@reyaxyz/api-v2-sdk 0.301.5 → 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 +321 -14
- 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 +329 -15
- package/rest/runtime.ts +1 -1
- package/websocket/types.ts +70 -0
package/rest/models/index.ts
CHANGED
|
@@ -19,6 +19,12 @@ export interface Account {
|
|
|
19
19
|
* @memberof Account
|
|
20
20
|
*/
|
|
21
21
|
name: string;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {AccountType}
|
|
25
|
+
* @memberof Account
|
|
26
|
+
*/
|
|
27
|
+
type: AccountType;
|
|
22
28
|
/**
|
|
23
29
|
*
|
|
24
30
|
* @type {number}
|
|
@@ -51,7 +57,25 @@ export interface AccountBalance {
|
|
|
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,7 +90,7 @@ 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
|
*/
|
|
@@ -89,7 +113,36 @@ export interface AssetDefinition {
|
|
|
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
|
*/
|
|
@@ -259,6 +348,12 @@ export interface CreateOrderRequest {
|
|
|
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
|
|
@@ -362,6 +524,26 @@ export interface 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,7 +552,7 @@ 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
|
*/
|
|
@@ -396,7 +578,7 @@ 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
|
*/
|
|
@@ -458,7 +640,7 @@ 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
|
*/
|
|
@@ -542,6 +724,58 @@ export interface 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
|
*/
|
|
@@ -585,6 +819,12 @@ export interface Order {
|
|
|
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}
|
|
@@ -711,7 +951,7 @@ export interface PerpExecution {
|
|
|
711
951
|
*/
|
|
712
952
|
exchangeId: number;
|
|
713
953
|
/**
|
|
714
|
-
* Trading symbol (e.g., BTCRUSDPERP,
|
|
954
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
715
955
|
* @type {string}
|
|
716
956
|
* @memberof PerpExecution
|
|
717
957
|
*/
|
|
@@ -799,7 +1039,7 @@ export interface Position {
|
|
|
799
1039
|
*/
|
|
800
1040
|
exchangeId: number;
|
|
801
1041
|
/**
|
|
802
|
-
* Trading symbol (e.g., BTCRUSDPERP,
|
|
1042
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
803
1043
|
* @type {string}
|
|
804
1044
|
* @memberof Position
|
|
805
1045
|
*/
|
|
@@ -849,7 +1089,7 @@ export interface Position {
|
|
|
849
1089
|
export interface Price {
|
|
850
1090
|
[key: string]: any | any;
|
|
851
1091
|
/**
|
|
852
|
-
* Trading symbol (e.g., BTCRUSDPERP,
|
|
1092
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
853
1093
|
* @type {string}
|
|
854
1094
|
* @memberof Price
|
|
855
1095
|
*/
|
|
@@ -904,7 +1144,13 @@ export const RequestErrorCode = {
|
|
|
904
1144
|
NO_PRICES_FOUND_FOR_SYMBOL: 'NO_PRICES_FOUND_FOR_SYMBOL',
|
|
905
1145
|
INPUT_VALIDATION_ERROR: 'INPUT_VALIDATION_ERROR',
|
|
906
1146
|
CREATE_ORDER_OTHER_ERROR: 'CREATE_ORDER_OTHER_ERROR',
|
|
907
|
-
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'
|
|
908
1154
|
} as const;
|
|
909
1155
|
export type RequestErrorCode = typeof RequestErrorCode[keyof typeof RequestErrorCode];
|
|
910
1156
|
|
|
@@ -961,9 +1207,9 @@ export interface SpotExecution {
|
|
|
961
1207
|
* @type {number}
|
|
962
1208
|
* @memberof SpotExecution
|
|
963
1209
|
*/
|
|
964
|
-
exchangeId
|
|
1210
|
+
exchangeId?: number;
|
|
965
1211
|
/**
|
|
966
|
-
* Trading symbol (e.g., BTCRUSDPERP,
|
|
1212
|
+
* Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
|
|
967
1213
|
* @type {string}
|
|
968
1214
|
* @memberof SpotExecution
|
|
969
1215
|
*/
|
|
@@ -974,6 +1220,24 @@ export interface SpotExecution {
|
|
|
974
1220
|
* @memberof SpotExecution
|
|
975
1221
|
*/
|
|
976
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;
|
|
977
1241
|
/**
|
|
978
1242
|
*
|
|
979
1243
|
* @type {Side}
|
|
@@ -991,7 +1255,7 @@ export interface SpotExecution {
|
|
|
991
1255
|
* @type {string}
|
|
992
1256
|
* @memberof SpotExecution
|
|
993
1257
|
*/
|
|
994
|
-
price
|
|
1258
|
+
price: string;
|
|
995
1259
|
/**
|
|
996
1260
|
*
|
|
997
1261
|
* @type {string}
|
|
@@ -1031,6 +1295,56 @@ export interface SpotExecutionList {
|
|
|
1031
1295
|
*/
|
|
1032
1296
|
meta: PaginationMeta;
|
|
1033
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
|
+
}
|
|
1034
1348
|
|
|
1035
1349
|
/**
|
|
1036
1350
|
* Fee tier type (REGULAR = Standard tier, VIP = VIP tier)
|
package/rest/runtime.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Reya DEX Trading API v2
|
|
5
5
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.0
|
|
7
|
+
* The version of the OpenAPI document: 2.1.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/websocket/types.ts
CHANGED
|
@@ -14,8 +14,34 @@ export const WebSocketServers = {
|
|
|
14
14
|
test: 'wss://websocket-testnet.reya.xyz'
|
|
15
15
|
} as const;
|
|
16
16
|
|
|
17
|
+
export interface AccountBalance {
|
|
18
|
+
accountId: number;
|
|
19
|
+
asset: string;
|
|
20
|
+
realBalance: string;
|
|
21
|
+
balanceDeprecated: string;
|
|
22
|
+
additionalProperties?: Map<string, any>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface AccountBalanceUpdatePayload {
|
|
26
|
+
type: ChannelDataMessageType;
|
|
27
|
+
timestamp: number;
|
|
28
|
+
channel: string;
|
|
29
|
+
data: AccountBalance[];
|
|
30
|
+
}
|
|
31
|
+
|
|
17
32
|
export type ChannelDataMessageType = "channel_data";
|
|
18
33
|
|
|
34
|
+
export interface Depth {
|
|
35
|
+
symbol: string;
|
|
36
|
+
type: DepthType;
|
|
37
|
+
bids: Level[];
|
|
38
|
+
asks: Level[];
|
|
39
|
+
updatedAt: number;
|
|
40
|
+
additionalProperties?: Map<string, any>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type DepthType = "SNAPSHOT" | "UPDATE";
|
|
44
|
+
|
|
19
45
|
export interface ErrorMessagePayload {
|
|
20
46
|
type: ErrorMessageType;
|
|
21
47
|
message: string;
|
|
@@ -26,6 +52,19 @@ export type ErrorMessageType = "error";
|
|
|
26
52
|
|
|
27
53
|
export type ExecutionType = "ORDER_MATCH" | "LIQUIDATION" | "ADL";
|
|
28
54
|
|
|
55
|
+
export interface Level {
|
|
56
|
+
px: string;
|
|
57
|
+
qty: string;
|
|
58
|
+
additionalProperties?: Map<string, any>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface MarketDepthUpdatePayload {
|
|
62
|
+
type: ChannelDataMessageType;
|
|
63
|
+
timestamp: number;
|
|
64
|
+
channel: string;
|
|
65
|
+
data: Depth;
|
|
66
|
+
}
|
|
67
|
+
|
|
29
68
|
export interface MarketPerpExecutionUpdatePayload {
|
|
30
69
|
type: ChannelDataMessageType;
|
|
31
70
|
timestamp: number;
|
|
@@ -33,6 +72,13 @@ export interface MarketPerpExecutionUpdatePayload {
|
|
|
33
72
|
data: PerpExecution[];
|
|
34
73
|
}
|
|
35
74
|
|
|
75
|
+
export interface MarketSpotExecutionUpdatePayload {
|
|
76
|
+
type: ChannelDataMessageType;
|
|
77
|
+
timestamp: number;
|
|
78
|
+
channel: string;
|
|
79
|
+
data: SpotExecution[];
|
|
80
|
+
}
|
|
81
|
+
|
|
36
82
|
export interface MarketSummary {
|
|
37
83
|
symbol: string;
|
|
38
84
|
updatedAt: number;
|
|
@@ -74,6 +120,7 @@ export interface Order {
|
|
|
74
120
|
orderId: string;
|
|
75
121
|
qty?: string;
|
|
76
122
|
execQty?: string;
|
|
123
|
+
cumQty?: string;
|
|
77
124
|
side: Side;
|
|
78
125
|
limitPx: string;
|
|
79
126
|
orderType: OrderType;
|
|
@@ -170,6 +217,22 @@ export interface PricesUpdatePayload {
|
|
|
170
217
|
|
|
171
218
|
export type Side = "B" | "A";
|
|
172
219
|
|
|
220
|
+
export interface SpotExecution {
|
|
221
|
+
exchangeId?: number;
|
|
222
|
+
symbol: string;
|
|
223
|
+
accountId: number;
|
|
224
|
+
makerAccountId: number;
|
|
225
|
+
orderId?: string;
|
|
226
|
+
makerOrderId?: string;
|
|
227
|
+
side: Side;
|
|
228
|
+
qty: string;
|
|
229
|
+
price: string;
|
|
230
|
+
fee: string;
|
|
231
|
+
type: ExecutionType;
|
|
232
|
+
timestamp: number;
|
|
233
|
+
additionalProperties?: Map<string, any>;
|
|
234
|
+
}
|
|
235
|
+
|
|
173
236
|
export interface SubscribeMessagePayload {
|
|
174
237
|
type: SubscribeMessageType;
|
|
175
238
|
channel: string;
|
|
@@ -210,3 +273,10 @@ export interface WalletPerpExecutionUpdatePayload {
|
|
|
210
273
|
data: PerpExecution[];
|
|
211
274
|
}
|
|
212
275
|
|
|
276
|
+
export interface WalletSpotExecutionUpdatePayload {
|
|
277
|
+
type: ChannelDataMessageType;
|
|
278
|
+
timestamp: number;
|
|
279
|
+
channel: string;
|
|
280
|
+
data: SpotExecution[];
|
|
281
|
+
}
|
|
282
|
+
|