@bluefin-exchange/pro-sdk 0.1.21 → 0.1.23
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/src/api.d.ts +27 -175
- package/dist/src/api.js +4 -17
- package/package.json +1 -1
- package/src/api.ts +27 -184
package/dist/src/api.d.ts
CHANGED
|
@@ -128,6 +128,19 @@ export interface Account {
|
|
|
128
128
|
*/
|
|
129
129
|
'authorizedAccounts': Array<string>;
|
|
130
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* Aggregated details about a trade in the account.
|
|
133
|
+
* @export
|
|
134
|
+
* @interface AccountAggregatedTradeUpdate
|
|
135
|
+
*/
|
|
136
|
+
export interface AccountAggregatedTradeUpdate {
|
|
137
|
+
/**
|
|
138
|
+
*
|
|
139
|
+
* @type {Trade}
|
|
140
|
+
* @memberof AccountAggregatedTradeUpdate
|
|
141
|
+
*/
|
|
142
|
+
'trade': Trade;
|
|
143
|
+
}
|
|
131
144
|
/**
|
|
132
145
|
*
|
|
133
146
|
* @export
|
|
@@ -217,6 +230,7 @@ export interface AccountCommandFailureUpdate {
|
|
|
217
230
|
export declare const AccountDataStream: {
|
|
218
231
|
readonly AccountOrderUpdate: "AccountOrderUpdate";
|
|
219
232
|
readonly AccountTradeUpdate: "AccountTradeUpdate";
|
|
233
|
+
readonly AccountAggregatedTradeUpdate: "AccountAggregatedTradeUpdate";
|
|
220
234
|
readonly AccountPositionUpdate: "AccountPositionUpdate";
|
|
221
235
|
readonly AccountUpdate: "AccountUpdate";
|
|
222
236
|
readonly AccountTransactionUpdate: "AccountTransactionUpdate";
|
|
@@ -247,6 +261,7 @@ export type AccountEventReason = typeof AccountEventReason[keyof typeof AccountE
|
|
|
247
261
|
export declare const AccountEventType: {
|
|
248
262
|
readonly AccountUpdate: "AccountUpdate";
|
|
249
263
|
readonly AccountTradeUpdate: "AccountTradeUpdate";
|
|
264
|
+
readonly AccountAggregatedTradeUpdate: "AccountAggregatedTradeUpdate";
|
|
250
265
|
readonly AccountOrderUpdate: "AccountOrderUpdate";
|
|
251
266
|
readonly AccountPositionUpdate: "AccountPositionUpdate";
|
|
252
267
|
readonly AccountTransactionUpdate: "AccountTransactionUpdate";
|
|
@@ -452,10 +467,10 @@ export interface AccountPositionUpdate {
|
|
|
452
467
|
'unrealizedPnlE9': string;
|
|
453
468
|
/**
|
|
454
469
|
*
|
|
455
|
-
* @type {
|
|
470
|
+
* @type {PositionSide}
|
|
456
471
|
* @memberof AccountPositionUpdate
|
|
457
472
|
*/
|
|
458
|
-
'side':
|
|
473
|
+
'side': PositionSide;
|
|
459
474
|
/**
|
|
460
475
|
* The initial margin required for the position.
|
|
461
476
|
* @type {string}
|
|
@@ -542,7 +557,7 @@ export interface AccountStreamMessage {
|
|
|
542
557
|
* The payload of the message, which varies based on the event type.
|
|
543
558
|
* @export
|
|
544
559
|
*/
|
|
545
|
-
export type AccountStreamMessagePayload = AccountCommandFailureUpdate | AccountOrderUpdate | AccountPositionUpdate | AccountTradeUpdate | AccountTransactionUpdate | AccountUpdate;
|
|
560
|
+
export type AccountStreamMessagePayload = AccountAggregatedTradeUpdate | AccountCommandFailureUpdate | AccountOrderUpdate | AccountPositionUpdate | AccountTradeUpdate | AccountTransactionUpdate | AccountUpdate;
|
|
546
561
|
/**
|
|
547
562
|
* Subscription message for account data streams.
|
|
548
563
|
* @export
|
|
@@ -574,96 +589,12 @@ export interface AccountSubscriptionMessage {
|
|
|
574
589
|
* @interface AccountTradeUpdate
|
|
575
590
|
*/
|
|
576
591
|
export interface AccountTradeUpdate {
|
|
577
|
-
/**
|
|
578
|
-
* The unique identifier for the trade.
|
|
579
|
-
* @type {string}
|
|
580
|
-
* @memberof AccountTradeUpdate
|
|
581
|
-
*/
|
|
582
|
-
'tradeId': string;
|
|
583
|
-
/**
|
|
584
|
-
* The client order ID associated with the trade.
|
|
585
|
-
* @type {string}
|
|
586
|
-
* @memberof AccountTradeUpdate
|
|
587
|
-
*/
|
|
588
|
-
'clientOrderId'?: string;
|
|
589
|
-
/**
|
|
590
|
-
* The symbol of the market.
|
|
591
|
-
* @type {string}
|
|
592
|
-
* @memberof AccountTradeUpdate
|
|
593
|
-
*/
|
|
594
|
-
'symbol': string;
|
|
595
|
-
/**
|
|
596
|
-
* The hash of the order.
|
|
597
|
-
* @type {string}
|
|
598
|
-
* @memberof AccountTradeUpdate
|
|
599
|
-
*/
|
|
600
|
-
'orderHash': string;
|
|
601
|
-
/**
|
|
602
|
-
*
|
|
603
|
-
* @type {TradeType}
|
|
604
|
-
* @memberof AccountTradeUpdate
|
|
605
|
-
*/
|
|
606
|
-
'type': TradeType;
|
|
607
|
-
/**
|
|
608
|
-
*
|
|
609
|
-
* @type {Side}
|
|
610
|
-
* @memberof AccountTradeUpdate
|
|
611
|
-
*/
|
|
612
|
-
'tradeSide': Side;
|
|
613
|
-
/**
|
|
614
|
-
* Indicates if the trade was a maker order.
|
|
615
|
-
* @type {boolean}
|
|
616
|
-
* @memberof AccountTradeUpdate
|
|
617
|
-
*/
|
|
618
|
-
'isMaker': boolean;
|
|
619
|
-
/**
|
|
620
|
-
* The price of the trade.
|
|
621
|
-
* @type {string}
|
|
622
|
-
* @memberof AccountTradeUpdate
|
|
623
|
-
*/
|
|
624
|
-
'priceE9': string;
|
|
625
|
-
/**
|
|
626
|
-
* The quantity of the trade.
|
|
627
|
-
* @type {string}
|
|
628
|
-
* @memberof AccountTradeUpdate
|
|
629
|
-
*/
|
|
630
|
-
'quantityE9': string;
|
|
631
|
-
/**
|
|
632
|
-
* The quote quantity of the trade.
|
|
633
|
-
* @type {string}
|
|
634
|
-
* @memberof AccountTradeUpdate
|
|
635
|
-
*/
|
|
636
|
-
'quoteQuantityE9': string;
|
|
637
|
-
/**
|
|
638
|
-
* The realized profit and loss.
|
|
639
|
-
* @type {string}
|
|
640
|
-
* @memberof AccountTradeUpdate
|
|
641
|
-
*/
|
|
642
|
-
'realizedPnlE9': string;
|
|
643
592
|
/**
|
|
644
593
|
*
|
|
645
|
-
* @type {
|
|
594
|
+
* @type {Trade}
|
|
646
595
|
* @memberof AccountTradeUpdate
|
|
647
596
|
*/
|
|
648
|
-
'
|
|
649
|
-
/**
|
|
650
|
-
* The trading fee for the trade.
|
|
651
|
-
* @type {string}
|
|
652
|
-
* @memberof AccountTradeUpdate
|
|
653
|
-
*/
|
|
654
|
-
'tradingFeeE9': string;
|
|
655
|
-
/**
|
|
656
|
-
* The market symbol of the asset used for the trading fee.
|
|
657
|
-
* @type {string}
|
|
658
|
-
* @memberof AccountTradeUpdate
|
|
659
|
-
*/
|
|
660
|
-
'tradingFeeAssetSymbol': string;
|
|
661
|
-
/**
|
|
662
|
-
* The timestamp when the trade was executed in milliseconds.
|
|
663
|
-
* @type {number}
|
|
664
|
-
* @memberof AccountTradeUpdate
|
|
665
|
-
*/
|
|
666
|
-
'executedAtMillis': number;
|
|
597
|
+
'trade': Trade;
|
|
667
598
|
}
|
|
668
599
|
/**
|
|
669
600
|
* Details about a transaction in the account.
|
|
@@ -861,10 +792,10 @@ export interface ActiveOrderUpdate {
|
|
|
861
792
|
'filledQuantityE9': string;
|
|
862
793
|
/**
|
|
863
794
|
*
|
|
864
|
-
* @type {
|
|
795
|
+
* @type {TradeSide}
|
|
865
796
|
* @memberof ActiveOrderUpdate
|
|
866
797
|
*/
|
|
867
|
-
'side':
|
|
798
|
+
'side': TradeSide;
|
|
868
799
|
/**
|
|
869
800
|
* The leverage of the order in scientific notation with 9 decimal places.
|
|
870
801
|
* @type {string}
|
|
@@ -2585,68 +2516,6 @@ export interface PostCreateOrder202Response {
|
|
|
2585
2516
|
*/
|
|
2586
2517
|
'orderHash': string;
|
|
2587
2518
|
}
|
|
2588
|
-
/**
|
|
2589
|
-
*
|
|
2590
|
-
* @export
|
|
2591
|
-
* @interface RecentTradeUpdates
|
|
2592
|
-
*/
|
|
2593
|
-
export interface RecentTradeUpdates {
|
|
2594
|
-
/**
|
|
2595
|
-
*
|
|
2596
|
-
* @type {Array<RecentTradesUpdate>}
|
|
2597
|
-
* @memberof RecentTradeUpdates
|
|
2598
|
-
*/
|
|
2599
|
-
'recentTrades': Array<RecentTradesUpdate>;
|
|
2600
|
-
}
|
|
2601
|
-
/**
|
|
2602
|
-
*
|
|
2603
|
-
* @export
|
|
2604
|
-
* @interface RecentTradesUpdate
|
|
2605
|
-
*/
|
|
2606
|
-
export interface RecentTradesUpdate {
|
|
2607
|
-
/**
|
|
2608
|
-
* The unique identifier of the trade.
|
|
2609
|
-
* @type {number}
|
|
2610
|
-
* @memberof RecentTradesUpdate
|
|
2611
|
-
*/
|
|
2612
|
-
'id': number;
|
|
2613
|
-
/**
|
|
2614
|
-
* The symbol of the market where the trade occurred.
|
|
2615
|
-
* @type {string}
|
|
2616
|
-
* @memberof RecentTradesUpdate
|
|
2617
|
-
*/
|
|
2618
|
-
'symbol': string;
|
|
2619
|
-
/**
|
|
2620
|
-
* The trade price in scientific notation with 9 decimal places of precision.
|
|
2621
|
-
* @type {string}
|
|
2622
|
-
* @memberof RecentTradesUpdate
|
|
2623
|
-
*/
|
|
2624
|
-
'priceE9': string;
|
|
2625
|
-
/**
|
|
2626
|
-
* The quantity traded in scientific notation with 9 decimal places of precision.
|
|
2627
|
-
* @type {string}
|
|
2628
|
-
* @memberof RecentTradesUpdate
|
|
2629
|
-
*/
|
|
2630
|
-
'quantityE9': string;
|
|
2631
|
-
/**
|
|
2632
|
-
* The quote quantity traded in scientific notation with 9 decimal places of precision.
|
|
2633
|
-
* @type {string}
|
|
2634
|
-
* @memberof RecentTradesUpdate
|
|
2635
|
-
*/
|
|
2636
|
-
'quoteQuantityE9': string;
|
|
2637
|
-
/**
|
|
2638
|
-
*
|
|
2639
|
-
* @type {Side}
|
|
2640
|
-
* @memberof RecentTradesUpdate
|
|
2641
|
-
*/
|
|
2642
|
-
'side': Side;
|
|
2643
|
-
/**
|
|
2644
|
-
* The timestamp of the trade.
|
|
2645
|
-
* @type {number}
|
|
2646
|
-
* @memberof RecentTradesUpdate
|
|
2647
|
-
*/
|
|
2648
|
-
'updatedAtMillis': number;
|
|
2649
|
-
}
|
|
2650
2519
|
/**
|
|
2651
2520
|
*
|
|
2652
2521
|
* @export
|
|
@@ -2655,10 +2524,10 @@ export interface RecentTradesUpdate {
|
|
|
2655
2524
|
export interface RecentTradesUpdates {
|
|
2656
2525
|
/**
|
|
2657
2526
|
*
|
|
2658
|
-
* @type {Array<
|
|
2527
|
+
* @type {Array<Trade>}
|
|
2659
2528
|
* @memberof RecentTradesUpdates
|
|
2660
2529
|
*/
|
|
2661
|
-
'
|
|
2530
|
+
'trades': Array<Trade>;
|
|
2662
2531
|
}
|
|
2663
2532
|
/**
|
|
2664
2533
|
*
|
|
@@ -2716,17 +2585,6 @@ export declare const SelfTradePreventionType: {
|
|
|
2716
2585
|
readonly Unspecified: "UNSPECIFIED";
|
|
2717
2586
|
};
|
|
2718
2587
|
export type SelfTradePreventionType = typeof SelfTradePreventionType[keyof typeof SelfTradePreventionType];
|
|
2719
|
-
/**
|
|
2720
|
-
* Indicates the side of the trade.
|
|
2721
|
-
* @export
|
|
2722
|
-
* @enum {string}
|
|
2723
|
-
*/
|
|
2724
|
-
export declare const Side: {
|
|
2725
|
-
readonly Long: "LONG";
|
|
2726
|
-
readonly Short: "SHORT";
|
|
2727
|
-
readonly Unspecified: "UNSPECIFIED";
|
|
2728
|
-
};
|
|
2729
|
-
export type Side = typeof Side[keyof typeof Side];
|
|
2730
2588
|
/**
|
|
2731
2589
|
* Response message indicating the success or failure of a subscription operation.
|
|
2732
2590
|
* @export
|
|
@@ -3256,13 +3114,13 @@ export interface Trade {
|
|
|
3256
3114
|
* @type {string}
|
|
3257
3115
|
* @memberof Trade
|
|
3258
3116
|
*/
|
|
3259
|
-
'tradingFeeAsset'?:
|
|
3117
|
+
'tradingFeeAsset'?: string;
|
|
3260
3118
|
/**
|
|
3261
3119
|
* Gas fee.
|
|
3262
|
-
* @type {
|
|
3120
|
+
* @type {string}
|
|
3263
3121
|
* @memberof Trade
|
|
3264
3122
|
*/
|
|
3265
|
-
'gasFeeE9'?:
|
|
3123
|
+
'gasFeeE9'?: string;
|
|
3266
3124
|
/**
|
|
3267
3125
|
* Asset used for gas fee.
|
|
3268
3126
|
* @type {string}
|
|
@@ -3276,12 +3134,6 @@ export interface Trade {
|
|
|
3276
3134
|
*/
|
|
3277
3135
|
'executedAtMillis': number;
|
|
3278
3136
|
}
|
|
3279
|
-
export declare const TradeTradingFeeAssetEnum: {
|
|
3280
|
-
readonly Usdc: "USDC";
|
|
3281
|
-
readonly Blue: "BLUE";
|
|
3282
|
-
readonly Unspecified: "UNSPECIFIED";
|
|
3283
|
-
};
|
|
3284
|
-
export type TradeTradingFeeAssetEnum = typeof TradeTradingFeeAssetEnum[keyof typeof TradeTradingFeeAssetEnum];
|
|
3285
3137
|
/**
|
|
3286
3138
|
* Trade side based on the user order in this trade.
|
|
3287
3139
|
* @export
|
package/dist/src/api.js
CHANGED
|
@@ -22,8 +22,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.TradeApiAxiosParamCreator = exports.WebSocketMarketDataSecWebSocketVersionEnum = exports.WebSocketMarketDataUpgradeEnum = exports.WebSocketAccountDataSecWebSocketVersionEnum = exports.WebSocketAccountDataUpgradeEnum = exports.StreamsApi = exports.StreamsApiFactory = exports.StreamsApiFp = exports.StreamsApiAxiosParamCreator = exports.GetRecentTradesTradeTypeEnum = exports.ExchangeApi = exports.ExchangeApiFactory = exports.ExchangeApiFp = exports.ExchangeApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = exports.AccountDataApi = exports.AccountDataApiFactory = exports.AccountDataApiFp = exports.AccountDataApiAxiosParamCreator = exports.TransactionType = exports.TradeType = exports.TradeSide = exports.
|
|
26
|
-
exports.TradeApi =
|
|
25
|
+
exports.TradeApiFactory = exports.TradeApiFp = exports.TradeApiAxiosParamCreator = exports.WebSocketMarketDataSecWebSocketVersionEnum = exports.WebSocketMarketDataUpgradeEnum = exports.WebSocketAccountDataSecWebSocketVersionEnum = exports.WebSocketAccountDataUpgradeEnum = exports.StreamsApi = exports.StreamsApiFactory = exports.StreamsApiFp = exports.StreamsApiAxiosParamCreator = exports.GetRecentTradesTradeTypeEnum = exports.ExchangeApi = exports.ExchangeApiFactory = exports.ExchangeApiFp = exports.ExchangeApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = exports.AccountDataApi = exports.AccountDataApiFactory = exports.AccountDataApiFp = exports.AccountDataApiAxiosParamCreator = exports.TransactionType = exports.TradeType = exports.TradeSide = exports.SubscriptionType = exports.SelfTradePreventionType = exports.PositionSide = exports.OrderbookPartialDepthUpdateDepthLevelEnum = exports.OrderType = exports.OrderTimeInForce = exports.OrderStatus = exports.OrderSide = exports.OrderCancellationFailureReason = exports.OrderCancelReason = exports.OraclePriceUpdateSourceEnum = exports.MarketStatus = exports.MarketPriceUpdateSourceEnum = exports.MarketEventType = exports.MarketDataStreamName = exports.MarkPriceUpdateSourceEnum = exports.MarginType = exports.KlineInterval = exports.ContractsConfigNetworkEnum = exports.CandlePriceType = exports.AccountEventType = exports.AccountEventReason = exports.AccountDataStream = void 0;
|
|
26
|
+
exports.TradeApi = void 0;
|
|
27
27
|
const axios_1 = require("axios");
|
|
28
28
|
// Some imports not used depending on template conditions
|
|
29
29
|
// @ts-ignore
|
|
@@ -38,6 +38,7 @@ const base_1 = require("./base");
|
|
|
38
38
|
exports.AccountDataStream = {
|
|
39
39
|
AccountOrderUpdate: 'AccountOrderUpdate',
|
|
40
40
|
AccountTradeUpdate: 'AccountTradeUpdate',
|
|
41
|
+
AccountAggregatedTradeUpdate: 'AccountAggregatedTradeUpdate',
|
|
41
42
|
AccountPositionUpdate: 'AccountPositionUpdate',
|
|
42
43
|
AccountUpdate: 'AccountUpdate',
|
|
43
44
|
AccountTransactionUpdate: 'AccountTransactionUpdate',
|
|
@@ -66,6 +67,7 @@ exports.AccountEventReason = {
|
|
|
66
67
|
exports.AccountEventType = {
|
|
67
68
|
AccountUpdate: 'AccountUpdate',
|
|
68
69
|
AccountTradeUpdate: 'AccountTradeUpdate',
|
|
70
|
+
AccountAggregatedTradeUpdate: 'AccountAggregatedTradeUpdate',
|
|
69
71
|
AccountOrderUpdate: 'AccountOrderUpdate',
|
|
70
72
|
AccountPositionUpdate: 'AccountPositionUpdate',
|
|
71
73
|
AccountTransactionUpdate: 'AccountTransactionUpdate',
|
|
@@ -352,16 +354,6 @@ exports.SelfTradePreventionType = {
|
|
|
352
354
|
Both: 'BOTH',
|
|
353
355
|
Unspecified: 'UNSPECIFIED'
|
|
354
356
|
};
|
|
355
|
-
/**
|
|
356
|
-
* Indicates the side of the trade.
|
|
357
|
-
* @export
|
|
358
|
-
* @enum {string}
|
|
359
|
-
*/
|
|
360
|
-
exports.Side = {
|
|
361
|
-
Long: 'LONG',
|
|
362
|
-
Short: 'SHORT',
|
|
363
|
-
Unspecified: 'UNSPECIFIED'
|
|
364
|
-
};
|
|
365
357
|
/**
|
|
366
358
|
* Indicates the type of subscription action.
|
|
367
359
|
* @export
|
|
@@ -371,11 +363,6 @@ exports.SubscriptionType = {
|
|
|
371
363
|
Subscribe: 'Subscribe',
|
|
372
364
|
Unsubscribe: 'Unsubscribe'
|
|
373
365
|
};
|
|
374
|
-
exports.TradeTradingFeeAssetEnum = {
|
|
375
|
-
Usdc: 'USDC',
|
|
376
|
-
Blue: 'BLUE',
|
|
377
|
-
Unspecified: 'UNSPECIFIED'
|
|
378
|
-
};
|
|
379
366
|
/**
|
|
380
367
|
* Trade side based on the user order in this trade.
|
|
381
368
|
* @export
|
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -138,6 +138,19 @@ export interface Account {
|
|
|
138
138
|
*/
|
|
139
139
|
'authorizedAccounts': Array<string>;
|
|
140
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Aggregated details about a trade in the account.
|
|
143
|
+
* @export
|
|
144
|
+
* @interface AccountAggregatedTradeUpdate
|
|
145
|
+
*/
|
|
146
|
+
export interface AccountAggregatedTradeUpdate {
|
|
147
|
+
/**
|
|
148
|
+
*
|
|
149
|
+
* @type {Trade}
|
|
150
|
+
* @memberof AccountAggregatedTradeUpdate
|
|
151
|
+
*/
|
|
152
|
+
'trade': Trade;
|
|
153
|
+
}
|
|
141
154
|
/**
|
|
142
155
|
*
|
|
143
156
|
* @export
|
|
@@ -228,6 +241,7 @@ export interface AccountCommandFailureUpdate {
|
|
|
228
241
|
export const AccountDataStream = {
|
|
229
242
|
AccountOrderUpdate: 'AccountOrderUpdate',
|
|
230
243
|
AccountTradeUpdate: 'AccountTradeUpdate',
|
|
244
|
+
AccountAggregatedTradeUpdate: 'AccountAggregatedTradeUpdate',
|
|
231
245
|
AccountPositionUpdate: 'AccountPositionUpdate',
|
|
232
246
|
AccountUpdate: 'AccountUpdate',
|
|
233
247
|
AccountTransactionUpdate: 'AccountTransactionUpdate',
|
|
@@ -266,6 +280,7 @@ export type AccountEventReason = typeof AccountEventReason[keyof typeof AccountE
|
|
|
266
280
|
export const AccountEventType = {
|
|
267
281
|
AccountUpdate: 'AccountUpdate',
|
|
268
282
|
AccountTradeUpdate: 'AccountTradeUpdate',
|
|
283
|
+
AccountAggregatedTradeUpdate: 'AccountAggregatedTradeUpdate',
|
|
269
284
|
AccountOrderUpdate: 'AccountOrderUpdate',
|
|
270
285
|
AccountPositionUpdate: 'AccountPositionUpdate',
|
|
271
286
|
AccountTransactionUpdate: 'AccountTransactionUpdate',
|
|
@@ -479,10 +494,10 @@ export interface AccountPositionUpdate {
|
|
|
479
494
|
'unrealizedPnlE9': string;
|
|
480
495
|
/**
|
|
481
496
|
*
|
|
482
|
-
* @type {
|
|
497
|
+
* @type {PositionSide}
|
|
483
498
|
* @memberof AccountPositionUpdate
|
|
484
499
|
*/
|
|
485
|
-
'side':
|
|
500
|
+
'side': PositionSide;
|
|
486
501
|
/**
|
|
487
502
|
* The initial margin required for the position.
|
|
488
503
|
* @type {string}
|
|
@@ -573,7 +588,7 @@ export interface AccountStreamMessage {
|
|
|
573
588
|
* The payload of the message, which varies based on the event type.
|
|
574
589
|
* @export
|
|
575
590
|
*/
|
|
576
|
-
export type AccountStreamMessagePayload = AccountCommandFailureUpdate | AccountOrderUpdate | AccountPositionUpdate | AccountTradeUpdate | AccountTransactionUpdate | AccountUpdate;
|
|
591
|
+
export type AccountStreamMessagePayload = AccountAggregatedTradeUpdate | AccountCommandFailureUpdate | AccountOrderUpdate | AccountPositionUpdate | AccountTradeUpdate | AccountTransactionUpdate | AccountUpdate;
|
|
577
592
|
|
|
578
593
|
/**
|
|
579
594
|
* Subscription message for account data streams.
|
|
@@ -608,99 +623,13 @@ export interface AccountSubscriptionMessage {
|
|
|
608
623
|
* @interface AccountTradeUpdate
|
|
609
624
|
*/
|
|
610
625
|
export interface AccountTradeUpdate {
|
|
611
|
-
/**
|
|
612
|
-
* The unique identifier for the trade.
|
|
613
|
-
* @type {string}
|
|
614
|
-
* @memberof AccountTradeUpdate
|
|
615
|
-
*/
|
|
616
|
-
'tradeId': string;
|
|
617
|
-
/**
|
|
618
|
-
* The client order ID associated with the trade.
|
|
619
|
-
* @type {string}
|
|
620
|
-
* @memberof AccountTradeUpdate
|
|
621
|
-
*/
|
|
622
|
-
'clientOrderId'?: string;
|
|
623
|
-
/**
|
|
624
|
-
* The symbol of the market.
|
|
625
|
-
* @type {string}
|
|
626
|
-
* @memberof AccountTradeUpdate
|
|
627
|
-
*/
|
|
628
|
-
'symbol': string;
|
|
629
|
-
/**
|
|
630
|
-
* The hash of the order.
|
|
631
|
-
* @type {string}
|
|
632
|
-
* @memberof AccountTradeUpdate
|
|
633
|
-
*/
|
|
634
|
-
'orderHash': string;
|
|
635
|
-
/**
|
|
636
|
-
*
|
|
637
|
-
* @type {TradeType}
|
|
638
|
-
* @memberof AccountTradeUpdate
|
|
639
|
-
*/
|
|
640
|
-
'type': TradeType;
|
|
641
626
|
/**
|
|
642
627
|
*
|
|
643
|
-
* @type {
|
|
644
|
-
* @memberof AccountTradeUpdate
|
|
645
|
-
*/
|
|
646
|
-
'tradeSide': Side;
|
|
647
|
-
/**
|
|
648
|
-
* Indicates if the trade was a maker order.
|
|
649
|
-
* @type {boolean}
|
|
650
|
-
* @memberof AccountTradeUpdate
|
|
651
|
-
*/
|
|
652
|
-
'isMaker': boolean;
|
|
653
|
-
/**
|
|
654
|
-
* The price of the trade.
|
|
655
|
-
* @type {string}
|
|
656
|
-
* @memberof AccountTradeUpdate
|
|
657
|
-
*/
|
|
658
|
-
'priceE9': string;
|
|
659
|
-
/**
|
|
660
|
-
* The quantity of the trade.
|
|
661
|
-
* @type {string}
|
|
662
|
-
* @memberof AccountTradeUpdate
|
|
663
|
-
*/
|
|
664
|
-
'quantityE9': string;
|
|
665
|
-
/**
|
|
666
|
-
* The quote quantity of the trade.
|
|
667
|
-
* @type {string}
|
|
668
|
-
* @memberof AccountTradeUpdate
|
|
669
|
-
*/
|
|
670
|
-
'quoteQuantityE9': string;
|
|
671
|
-
/**
|
|
672
|
-
* The realized profit and loss.
|
|
673
|
-
* @type {string}
|
|
674
|
-
* @memberof AccountTradeUpdate
|
|
675
|
-
*/
|
|
676
|
-
'realizedPnlE9': string;
|
|
677
|
-
/**
|
|
678
|
-
*
|
|
679
|
-
* @type {Side}
|
|
680
|
-
* @memberof AccountTradeUpdate
|
|
681
|
-
*/
|
|
682
|
-
'positionSide': Side;
|
|
683
|
-
/**
|
|
684
|
-
* The trading fee for the trade.
|
|
685
|
-
* @type {string}
|
|
686
|
-
* @memberof AccountTradeUpdate
|
|
687
|
-
*/
|
|
688
|
-
'tradingFeeE9': string;
|
|
689
|
-
/**
|
|
690
|
-
* The market symbol of the asset used for the trading fee.
|
|
691
|
-
* @type {string}
|
|
692
|
-
* @memberof AccountTradeUpdate
|
|
693
|
-
*/
|
|
694
|
-
'tradingFeeAssetSymbol': string;
|
|
695
|
-
/**
|
|
696
|
-
* The timestamp when the trade was executed in milliseconds.
|
|
697
|
-
* @type {number}
|
|
628
|
+
* @type {Trade}
|
|
698
629
|
* @memberof AccountTradeUpdate
|
|
699
630
|
*/
|
|
700
|
-
'
|
|
631
|
+
'trade': Trade;
|
|
701
632
|
}
|
|
702
|
-
|
|
703
|
-
|
|
704
633
|
/**
|
|
705
634
|
* Details about a transaction in the account.
|
|
706
635
|
* @export
|
|
@@ -899,10 +828,10 @@ export interface ActiveOrderUpdate {
|
|
|
899
828
|
'filledQuantityE9': string;
|
|
900
829
|
/**
|
|
901
830
|
*
|
|
902
|
-
* @type {
|
|
831
|
+
* @type {TradeSide}
|
|
903
832
|
* @memberof ActiveOrderUpdate
|
|
904
833
|
*/
|
|
905
|
-
'side':
|
|
834
|
+
'side': TradeSide;
|
|
906
835
|
/**
|
|
907
836
|
* The leverage of the order in scientific notation with 9 decimal places.
|
|
908
837
|
* @type {string}
|
|
@@ -2709,70 +2638,6 @@ export interface PostCreateOrder202Response {
|
|
|
2709
2638
|
*/
|
|
2710
2639
|
'orderHash': string;
|
|
2711
2640
|
}
|
|
2712
|
-
/**
|
|
2713
|
-
*
|
|
2714
|
-
* @export
|
|
2715
|
-
* @interface RecentTradeUpdates
|
|
2716
|
-
*/
|
|
2717
|
-
export interface RecentTradeUpdates {
|
|
2718
|
-
/**
|
|
2719
|
-
*
|
|
2720
|
-
* @type {Array<RecentTradesUpdate>}
|
|
2721
|
-
* @memberof RecentTradeUpdates
|
|
2722
|
-
*/
|
|
2723
|
-
'recentTrades': Array<RecentTradesUpdate>;
|
|
2724
|
-
}
|
|
2725
|
-
/**
|
|
2726
|
-
*
|
|
2727
|
-
* @export
|
|
2728
|
-
* @interface RecentTradesUpdate
|
|
2729
|
-
*/
|
|
2730
|
-
export interface RecentTradesUpdate {
|
|
2731
|
-
/**
|
|
2732
|
-
* The unique identifier of the trade.
|
|
2733
|
-
* @type {number}
|
|
2734
|
-
* @memberof RecentTradesUpdate
|
|
2735
|
-
*/
|
|
2736
|
-
'id': number;
|
|
2737
|
-
/**
|
|
2738
|
-
* The symbol of the market where the trade occurred.
|
|
2739
|
-
* @type {string}
|
|
2740
|
-
* @memberof RecentTradesUpdate
|
|
2741
|
-
*/
|
|
2742
|
-
'symbol': string;
|
|
2743
|
-
/**
|
|
2744
|
-
* The trade price in scientific notation with 9 decimal places of precision.
|
|
2745
|
-
* @type {string}
|
|
2746
|
-
* @memberof RecentTradesUpdate
|
|
2747
|
-
*/
|
|
2748
|
-
'priceE9': string;
|
|
2749
|
-
/**
|
|
2750
|
-
* The quantity traded in scientific notation with 9 decimal places of precision.
|
|
2751
|
-
* @type {string}
|
|
2752
|
-
* @memberof RecentTradesUpdate
|
|
2753
|
-
*/
|
|
2754
|
-
'quantityE9': string;
|
|
2755
|
-
/**
|
|
2756
|
-
* The quote quantity traded in scientific notation with 9 decimal places of precision.
|
|
2757
|
-
* @type {string}
|
|
2758
|
-
* @memberof RecentTradesUpdate
|
|
2759
|
-
*/
|
|
2760
|
-
'quoteQuantityE9': string;
|
|
2761
|
-
/**
|
|
2762
|
-
*
|
|
2763
|
-
* @type {Side}
|
|
2764
|
-
* @memberof RecentTradesUpdate
|
|
2765
|
-
*/
|
|
2766
|
-
'side': Side;
|
|
2767
|
-
/**
|
|
2768
|
-
* The timestamp of the trade.
|
|
2769
|
-
* @type {number}
|
|
2770
|
-
* @memberof RecentTradesUpdate
|
|
2771
|
-
*/
|
|
2772
|
-
'updatedAtMillis': number;
|
|
2773
|
-
}
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
2641
|
/**
|
|
2777
2642
|
*
|
|
2778
2643
|
* @export
|
|
@@ -2781,10 +2646,10 @@ export interface RecentTradesUpdate {
|
|
|
2781
2646
|
export interface RecentTradesUpdates {
|
|
2782
2647
|
/**
|
|
2783
2648
|
*
|
|
2784
|
-
* @type {Array<
|
|
2649
|
+
* @type {Array<Trade>}
|
|
2785
2650
|
* @memberof RecentTradesUpdates
|
|
2786
2651
|
*/
|
|
2787
|
-
'
|
|
2652
|
+
'trades': Array<Trade>;
|
|
2788
2653
|
}
|
|
2789
2654
|
/**
|
|
2790
2655
|
*
|
|
@@ -2846,21 +2711,6 @@ export const SelfTradePreventionType = {
|
|
|
2846
2711
|
export type SelfTradePreventionType = typeof SelfTradePreventionType[keyof typeof SelfTradePreventionType];
|
|
2847
2712
|
|
|
2848
2713
|
|
|
2849
|
-
/**
|
|
2850
|
-
* Indicates the side of the trade.
|
|
2851
|
-
* @export
|
|
2852
|
-
* @enum {string}
|
|
2853
|
-
*/
|
|
2854
|
-
|
|
2855
|
-
export const Side = {
|
|
2856
|
-
Long: 'LONG',
|
|
2857
|
-
Short: 'SHORT',
|
|
2858
|
-
Unspecified: 'UNSPECIFIED'
|
|
2859
|
-
} as const;
|
|
2860
|
-
|
|
2861
|
-
export type Side = typeof Side[keyof typeof Side];
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
2714
|
/**
|
|
2865
2715
|
* Response message indicating the success or failure of a subscription operation.
|
|
2866
2716
|
* @export
|
|
@@ -3394,13 +3244,13 @@ export interface Trade {
|
|
|
3394
3244
|
* @type {string}
|
|
3395
3245
|
* @memberof Trade
|
|
3396
3246
|
*/
|
|
3397
|
-
'tradingFeeAsset'?:
|
|
3247
|
+
'tradingFeeAsset'?: string;
|
|
3398
3248
|
/**
|
|
3399
3249
|
* Gas fee.
|
|
3400
|
-
* @type {
|
|
3250
|
+
* @type {string}
|
|
3401
3251
|
* @memberof Trade
|
|
3402
3252
|
*/
|
|
3403
|
-
'gasFeeE9'?:
|
|
3253
|
+
'gasFeeE9'?: string;
|
|
3404
3254
|
/**
|
|
3405
3255
|
* Asset used for gas fee.
|
|
3406
3256
|
* @type {string}
|
|
@@ -3415,13 +3265,6 @@ export interface Trade {
|
|
|
3415
3265
|
'executedAtMillis': number;
|
|
3416
3266
|
}
|
|
3417
3267
|
|
|
3418
|
-
export const TradeTradingFeeAssetEnum = {
|
|
3419
|
-
Usdc: 'USDC',
|
|
3420
|
-
Blue: 'BLUE',
|
|
3421
|
-
Unspecified: 'UNSPECIFIED'
|
|
3422
|
-
} as const;
|
|
3423
|
-
|
|
3424
|
-
export type TradeTradingFeeAssetEnum = typeof TradeTradingFeeAssetEnum[keyof typeof TradeTradingFeeAssetEnum];
|
|
3425
3268
|
|
|
3426
3269
|
/**
|
|
3427
3270
|
* Trade side based on the user order in this trade.
|