@reyaxyz/api-v2-sdk 0.301.1

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 (51) hide show
  1. package/LICENSE.md +1 -0
  2. package/dist/index.js +47 -0
  3. package/dist/index.js.map +1 -0
  4. package/dist/rest/apis/MarketDataApi.js +393 -0
  5. package/dist/rest/apis/MarketDataApi.js.map +1 -0
  6. package/dist/rest/apis/OrderEntryApi.js +199 -0
  7. package/dist/rest/apis/OrderEntryApi.js.map +1 -0
  8. package/dist/rest/apis/ReferenceDataApi.js +308 -0
  9. package/dist/rest/apis/ReferenceDataApi.js.map +1 -0
  10. package/dist/rest/apis/WalletDataApi.js +387 -0
  11. package/dist/rest/apis/WalletDataApi.js.map +1 -0
  12. package/dist/rest/apis/index.js +23 -0
  13. package/dist/rest/apis/index.js.map +1 -0
  14. package/dist/rest/index.js +22 -0
  15. package/dist/rest/index.js.map +1 -0
  16. package/dist/rest/models/index.js +222 -0
  17. package/dist/rest/models/index.js.map +1 -0
  18. package/dist/rest/runtime.js +551 -0
  19. package/dist/rest/runtime.js.map +1 -0
  20. package/dist/types/index.d.ts +14 -0
  21. package/dist/types/index.d.ts.map +1 -0
  22. package/dist/types/rest/apis/MarketDataApi.d.ts +104 -0
  23. package/dist/types/rest/apis/MarketDataApi.d.ts.map +1 -0
  24. package/dist/types/rest/apis/OrderEntryApi.d.ts +45 -0
  25. package/dist/types/rest/apis/OrderEntryApi.d.ts.map +1 -0
  26. package/dist/types/rest/apis/ReferenceDataApi.d.ts +59 -0
  27. package/dist/types/rest/apis/ReferenceDataApi.d.ts.map +1 -0
  28. package/dist/types/rest/apis/WalletDataApi.d.ts +97 -0
  29. package/dist/types/rest/apis/WalletDataApi.d.ts.map +1 -0
  30. package/dist/types/rest/apis/index.d.ts +5 -0
  31. package/dist/types/rest/apis/index.d.ts.map +1 -0
  32. package/dist/types/rest/index.d.ts +4 -0
  33. package/dist/types/rest/index.d.ts.map +1 -0
  34. package/dist/types/rest/models/index.d.ts +1346 -0
  35. package/dist/types/rest/models/index.d.ts.map +1 -0
  36. package/dist/types/rest/runtime.d.ts +181 -0
  37. package/dist/types/rest/runtime.d.ts.map +1 -0
  38. package/dist/types/websocket/types.d.ts +173 -0
  39. package/dist/types/websocket/types.d.ts.map +1 -0
  40. package/dist/websocket/types.js +61 -0
  41. package/dist/websocket/types.js.map +1 -0
  42. package/package.json +43 -0
  43. package/rest/apis/MarketDataApi.ts +261 -0
  44. package/rest/apis/OrderEntryApi.ts +109 -0
  45. package/rest/apis/ReferenceDataApi.ts +162 -0
  46. package/rest/apis/WalletDataApi.ts +265 -0
  47. package/rest/apis/index.ts +6 -0
  48. package/rest/index.ts +5 -0
  49. package/rest/models/index.ts +1405 -0
  50. package/rest/runtime.ts +421 -0
  51. package/websocket/types.ts +226 -0
@@ -0,0 +1,1405 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ *
5
+ * @export
6
+ * @interface Account
7
+ */
8
+ export interface Account {
9
+ /**
10
+ *
11
+ * @type {number}
12
+ * @memberof Account
13
+ */
14
+ accountId: number;
15
+ /**
16
+ *
17
+ * @type {string}
18
+ * @memberof Account
19
+ */
20
+ name: string;
21
+ /**
22
+ * Last update timestamp (milliseconds)
23
+ * @type {number}
24
+ * @memberof Account
25
+ */
26
+ lastUpdateAt: number;
27
+ }
28
+ /**
29
+ *
30
+ * @export
31
+ * @interface AssetDefinition
32
+ */
33
+ export interface AssetDefinition {
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof AssetDefinition
38
+ */
39
+ asset: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AssetDefinition
44
+ */
45
+ spotMarketSymbol: string;
46
+ /**
47
+ * Notional discount to the value of a collateral when used to satisfy the margin requirements; it does not imply any token conversion, but is rather an accounting adjustment.
48
+ * @type {string}
49
+ * @memberof AssetDefinition
50
+ */
51
+ priceHaircut: string;
52
+ /**
53
+ * Discount in the token price when liquidating collateral.
54
+ * @type {string}
55
+ * @memberof AssetDefinition
56
+ */
57
+ liquidationDiscount: string;
58
+ /**
59
+ * Configuration timestamp (milliseconds)
60
+ * @type {number}
61
+ * @memberof AssetDefinition
62
+ */
63
+ timestamp: number;
64
+ }
65
+ /**
66
+ *
67
+ * @export
68
+ * @interface CancelOrderRequest
69
+ */
70
+ export interface CancelOrderRequest {
71
+ /**
72
+ * Order ID to cancel
73
+ * @type {string}
74
+ * @memberof CancelOrderRequest
75
+ */
76
+ orderId: string;
77
+ /**
78
+ * See signatures section for more details on how to generate.
79
+ * @type {string}
80
+ * @memberof CancelOrderRequest
81
+ */
82
+ signature: string;
83
+ }
84
+ /**
85
+ *
86
+ * @export
87
+ * @interface CancelOrderResponse
88
+ */
89
+ export interface CancelOrderResponse {
90
+ /**
91
+ * Order status
92
+ * @type {string}
93
+ * @memberof CancelOrderResponse
94
+ */
95
+ status: CancelOrderResponseStatusEnum;
96
+ /**
97
+ * Cancelled order ID
98
+ * @type {string}
99
+ * @memberof CancelOrderResponse
100
+ */
101
+ orderId: string;
102
+ }
103
+
104
+
105
+ /**
106
+ * @export
107
+ */
108
+ export const CancelOrderResponseStatusEnum = {
109
+ OPEN: 'OPEN',
110
+ FILLED: 'FILLED',
111
+ CANCELLED: 'CANCELLED',
112
+ REJECTED: 'REJECTED'
113
+ } as const;
114
+ export type CancelOrderResponseStatusEnum = typeof CancelOrderResponseStatusEnum[keyof typeof CancelOrderResponseStatusEnum];
115
+
116
+ /**
117
+ *
118
+ * @export
119
+ * @interface CandleHistoryData
120
+ */
121
+ export interface CandleHistoryData {
122
+ /**
123
+ * Array of timestamps (seconds)
124
+ * @type {Array<number>}
125
+ * @memberof CandleHistoryData
126
+ */
127
+ t: Array<number>;
128
+ /**
129
+ * Array of opening prices
130
+ * @type {Array<string>}
131
+ * @memberof CandleHistoryData
132
+ */
133
+ o: Array<string>;
134
+ /**
135
+ * Array of high prices
136
+ * @type {Array<string>}
137
+ * @memberof CandleHistoryData
138
+ */
139
+ h: Array<string>;
140
+ /**
141
+ * Array of low prices
142
+ * @type {Array<string>}
143
+ * @memberof CandleHistoryData
144
+ */
145
+ l: Array<string>;
146
+ /**
147
+ * Array of closing prices
148
+ * @type {Array<string>}
149
+ * @memberof CandleHistoryData
150
+ */
151
+ c: Array<string>;
152
+ }
153
+ /**
154
+ *
155
+ * @export
156
+ * @interface CreateOrderRequest
157
+ */
158
+ export interface CreateOrderRequest {
159
+ /**
160
+ *
161
+ * @type {number}
162
+ * @memberof CreateOrderRequest
163
+ */
164
+ exchangeId: number;
165
+ /**
166
+ *
167
+ * @type {string}
168
+ * @memberof CreateOrderRequest
169
+ */
170
+ symbol?: string;
171
+ /**
172
+ *
173
+ * @type {number}
174
+ * @memberof CreateOrderRequest
175
+ */
176
+ accountId: number;
177
+ /**
178
+ * Whether this is a buy order
179
+ * @type {boolean}
180
+ * @memberof CreateOrderRequest
181
+ */
182
+ isBuy: boolean;
183
+ /**
184
+ *
185
+ * @type {string}
186
+ * @memberof CreateOrderRequest
187
+ */
188
+ limitPx: string;
189
+ /**
190
+ *
191
+ * @type {string}
192
+ * @memberof CreateOrderRequest
193
+ */
194
+ qty?: string;
195
+ /**
196
+ * Order type, (LIMIT = Limit, TP = Take Profit, SL = Stop Loss)
197
+ * @type {string}
198
+ * @memberof CreateOrderRequest
199
+ */
200
+ orderType: CreateOrderRequestOrderTypeEnum;
201
+ /**
202
+ * Order time in force, exclusively used for LIMIT orders
203
+ * @type {string}
204
+ * @memberof CreateOrderRequest
205
+ */
206
+ timeInForce?: CreateOrderRequestTimeInForceEnum;
207
+ /**
208
+ * Trigger price, only for TP/SL orders
209
+ * @type {string}
210
+ * @memberof CreateOrderRequest
211
+ */
212
+ triggerPx?: string;
213
+ /**
214
+ * Whether this is a reduce-only order, exclusively used for LIMIT IOC orders.
215
+ * @type {boolean}
216
+ * @memberof CreateOrderRequest
217
+ */
218
+ reduceOnly?: boolean;
219
+ /**
220
+ * See signatures and nonces section for more details on how to generate.
221
+ * @type {string}
222
+ * @memberof CreateOrderRequest
223
+ */
224
+ signature: string;
225
+ /**
226
+ * Order nonce, see signatures and nonces section for more details.
227
+ * @type {string}
228
+ * @memberof CreateOrderRequest
229
+ */
230
+ nonce: string;
231
+ /**
232
+ * Signer wallet address
233
+ * @type {string}
234
+ * @memberof CreateOrderRequest
235
+ */
236
+ signerWallet: string;
237
+ /**
238
+ * Expiration timestamp (exclusively for IOC orders). The order will only be filled before this timestamp.
239
+ * @type {number}
240
+ * @memberof CreateOrderRequest
241
+ */
242
+ expiresAfter?: number;
243
+ }
244
+
245
+
246
+ /**
247
+ * @export
248
+ */
249
+ export const CreateOrderRequestOrderTypeEnum = {
250
+ LIMIT: 'LIMIT',
251
+ TP: 'TP',
252
+ SL: 'SL'
253
+ } as const;
254
+ export type CreateOrderRequestOrderTypeEnum = typeof CreateOrderRequestOrderTypeEnum[keyof typeof CreateOrderRequestOrderTypeEnum];
255
+
256
+ /**
257
+ * @export
258
+ */
259
+ export const CreateOrderRequestTimeInForceEnum = {
260
+ IOC: 'IOC',
261
+ GTC: 'GTC'
262
+ } as const;
263
+ export type CreateOrderRequestTimeInForceEnum = typeof CreateOrderRequestTimeInForceEnum[keyof typeof CreateOrderRequestTimeInForceEnum];
264
+
265
+ /**
266
+ *
267
+ * @export
268
+ * @interface CreateOrderResponse
269
+ */
270
+ export interface CreateOrderResponse {
271
+ /**
272
+ * Order status
273
+ * @type {string}
274
+ * @memberof CreateOrderResponse
275
+ */
276
+ status: CreateOrderResponseStatusEnum;
277
+ /**
278
+ * Created order ID (currently generated for all order types except IOC)
279
+ * @type {string}
280
+ * @memberof CreateOrderResponse
281
+ */
282
+ orderId?: string;
283
+ }
284
+
285
+
286
+ /**
287
+ * @export
288
+ */
289
+ export const CreateOrderResponseStatusEnum = {
290
+ OPEN: 'OPEN',
291
+ FILLED: 'FILLED',
292
+ CANCELLED: 'CANCELLED',
293
+ REJECTED: 'REJECTED'
294
+ } as const;
295
+ export type CreateOrderResponseStatusEnum = typeof CreateOrderResponseStatusEnum[keyof typeof CreateOrderResponseStatusEnum];
296
+
297
+
298
+ /**
299
+ * Type of execution
300
+ * @export
301
+ */
302
+ export const ExecutionType = {
303
+ ORDER_MATCH: 'ORDER_MATCH',
304
+ LIQUIDATION: 'LIQUIDATION',
305
+ ADL: 'ADL'
306
+ } as const;
307
+ export type ExecutionType = typeof ExecutionType[keyof typeof ExecutionType];
308
+
309
+ /**
310
+ *
311
+ * @export
312
+ * @interface FeeTierParameters
313
+ */
314
+ export interface FeeTierParameters {
315
+ /**
316
+ *
317
+ * @type {number}
318
+ * @memberof FeeTierParameters
319
+ */
320
+ tierId: number;
321
+ /**
322
+ * Taker fee rate (fee will be qty * takerFee)
323
+ * @type {string}
324
+ * @memberof FeeTierParameters
325
+ */
326
+ takerFee: string;
327
+ /**
328
+ * Maker fee rate (fee will be qty * makerFee)
329
+ * @type {string}
330
+ * @memberof FeeTierParameters
331
+ */
332
+ makerFee: string;
333
+ /**
334
+ * 14-day volume level required this fee tier to be applied to a wallet
335
+ * @type {string}
336
+ * @memberof FeeTierParameters
337
+ */
338
+ volume14d: string;
339
+ /**
340
+ * Fee tier type (REGULAR = Standard tier, VIP = VIP tier)
341
+ * @type {string}
342
+ * @memberof FeeTierParameters
343
+ */
344
+ tierType: FeeTierParametersTierTypeEnum;
345
+ }
346
+
347
+
348
+ /**
349
+ * @export
350
+ */
351
+ export const FeeTierParametersTierTypeEnum = {
352
+ REGULAR: 'REGULAR',
353
+ VIP: 'VIP'
354
+ } as const;
355
+ export type FeeTierParametersTierTypeEnum = typeof FeeTierParametersTierTypeEnum[keyof typeof FeeTierParametersTierTypeEnum];
356
+
357
+ /**
358
+ *
359
+ * @export
360
+ * @interface GlobalFeeParameters
361
+ */
362
+ export interface GlobalFeeParameters {
363
+ /**
364
+ * OG user discount
365
+ * @type {string}
366
+ * @memberof GlobalFeeParameters
367
+ */
368
+ ogDiscount: string;
369
+ /**
370
+ * Referee discount
371
+ * @type {string}
372
+ * @memberof GlobalFeeParameters
373
+ */
374
+ refereeDiscount: string;
375
+ /**
376
+ * Referrer rebate
377
+ * @type {string}
378
+ * @memberof GlobalFeeParameters
379
+ */
380
+ referrerRebate: string;
381
+ /**
382
+ * Affiliate referrer rebate
383
+ * @type {string}
384
+ * @memberof GlobalFeeParameters
385
+ */
386
+ affiliateReferrerRebate: string;
387
+ }
388
+ /**
389
+ *
390
+ * @export
391
+ * @interface LiquidityParameters
392
+ */
393
+ export interface LiquidityParameters {
394
+ /**
395
+ *
396
+ * @type {string}
397
+ * @memberof LiquidityParameters
398
+ */
399
+ symbol: string;
400
+ /**
401
+ * Parameter determining the liquidity distribution along the AMM pricing curve, in particular expanding or contracting the max exposure parameter that would otherwise be determined by the capital available.
402
+ * @type {string}
403
+ * @memberof LiquidityParameters
404
+ */
405
+ depth: string;
406
+ /**
407
+ * Parameter determining the sensitivity of the dynamic funding rate to the size of the imbalances; higher multiplier means that the funding rate will diverge faster, all else being equal.
408
+ * @type {string}
409
+ * @memberof LiquidityParameters
410
+ */
411
+ velocityMultiplier: string;
412
+ }
413
+ /**
414
+ *
415
+ * @export
416
+ * @interface MarketDefinition
417
+ */
418
+ export interface MarketDefinition {
419
+ /**
420
+ *
421
+ * @type {string}
422
+ * @memberof MarketDefinition
423
+ */
424
+ symbol: string;
425
+ /**
426
+ * Numerical identifier for each market, only needed to generate signatures
427
+ * @type {number}
428
+ * @memberof MarketDefinition
429
+ */
430
+ marketId: number;
431
+ /**
432
+ *
433
+ * @type {string}
434
+ * @memberof MarketDefinition
435
+ */
436
+ minOrderQty: string;
437
+ /**
438
+ * Minimum size increment
439
+ * @type {string}
440
+ * @memberof MarketDefinition
441
+ */
442
+ qtyStepSize: string;
443
+ /**
444
+ * Minimum price increment
445
+ * @type {string}
446
+ * @memberof MarketDefinition
447
+ */
448
+ tickSize: string;
449
+ /**
450
+ * Minimum percentage of notional that needs to be covered to avoid liquidation procedures for a given market; below this value, your account is subject to liquidation procedures. When cross margining, all requirements across markets are covered by the same balance, and all positions are subject to liquidations.
451
+ * @type {string}
452
+ * @memberof MarketDefinition
453
+ */
454
+ liquidationMarginParameter: string;
455
+ /**
456
+ * Minimum percentage of notional that needs to be covered post trade; if the account does not satisfy this requirement, trades will not get executed.
457
+ * @type {string}
458
+ * @memberof MarketDefinition
459
+ */
460
+ initialMarginParameter: string;
461
+ /**
462
+ * Maximum leverage allowed
463
+ * @type {number}
464
+ * @memberof MarketDefinition
465
+ */
466
+ maxLeverage: number;
467
+ /**
468
+ * Maximum one-sided open interest in units for a given market.
469
+ * @type {string}
470
+ * @memberof MarketDefinition
471
+ */
472
+ oiCap: string;
473
+ }
474
+ /**
475
+ *
476
+ * @export
477
+ * @interface MarketSummary
478
+ */
479
+ export interface MarketSummary {
480
+ /**
481
+ *
482
+ * @type {string}
483
+ * @memberof MarketSummary
484
+ */
485
+ symbol: string;
486
+ /**
487
+ * Time when the market summary was last calculated (milliseconds)
488
+ * @type {number}
489
+ * @memberof MarketSummary
490
+ */
491
+ updatedAt: number;
492
+ /**
493
+ * Long open interest in lots
494
+ * @type {string}
495
+ * @memberof MarketSummary
496
+ */
497
+ longOiQty: string;
498
+ /**
499
+ * Short open interest in lots
500
+ * @type {string}
501
+ * @memberof MarketSummary
502
+ */
503
+ shortOiQty: string;
504
+ /**
505
+ * Total open interest quantity
506
+ * @type {string}
507
+ * @memberof MarketSummary
508
+ */
509
+ oiQty: string;
510
+ /**
511
+ * Current hourly funding rate
512
+ * @type {string}
513
+ * @memberof MarketSummary
514
+ */
515
+ fundingRate: string;
516
+ /**
517
+ * Current reference value of funding accrued by one unit of exposure; there is one funding value per market and per direction, with short v long funding values differing possibly due to Auto-Deleveraging (ADL)
518
+ * @type {string}
519
+ * @memberof MarketSummary
520
+ */
521
+ longFundingValue: string;
522
+ /**
523
+ * Current reference value of funding accrued by one unit of exposure; there is one funding value per market and per direction, with short v long funding values differing possibly due to Auto-Deleveraging (ADL)
524
+ * @type {string}
525
+ * @memberof MarketSummary
526
+ */
527
+ shortFundingValue: string;
528
+ /**
529
+ * Funding rate velocity
530
+ * @type {string}
531
+ * @memberof MarketSummary
532
+ */
533
+ fundingRateVelocity: string;
534
+ /**
535
+ *
536
+ * @type {string}
537
+ * @memberof MarketSummary
538
+ */
539
+ volume24h: string;
540
+ /**
541
+ *
542
+ * @type {string}
543
+ * @memberof MarketSummary
544
+ */
545
+ pxChange24h?: string;
546
+ /**
547
+ * Last oracle price, at the moment of the last market summary update
548
+ * @type {string}
549
+ * @memberof MarketSummary
550
+ */
551
+ throttledOraclePrice?: string;
552
+ /**
553
+ * Last pool price, at the moment of the last market summary update
554
+ * @type {string}
555
+ * @memberof MarketSummary
556
+ */
557
+ throttledPoolPrice?: string;
558
+ /**
559
+ * Timestamp of the last price update (milliseconds)
560
+ * @type {number}
561
+ * @memberof MarketSummary
562
+ */
563
+ pricesUpdatedAt?: number;
564
+ }
565
+ /**
566
+ *
567
+ * @export
568
+ * @interface Order
569
+ */
570
+ export interface Order {
571
+ /**
572
+ *
573
+ * @type {number}
574
+ * @memberof Order
575
+ */
576
+ exchangeId: number;
577
+ /**
578
+ *
579
+ * @type {string}
580
+ * @memberof Order
581
+ */
582
+ symbol: string;
583
+ /**
584
+ *
585
+ * @type {number}
586
+ * @memberof Order
587
+ */
588
+ accountId: number;
589
+ /**
590
+ *
591
+ * @type {string}
592
+ * @memberof Order
593
+ */
594
+ orderId?: string;
595
+ /**
596
+ *
597
+ * @type {string}
598
+ * @memberof Order
599
+ */
600
+ qty?: string;
601
+ /**
602
+ * Executed quantity. Example: I request 1.0 BTCRUSDPERP and the order is filled with 0.2 BTCRUSDPERP, qty will stay at 1.0 and execQty will be 0.2.
603
+ * @type {string}
604
+ * @memberof Order
605
+ */
606
+ execQty?: string;
607
+ /**
608
+ * Order side (B = Buy/Bid, A = Ask/Sell)
609
+ * @type {string}
610
+ * @memberof Order
611
+ */
612
+ side: OrderSideEnum;
613
+ /**
614
+ *
615
+ * @type {string}
616
+ * @memberof Order
617
+ */
618
+ limitPx: string;
619
+ /**
620
+ * Order type, (LIMIT = Limit, TP = Take Profit, SL = Stop Loss)
621
+ * @type {string}
622
+ * @memberof Order
623
+ */
624
+ orderType: OrderOrderTypeEnum;
625
+ /**
626
+ * Price at which TP/SL orders will be triggered, should not be set for other order types.
627
+ * @type {string}
628
+ * @memberof Order
629
+ */
630
+ triggerPx?: string;
631
+ /**
632
+ * Order time in force, exclusively used for LIMIT orders
633
+ * @type {string}
634
+ * @memberof Order
635
+ */
636
+ timeInForce?: OrderTimeInForceEnum;
637
+ /**
638
+ * Whether this is a reduce-only order, exclusively used for LIMIT IOC orders.
639
+ * @type {boolean}
640
+ * @memberof Order
641
+ */
642
+ reduceOnly?: boolean;
643
+ /**
644
+ * Order status
645
+ * @type {string}
646
+ * @memberof Order
647
+ */
648
+ status: OrderStatusEnum;
649
+ /**
650
+ * Creation timestamp (milliseconds)
651
+ * @type {number}
652
+ * @memberof Order
653
+ */
654
+ createdAt: number;
655
+ /**
656
+ * Last update timestamp (milliseconds)
657
+ * @type {number}
658
+ * @memberof Order
659
+ */
660
+ lastUpdateAt: number;
661
+ }
662
+
663
+
664
+ /**
665
+ * @export
666
+ */
667
+ export const OrderSideEnum = {
668
+ B: 'B',
669
+ A: 'A'
670
+ } as const;
671
+ export type OrderSideEnum = typeof OrderSideEnum[keyof typeof OrderSideEnum];
672
+
673
+ /**
674
+ * @export
675
+ */
676
+ export const OrderOrderTypeEnum = {
677
+ LIMIT: 'LIMIT',
678
+ TP: 'TP',
679
+ SL: 'SL'
680
+ } as const;
681
+ export type OrderOrderTypeEnum = typeof OrderOrderTypeEnum[keyof typeof OrderOrderTypeEnum];
682
+
683
+ /**
684
+ * @export
685
+ */
686
+ export const OrderTimeInForceEnum = {
687
+ IOC: 'IOC',
688
+ GTC: 'GTC'
689
+ } as const;
690
+ export type OrderTimeInForceEnum = typeof OrderTimeInForceEnum[keyof typeof OrderTimeInForceEnum];
691
+
692
+ /**
693
+ * @export
694
+ */
695
+ export const OrderStatusEnum = {
696
+ OPEN: 'OPEN',
697
+ FILLED: 'FILLED',
698
+ CANCELLED: 'CANCELLED',
699
+ REJECTED: 'REJECTED'
700
+ } as const;
701
+ export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
702
+
703
+
704
+ /**
705
+ * Order status
706
+ * @export
707
+ */
708
+ export const OrderStatus = {
709
+ OPEN: 'OPEN',
710
+ FILLED: 'FILLED',
711
+ CANCELLED: 'CANCELLED',
712
+ REJECTED: 'REJECTED'
713
+ } as const;
714
+ export type OrderStatus = typeof OrderStatus[keyof typeof OrderStatus];
715
+
716
+
717
+ /**
718
+ * Order type, (LIMIT = Limit, TP = Take Profit, SL = Stop Loss)
719
+ * @export
720
+ */
721
+ export const OrderType = {
722
+ LIMIT: 'LIMIT',
723
+ TP: 'TP',
724
+ SL: 'SL'
725
+ } as const;
726
+ export type OrderType = typeof OrderType[keyof typeof OrderType];
727
+
728
+ /**
729
+ *
730
+ * @export
731
+ * @interface PaginationParameters
732
+ */
733
+ export interface PaginationParameters {
734
+ /**
735
+ * Number of items requested
736
+ * @type {number}
737
+ * @memberof PaginationParameters
738
+ */
739
+ limit: number;
740
+ /**
741
+ * Number of items returned
742
+ * @type {number}
743
+ * @memberof PaginationParameters
744
+ */
745
+ count: number;
746
+ /**
747
+ * Timestamp of last result, in milliseconds
748
+ * @type {number}
749
+ * @memberof PaginationParameters
750
+ */
751
+ endTime?: number;
752
+ /**
753
+ * Timestamp of first result, in milliseconds
754
+ * @type {number}
755
+ * @memberof PaginationParameters
756
+ */
757
+ startTime?: number;
758
+ }
759
+ /**
760
+ *
761
+ * @export
762
+ * @interface PerpExecution
763
+ */
764
+ export interface PerpExecution {
765
+ /**
766
+ *
767
+ * @type {number}
768
+ * @memberof PerpExecution
769
+ */
770
+ exchangeId: number;
771
+ /**
772
+ *
773
+ * @type {string}
774
+ * @memberof PerpExecution
775
+ */
776
+ symbol: string;
777
+ /**
778
+ *
779
+ * @type {number}
780
+ * @memberof PerpExecution
781
+ */
782
+ accountId: number;
783
+ /**
784
+ *
785
+ * @type {string}
786
+ * @memberof PerpExecution
787
+ */
788
+ qty: string;
789
+ /**
790
+ * Order side (B = Buy/Bid, A = Ask/Sell)
791
+ * @type {string}
792
+ * @memberof PerpExecution
793
+ */
794
+ side: PerpExecutionSideEnum;
795
+ /**
796
+ *
797
+ * @type {string}
798
+ * @memberof PerpExecution
799
+ */
800
+ price: string;
801
+ /**
802
+ *
803
+ * @type {string}
804
+ * @memberof PerpExecution
805
+ */
806
+ fee: string;
807
+ /**
808
+ * Type of execution
809
+ * @type {string}
810
+ * @memberof PerpExecution
811
+ */
812
+ type: PerpExecutionTypeEnum;
813
+ /**
814
+ * Execution timestamp (milliseconds)
815
+ * @type {number}
816
+ * @memberof PerpExecution
817
+ */
818
+ timestamp: number;
819
+ /**
820
+ * Execution sequence number, increases by 1 for every perp execution in reya chain
821
+ * @type {number}
822
+ * @memberof PerpExecution
823
+ */
824
+ sequenceNumber: number;
825
+ }
826
+
827
+
828
+ /**
829
+ * @export
830
+ */
831
+ export const PerpExecutionSideEnum = {
832
+ B: 'B',
833
+ A: 'A'
834
+ } as const;
835
+ export type PerpExecutionSideEnum = typeof PerpExecutionSideEnum[keyof typeof PerpExecutionSideEnum];
836
+
837
+ /**
838
+ * @export
839
+ */
840
+ export const PerpExecutionTypeEnum = {
841
+ ORDER_MATCH: 'ORDER_MATCH',
842
+ LIQUIDATION: 'LIQUIDATION',
843
+ ADL: 'ADL'
844
+ } as const;
845
+ export type PerpExecutionTypeEnum = typeof PerpExecutionTypeEnum[keyof typeof PerpExecutionTypeEnum];
846
+
847
+ /**
848
+ *
849
+ * @export
850
+ * @interface PerpExecutionList
851
+ */
852
+ export interface PerpExecutionList {
853
+ /**
854
+ *
855
+ * @type {Array<PerpExecutionListDataInner>}
856
+ * @memberof PerpExecutionList
857
+ */
858
+ data: Array<PerpExecutionListDataInner>;
859
+ /**
860
+ *
861
+ * @type {PerpExecutionListMeta}
862
+ * @memberof PerpExecutionList
863
+ */
864
+ meta: PerpExecutionListMeta;
865
+ }
866
+ /**
867
+ *
868
+ * @export
869
+ * @interface PerpExecutionListDataInner
870
+ */
871
+ export interface PerpExecutionListDataInner {
872
+ /**
873
+ *
874
+ * @type {number}
875
+ * @memberof PerpExecutionListDataInner
876
+ */
877
+ exchangeId: number;
878
+ /**
879
+ *
880
+ * @type {string}
881
+ * @memberof PerpExecutionListDataInner
882
+ */
883
+ symbol: string;
884
+ /**
885
+ *
886
+ * @type {number}
887
+ * @memberof PerpExecutionListDataInner
888
+ */
889
+ accountId: number;
890
+ /**
891
+ *
892
+ * @type {string}
893
+ * @memberof PerpExecutionListDataInner
894
+ */
895
+ qty: string;
896
+ /**
897
+ * Order side (B = Buy/Bid, A = Ask/Sell)
898
+ * @type {string}
899
+ * @memberof PerpExecutionListDataInner
900
+ */
901
+ side: PerpExecutionListDataInnerSideEnum;
902
+ /**
903
+ *
904
+ * @type {string}
905
+ * @memberof PerpExecutionListDataInner
906
+ */
907
+ price: string;
908
+ /**
909
+ *
910
+ * @type {string}
911
+ * @memberof PerpExecutionListDataInner
912
+ */
913
+ fee: string;
914
+ /**
915
+ * Type of execution
916
+ * @type {string}
917
+ * @memberof PerpExecutionListDataInner
918
+ */
919
+ type: PerpExecutionListDataInnerTypeEnum;
920
+ /**
921
+ * Execution timestamp (milliseconds)
922
+ * @type {number}
923
+ * @memberof PerpExecutionListDataInner
924
+ */
925
+ timestamp: number;
926
+ /**
927
+ * Execution sequence number, increases by 1 for every perp execution in reya chain
928
+ * @type {number}
929
+ * @memberof PerpExecutionListDataInner
930
+ */
931
+ sequenceNumber: number;
932
+ }
933
+
934
+
935
+ /**
936
+ * @export
937
+ */
938
+ export const PerpExecutionListDataInnerSideEnum = {
939
+ B: 'B',
940
+ A: 'A'
941
+ } as const;
942
+ export type PerpExecutionListDataInnerSideEnum = typeof PerpExecutionListDataInnerSideEnum[keyof typeof PerpExecutionListDataInnerSideEnum];
943
+
944
+ /**
945
+ * @export
946
+ */
947
+ export const PerpExecutionListDataInnerTypeEnum = {
948
+ ORDER_MATCH: 'ORDER_MATCH',
949
+ LIQUIDATION: 'LIQUIDATION',
950
+ ADL: 'ADL'
951
+ } as const;
952
+ export type PerpExecutionListDataInnerTypeEnum = typeof PerpExecutionListDataInnerTypeEnum[keyof typeof PerpExecutionListDataInnerTypeEnum];
953
+
954
+ /**
955
+ *
956
+ * @export
957
+ * @interface PerpExecutionListMeta
958
+ */
959
+ export interface PerpExecutionListMeta {
960
+ /**
961
+ * Number of items requested
962
+ * @type {number}
963
+ * @memberof PerpExecutionListMeta
964
+ */
965
+ limit: number;
966
+ /**
967
+ * Number of items returned
968
+ * @type {number}
969
+ * @memberof PerpExecutionListMeta
970
+ */
971
+ count: number;
972
+ /**
973
+ * Timestamp of last result, in milliseconds
974
+ * @type {number}
975
+ * @memberof PerpExecutionListMeta
976
+ */
977
+ endTime?: number;
978
+ /**
979
+ * Timestamp of first result, in milliseconds
980
+ * @type {number}
981
+ * @memberof PerpExecutionListMeta
982
+ */
983
+ startTime?: number;
984
+ }
985
+ /**
986
+ *
987
+ * @export
988
+ * @interface Position
989
+ */
990
+ export interface Position {
991
+ /**
992
+ *
993
+ * @type {number}
994
+ * @memberof Position
995
+ */
996
+ exchangeId: number;
997
+ /**
998
+ *
999
+ * @type {string}
1000
+ * @memberof Position
1001
+ */
1002
+ symbol: string;
1003
+ /**
1004
+ *
1005
+ * @type {number}
1006
+ * @memberof Position
1007
+ */
1008
+ accountId: number;
1009
+ /**
1010
+ *
1011
+ * @type {string}
1012
+ * @memberof Position
1013
+ */
1014
+ qty: string;
1015
+ /**
1016
+ * Order side (B = Buy/Bid, A = Ask/Sell)
1017
+ * @type {string}
1018
+ * @memberof Position
1019
+ */
1020
+ side: PositionSideEnum;
1021
+ /**
1022
+ *
1023
+ * @type {string}
1024
+ * @memberof Position
1025
+ */
1026
+ avgEntryPrice: string;
1027
+ /**
1028
+ * Average of funding values at the entry times of currently open exposure, which serves as a baseline from which to compute the accrued funding in the position: units x (fundingValue - avgEntryFundingValue)
1029
+ * @type {string}
1030
+ * @memberof Position
1031
+ */
1032
+ avgEntryFundingValue: string;
1033
+ /**
1034
+ * Sequence number of last execution taken into account for the position.
1035
+ * @type {number}
1036
+ * @memberof Position
1037
+ */
1038
+ lastTradeSequenceNumber: number;
1039
+ }
1040
+
1041
+
1042
+ /**
1043
+ * @export
1044
+ */
1045
+ export const PositionSideEnum = {
1046
+ B: 'B',
1047
+ A: 'A'
1048
+ } as const;
1049
+ export type PositionSideEnum = typeof PositionSideEnum[keyof typeof PositionSideEnum];
1050
+
1051
+ /**
1052
+ *
1053
+ * @export
1054
+ * @interface Price
1055
+ */
1056
+ export interface Price {
1057
+ /**
1058
+ *
1059
+ * @type {string}
1060
+ * @memberof Price
1061
+ */
1062
+ symbol: string;
1063
+ /**
1064
+ * Price given by the Stork feeds, used both as the peg price for prices on Reya, as well as Mark Prices. The Stork price feed is usually the perp prices across three major CEXs
1065
+ * @type {string}
1066
+ * @memberof Price
1067
+ */
1068
+ oraclePrice?: string;
1069
+ /**
1070
+ * The price currently quoted by the AMM for zero volume, from which trades are priced (equivalent to mid price in an order book); a trade of any size will be move this price up or down depending on the direction.
1071
+ * @type {string}
1072
+ * @memberof Price
1073
+ */
1074
+ poolPrice?: string;
1075
+ /**
1076
+ * Last update timestamp (milliseconds)
1077
+ * @type {number}
1078
+ * @memberof Price
1079
+ */
1080
+ updatedAt: number;
1081
+ }
1082
+ /**
1083
+ *
1084
+ * @export
1085
+ * @interface RequestError
1086
+ */
1087
+ export interface RequestError {
1088
+ /**
1089
+ * Standardized error codes for API responses
1090
+ * @type {string}
1091
+ * @memberof RequestError
1092
+ */
1093
+ error: RequestErrorErrorEnum;
1094
+ /**
1095
+ * Human-readable error message
1096
+ * @type {string}
1097
+ * @memberof RequestError
1098
+ */
1099
+ message: string;
1100
+ }
1101
+
1102
+
1103
+ /**
1104
+ * @export
1105
+ */
1106
+ export const RequestErrorErrorEnum = {
1107
+ SYMBOL_NOT_FOUND: 'SYMBOL_NOT_FOUND',
1108
+ NO_ACCOUNTS_FOUND: 'NO_ACCOUNTS_FOUND',
1109
+ NO_PRICES_FOUND_FOR_SYMBOL: 'NO_PRICES_FOUND_FOR_SYMBOL',
1110
+ INPUT_VALIDATION_ERROR: 'INPUT_VALIDATION_ERROR',
1111
+ CREATE_ORDER_OTHER_ERROR: 'CREATE_ORDER_OTHER_ERROR',
1112
+ CANCEL_ORDER_OTHER_ERROR: 'CANCEL_ORDER_OTHER_ERROR'
1113
+ } as const;
1114
+ export type RequestErrorErrorEnum = typeof RequestErrorErrorEnum[keyof typeof RequestErrorErrorEnum];
1115
+
1116
+
1117
+ /**
1118
+ * Standardized error codes for API responses
1119
+ * @export
1120
+ */
1121
+ export const RequestErrorCode = {
1122
+ SYMBOL_NOT_FOUND: 'SYMBOL_NOT_FOUND',
1123
+ NO_ACCOUNTS_FOUND: 'NO_ACCOUNTS_FOUND',
1124
+ NO_PRICES_FOUND_FOR_SYMBOL: 'NO_PRICES_FOUND_FOR_SYMBOL',
1125
+ INPUT_VALIDATION_ERROR: 'INPUT_VALIDATION_ERROR',
1126
+ CREATE_ORDER_OTHER_ERROR: 'CREATE_ORDER_OTHER_ERROR',
1127
+ CANCEL_ORDER_OTHER_ERROR: 'CANCEL_ORDER_OTHER_ERROR'
1128
+ } as const;
1129
+ export type RequestErrorCode = typeof RequestErrorCode[keyof typeof RequestErrorCode];
1130
+
1131
+ /**
1132
+ *
1133
+ * @export
1134
+ * @interface ServerError
1135
+ */
1136
+ export interface ServerError {
1137
+ /**
1138
+ * Standardized error codes for API responses
1139
+ * @type {string}
1140
+ * @memberof ServerError
1141
+ */
1142
+ error: ServerErrorErrorEnum;
1143
+ /**
1144
+ * Human-readable error message
1145
+ * @type {string}
1146
+ * @memberof ServerError
1147
+ */
1148
+ message: string;
1149
+ }
1150
+
1151
+
1152
+ /**
1153
+ * @export
1154
+ */
1155
+ export const ServerErrorErrorEnum = {
1156
+ INTERNAL_SERVER_ERROR: 'INTERNAL_SERVER_ERROR'
1157
+ } as const;
1158
+ export type ServerErrorErrorEnum = typeof ServerErrorErrorEnum[keyof typeof ServerErrorErrorEnum];
1159
+
1160
+
1161
+ /**
1162
+ * Standardized error codes for API responses
1163
+ * @export
1164
+ */
1165
+ export const ServerErrorCode = {
1166
+ INTERNAL_SERVER_ERROR: 'INTERNAL_SERVER_ERROR'
1167
+ } as const;
1168
+ export type ServerErrorCode = typeof ServerErrorCode[keyof typeof ServerErrorCode];
1169
+
1170
+
1171
+ /**
1172
+ * Order side (B = Buy/Bid, A = Ask/Sell)
1173
+ * @export
1174
+ */
1175
+ export const Side = {
1176
+ B: 'B',
1177
+ A: 'A'
1178
+ } as const;
1179
+ export type Side = typeof Side[keyof typeof Side];
1180
+
1181
+ /**
1182
+ *
1183
+ * @export
1184
+ * @interface SpotExecution
1185
+ */
1186
+ export interface SpotExecution {
1187
+ /**
1188
+ *
1189
+ * @type {number}
1190
+ * @memberof SpotExecution
1191
+ */
1192
+ exchangeId: number;
1193
+ /**
1194
+ *
1195
+ * @type {string}
1196
+ * @memberof SpotExecution
1197
+ */
1198
+ symbol: string;
1199
+ /**
1200
+ *
1201
+ * @type {number}
1202
+ * @memberof SpotExecution
1203
+ */
1204
+ accountId: number;
1205
+ /**
1206
+ * Order side (B = Buy/Bid, A = Ask/Sell)
1207
+ * @type {string}
1208
+ * @memberof SpotExecution
1209
+ */
1210
+ side: SpotExecutionSideEnum;
1211
+ /**
1212
+ *
1213
+ * @type {string}
1214
+ * @memberof SpotExecution
1215
+ */
1216
+ qty: string;
1217
+ /**
1218
+ *
1219
+ * @type {string}
1220
+ * @memberof SpotExecution
1221
+ */
1222
+ price?: string;
1223
+ /**
1224
+ *
1225
+ * @type {string}
1226
+ * @memberof SpotExecution
1227
+ */
1228
+ fee: string;
1229
+ /**
1230
+ * Type of execution
1231
+ * @type {string}
1232
+ * @memberof SpotExecution
1233
+ */
1234
+ type: SpotExecutionTypeEnum;
1235
+ /**
1236
+ * Execution timestamp (milliseconds)
1237
+ * @type {number}
1238
+ * @memberof SpotExecution
1239
+ */
1240
+ timestamp: number;
1241
+ }
1242
+
1243
+
1244
+ /**
1245
+ * @export
1246
+ */
1247
+ export const SpotExecutionSideEnum = {
1248
+ B: 'B',
1249
+ A: 'A'
1250
+ } as const;
1251
+ export type SpotExecutionSideEnum = typeof SpotExecutionSideEnum[keyof typeof SpotExecutionSideEnum];
1252
+
1253
+ /**
1254
+ * @export
1255
+ */
1256
+ export const SpotExecutionTypeEnum = {
1257
+ ORDER_MATCH: 'ORDER_MATCH',
1258
+ LIQUIDATION: 'LIQUIDATION',
1259
+ ADL: 'ADL'
1260
+ } as const;
1261
+ export type SpotExecutionTypeEnum = typeof SpotExecutionTypeEnum[keyof typeof SpotExecutionTypeEnum];
1262
+
1263
+ /**
1264
+ *
1265
+ * @export
1266
+ * @interface SpotExecutionList
1267
+ */
1268
+ export interface SpotExecutionList {
1269
+ /**
1270
+ *
1271
+ * @type {Array<SpotExecutionListDataInner>}
1272
+ * @memberof SpotExecutionList
1273
+ */
1274
+ data: Array<SpotExecutionListDataInner>;
1275
+ /**
1276
+ *
1277
+ * @type {PerpExecutionListMeta}
1278
+ * @memberof SpotExecutionList
1279
+ */
1280
+ meta: PerpExecutionListMeta;
1281
+ }
1282
+ /**
1283
+ *
1284
+ * @export
1285
+ * @interface SpotExecutionListDataInner
1286
+ */
1287
+ export interface SpotExecutionListDataInner {
1288
+ /**
1289
+ *
1290
+ * @type {number}
1291
+ * @memberof SpotExecutionListDataInner
1292
+ */
1293
+ exchangeId: number;
1294
+ /**
1295
+ *
1296
+ * @type {string}
1297
+ * @memberof SpotExecutionListDataInner
1298
+ */
1299
+ symbol: string;
1300
+ /**
1301
+ *
1302
+ * @type {number}
1303
+ * @memberof SpotExecutionListDataInner
1304
+ */
1305
+ accountId: number;
1306
+ /**
1307
+ * Order side (B = Buy/Bid, A = Ask/Sell)
1308
+ * @type {string}
1309
+ * @memberof SpotExecutionListDataInner
1310
+ */
1311
+ side: SpotExecutionListDataInnerSideEnum;
1312
+ /**
1313
+ *
1314
+ * @type {string}
1315
+ * @memberof SpotExecutionListDataInner
1316
+ */
1317
+ qty: string;
1318
+ /**
1319
+ *
1320
+ * @type {string}
1321
+ * @memberof SpotExecutionListDataInner
1322
+ */
1323
+ price?: string;
1324
+ /**
1325
+ *
1326
+ * @type {string}
1327
+ * @memberof SpotExecutionListDataInner
1328
+ */
1329
+ fee: string;
1330
+ /**
1331
+ * Type of execution
1332
+ * @type {string}
1333
+ * @memberof SpotExecutionListDataInner
1334
+ */
1335
+ type: SpotExecutionListDataInnerTypeEnum;
1336
+ /**
1337
+ * Execution timestamp (milliseconds)
1338
+ * @type {number}
1339
+ * @memberof SpotExecutionListDataInner
1340
+ */
1341
+ timestamp: number;
1342
+ }
1343
+
1344
+
1345
+ /**
1346
+ * @export
1347
+ */
1348
+ export const SpotExecutionListDataInnerSideEnum = {
1349
+ B: 'B',
1350
+ A: 'A'
1351
+ } as const;
1352
+ export type SpotExecutionListDataInnerSideEnum = typeof SpotExecutionListDataInnerSideEnum[keyof typeof SpotExecutionListDataInnerSideEnum];
1353
+
1354
+ /**
1355
+ * @export
1356
+ */
1357
+ export const SpotExecutionListDataInnerTypeEnum = {
1358
+ ORDER_MATCH: 'ORDER_MATCH',
1359
+ LIQUIDATION: 'LIQUIDATION',
1360
+ ADL: 'ADL'
1361
+ } as const;
1362
+ export type SpotExecutionListDataInnerTypeEnum = typeof SpotExecutionListDataInnerTypeEnum[keyof typeof SpotExecutionListDataInnerTypeEnum];
1363
+
1364
+
1365
+ /**
1366
+ * Order time in force (IOC = Immediate or Cancel, GTC = Good Till Cancel)
1367
+ * @export
1368
+ */
1369
+ export const TimeInForce = {
1370
+ IOC: 'IOC',
1371
+ GTC: 'GTC'
1372
+ } as const;
1373
+ export type TimeInForce = typeof TimeInForce[keyof typeof TimeInForce];
1374
+
1375
+ /**
1376
+ *
1377
+ * @export
1378
+ * @interface WalletConfiguration
1379
+ */
1380
+ export interface WalletConfiguration {
1381
+ /**
1382
+ * Fee tier identifier
1383
+ * @type {number}
1384
+ * @memberof WalletConfiguration
1385
+ */
1386
+ feeTierId: number;
1387
+ /**
1388
+ * OG status
1389
+ * @type {boolean}
1390
+ * @memberof WalletConfiguration
1391
+ */
1392
+ ogStatus: boolean;
1393
+ /**
1394
+ * Affiliate status
1395
+ * @type {boolean}
1396
+ * @memberof WalletConfiguration
1397
+ */
1398
+ affiliateStatus: boolean;
1399
+ /**
1400
+ * Referee status
1401
+ * @type {boolean}
1402
+ * @memberof WalletConfiguration
1403
+ */
1404
+ refereeStatus: boolean;
1405
+ }