mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-11 01:08:07 +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,8 +1,8 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { computeBollingerBandwidth, getPosition, getSMA } from "../src/utils/strategy";
|
||||
import type { AsterAccountSnapshot, AsterKline } from "../src/exchanges/types";
|
||||
import type { AccountSnapshot, Kline } from "../src/exchanges/types";
|
||||
|
||||
const mockSnapshot = (positions: Array<{ symbol: string; amt: number; entry: number; pnl: number }> = []): AsterAccountSnapshot => ({
|
||||
const mockSnapshot = (positions: Array<{ symbol: string; amt: number; entry: number; pnl: number }> = []): AccountSnapshot => ({
|
||||
canTrade: true,
|
||||
canDeposit: true,
|
||||
canWithdraw: true,
|
||||
@@ -20,7 +20,7 @@ const mockSnapshot = (positions: Array<{ symbol: string; amt: number; entry: num
|
||||
assets: [],
|
||||
});
|
||||
|
||||
const mockKlines = (values: number[]): AsterKline[] =>
|
||||
const mockKlines = (values: number[]): Kline[] =>
|
||||
values.map((value, index) => ({
|
||||
openTime: index,
|
||||
open: String(value),
|
||||
|
||||
Reference in New Issue
Block a user