mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-11 17:28:08 +00:00
refactor: rename Aster-prefixed universal types to clean names
- AsterOrder → Order - AsterAccountSnapshot → AccountSnapshot - AsterAccountPosition → AccountPosition - AsterAccountAsset → AccountAsset - AsterDepthLevel → DepthLevel - AsterDepth → Depth - AsterTicker → Ticker - AsterKline → Kline These types are the platform-agnostic contract used by all 8 exchanges, not Aster-specific. Renamed across 63 files.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { AsterOrder } from "../../exchanges/types";
|
||||
import type { Order } from "../../exchanges/types";
|
||||
|
||||
export interface OrderTarget {
|
||||
side: "BUY" | "SELL";
|
||||
@@ -8,11 +8,11 @@ export interface OrderTarget {
|
||||
}
|
||||
|
||||
export function makeOrderPlan(
|
||||
openOrders: AsterOrder[],
|
||||
openOrders: Order[],
|
||||
targets: OrderTarget[]
|
||||
): { toCancel: AsterOrder[]; toPlace: OrderTarget[] } {
|
||||
): { toCancel: Order[]; toPlace: OrderTarget[] } {
|
||||
const unmatched = new Set(targets.map((_, idx) => idx));
|
||||
const toCancel: AsterOrder[] = [];
|
||||
const toCancel: Order[] = [];
|
||||
|
||||
for (const order of openOrders) {
|
||||
const orderPrice = String(order.price);
|
||||
|
||||
Reference in New Issue
Block a user