@reyaxyz/api-v2-sdk 0.301.4 → 0.301.6
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.
- package/dist/index.js.map +1 -1
- package/dist/rest/apis/MarketDataApi.js +99 -1
- package/dist/rest/apis/MarketDataApi.js.map +1 -1
- package/dist/rest/apis/OrderEntryApi.js +47 -1
- package/dist/rest/apis/OrderEntryApi.js.map +1 -1
- package/dist/rest/apis/ReferenceDataApi.js +42 -1
- package/dist/rest/apis/ReferenceDataApi.js.map +1 -1
- package/dist/rest/apis/SpecsApi.js +1 -1
- package/dist/rest/apis/SpecsApi.js.map +1 -1
- package/dist/rest/apis/WalletDataApi.js +1 -1
- package/dist/rest/apis/WalletDataApi.js.map +1 -1
- package/dist/rest/models/index.js +32 -2
- package/dist/rest/models/index.js.map +1 -1
- package/dist/rest/runtime.js +1 -1
- package/dist/rest/runtime.js.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/rest/apis/MarketDataApi.d.ts +30 -2
- package/dist/types/rest/apis/MarketDataApi.d.ts.map +1 -1
- package/dist/types/rest/apis/OrderEntryApi.d.ts +15 -2
- package/dist/types/rest/apis/OrderEntryApi.d.ts.map +1 -1
- package/dist/types/rest/apis/ReferenceDataApi.d.ts +10 -2
- package/dist/types/rest/apis/ReferenceDataApi.d.ts.map +1 -1
- package/dist/types/rest/apis/SpecsApi.d.ts +1 -1
- package/dist/types/rest/apis/WalletDataApi.d.ts +1 -1
- package/dist/types/rest/models/index.d.ts +373 -98
- package/dist/types/rest/models/index.d.ts.map +1 -1
- package/dist/types/rest/runtime.d.ts +1 -1
- package/dist/types/websocket/types.d.ts +61 -0
- package/dist/types/websocket/types.d.ts.map +1 -1
- package/dist/websocket/types.js.map +1 -1
- package/package.json +2 -2
- package/rest/apis/MarketDataApi.ts +85 -1
- package/rest/apis/OrderEntryApi.ts +38 -1
- package/rest/apis/ReferenceDataApi.ts +28 -1
- package/rest/apis/SpecsApi.ts +1 -1
- package/rest/apis/WalletDataApi.ts +1 -1
- package/rest/models/index.ts +381 -99
- package/rest/runtime.ts +1 -1
- package/websocket/types.ts +70 -0
package/rest/models/index.ts
CHANGED
|
@@ -20,7 +20,13 @@ export interface Account {
|
|
|
20
20
|
*/
|
|
21
21
|
name: string;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
*
|
|
24
|
+
* @type {AccountType}
|
|
25
|
+
* @memberof Account
|
|
26
|
+
*/
|
|
27
|
+
type: AccountType;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
24
30
|
* @type {number}
|
|
25
31
|
* @memberof Account
|
|
26
32
|
*/
|
|
@@ -46,12 +52,30 @@ export interface AccountBalance {
|
|
|
46
52
|
*/
|
|
47
53
|
asset: string;
|
|
48
54
|
/**
|
|
49
|
-
*
|
|
55
|
+
*
|
|
50
56
|
* @type {string}
|
|
51
57
|
* @memberof AccountBalance
|
|
52
58
|
*/
|
|
53
59
|
realBalance: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof AccountBalance
|
|
64
|
+
*/
|
|
65
|
+
balanceDEPRECATED: string;
|
|
54
66
|
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* SPOT = account that can only trade spot, MAINPERP = main perp account, SUBPERP = sub perp account
|
|
70
|
+
* @export
|
|
71
|
+
*/
|
|
72
|
+
export const AccountType = {
|
|
73
|
+
MAINPERP: 'MAINPERP',
|
|
74
|
+
SUBPERP: 'SUBPERP',
|
|
75
|
+
SPOT: 'SPOT'
|
|
76
|
+
} as const;
|
|
77
|
+
export type AccountType = typeof AccountType[keyof typeof AccountType];
|
|
78
|
+
|
|
55
79
|
/**
|
|
56
80
|
*
|
|
57
81
|
* @export
|
|
@@ -66,30 +90,59 @@ export interface AssetDefinition {
|
|
|
66
90
|
*/
|
|
67
91
|
asset: string;
|
|
68
92
|
/**
|
|
69
|
-
* Trading symbol (e.g., BTCRUSDPERP,
|
|
93
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
70
94
|
* @type {string}
|
|
71
95
|
* @memberof AssetDefinition
|
|
72
96
|
*/
|
|
73
97
|
spotMarketSymbol: string;
|
|
74
98
|
/**
|
|
75
|
-
*
|
|
99
|
+
*
|
|
76
100
|
* @type {string}
|
|
77
101
|
* @memberof AssetDefinition
|
|
78
102
|
*/
|
|
79
103
|
priceHaircut: string;
|
|
80
104
|
/**
|
|
81
|
-
*
|
|
105
|
+
*
|
|
82
106
|
* @type {string}
|
|
83
107
|
* @memberof AssetDefinition
|
|
84
108
|
*/
|
|
85
109
|
liquidationDiscount: string;
|
|
86
110
|
/**
|
|
87
|
-
*
|
|
111
|
+
*
|
|
88
112
|
* @type {number}
|
|
89
113
|
* @memberof AssetDefinition
|
|
90
114
|
*/
|
|
91
115
|
timestamp: number;
|
|
116
|
+
/**
|
|
117
|
+
* Status of asset (ENABLED = deposits and withdrawals allowed, WITHDRAWAL_ONLY = only withdrawals allowed)
|
|
118
|
+
* @type {string}
|
|
119
|
+
* @memberof AssetDefinition
|
|
120
|
+
*/
|
|
121
|
+
status: AssetDefinitionStatusEnum;
|
|
122
|
+
/**
|
|
123
|
+
*
|
|
124
|
+
* @type {number}
|
|
125
|
+
* @memberof AssetDefinition
|
|
126
|
+
*/
|
|
127
|
+
decimals: number;
|
|
128
|
+
/**
|
|
129
|
+
*
|
|
130
|
+
* @type {number}
|
|
131
|
+
* @memberof AssetDefinition
|
|
132
|
+
*/
|
|
133
|
+
displayDecimals: number;
|
|
92
134
|
}
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @export
|
|
139
|
+
*/
|
|
140
|
+
export const AssetDefinitionStatusEnum = {
|
|
141
|
+
ENABLED: 'ENABLED',
|
|
142
|
+
WITHDRAWAL_ONLY: 'WITHDRAWAL_ONLY'
|
|
143
|
+
} as const;
|
|
144
|
+
export type AssetDefinitionStatusEnum = typeof AssetDefinitionStatusEnum[keyof typeof AssetDefinitionStatusEnum];
|
|
145
|
+
|
|
93
146
|
/**
|
|
94
147
|
*
|
|
95
148
|
* @export
|
|
@@ -98,17 +151,47 @@ export interface AssetDefinition {
|
|
|
98
151
|
export interface CancelOrderRequest {
|
|
99
152
|
[key: string]: any | any;
|
|
100
153
|
/**
|
|
101
|
-
*
|
|
154
|
+
* Internal matching engine order ID to cancel. Provide either orderId OR clientOrderId, not both. For spot markets, this is the order ID returned in the CreateOrderResponse.
|
|
102
155
|
* @type {string}
|
|
103
156
|
* @memberof CancelOrderRequest
|
|
104
157
|
*/
|
|
105
|
-
orderId
|
|
158
|
+
orderId?: string;
|
|
159
|
+
/**
|
|
160
|
+
*
|
|
161
|
+
* @type {number}
|
|
162
|
+
* @memberof CancelOrderRequest
|
|
163
|
+
*/
|
|
164
|
+
clientOrderId?: number;
|
|
165
|
+
/**
|
|
166
|
+
*
|
|
167
|
+
* @type {number}
|
|
168
|
+
* @memberof CancelOrderRequest
|
|
169
|
+
*/
|
|
170
|
+
accountId?: number;
|
|
171
|
+
/**
|
|
172
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
173
|
+
* @type {string}
|
|
174
|
+
* @memberof CancelOrderRequest
|
|
175
|
+
*/
|
|
176
|
+
symbol?: string;
|
|
106
177
|
/**
|
|
107
178
|
* See signatures section for more details on how to generate.
|
|
108
179
|
* @type {string}
|
|
109
180
|
* @memberof CancelOrderRequest
|
|
110
181
|
*/
|
|
111
182
|
signature: string;
|
|
183
|
+
/**
|
|
184
|
+
* See signatures and nonces section for more details. Compulsory for spot orders.
|
|
185
|
+
* @type {string}
|
|
186
|
+
* @memberof CancelOrderRequest
|
|
187
|
+
*/
|
|
188
|
+
nonce?: string;
|
|
189
|
+
/**
|
|
190
|
+
*
|
|
191
|
+
* @type {number}
|
|
192
|
+
* @memberof CancelOrderRequest
|
|
193
|
+
*/
|
|
194
|
+
expiresAfter?: number;
|
|
112
195
|
}
|
|
113
196
|
/**
|
|
114
197
|
*
|
|
@@ -129,6 +212,12 @@ export interface CancelOrderResponse {
|
|
|
129
212
|
* @memberof CancelOrderResponse
|
|
130
213
|
*/
|
|
131
214
|
orderId: string;
|
|
215
|
+
/**
|
|
216
|
+
* Client-provided order ID echoed back from the request
|
|
217
|
+
* @type {number}
|
|
218
|
+
* @memberof CancelOrderResponse
|
|
219
|
+
*/
|
|
220
|
+
clientOrderId?: number;
|
|
132
221
|
}
|
|
133
222
|
/**
|
|
134
223
|
*
|
|
@@ -182,7 +271,7 @@ export interface CreateOrderRequest {
|
|
|
182
271
|
*/
|
|
183
272
|
exchangeId: number;
|
|
184
273
|
/**
|
|
185
|
-
* Trading symbol (e.g., BTCRUSDPERP,
|
|
274
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
186
275
|
* @type {string}
|
|
187
276
|
* @memberof CreateOrderRequest
|
|
188
277
|
*/
|
|
@@ -224,7 +313,7 @@ export interface CreateOrderRequest {
|
|
|
224
313
|
*/
|
|
225
314
|
timeInForce?: TimeInForce;
|
|
226
315
|
/**
|
|
227
|
-
*
|
|
316
|
+
*
|
|
228
317
|
* @type {string}
|
|
229
318
|
* @memberof CreateOrderRequest
|
|
230
319
|
*/
|
|
@@ -248,17 +337,23 @@ export interface CreateOrderRequest {
|
|
|
248
337
|
*/
|
|
249
338
|
nonce: string;
|
|
250
339
|
/**
|
|
251
|
-
*
|
|
340
|
+
*
|
|
252
341
|
* @type {string}
|
|
253
342
|
* @memberof CreateOrderRequest
|
|
254
343
|
*/
|
|
255
344
|
signerWallet: string;
|
|
256
345
|
/**
|
|
257
|
-
*
|
|
346
|
+
*
|
|
258
347
|
* @type {number}
|
|
259
348
|
* @memberof CreateOrderRequest
|
|
260
349
|
*/
|
|
261
350
|
expiresAfter?: number;
|
|
351
|
+
/**
|
|
352
|
+
*
|
|
353
|
+
* @type {number}
|
|
354
|
+
* @memberof CreateOrderRequest
|
|
355
|
+
*/
|
|
356
|
+
clientOrderId?: number;
|
|
262
357
|
}
|
|
263
358
|
/**
|
|
264
359
|
*
|
|
@@ -273,14 +368,81 @@ export interface CreateOrderResponse {
|
|
|
273
368
|
* @memberof CreateOrderResponse
|
|
274
369
|
*/
|
|
275
370
|
status: OrderStatus;
|
|
371
|
+
/**
|
|
372
|
+
*
|
|
373
|
+
* @type {string}
|
|
374
|
+
* @memberof CreateOrderResponse
|
|
375
|
+
*/
|
|
376
|
+
execQty?: string;
|
|
377
|
+
/**
|
|
378
|
+
*
|
|
379
|
+
* @type {string}
|
|
380
|
+
* @memberof CreateOrderResponse
|
|
381
|
+
*/
|
|
382
|
+
cumQty?: string;
|
|
276
383
|
/**
|
|
277
384
|
* Created order ID (currently generated for all order types except IOC)
|
|
278
385
|
* @type {string}
|
|
279
386
|
* @memberof CreateOrderResponse
|
|
280
387
|
*/
|
|
281
388
|
orderId?: string;
|
|
389
|
+
/**
|
|
390
|
+
*
|
|
391
|
+
* @type {number}
|
|
392
|
+
* @memberof CreateOrderResponse
|
|
393
|
+
*/
|
|
394
|
+
clientOrderId?: number;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
*
|
|
398
|
+
* @export
|
|
399
|
+
* @interface Depth
|
|
400
|
+
*/
|
|
401
|
+
export interface Depth {
|
|
402
|
+
[key: string]: any | any;
|
|
403
|
+
/**
|
|
404
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
405
|
+
* @type {string}
|
|
406
|
+
* @memberof Depth
|
|
407
|
+
*/
|
|
408
|
+
symbol: string;
|
|
409
|
+
/**
|
|
410
|
+
*
|
|
411
|
+
* @type {DepthType}
|
|
412
|
+
* @memberof Depth
|
|
413
|
+
*/
|
|
414
|
+
type: DepthType;
|
|
415
|
+
/**
|
|
416
|
+
* Bid side levels aggregated by price, sorted descending by price
|
|
417
|
+
* @type {Array<Level>}
|
|
418
|
+
* @memberof Depth
|
|
419
|
+
*/
|
|
420
|
+
bids: Array<Level>;
|
|
421
|
+
/**
|
|
422
|
+
* Ask side levels aggregated by price, sorted ascending by price
|
|
423
|
+
* @type {Array<Level>}
|
|
424
|
+
* @memberof Depth
|
|
425
|
+
*/
|
|
426
|
+
asks: Array<Level>;
|
|
427
|
+
/**
|
|
428
|
+
*
|
|
429
|
+
* @type {number}
|
|
430
|
+
* @memberof Depth
|
|
431
|
+
*/
|
|
432
|
+
updatedAt: number;
|
|
282
433
|
}
|
|
283
434
|
|
|
435
|
+
/**
|
|
436
|
+
* Depth message type (SNAPSHOT = full book, UPDATE = single level change)
|
|
437
|
+
* @export
|
|
438
|
+
*/
|
|
439
|
+
export const DepthType = {
|
|
440
|
+
SNAPSHOT: 'SNAPSHOT',
|
|
441
|
+
UPDATE: 'UPDATE'
|
|
442
|
+
} as const;
|
|
443
|
+
export type DepthType = typeof DepthType[keyof typeof DepthType];
|
|
444
|
+
|
|
445
|
+
|
|
284
446
|
/**
|
|
285
447
|
* Type of execution
|
|
286
448
|
* @export
|
|
@@ -306,19 +468,19 @@ export interface FeeTierParameters {
|
|
|
306
468
|
*/
|
|
307
469
|
tierId: number;
|
|
308
470
|
/**
|
|
309
|
-
*
|
|
471
|
+
*
|
|
310
472
|
* @type {string}
|
|
311
473
|
* @memberof FeeTierParameters
|
|
312
474
|
*/
|
|
313
475
|
takerFee: string;
|
|
314
476
|
/**
|
|
315
|
-
*
|
|
477
|
+
*
|
|
316
478
|
* @type {string}
|
|
317
479
|
* @memberof FeeTierParameters
|
|
318
480
|
*/
|
|
319
481
|
makerFee: string;
|
|
320
482
|
/**
|
|
321
|
-
*
|
|
483
|
+
*
|
|
322
484
|
* @type {string}
|
|
323
485
|
* @memberof FeeTierParameters
|
|
324
486
|
*/
|
|
@@ -338,30 +500,50 @@ export interface FeeTierParameters {
|
|
|
338
500
|
export interface GlobalFeeParameters {
|
|
339
501
|
[key: string]: any | any;
|
|
340
502
|
/**
|
|
341
|
-
*
|
|
503
|
+
*
|
|
342
504
|
* @type {string}
|
|
343
505
|
* @memberof GlobalFeeParameters
|
|
344
506
|
*/
|
|
345
507
|
ogDiscount: string;
|
|
346
508
|
/**
|
|
347
|
-
*
|
|
509
|
+
*
|
|
348
510
|
* @type {string}
|
|
349
511
|
* @memberof GlobalFeeParameters
|
|
350
512
|
*/
|
|
351
513
|
refereeDiscount: string;
|
|
352
514
|
/**
|
|
353
|
-
*
|
|
515
|
+
*
|
|
354
516
|
* @type {string}
|
|
355
517
|
* @memberof GlobalFeeParameters
|
|
356
518
|
*/
|
|
357
519
|
referrerRebate: string;
|
|
358
520
|
/**
|
|
359
|
-
*
|
|
521
|
+
*
|
|
360
522
|
* @type {string}
|
|
361
523
|
* @memberof GlobalFeeParameters
|
|
362
524
|
*/
|
|
363
525
|
affiliateReferrerRebate: string;
|
|
364
526
|
}
|
|
527
|
+
/**
|
|
528
|
+
*
|
|
529
|
+
* @export
|
|
530
|
+
* @interface Level
|
|
531
|
+
*/
|
|
532
|
+
export interface Level {
|
|
533
|
+
[key: string]: any | any;
|
|
534
|
+
/**
|
|
535
|
+
*
|
|
536
|
+
* @type {string}
|
|
537
|
+
* @memberof Level
|
|
538
|
+
*/
|
|
539
|
+
px: string;
|
|
540
|
+
/**
|
|
541
|
+
*
|
|
542
|
+
* @type {string}
|
|
543
|
+
* @memberof Level
|
|
544
|
+
*/
|
|
545
|
+
qty: string;
|
|
546
|
+
}
|
|
365
547
|
/**
|
|
366
548
|
*
|
|
367
549
|
* @export
|
|
@@ -370,19 +552,19 @@ export interface GlobalFeeParameters {
|
|
|
370
552
|
export interface LiquidityParameters {
|
|
371
553
|
[key: string]: any | any;
|
|
372
554
|
/**
|
|
373
|
-
* Trading symbol (e.g., BTCRUSDPERP,
|
|
555
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
374
556
|
* @type {string}
|
|
375
557
|
* @memberof LiquidityParameters
|
|
376
558
|
*/
|
|
377
559
|
symbol: string;
|
|
378
560
|
/**
|
|
379
|
-
*
|
|
561
|
+
*
|
|
380
562
|
* @type {string}
|
|
381
563
|
* @memberof LiquidityParameters
|
|
382
564
|
*/
|
|
383
565
|
depth: string;
|
|
384
566
|
/**
|
|
385
|
-
*
|
|
567
|
+
*
|
|
386
568
|
* @type {string}
|
|
387
569
|
* @memberof LiquidityParameters
|
|
388
570
|
*/
|
|
@@ -396,13 +578,13 @@ export interface LiquidityParameters {
|
|
|
396
578
|
export interface MarketDefinition {
|
|
397
579
|
[key: string]: any | any;
|
|
398
580
|
/**
|
|
399
|
-
* Trading symbol (e.g., BTCRUSDPERP,
|
|
581
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
400
582
|
* @type {string}
|
|
401
583
|
* @memberof MarketDefinition
|
|
402
584
|
*/
|
|
403
585
|
symbol: string;
|
|
404
586
|
/**
|
|
405
|
-
*
|
|
587
|
+
*
|
|
406
588
|
* @type {number}
|
|
407
589
|
* @memberof MarketDefinition
|
|
408
590
|
*/
|
|
@@ -414,37 +596,37 @@ export interface MarketDefinition {
|
|
|
414
596
|
*/
|
|
415
597
|
minOrderQty: string;
|
|
416
598
|
/**
|
|
417
|
-
*
|
|
599
|
+
*
|
|
418
600
|
* @type {string}
|
|
419
601
|
* @memberof MarketDefinition
|
|
420
602
|
*/
|
|
421
603
|
qtyStepSize: string;
|
|
422
604
|
/**
|
|
423
|
-
*
|
|
605
|
+
*
|
|
424
606
|
* @type {string}
|
|
425
607
|
* @memberof MarketDefinition
|
|
426
608
|
*/
|
|
427
609
|
tickSize: string;
|
|
428
610
|
/**
|
|
429
|
-
*
|
|
611
|
+
*
|
|
430
612
|
* @type {string}
|
|
431
613
|
* @memberof MarketDefinition
|
|
432
614
|
*/
|
|
433
615
|
liquidationMarginParameter: string;
|
|
434
616
|
/**
|
|
435
|
-
*
|
|
617
|
+
*
|
|
436
618
|
* @type {string}
|
|
437
619
|
* @memberof MarketDefinition
|
|
438
620
|
*/
|
|
439
621
|
initialMarginParameter: string;
|
|
440
622
|
/**
|
|
441
|
-
*
|
|
623
|
+
*
|
|
442
624
|
* @type {number}
|
|
443
625
|
* @memberof MarketDefinition
|
|
444
626
|
*/
|
|
445
627
|
maxLeverage: number;
|
|
446
628
|
/**
|
|
447
|
-
*
|
|
629
|
+
*
|
|
448
630
|
* @type {string}
|
|
449
631
|
* @memberof MarketDefinition
|
|
450
632
|
*/
|
|
@@ -458,55 +640,55 @@ export interface MarketDefinition {
|
|
|
458
640
|
export interface MarketSummary {
|
|
459
641
|
[key: string]: any | any;
|
|
460
642
|
/**
|
|
461
|
-
* Trading symbol (e.g., BTCRUSDPERP,
|
|
643
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
462
644
|
* @type {string}
|
|
463
645
|
* @memberof MarketSummary
|
|
464
646
|
*/
|
|
465
647
|
symbol: string;
|
|
466
648
|
/**
|
|
467
|
-
*
|
|
649
|
+
*
|
|
468
650
|
* @type {number}
|
|
469
651
|
* @memberof MarketSummary
|
|
470
652
|
*/
|
|
471
653
|
updatedAt: number;
|
|
472
654
|
/**
|
|
473
|
-
*
|
|
655
|
+
*
|
|
474
656
|
* @type {string}
|
|
475
657
|
* @memberof MarketSummary
|
|
476
658
|
*/
|
|
477
659
|
longOiQty: string;
|
|
478
660
|
/**
|
|
479
|
-
*
|
|
661
|
+
*
|
|
480
662
|
* @type {string}
|
|
481
663
|
* @memberof MarketSummary
|
|
482
664
|
*/
|
|
483
665
|
shortOiQty: string;
|
|
484
666
|
/**
|
|
485
|
-
*
|
|
667
|
+
*
|
|
486
668
|
* @type {string}
|
|
487
669
|
* @memberof MarketSummary
|
|
488
670
|
*/
|
|
489
671
|
oiQty: string;
|
|
490
672
|
/**
|
|
491
|
-
*
|
|
673
|
+
*
|
|
492
674
|
* @type {string}
|
|
493
675
|
* @memberof MarketSummary
|
|
494
676
|
*/
|
|
495
677
|
fundingRate: string;
|
|
496
678
|
/**
|
|
497
|
-
*
|
|
679
|
+
*
|
|
498
680
|
* @type {string}
|
|
499
681
|
* @memberof MarketSummary
|
|
500
682
|
*/
|
|
501
683
|
longFundingValue: string;
|
|
502
684
|
/**
|
|
503
|
-
*
|
|
685
|
+
*
|
|
504
686
|
* @type {string}
|
|
505
687
|
* @memberof MarketSummary
|
|
506
688
|
*/
|
|
507
689
|
shortFundingValue: string;
|
|
508
690
|
/**
|
|
509
|
-
*
|
|
691
|
+
*
|
|
510
692
|
* @type {string}
|
|
511
693
|
* @memberof MarketSummary
|
|
512
694
|
*/
|
|
@@ -524,24 +706,76 @@ export interface MarketSummary {
|
|
|
524
706
|
*/
|
|
525
707
|
pxChange24h?: string;
|
|
526
708
|
/**
|
|
527
|
-
*
|
|
709
|
+
*
|
|
528
710
|
* @type {string}
|
|
529
711
|
* @memberof MarketSummary
|
|
530
712
|
*/
|
|
531
713
|
throttledOraclePrice?: string;
|
|
532
714
|
/**
|
|
533
|
-
*
|
|
715
|
+
*
|
|
534
716
|
* @type {string}
|
|
535
717
|
* @memberof MarketSummary
|
|
536
718
|
*/
|
|
537
719
|
throttledPoolPrice?: string;
|
|
538
720
|
/**
|
|
539
|
-
*
|
|
721
|
+
*
|
|
540
722
|
* @type {number}
|
|
541
723
|
* @memberof MarketSummary
|
|
542
724
|
*/
|
|
543
725
|
pricesUpdatedAt?: number;
|
|
544
726
|
}
|
|
727
|
+
/**
|
|
728
|
+
* Request to cancel all orders matching the specified filters
|
|
729
|
+
* @export
|
|
730
|
+
* @interface MassCancelRequest
|
|
731
|
+
*/
|
|
732
|
+
export interface MassCancelRequest {
|
|
733
|
+
[key: string]: any | any;
|
|
734
|
+
/**
|
|
735
|
+
*
|
|
736
|
+
* @type {number}
|
|
737
|
+
* @memberof MassCancelRequest
|
|
738
|
+
*/
|
|
739
|
+
accountId: number;
|
|
740
|
+
/**
|
|
741
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
742
|
+
* @type {string}
|
|
743
|
+
* @memberof MassCancelRequest
|
|
744
|
+
*/
|
|
745
|
+
symbol?: string;
|
|
746
|
+
/**
|
|
747
|
+
* See signatures and nonces section for more details on how to generate.
|
|
748
|
+
* @type {string}
|
|
749
|
+
* @memberof MassCancelRequest
|
|
750
|
+
*/
|
|
751
|
+
signature: string;
|
|
752
|
+
/**
|
|
753
|
+
* See signatures and nonces section for more details.
|
|
754
|
+
* @type {string}
|
|
755
|
+
* @memberof MassCancelRequest
|
|
756
|
+
*/
|
|
757
|
+
nonce: string;
|
|
758
|
+
/**
|
|
759
|
+
*
|
|
760
|
+
* @type {number}
|
|
761
|
+
* @memberof MassCancelRequest
|
|
762
|
+
*/
|
|
763
|
+
expiresAfter: number;
|
|
764
|
+
}
|
|
765
|
+
/**
|
|
766
|
+
*
|
|
767
|
+
* @export
|
|
768
|
+
* @interface MassCancelResponse
|
|
769
|
+
*/
|
|
770
|
+
export interface MassCancelResponse {
|
|
771
|
+
[key: string]: any | any;
|
|
772
|
+
/**
|
|
773
|
+
*
|
|
774
|
+
* @type {number}
|
|
775
|
+
* @memberof MassCancelResponse
|
|
776
|
+
*/
|
|
777
|
+
cancelledCount: number;
|
|
778
|
+
}
|
|
545
779
|
/**
|
|
546
780
|
*
|
|
547
781
|
* @export
|
|
@@ -556,7 +790,7 @@ export interface Order {
|
|
|
556
790
|
*/
|
|
557
791
|
exchangeId: number;
|
|
558
792
|
/**
|
|
559
|
-
* Trading symbol (e.g., BTCRUSDPERP,
|
|
793
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
560
794
|
* @type {string}
|
|
561
795
|
* @memberof Order
|
|
562
796
|
*/
|
|
@@ -580,11 +814,17 @@ export interface Order {
|
|
|
580
814
|
*/
|
|
581
815
|
qty?: string;
|
|
582
816
|
/**
|
|
583
|
-
*
|
|
817
|
+
*
|
|
584
818
|
* @type {string}
|
|
585
819
|
* @memberof Order
|
|
586
820
|
*/
|
|
587
821
|
execQty?: string;
|
|
822
|
+
/**
|
|
823
|
+
*
|
|
824
|
+
* @type {string}
|
|
825
|
+
* @memberof Order
|
|
826
|
+
*/
|
|
827
|
+
cumQty?: string;
|
|
588
828
|
/**
|
|
589
829
|
*
|
|
590
830
|
* @type {Side}
|
|
@@ -604,7 +844,7 @@ export interface Order {
|
|
|
604
844
|
*/
|
|
605
845
|
orderType: OrderType;
|
|
606
846
|
/**
|
|
607
|
-
*
|
|
847
|
+
*
|
|
608
848
|
* @type {string}
|
|
609
849
|
* @memberof Order
|
|
610
850
|
*/
|
|
@@ -628,13 +868,13 @@ export interface Order {
|
|
|
628
868
|
*/
|
|
629
869
|
status: OrderStatus;
|
|
630
870
|
/**
|
|
631
|
-
*
|
|
871
|
+
*
|
|
632
872
|
* @type {number}
|
|
633
873
|
* @memberof Order
|
|
634
874
|
*/
|
|
635
875
|
createdAt: number;
|
|
636
876
|
/**
|
|
637
|
-
*
|
|
877
|
+
*
|
|
638
878
|
* @type {number}
|
|
639
879
|
* @memberof Order
|
|
640
880
|
*/
|
|
@@ -673,62 +913,30 @@ export type OrderType = typeof OrderType[keyof typeof OrderType];
|
|
|
673
913
|
export interface PaginationMeta {
|
|
674
914
|
[key: string]: any | any;
|
|
675
915
|
/**
|
|
676
|
-
*
|
|
916
|
+
*
|
|
677
917
|
* @type {number}
|
|
678
918
|
* @memberof PaginationMeta
|
|
679
919
|
*/
|
|
680
920
|
limit: number;
|
|
681
921
|
/**
|
|
682
|
-
*
|
|
922
|
+
*
|
|
683
923
|
* @type {number}
|
|
684
924
|
* @memberof PaginationMeta
|
|
685
925
|
*/
|
|
686
926
|
count: number;
|
|
687
927
|
/**
|
|
688
|
-
*
|
|
928
|
+
*
|
|
689
929
|
* @type {number}
|
|
690
930
|
* @memberof PaginationMeta
|
|
691
931
|
*/
|
|
692
932
|
endTime?: number;
|
|
693
933
|
/**
|
|
694
|
-
*
|
|
934
|
+
*
|
|
695
935
|
* @type {number}
|
|
696
936
|
* @memberof PaginationMeta
|
|
697
937
|
*/
|
|
698
938
|
startTime?: number;
|
|
699
939
|
}
|
|
700
|
-
/**
|
|
701
|
-
*
|
|
702
|
-
* @export
|
|
703
|
-
* @interface PaginationParameters
|
|
704
|
-
*/
|
|
705
|
-
export interface PaginationParameters {
|
|
706
|
-
[key: string]: any | any;
|
|
707
|
-
/**
|
|
708
|
-
* Number of items requested
|
|
709
|
-
* @type {number}
|
|
710
|
-
* @memberof PaginationParameters
|
|
711
|
-
*/
|
|
712
|
-
limit: number;
|
|
713
|
-
/**
|
|
714
|
-
* Number of items returned
|
|
715
|
-
* @type {number}
|
|
716
|
-
* @memberof PaginationParameters
|
|
717
|
-
*/
|
|
718
|
-
count: number;
|
|
719
|
-
/**
|
|
720
|
-
* Timestamp of last result, in milliseconds
|
|
721
|
-
* @type {number}
|
|
722
|
-
* @memberof PaginationParameters
|
|
723
|
-
*/
|
|
724
|
-
endTime?: number;
|
|
725
|
-
/**
|
|
726
|
-
* Timestamp of first result, in milliseconds
|
|
727
|
-
* @type {number}
|
|
728
|
-
* @memberof PaginationParameters
|
|
729
|
-
*/
|
|
730
|
-
startTime?: number;
|
|
731
|
-
}
|
|
732
940
|
/**
|
|
733
941
|
*
|
|
734
942
|
* @export
|
|
@@ -743,7 +951,7 @@ export interface PerpExecution {
|
|
|
743
951
|
*/
|
|
744
952
|
exchangeId: number;
|
|
745
953
|
/**
|
|
746
|
-
* Trading symbol (e.g., BTCRUSDPERP,
|
|
954
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
747
955
|
* @type {string}
|
|
748
956
|
* @memberof PerpExecution
|
|
749
957
|
*/
|
|
@@ -785,13 +993,13 @@ export interface PerpExecution {
|
|
|
785
993
|
*/
|
|
786
994
|
type: ExecutionType;
|
|
787
995
|
/**
|
|
788
|
-
*
|
|
996
|
+
*
|
|
789
997
|
* @type {number}
|
|
790
998
|
* @memberof PerpExecution
|
|
791
999
|
*/
|
|
792
1000
|
timestamp: number;
|
|
793
1001
|
/**
|
|
794
|
-
*
|
|
1002
|
+
*
|
|
795
1003
|
* @type {number}
|
|
796
1004
|
* @memberof PerpExecution
|
|
797
1005
|
*/
|
|
@@ -831,7 +1039,7 @@ export interface Position {
|
|
|
831
1039
|
*/
|
|
832
1040
|
exchangeId: number;
|
|
833
1041
|
/**
|
|
834
|
-
* Trading symbol (e.g., BTCRUSDPERP,
|
|
1042
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
835
1043
|
* @type {string}
|
|
836
1044
|
* @memberof Position
|
|
837
1045
|
*/
|
|
@@ -861,13 +1069,13 @@ export interface Position {
|
|
|
861
1069
|
*/
|
|
862
1070
|
avgEntryPrice: string;
|
|
863
1071
|
/**
|
|
864
|
-
*
|
|
1072
|
+
*
|
|
865
1073
|
* @type {string}
|
|
866
1074
|
* @memberof Position
|
|
867
1075
|
*/
|
|
868
1076
|
avgEntryFundingValue: string;
|
|
869
1077
|
/**
|
|
870
|
-
*
|
|
1078
|
+
*
|
|
871
1079
|
* @type {number}
|
|
872
1080
|
* @memberof Position
|
|
873
1081
|
*/
|
|
@@ -881,25 +1089,25 @@ export interface Position {
|
|
|
881
1089
|
export interface Price {
|
|
882
1090
|
[key: string]: any | any;
|
|
883
1091
|
/**
|
|
884
|
-
* Trading symbol (e.g., BTCRUSDPERP,
|
|
1092
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
885
1093
|
* @type {string}
|
|
886
1094
|
* @memberof Price
|
|
887
1095
|
*/
|
|
888
1096
|
symbol: string;
|
|
889
1097
|
/**
|
|
890
|
-
*
|
|
1098
|
+
*
|
|
891
1099
|
* @type {string}
|
|
892
1100
|
* @memberof Price
|
|
893
1101
|
*/
|
|
894
1102
|
oraclePrice: string;
|
|
895
1103
|
/**
|
|
896
|
-
*
|
|
1104
|
+
*
|
|
897
1105
|
* @type {string}
|
|
898
1106
|
* @memberof Price
|
|
899
1107
|
*/
|
|
900
1108
|
poolPrice?: string;
|
|
901
1109
|
/**
|
|
902
|
-
*
|
|
1110
|
+
*
|
|
903
1111
|
* @type {number}
|
|
904
1112
|
* @memberof Price
|
|
905
1113
|
*/
|
|
@@ -936,7 +1144,13 @@ export const RequestErrorCode = {
|
|
|
936
1144
|
NO_PRICES_FOUND_FOR_SYMBOL: 'NO_PRICES_FOUND_FOR_SYMBOL',
|
|
937
1145
|
INPUT_VALIDATION_ERROR: 'INPUT_VALIDATION_ERROR',
|
|
938
1146
|
CREATE_ORDER_OTHER_ERROR: 'CREATE_ORDER_OTHER_ERROR',
|
|
939
|
-
CANCEL_ORDER_OTHER_ERROR: 'CANCEL_ORDER_OTHER_ERROR'
|
|
1147
|
+
CANCEL_ORDER_OTHER_ERROR: 'CANCEL_ORDER_OTHER_ERROR',
|
|
1148
|
+
ORDER_DEADLINE_PASSED_ERROR: 'ORDER_DEADLINE_PASSED_ERROR',
|
|
1149
|
+
ORDER_DEADLINE_TOO_HIGH_ERROR: 'ORDER_DEADLINE_TOO_HIGH_ERROR',
|
|
1150
|
+
INVALID_NONCE_ERROR: 'INVALID_NONCE_ERROR',
|
|
1151
|
+
UNAVAILABLE_MATCHING_ENGINE_ERROR: 'UNAVAILABLE_MATCHING_ENGINE_ERROR',
|
|
1152
|
+
UNAUTHORIZED_SIGNATURE_ERROR: 'UNAUTHORIZED_SIGNATURE_ERROR',
|
|
1153
|
+
NUMERIC_OVERFLOW_ERROR: 'NUMERIC_OVERFLOW_ERROR'
|
|
940
1154
|
} as const;
|
|
941
1155
|
export type RequestErrorCode = typeof RequestErrorCode[keyof typeof RequestErrorCode];
|
|
942
1156
|
|
|
@@ -993,9 +1207,9 @@ export interface SpotExecution {
|
|
|
993
1207
|
* @type {number}
|
|
994
1208
|
* @memberof SpotExecution
|
|
995
1209
|
*/
|
|
996
|
-
exchangeId
|
|
1210
|
+
exchangeId?: number;
|
|
997
1211
|
/**
|
|
998
|
-
* Trading symbol (e.g., BTCRUSDPERP,
|
|
1212
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
999
1213
|
* @type {string}
|
|
1000
1214
|
* @memberof SpotExecution
|
|
1001
1215
|
*/
|
|
@@ -1006,6 +1220,24 @@ export interface SpotExecution {
|
|
|
1006
1220
|
* @memberof SpotExecution
|
|
1007
1221
|
*/
|
|
1008
1222
|
accountId: number;
|
|
1223
|
+
/**
|
|
1224
|
+
*
|
|
1225
|
+
* @type {number}
|
|
1226
|
+
* @memberof SpotExecution
|
|
1227
|
+
*/
|
|
1228
|
+
makerAccountId: number;
|
|
1229
|
+
/**
|
|
1230
|
+
* Order ID for the taker
|
|
1231
|
+
* @type {string}
|
|
1232
|
+
* @memberof SpotExecution
|
|
1233
|
+
*/
|
|
1234
|
+
orderId?: string;
|
|
1235
|
+
/**
|
|
1236
|
+
* Order ID for the maker
|
|
1237
|
+
* @type {string}
|
|
1238
|
+
* @memberof SpotExecution
|
|
1239
|
+
*/
|
|
1240
|
+
makerOrderId?: string;
|
|
1009
1241
|
/**
|
|
1010
1242
|
*
|
|
1011
1243
|
* @type {Side}
|
|
@@ -1023,7 +1255,7 @@ export interface SpotExecution {
|
|
|
1023
1255
|
* @type {string}
|
|
1024
1256
|
* @memberof SpotExecution
|
|
1025
1257
|
*/
|
|
1026
|
-
price
|
|
1258
|
+
price: string;
|
|
1027
1259
|
/**
|
|
1028
1260
|
*
|
|
1029
1261
|
* @type {string}
|
|
@@ -1037,7 +1269,7 @@ export interface SpotExecution {
|
|
|
1037
1269
|
*/
|
|
1038
1270
|
type: ExecutionType;
|
|
1039
1271
|
/**
|
|
1040
|
-
*
|
|
1272
|
+
*
|
|
1041
1273
|
* @type {number}
|
|
1042
1274
|
* @memberof SpotExecution
|
|
1043
1275
|
*/
|
|
@@ -1063,6 +1295,56 @@ export interface SpotExecutionList {
|
|
|
1063
1295
|
*/
|
|
1064
1296
|
meta: PaginationMeta;
|
|
1065
1297
|
}
|
|
1298
|
+
/**
|
|
1299
|
+
*
|
|
1300
|
+
* @export
|
|
1301
|
+
* @interface SpotMarketDefinition
|
|
1302
|
+
*/
|
|
1303
|
+
export interface SpotMarketDefinition {
|
|
1304
|
+
[key: string]: any | any;
|
|
1305
|
+
/**
|
|
1306
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
1307
|
+
* @type {string}
|
|
1308
|
+
* @memberof SpotMarketDefinition
|
|
1309
|
+
*/
|
|
1310
|
+
symbol: string;
|
|
1311
|
+
/**
|
|
1312
|
+
*
|
|
1313
|
+
* @type {number}
|
|
1314
|
+
* @memberof SpotMarketDefinition
|
|
1315
|
+
*/
|
|
1316
|
+
marketId: number;
|
|
1317
|
+
/**
|
|
1318
|
+
* Base asset symbol
|
|
1319
|
+
* @type {string}
|
|
1320
|
+
* @memberof SpotMarketDefinition
|
|
1321
|
+
*/
|
|
1322
|
+
baseAsset: string;
|
|
1323
|
+
/**
|
|
1324
|
+
* Quote asset symbol
|
|
1325
|
+
* @type {string}
|
|
1326
|
+
* @memberof SpotMarketDefinition
|
|
1327
|
+
*/
|
|
1328
|
+
quoteAsset: string;
|
|
1329
|
+
/**
|
|
1330
|
+
*
|
|
1331
|
+
* @type {string}
|
|
1332
|
+
* @memberof SpotMarketDefinition
|
|
1333
|
+
*/
|
|
1334
|
+
minOrderQty: string;
|
|
1335
|
+
/**
|
|
1336
|
+
*
|
|
1337
|
+
* @type {string}
|
|
1338
|
+
* @memberof SpotMarketDefinition
|
|
1339
|
+
*/
|
|
1340
|
+
qtyStepSize: string;
|
|
1341
|
+
/**
|
|
1342
|
+
*
|
|
1343
|
+
* @type {string}
|
|
1344
|
+
* @memberof SpotMarketDefinition
|
|
1345
|
+
*/
|
|
1346
|
+
tickSize: string;
|
|
1347
|
+
}
|
|
1066
1348
|
|
|
1067
1349
|
/**
|
|
1068
1350
|
* Fee tier type (REGULAR = Standard tier, VIP = VIP tier)
|
|
@@ -1093,7 +1375,7 @@ export type TimeInForce = typeof TimeInForce[keyof typeof TimeInForce];
|
|
|
1093
1375
|
export interface WalletConfiguration {
|
|
1094
1376
|
[key: string]: any | any;
|
|
1095
1377
|
/**
|
|
1096
|
-
*
|
|
1378
|
+
*
|
|
1097
1379
|
* @type {number}
|
|
1098
1380
|
* @memberof WalletConfiguration
|
|
1099
1381
|
*/
|