@imbingox/acex 0.1.0 → 0.3.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/README.md +96 -285
  2. package/index.ts +1 -0
  3. package/package.json +40 -23
  4. package/src/adapters/binance/adapter.ts +80 -0
  5. package/src/adapters/binance/book-ticker.ts +123 -0
  6. package/src/adapters/binance/mark-price.ts +126 -0
  7. package/src/adapters/binance/market-catalog.ts +258 -0
  8. package/src/adapters/binance/private-adapter.ts +833 -0
  9. package/src/adapters/types.ts +219 -0
  10. package/src/client/context.ts +123 -0
  11. package/src/client/create-client.ts +6 -0
  12. package/src/client/private-subscription-coordinator.ts +512 -0
  13. package/src/client/runtime.ts +410 -0
  14. package/src/errors.ts +27 -0
  15. package/src/index.ts +5 -0
  16. package/src/internal/async-event-bus.ts +100 -0
  17. package/src/internal/filters.ts +117 -0
  18. package/src/internal/managed-websocket.ts +280 -0
  19. package/src/managers/account-manager.ts +609 -0
  20. package/src/managers/market-manager.ts +912 -0
  21. package/src/managers/order-manager.ts +685 -0
  22. package/src/types/account.ts +157 -0
  23. package/src/types/client.ts +79 -0
  24. package/src/types/index.ts +5 -0
  25. package/src/types/market.ts +152 -0
  26. package/src/types/order.ts +177 -0
  27. package/src/types/shared.ts +93 -0
  28. package/dist/adapters/binance/composite-adapter.d.ts +0 -116
  29. package/dist/adapters/binance/composite-adapter.js +0 -121
  30. package/dist/adapters/binance/market-types.d.ts +0 -63
  31. package/dist/adapters/binance/market-types.js +0 -1
  32. package/dist/adapters/binance/native-market-adapter.d.ts +0 -102
  33. package/dist/adapters/binance/native-market-adapter.js +0 -455
  34. package/dist/adapters/binance/normalizers.d.ts +0 -8
  35. package/dist/adapters/binance/normalizers.js +0 -123
  36. package/dist/adapters/binance/rest-client.d.ts +0 -17
  37. package/dist/adapters/binance/rest-client.js +0 -66
  38. package/dist/adapters/binance/symbol-router.d.ts +0 -9
  39. package/dist/adapters/binance/symbol-router.js +0 -174
  40. package/dist/adapters/binance/ws-client.d.ts +0 -24
  41. package/dist/adapters/binance/ws-client.js +0 -261
  42. package/dist/adapters/ccxt/aster-ccxt-adapter.d.ts +0 -157
  43. package/dist/adapters/ccxt/aster-ccxt-adapter.js +0 -272
  44. package/dist/adapters/ccxt/binance-usdm-ccxt-adapter.d.ts +0 -180
  45. package/dist/adapters/ccxt/binance-usdm-ccxt-adapter.js +0 -539
  46. package/dist/adapters/ccxt/binance-usdm-exchange.d.ts +0 -22
  47. package/dist/adapters/ccxt/binance-usdm-exchange.js +0 -23
  48. package/dist/adapters/fake/fake-aster-adapter.d.ts +0 -130
  49. package/dist/adapters/fake/fake-aster-adapter.js +0 -283
  50. package/dist/adapters/types.d.ts +0 -210
  51. package/dist/adapters/types.js +0 -1
  52. package/dist/core/client.d.ts +0 -50
  53. package/dist/core/client.js +0 -403
  54. package/dist/core/recovery.d.ts +0 -22
  55. package/dist/core/recovery.js +0 -18
  56. package/dist/core/runtime.d.ts +0 -26
  57. package/dist/core/runtime.js +0 -150
  58. package/dist/errors/acex-error.d.ts +0 -25
  59. package/dist/errors/acex-error.js +0 -54
  60. package/dist/index.d.ts +0 -6
  61. package/dist/index.js +0 -3
  62. package/dist/managers/account-manager.d.ts +0 -41
  63. package/dist/managers/account-manager.js +0 -80
  64. package/dist/managers/market-manager.d.ts +0 -16
  65. package/dist/managers/market-manager.js +0 -28
  66. package/dist/managers/order-manager.d.ts +0 -87
  67. package/dist/managers/order-manager.js +0 -122
  68. package/dist/runtime/async-queue.d.ts +0 -8
  69. package/dist/runtime/async-queue.js +0 -88
  70. package/dist/runtime/request-id.d.ts +0 -1
  71. package/dist/runtime/request-id.js +0 -5
  72. package/dist/runtime/ws-connection-supervisor.d.ts +0 -76
  73. package/dist/runtime/ws-connection-supervisor.js +0 -522
  74. package/dist/store/account-store.d.ts +0 -52
  75. package/dist/store/account-store.js +0 -18
  76. package/dist/store/health-store.d.ts +0 -16
  77. package/dist/store/health-store.js +0 -29
  78. package/dist/store/market-store.d.ts +0 -42
  79. package/dist/store/market-store.js +0 -51
  80. package/dist/store/order-store.d.ts +0 -38
  81. package/dist/store/order-store.js +0 -49
  82. package/dist/testing/create-fake-runtime.d.ts +0 -5
  83. package/dist/testing/create-fake-runtime.js +0 -7
  84. package/dist/types/public.d.ts +0 -5
  85. package/dist/types/public.js +0 -1
@@ -0,0 +1,123 @@
1
+ import { createManagedWebSocket } from "../../internal/managed-websocket.ts";
2
+ import type { BinanceMarketDefinition } from "./market-catalog.ts";
3
+
4
+ export interface BinanceL1BookUpdate {
5
+ bidPrice: string;
6
+ bidSize: string;
7
+ askPrice: string;
8
+ askSize: string;
9
+ exchangeTs?: number;
10
+ receivedAt: number;
11
+ }
12
+
13
+ export interface BinanceBookTickerSubscription {
14
+ readonly ready: Promise<void>;
15
+ close(): void;
16
+ }
17
+
18
+ export interface BinanceBookTickerCallbacks {
19
+ onBookTicker(update: BinanceL1BookUpdate): void;
20
+ onFreshnessChange(
21
+ freshness: "fresh" | "stale",
22
+ reason?: "heartbeat_timeout",
23
+ ): void;
24
+ onDisconnected(): void;
25
+ onError?(error: Error): void;
26
+ }
27
+
28
+ export interface BinanceBookTickerOptions {
29
+ initialMessageTimeoutMs: number;
30
+ staleAfterMs: number;
31
+ reconnectDelayMs: number;
32
+ reconnectMaxDelayMs: number;
33
+ now?: () => number;
34
+ }
35
+
36
+ interface BinanceBookTickerMessage {
37
+ b?: string;
38
+ B?: string;
39
+ a?: string;
40
+ A?: string;
41
+ T?: number;
42
+ }
43
+
44
+ const BINANCE_SPOT_WS_BASE_URL = "wss://stream.binance.com:9443/ws";
45
+ const BINANCE_USDM_WS_BASE_URL = "wss://fstream.binance.com/ws";
46
+ const BINANCE_COINM_WS_BASE_URL = "wss://dstream.binance.com/ws";
47
+
48
+ function getWsBaseUrl(market: BinanceMarketDefinition): string {
49
+ switch (market.family) {
50
+ case "spot":
51
+ return BINANCE_SPOT_WS_BASE_URL;
52
+ case "usdm":
53
+ return BINANCE_USDM_WS_BASE_URL;
54
+ case "coinm":
55
+ return BINANCE_COINM_WS_BASE_URL;
56
+ }
57
+ }
58
+
59
+ function buildBookTickerUrl(market: BinanceMarketDefinition): string {
60
+ return `${getWsBaseUrl(market)}/${market.id.toLowerCase()}@bookTicker`;
61
+ }
62
+
63
+ function parseBookTickerMessage(
64
+ data: string,
65
+ ): BinanceBookTickerMessage | undefined {
66
+ const parsed = JSON.parse(data) as BinanceBookTickerMessage;
67
+ if (!parsed.b || !parsed.B || !parsed.a || !parsed.A) {
68
+ return undefined;
69
+ }
70
+
71
+ return parsed;
72
+ }
73
+
74
+ export function subscribeBinanceBookTicker(
75
+ market: BinanceMarketDefinition,
76
+ callbacks: BinanceBookTickerCallbacks,
77
+ options: BinanceBookTickerOptions,
78
+ ): BinanceBookTickerSubscription {
79
+ const session = createManagedWebSocket<BinanceBookTickerMessage>({
80
+ url: buildBookTickerUrl(market),
81
+ initialMessageTimeoutMs: options.initialMessageTimeoutMs,
82
+ now: options.now,
83
+ messageWatchdog: {
84
+ staleAfterMs: options.staleAfterMs,
85
+ onStale() {
86
+ callbacks.onFreshnessChange("stale", "heartbeat_timeout");
87
+ },
88
+ },
89
+ reconnect: {
90
+ initialDelayMs: options.reconnectDelayMs,
91
+ maxDelayMs: options.reconnectMaxDelayMs,
92
+ },
93
+ parseMessage: parseBookTickerMessage,
94
+ onMessage(message, receivedAt) {
95
+ if (!message.b || !message.B || !message.a || !message.A) {
96
+ return;
97
+ }
98
+
99
+ callbacks.onBookTicker({
100
+ bidPrice: message.b,
101
+ bidSize: message.B,
102
+ askPrice: message.a,
103
+ askSize: message.A,
104
+ exchangeTs: message.T,
105
+ receivedAt,
106
+ });
107
+ callbacks.onFreshnessChange("fresh");
108
+ },
109
+ onUnexpectedClose() {
110
+ callbacks.onDisconnected();
111
+ },
112
+ onError() {
113
+ callbacks.onError?.(new Error(`WebSocket error for ${market.symbol}`));
114
+ },
115
+ });
116
+
117
+ return {
118
+ ready: session.ready,
119
+ close() {
120
+ session.close();
121
+ },
122
+ };
123
+ }
@@ -0,0 +1,126 @@
1
+ import { createManagedWebSocket } from "../../internal/managed-websocket.ts";
2
+ import type { BinanceMarketDefinition } from "./market-catalog.ts";
3
+
4
+ export interface BinanceFundingRateUpdate {
5
+ fundingRate: string;
6
+ nextFundingTime?: number;
7
+ markPrice?: string;
8
+ indexPrice?: string;
9
+ exchangeTs?: number;
10
+ receivedAt: number;
11
+ }
12
+
13
+ export interface BinanceMarkPriceSubscription {
14
+ readonly ready: Promise<void>;
15
+ close(): void;
16
+ }
17
+
18
+ export interface BinanceMarkPriceCallbacks {
19
+ onFundingRate(update: BinanceFundingRateUpdate): void;
20
+ onFreshnessChange(
21
+ freshness: "fresh" | "stale",
22
+ reason?: "heartbeat_timeout",
23
+ ): void;
24
+ onDisconnected(): void;
25
+ onError?(error: Error): void;
26
+ }
27
+
28
+ export interface BinanceMarkPriceOptions {
29
+ initialMessageTimeoutMs: number;
30
+ staleAfterMs: number;
31
+ reconnectDelayMs: number;
32
+ reconnectMaxDelayMs: number;
33
+ now?: () => number;
34
+ }
35
+
36
+ interface BinanceMarkPriceMessage {
37
+ e?: string;
38
+ E?: number;
39
+ s?: string;
40
+ p?: string;
41
+ i?: string;
42
+ r?: string;
43
+ T?: number;
44
+ }
45
+
46
+ const BINANCE_USDM_MARKET_WS_BASE_URL = "wss://fstream.binance.com/market/ws";
47
+ const BINANCE_COINM_WS_BASE_URL = "wss://dstream.binance.com/ws";
48
+
49
+ function getWsBaseUrl(market: BinanceMarketDefinition): string {
50
+ switch (market.family) {
51
+ case "usdm":
52
+ return BINANCE_USDM_MARKET_WS_BASE_URL;
53
+ case "coinm":
54
+ return BINANCE_COINM_WS_BASE_URL;
55
+ case "spot":
56
+ throw new Error(
57
+ `Funding rate is not supported for spot market: ${market.symbol}`,
58
+ );
59
+ }
60
+ }
61
+
62
+ function buildMarkPriceUrl(market: BinanceMarketDefinition): string {
63
+ return `${getWsBaseUrl(market)}/${market.id.toLowerCase()}@markPrice`;
64
+ }
65
+
66
+ function parseMarkPriceMessage(
67
+ data: string,
68
+ ): BinanceMarkPriceMessage | undefined {
69
+ const parsed = JSON.parse(data) as BinanceMarkPriceMessage;
70
+ if (!parsed.r) {
71
+ return undefined;
72
+ }
73
+
74
+ return parsed;
75
+ }
76
+
77
+ export function subscribeBinanceMarkPrice(
78
+ market: BinanceMarketDefinition,
79
+ callbacks: BinanceMarkPriceCallbacks,
80
+ options: BinanceMarkPriceOptions,
81
+ ): BinanceMarkPriceSubscription {
82
+ const session = createManagedWebSocket<BinanceMarkPriceMessage>({
83
+ url: buildMarkPriceUrl(market),
84
+ initialMessageTimeoutMs: options.initialMessageTimeoutMs,
85
+ now: options.now,
86
+ messageWatchdog: {
87
+ staleAfterMs: options.staleAfterMs,
88
+ onStale() {
89
+ callbacks.onFreshnessChange("stale", "heartbeat_timeout");
90
+ },
91
+ },
92
+ reconnect: {
93
+ initialDelayMs: options.reconnectDelayMs,
94
+ maxDelayMs: options.reconnectMaxDelayMs,
95
+ },
96
+ parseMessage: parseMarkPriceMessage,
97
+ onMessage(message, receivedAt) {
98
+ if (!message.r) {
99
+ return;
100
+ }
101
+
102
+ callbacks.onFundingRate({
103
+ fundingRate: message.r,
104
+ nextFundingTime: message.T,
105
+ markPrice: message.p,
106
+ indexPrice: message.i,
107
+ exchangeTs: message.E,
108
+ receivedAt,
109
+ });
110
+ callbacks.onFreshnessChange("fresh");
111
+ },
112
+ onUnexpectedClose() {
113
+ callbacks.onDisconnected();
114
+ },
115
+ onError() {
116
+ callbacks.onError?.(new Error(`WebSocket error for ${market.symbol}`));
117
+ },
118
+ });
119
+
120
+ return {
121
+ ready: session.ready,
122
+ close() {
123
+ session.close();
124
+ },
125
+ };
126
+ }
@@ -0,0 +1,258 @@
1
+ import BigNumber from "bignumber.js";
2
+ import type { MarketDefinition, MarketType } from "../../types/index.ts";
3
+
4
+ type FetchLike = typeof fetch;
5
+
6
+ export type BinanceMarketFamily = "spot" | "usdm" | "coinm";
7
+
8
+ export interface BinanceMarketDefinition extends MarketDefinition {
9
+ family: BinanceMarketFamily;
10
+ }
11
+
12
+ interface BinanceSymbolFilter {
13
+ filterType?: string;
14
+ tickSize?: string;
15
+ stepSize?: string;
16
+ minQty?: string;
17
+ minNotional?: string;
18
+ notional?: string;
19
+ }
20
+
21
+ interface BinanceSpotSymbolInfo {
22
+ symbol: string;
23
+ status: string;
24
+ baseAsset: string;
25
+ quoteAsset: string;
26
+ filters?: BinanceSymbolFilter[];
27
+ }
28
+
29
+ interface BinanceSpotExchangeInfo {
30
+ symbols?: BinanceSpotSymbolInfo[];
31
+ }
32
+
33
+ interface BinanceDerivativesSymbolInfo {
34
+ symbol: string;
35
+ status: string;
36
+ contractType?: string;
37
+ deliveryDate?: number;
38
+ baseAsset: string;
39
+ quoteAsset: string;
40
+ marginAsset?: string;
41
+ pricePrecision?: number;
42
+ quantityPrecision?: number;
43
+ contractSize?: number | string;
44
+ filters?: BinanceSymbolFilter[];
45
+ }
46
+
47
+ interface BinanceDerivativesExchangeInfo {
48
+ symbols?: BinanceDerivativesSymbolInfo[];
49
+ }
50
+
51
+ const BINANCE_SPOT_EXCHANGE_INFO_URL =
52
+ "https://api.binance.com/api/v3/exchangeInfo";
53
+ const BINANCE_USDM_EXCHANGE_INFO_URL =
54
+ "https://fapi.binance.com/fapi/v1/exchangeInfo";
55
+ const BINANCE_COINM_EXCHANGE_INFO_URL =
56
+ "https://dapi.binance.com/dapi/v1/exchangeInfo";
57
+
58
+ function toRecord(value: unknown): Record<string, unknown> {
59
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
60
+ return {};
61
+ }
62
+
63
+ return value as Record<string, unknown>;
64
+ }
65
+
66
+ function getFilter(
67
+ filters: BinanceSymbolFilter[] | undefined,
68
+ filterType: string,
69
+ ): BinanceSymbolFilter | undefined {
70
+ return filters?.find((filter) => filter.filterType === filterType);
71
+ }
72
+
73
+ function normalizeStep(step: string | undefined, fallback = "1"): string {
74
+ return step && step.length > 0 ? step : fallback;
75
+ }
76
+
77
+ function precisionFromStep(step: string): number {
78
+ const normalized = step.replace(/0+$/, "");
79
+ const dotIndex = normalized.indexOf(".");
80
+ if (dotIndex === -1) {
81
+ return 0;
82
+ }
83
+
84
+ return normalized.length - dotIndex - 1;
85
+ }
86
+
87
+ function formatExpiry(expiry: number): string {
88
+ const date = new Date(expiry);
89
+ const year = date.getUTCFullYear();
90
+ const month = `${date.getUTCMonth() + 1}`.padStart(2, "0");
91
+ const day = `${date.getUTCDate()}`.padStart(2, "0");
92
+ return `${year}${month}${day}`;
93
+ }
94
+
95
+ function inferContractType(
96
+ contractType: string | undefined,
97
+ deliveryDate: number | undefined,
98
+ ): MarketType {
99
+ if (contractType === "PERPETUAL") {
100
+ return "swap";
101
+ }
102
+
103
+ if (deliveryDate && Number.isFinite(deliveryDate) && deliveryDate > 0) {
104
+ return "future";
105
+ }
106
+
107
+ return "swap";
108
+ }
109
+
110
+ function buildFuturesSymbol(
111
+ base: string,
112
+ quote: string,
113
+ settle: string,
114
+ type: MarketType,
115
+ expiry: number | undefined,
116
+ ): string {
117
+ const prefix = `${base}/${quote}:${settle}`;
118
+ if (type !== "future" || !expiry) {
119
+ return prefix;
120
+ }
121
+
122
+ return `${prefix}-${formatExpiry(expiry)}`;
123
+ }
124
+
125
+ function normalizeSpotSymbol(
126
+ symbol: BinanceSpotSymbolInfo,
127
+ ): BinanceMarketDefinition {
128
+ const priceFilter = getFilter(symbol.filters, "PRICE_FILTER");
129
+ const lotSizeFilter = getFilter(symbol.filters, "LOT_SIZE");
130
+ const notionalFilter =
131
+ getFilter(symbol.filters, "NOTIONAL") ??
132
+ getFilter(symbol.filters, "MIN_NOTIONAL");
133
+ const priceStep = normalizeStep(priceFilter?.tickSize);
134
+ const amountStep = normalizeStep(lotSizeFilter?.stepSize);
135
+ const notionalValue = notionalFilter?.minNotional ?? notionalFilter?.notional;
136
+
137
+ return {
138
+ exchange: "binance",
139
+ family: "spot",
140
+ symbol: `${symbol.baseAsset}/${symbol.quoteAsset}`,
141
+ id: symbol.symbol,
142
+ type: "spot",
143
+ base: symbol.baseAsset,
144
+ quote: symbol.quoteAsset,
145
+ active: symbol.status === "TRADING",
146
+ contract: false,
147
+ pricePrecision: precisionFromStep(priceStep),
148
+ amountPrecision: precisionFromStep(amountStep),
149
+ priceStep: new BigNumber(priceStep),
150
+ amountStep: new BigNumber(amountStep),
151
+ minAmount: lotSizeFilter?.minQty
152
+ ? new BigNumber(lotSizeFilter.minQty)
153
+ : undefined,
154
+ minNotional: notionalValue ? new BigNumber(notionalValue) : undefined,
155
+ raw: toRecord(symbol),
156
+ };
157
+ }
158
+
159
+ function normalizeDerivativesSymbol(
160
+ symbol: BinanceDerivativesSymbolInfo,
161
+ family: BinanceMarketFamily,
162
+ ): BinanceMarketDefinition {
163
+ const priceFilter = getFilter(symbol.filters, "PRICE_FILTER");
164
+ const lotSizeFilter = getFilter(symbol.filters, "LOT_SIZE");
165
+ const notionalFilter =
166
+ getFilter(symbol.filters, "NOTIONAL") ??
167
+ getFilter(symbol.filters, "MIN_NOTIONAL");
168
+ const priceStep = normalizeStep(priceFilter?.tickSize);
169
+ const amountStep = normalizeStep(lotSizeFilter?.stepSize);
170
+ const type = inferContractType(symbol.contractType, symbol.deliveryDate);
171
+ const settle =
172
+ symbol.marginAsset ??
173
+ (family === "usdm" ? symbol.quoteAsset : symbol.baseAsset);
174
+ const contractSize =
175
+ symbol.contractSize !== undefined
176
+ ? `${symbol.contractSize}`
177
+ : family === "usdm"
178
+ ? "1"
179
+ : undefined;
180
+ const notionalValue = notionalFilter?.minNotional ?? notionalFilter?.notional;
181
+
182
+ return {
183
+ exchange: "binance",
184
+ family,
185
+ symbol: buildFuturesSymbol(
186
+ symbol.baseAsset,
187
+ symbol.quoteAsset,
188
+ settle,
189
+ type,
190
+ type === "future" ? symbol.deliveryDate : undefined,
191
+ ),
192
+ id: symbol.symbol,
193
+ type,
194
+ base: symbol.baseAsset,
195
+ quote: symbol.quoteAsset,
196
+ settle,
197
+ active: symbol.status === "TRADING",
198
+ contract: true,
199
+ linear: family === "usdm",
200
+ inverse: family === "coinm",
201
+ contractSize: contractSize ? new BigNumber(contractSize) : undefined,
202
+ pricePrecision: precisionFromStep(priceStep),
203
+ amountPrecision: precisionFromStep(amountStep),
204
+ priceStep: new BigNumber(priceStep),
205
+ amountStep: new BigNumber(amountStep),
206
+ minAmount: lotSizeFilter?.minQty
207
+ ? new BigNumber(lotSizeFilter.minQty)
208
+ : undefined,
209
+ minNotional: notionalValue ? new BigNumber(notionalValue) : undefined,
210
+ expiry: type === "future" ? symbol.deliveryDate : undefined,
211
+ raw: toRecord(symbol),
212
+ };
213
+ }
214
+
215
+ async function fetchJson<T>(fetchFn: FetchLike, url: string): Promise<T> {
216
+ const response = await fetchFn(url);
217
+ if (!response.ok) {
218
+ throw new Error(
219
+ `Binance request failed: ${response.status} ${response.statusText}`,
220
+ );
221
+ }
222
+
223
+ return (await response.json()) as T;
224
+ }
225
+
226
+ function sortMarkets(
227
+ markets: BinanceMarketDefinition[],
228
+ ): BinanceMarketDefinition[] {
229
+ return [...markets].sort((left, right) =>
230
+ left.symbol.localeCompare(right.symbol),
231
+ );
232
+ }
233
+
234
+ export async function loadBinanceMarkets(
235
+ fetchFn: FetchLike = fetch,
236
+ ): Promise<BinanceMarketDefinition[]> {
237
+ const [spot, usdm, coinm] = await Promise.all([
238
+ fetchJson<BinanceSpotExchangeInfo>(fetchFn, BINANCE_SPOT_EXCHANGE_INFO_URL),
239
+ fetchJson<BinanceDerivativesExchangeInfo>(
240
+ fetchFn,
241
+ BINANCE_USDM_EXCHANGE_INFO_URL,
242
+ ),
243
+ fetchJson<BinanceDerivativesExchangeInfo>(
244
+ fetchFn,
245
+ BINANCE_COINM_EXCHANGE_INFO_URL,
246
+ ),
247
+ ]);
248
+
249
+ return sortMarkets([
250
+ ...(spot.symbols ?? []).map(normalizeSpotSymbol),
251
+ ...(usdm.symbols ?? []).map((symbol) =>
252
+ normalizeDerivativesSymbol(symbol, "usdm"),
253
+ ),
254
+ ...(coinm.symbols ?? []).map((symbol) =>
255
+ normalizeDerivativesSymbol(symbol, "coinm"),
256
+ ),
257
+ ]);
258
+ }