bybit-api 3.10.30 → 4.0.0-beta.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 (146) hide show
  1. package/README.md +301 -178
  2. package/lib/index.d.ts +0 -11
  3. package/lib/index.js +0 -11
  4. package/lib/index.js.map +1 -1
  5. package/lib/rest-client-v5.d.ts +1 -1
  6. package/lib/rest-client-v5.js +1 -1
  7. package/lib/spot-client-v3.d.ts +8 -81
  8. package/lib/spot-client-v3.js +7 -172
  9. package/lib/spot-client-v3.js.map +1 -1
  10. package/lib/types/index.d.ts +1 -2
  11. package/lib/types/index.js +1 -2
  12. package/lib/types/index.js.map +1 -1
  13. package/lib/types/request/index.d.ts +0 -1
  14. package/lib/types/request/index.js +0 -1
  15. package/lib/types/request/index.js.map +1 -1
  16. package/lib/types/request/v5-account.d.ts +1 -1
  17. package/lib/types/request/v5-asset.d.ts +1 -1
  18. package/lib/types/request/v5-market.d.ts +1 -1
  19. package/lib/types/request/v5-position.d.ts +1 -1
  20. package/lib/types/request/v5-pre-upgrade.d.ts +1 -1
  21. package/lib/types/request/v5-spot-leverage-token.d.ts +1 -1
  22. package/lib/types/request/v5-trade.d.ts +1 -1
  23. package/lib/types/request/v5-user.d.ts +1 -1
  24. package/lib/types/response/v5-account.d.ts +1 -1
  25. package/lib/types/response/v5-asset.d.ts +1 -1
  26. package/lib/types/response/v5-market.d.ts +1 -1
  27. package/lib/types/response/v5-position.d.ts +1 -1
  28. package/lib/types/response/v5-spot-leverage-token.d.ts +1 -1
  29. package/lib/types/response/v5-trade.d.ts +1 -1
  30. package/lib/types/response/v5-user.d.ts +1 -1
  31. package/lib/types/{request/spot.js → shared-v5.js} +1 -1
  32. package/lib/types/shared-v5.js.map +1 -0
  33. package/lib/types/shared.d.ts +1 -19
  34. package/lib/types/websockets/index.d.ts +3 -0
  35. package/lib/types/websockets/index.js +20 -0
  36. package/lib/types/websockets/index.js.map +1 -0
  37. package/lib/types/websockets/ws-api.d.ts +73 -0
  38. package/lib/types/websockets/ws-api.js +10 -0
  39. package/lib/types/websockets/ws-api.js.map +1 -0
  40. package/lib/types/websockets/ws-confirmations.d.ts +13 -0
  41. package/lib/types/{websocket.events.js → websockets/ws-confirmations.js} +1 -1
  42. package/lib/types/websockets/ws-confirmations.js.map +1 -0
  43. package/lib/types/{websocket.events.d.ts → websockets/ws-events.d.ts} +9 -3
  44. package/lib/types/websockets/ws-events.js +11 -0
  45. package/lib/types/websockets/ws-events.js.map +1 -0
  46. package/lib/types/{websockets.d.ts → websockets/ws-general.d.ts} +35 -10
  47. package/lib/types/{v5-shared.js → websockets/ws-general.js} +1 -1
  48. package/lib/types/websockets/ws-general.js.map +1 -0
  49. package/lib/util/BaseRestClient.d.ts +1 -1
  50. package/lib/util/BaseRestClient.js +15 -39
  51. package/lib/util/BaseRestClient.js.map +1 -1
  52. package/lib/util/BaseWSClient.d.ts +221 -0
  53. package/lib/util/BaseWSClient.js +733 -0
  54. package/lib/util/BaseWSClient.js.map +1 -0
  55. package/lib/util/index.d.ts +1 -2
  56. package/lib/util/index.js +1 -2
  57. package/lib/util/index.js.map +1 -1
  58. package/lib/util/logger.d.ts +2 -5
  59. package/lib/util/logger.js +3 -12
  60. package/lib/util/logger.js.map +1 -1
  61. package/lib/util/requestUtils.d.ts +7 -10
  62. package/lib/util/requestUtils.js +6 -33
  63. package/lib/util/requestUtils.js.map +1 -1
  64. package/lib/util/typeGuards.d.ts +7 -1
  65. package/lib/util/typeGuards.js +41 -5
  66. package/lib/util/typeGuards.js.map +1 -1
  67. package/lib/util/webCryptoAPI.d.ts +10 -0
  68. package/lib/util/webCryptoAPI.js +69 -0
  69. package/lib/util/webCryptoAPI.js.map +1 -0
  70. package/lib/util/websockets/WsStore.d.ts +71 -0
  71. package/lib/util/websockets/WsStore.js +269 -0
  72. package/lib/util/websockets/WsStore.js.map +1 -0
  73. package/lib/util/websockets/WsStore.types.d.ts +50 -0
  74. package/lib/util/websockets/WsStore.types.js +14 -0
  75. package/lib/util/websockets/WsStore.types.js.map +1 -0
  76. package/lib/util/websockets/index.d.ts +3 -0
  77. package/lib/util/websockets/index.js +20 -0
  78. package/lib/util/websockets/index.js.map +1 -0
  79. package/lib/util/websockets/websocket-util.d.ts +92 -0
  80. package/lib/util/websockets/websocket-util.js +280 -0
  81. package/lib/util/websockets/websocket-util.js.map +1 -0
  82. package/lib/websocket-client.d.ts +107 -114
  83. package/lib/websocket-client.js +427 -716
  84. package/lib/websocket-client.js.map +1 -1
  85. package/package.json +4 -4
  86. package/lib/account-asset-client-v3.d.ts +0 -87
  87. package/lib/account-asset-client-v3.js +0 -154
  88. package/lib/account-asset-client-v3.js.map +0 -1
  89. package/lib/account-asset-client.d.ts +0 -46
  90. package/lib/account-asset-client.js +0 -108
  91. package/lib/account-asset-client.js.map +0 -1
  92. package/lib/contract-client.d.ts +0 -136
  93. package/lib/contract-client.js +0 -251
  94. package/lib/contract-client.js.map +0 -1
  95. package/lib/copy-trading-client.d.ts +0 -60
  96. package/lib/copy-trading-client.js +0 -114
  97. package/lib/copy-trading-client.js.map +0 -1
  98. package/lib/inverse-client.d.ts +0 -104
  99. package/lib/inverse-client.js +0 -213
  100. package/lib/inverse-client.js.map +0 -1
  101. package/lib/inverse-futures-client.d.ts +0 -217
  102. package/lib/inverse-futures-client.js +0 -224
  103. package/lib/inverse-futures-client.js.map +0 -1
  104. package/lib/linear-client.d.ts +0 -112
  105. package/lib/linear-client.js +0 -225
  106. package/lib/linear-client.js.map +0 -1
  107. package/lib/spot-client.d.ts +0 -46
  108. package/lib/spot-client.js +0 -131
  109. package/lib/spot-client.js.map +0 -1
  110. package/lib/types/request/spot.d.ts +0 -79
  111. package/lib/types/request/spot.js.map +0 -1
  112. package/lib/types/v5-shared.js.map +0 -1
  113. package/lib/types/websocket.events.js.map +0 -1
  114. package/lib/types/websockets.js +0 -3
  115. package/lib/types/websockets.js.map +0 -1
  116. package/lib/types/ws-events/failed-topic-subscription-confirmation.d.ts +0 -4
  117. package/lib/types/ws-events/failed-topic-subscription-confirmation.js +0 -3
  118. package/lib/types/ws-events/failed-topic-subscription-confirmation.js.map +0 -1
  119. package/lib/types/ws-events/succeeded-topic-subscription-confirmation.d.ts +0 -4
  120. package/lib/types/ws-events/succeeded-topic-subscription-confirmation.js +0 -3
  121. package/lib/types/ws-events/succeeded-topic-subscription-confirmation.js.map +0 -1
  122. package/lib/types/ws-events/topic-subscription-confirmation.d.ts +0 -7
  123. package/lib/types/ws-events/topic-subscription-confirmation.js +0 -3
  124. package/lib/types/ws-events/topic-subscription-confirmation.js.map +0 -1
  125. package/lib/unified-margin-client.d.ts +0 -140
  126. package/lib/unified-margin-client.js +0 -270
  127. package/lib/unified-margin-client.js.map +0 -1
  128. package/lib/usdc-option-client.d.ts +0 -110
  129. package/lib/usdc-option-client.js +0 -196
  130. package/lib/usdc-option-client.js.map +0 -1
  131. package/lib/usdc-perpetual-client.d.ts +0 -97
  132. package/lib/usdc-perpetual-client.js +0 -191
  133. package/lib/usdc-perpetual-client.js.map +0 -1
  134. package/lib/util/WsStore.d.ts +0 -57
  135. package/lib/util/WsStore.js +0 -97
  136. package/lib/util/WsStore.js.map +0 -1
  137. package/lib/util/browser-support.d.ts +0 -1
  138. package/lib/util/browser-support.js +0 -26
  139. package/lib/util/browser-support.js.map +0 -1
  140. package/lib/util/node-support.d.ts +0 -2
  141. package/lib/util/node-support.js +0 -21
  142. package/lib/util/node-support.js.map +0 -1
  143. package/lib/util/websocket-util.d.ts +0 -68
  144. package/lib/util/websocket-util.js +0 -506
  145. package/lib/util/websocket-util.js.map +0 -1
  146. /package/lib/types/{v5-shared.d.ts → shared-v5.d.ts} +0 -0
package/lib/index.d.ts CHANGED
@@ -1,16 +1,5 @@
1
- export * from './account-asset-client';
2
- export * from './account-asset-client-v3';
3
- export * from './copy-trading-client';
4
- export * from './inverse-client';
5
- export * from './inverse-futures-client';
6
- export * from './linear-client';
7
1
  export * from './rest-client-v5';
8
- export * from './spot-client';
9
2
  export * from './spot-client-v3';
10
- export * from './usdc-option-client';
11
- export * from './usdc-perpetual-client';
12
- export * from './unified-margin-client';
13
- export * from './contract-client';
14
3
  export * from './websocket-client';
15
4
  export * from './util/logger';
16
5
  export * from './util';
package/lib/index.js CHANGED
@@ -14,19 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./account-asset-client"), exports);
18
- __exportStar(require("./account-asset-client-v3"), exports);
19
- __exportStar(require("./copy-trading-client"), exports);
20
- __exportStar(require("./inverse-client"), exports);
21
- __exportStar(require("./inverse-futures-client"), exports);
22
- __exportStar(require("./linear-client"), exports);
23
17
  __exportStar(require("./rest-client-v5"), exports);
24
- __exportStar(require("./spot-client"), exports);
25
18
  __exportStar(require("./spot-client-v3"), exports);
26
- __exportStar(require("./usdc-option-client"), exports);
27
- __exportStar(require("./usdc-perpetual-client"), exports);
28
- __exportStar(require("./unified-margin-client"), exports);
29
- __exportStar(require("./contract-client"), exports);
30
19
  __exportStar(require("./websocket-client"), exports);
31
20
  __exportStar(require("./util/logger"), exports);
32
21
  __exportStar(require("./util"), exports);
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,4DAA0C;AAC1C,wDAAsC;AACtC,mDAAiC;AACjC,2DAAyC;AACzC,kDAAgC;AAChC,mDAAiC;AACjC,gDAA8B;AAC9B,mDAAiC;AACjC,uDAAqC;AACrC,0DAAwC;AACxC,0DAAwC;AACxC,oDAAkC;AAClC,qDAAmC;AACnC,gDAA8B;AAC9B,yCAAuB;AACvB,0CAAwB;AACxB,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,mDAAiC;AACjC,qDAAmC;AACnC,gDAA8B;AAC9B,yCAAuB;AACvB,0CAAwB;AACxB,mDAAiC"}
@@ -24,7 +24,7 @@ export declare class RestClientV5 extends BaseRestClient {
24
24
  ****** Misc Bybit APIs
25
25
  *
26
26
  */
27
- getClientType(): "v3";
27
+ getClientType(): "v5";
28
28
  fetchServerTime(): Promise<number>;
29
29
  getServerTime(): Promise<APIResponseV3WithTime<{
30
30
  timeSecond: string;
@@ -76,7 +76,7 @@ class RestClientV5 extends BaseRestClient_1.default {
76
76
  *
77
77
  */
78
78
  getClientType() {
79
- return util_1.REST_CLIENT_TYPE_ENUM.v3;
79
+ return util_1.REST_CLIENT_TYPE_ENUM.v5;
80
80
  }
81
81
  fetchServerTime() {
82
82
  return __awaiter(this, void 0, void 0, function* () {
@@ -1,4 +1,4 @@
1
- import { APIResponseV3, APIResponseWithTime, KlineInterval, NewSpotOrderV3, SpotBalances, SpotCancelOrderBatchRequest, SpotCrossMarginBorrowingInfoRequest, SpotCrossMarginRepaymentHistoryRequest, SpotLeveragedTokenPRHistoryRequest, SpotMyTradesRequest, SpotOrderQueryById } from './types';
1
+ import { APIResponseV3, numberInString } from './types';
2
2
  import BaseRestClient from './util/BaseRestClient';
3
3
  /**
4
4
  * REST API client for newer Spot V3 APIs.
@@ -8,98 +8,25 @@ import BaseRestClient from './util/BaseRestClient';
8
8
  * Please update your code as soon as possible to use the V5 APIs instead.
9
9
  */
10
10
  export declare class SpotClientV3 extends BaseRestClient {
11
- getClientType(): "v3";
11
+ getClientType(): "v5";
12
12
  fetchServerTime(): Promise<number>;
13
13
  /**
14
14
  *
15
15
  * Market Data Endpoints
16
16
  *
17
17
  */
18
- /** Get all symbols */
19
- getSymbols(): Promise<APIResponseV3<any>>;
20
- /** Get orderbook for symbol */
21
- getOrderBook(symbol: string, limit?: number): Promise<APIResponseV3<any>>;
22
- /** Get merged orderbook for symbol */
23
- getMergedOrderBook(symbol: string, scale?: number, limit?: number): Promise<APIResponseV3<any>>;
24
- /** Get public trading records (raw trades) */
25
- getTrades(symbol: string, limit?: number): Promise<APIResponseV3<any>>;
26
- /** Get candles/klines */
27
- getCandles(symbol: string, interval: KlineInterval, limit?: number, startTime?: number, endTime?: number): Promise<APIResponseV3<any>>;
28
- /** Get latest information for symbol (24hr ticker) */
29
- get24hrTicker(symbol?: string): Promise<APIResponseV3<any>>;
30
- /** Get last traded price */
31
- getLastTradedPrice(symbol?: string): Promise<APIResponseV3<any>>;
32
- /** Get best bid/ask price */
33
- getBestBidAskPrice(symbol?: string): Promise<APIResponseV3<any>>;
34
18
  /**
19
+ * Get merged orderbook for symbol
35
20
  *
36
- * Account Data Endpoints
37
- *
21
+ * This is the only known pre-V5 endpoint to still be online.
38
22
  */
39
- /** -> Order API */
40
- /** Create order */
41
- submitOrder(params: NewSpotOrderV3): Promise<APIResponseV3<any>>;
42
- /** Get active order state */
43
- getOrder(params: SpotOrderQueryById): Promise<APIResponseV3<any>>;
44
- /** Cancel order */
45
- cancelOrder(params: SpotOrderQueryById): Promise<APIResponseV3<any>>;
46
- /** Batch cancel orders */
47
- cancelOrderBatch(params: SpotCancelOrderBatchRequest): Promise<APIResponseV3<any>>;
48
- /** Batch cancel up to 100 orders by ID */
49
- cancelOrderBatchIDs(orderIds: string[]): Promise<APIResponseV3<any>>;
50
- /** Get open orders */
51
- getOpenOrders(symbol?: string, orderId?: string, limit?: number, orderCategory?: 0 | 1): Promise<APIResponseV3<any>>;
52
- /** Get order history */
53
- getPastOrders(symbol?: string, orderId?: string, limit?: number, orderCategory?: 0 | 1): Promise<APIResponseV3<any>>;
54
- /**
55
- * Get your trade history.
56
- * If startTime is not specified, you can only query for records in the last 7 days.
57
- * If you want to query for records older than 7 days, startTime is required.
58
- */
59
- getMyTrades(params?: SpotMyTradesRequest): Promise<APIResponseV3<any>>;
60
- /**
61
- *
62
- * Wallet Data Endpoints
63
- *
64
- */
65
- /** Get Wallet Balance */
66
- getBalances(): Promise<APIResponseV3<SpotBalances>>;
23
+ getMergedOrderBook(symbol: string, scale?: number, limit?: number): Promise<APIResponseV3<any>>;
67
24
  /**
68
25
  *
69
26
  * API Data Endpoints
70
27
  *
71
28
  */
72
- getServerTime(): Promise<APIResponseWithTime>;
73
- /**
74
- *
75
- * Leveraged Token Endpoints
76
- *
77
- */
78
- /** Get all asset infos */
79
- getLeveragedTokenAssetInfos(ltCode?: string): Promise<APIResponseV3<any>>;
80
- /** Get leveraged token market info */
81
- getLeveragedTokenMarketInfo(ltCode: string): Promise<APIResponseV3<any>>;
82
- /** Purchase leveraged token */
83
- purchaseLeveragedToken(ltCode: string, ltAmount: string, serialNo?: string): Promise<APIResponseV3<any>>;
84
- /** Redeem leveraged token */
85
- redeemLeveragedToken(ltCode: string, ltAmount: string, serialNo?: string): Promise<APIResponseV3<any>>;
86
- /** Get leveraged token purchase/redemption history */
87
- getLeveragedTokenPRHistory(params?: SpotLeveragedTokenPRHistoryRequest): Promise<APIResponseV3<any>>;
88
- /**
89
- *
90
- * Cross Margin Trading Endpoints
91
- *
92
- */
93
- /** Borrow margin loan */
94
- borrowCrossMarginLoan(coin: string, qty: string): Promise<APIResponseV3<any>>;
95
- /** Repay margin loan */
96
- repayCrossMarginLoan(coin: string, qty: string): Promise<APIResponseV3<any>>;
97
- /** Query borrowing info */
98
- getCrossMarginBorrowingInfo(params?: SpotCrossMarginBorrowingInfoRequest): Promise<APIResponseV3<any>>;
99
- /** Query account info */
100
- getCrossMarginAccountInfo(): Promise<APIResponseV3<any>>;
101
- /** Query interest & quota */
102
- getCrossMarginInterestQuota(coin: string): Promise<APIResponseV3<any>>;
103
- /** Query repayment history */
104
- getCrossMarginRepaymentHistory(params?: SpotCrossMarginRepaymentHistoryRequest): Promise<APIResponseV3<any>>;
29
+ getServerTime(): Promise<{
30
+ time_now: numberInString;
31
+ }>;
105
32
  }
@@ -24,8 +24,8 @@ const BaseRestClient_1 = __importDefault(require("./util/BaseRestClient"));
24
24
  */
25
25
  class SpotClientV3 extends BaseRestClient_1.default {
26
26
  getClientType() {
27
- // Follows the same authentication mechanism as other v3 APIs (e.g. USDC)
28
- return util_1.REST_CLIENT_TYPE_ENUM.v3;
27
+ // Doesn't really matter here, since the only remaining endpoint does not require auth.
28
+ return util_1.REST_CLIENT_TYPE_ENUM.v5;
29
29
  }
30
30
  fetchServerTime() {
31
31
  return __awaiter(this, void 0, void 0, function* () {
@@ -38,115 +38,18 @@ class SpotClientV3 extends BaseRestClient_1.default {
38
38
  * Market Data Endpoints
39
39
  *
40
40
  */
41
- /** Get all symbols */
42
- getSymbols() {
43
- return this.get('/spot/v3/public/symbols');
44
- }
45
- /** Get orderbook for symbol */
46
- getOrderBook(symbol, limit) {
47
- return this.get('/spot/v3/public/quote/depth', { symbol, limit });
48
- }
49
- /** Get merged orderbook for symbol */
50
- getMergedOrderBook(symbol, scale, limit) {
51
- return this.get('/spot/v3/public/quote/depth/merged', {
52
- symbol,
53
- scale,
54
- limit,
55
- });
56
- }
57
- /** Get public trading records (raw trades) */
58
- getTrades(symbol, limit) {
59
- return this.get('/spot/v3/public/quote/trades', { symbol, limit });
60
- }
61
- /** Get candles/klines */
62
- getCandles(symbol, interval, limit, startTime, endTime) {
63
- return this.get('/spot/v3/public/quote/kline', {
64
- symbol,
65
- interval,
66
- limit,
67
- startTime,
68
- endTime,
69
- });
70
- }
71
- /** Get latest information for symbol (24hr ticker) */
72
- get24hrTicker(symbol) {
73
- return this.get('/spot/v3/public/quote/ticker/24hr', { symbol });
74
- }
75
- /** Get last traded price */
76
- getLastTradedPrice(symbol) {
77
- return this.get('/spot/v3/public/quote/ticker/price', { symbol });
78
- }
79
- /** Get best bid/ask price */
80
- getBestBidAskPrice(symbol) {
81
- return this.get('/spot/v3/public/quote/ticker/bookTicker', { symbol });
82
- }
83
41
  /**
42
+ * Get merged orderbook for symbol
84
43
  *
85
- * Account Data Endpoints
86
- *
44
+ * This is the only known pre-V5 endpoint to still be online.
87
45
  */
88
- /** -> Order API */
89
- /** Create order */
90
- submitOrder(params) {
91
- return this.postPrivate('/spot/v3/private/order', params);
92
- }
93
- /** Get active order state */
94
- getOrder(params) {
95
- return this.getPrivate('/spot/v3/private/order', params);
96
- }
97
- /** Cancel order */
98
- cancelOrder(params) {
99
- return this.postPrivate('/spot/v3/private/cancel-order', params);
100
- }
101
- /** Batch cancel orders */
102
- cancelOrderBatch(params) {
103
- const orderTypes = params.orderTypes
104
- ? params.orderTypes.join(',')
105
- : undefined;
106
- return this.postPrivate('/spot/v3/private/cancel-orders', Object.assign(Object.assign({}, params), { orderTypes }));
107
- }
108
- /** Batch cancel up to 100 orders by ID */
109
- cancelOrderBatchIDs(orderIds) {
110
- const orderIdsCsv = orderIds.join(',');
111
- return this.postPrivate('/spot/v3/private/cancel-orders-by-ids', {
112
- orderIds: orderIdsCsv,
113
- });
114
- }
115
- /** Get open orders */
116
- getOpenOrders(symbol, orderId, limit, orderCategory) {
117
- return this.getPrivate('/spot/v3/private/open-orders', {
118
- symbol,
119
- orderId,
120
- limit,
121
- orderCategory,
122
- });
123
- }
124
- /** Get order history */
125
- getPastOrders(symbol, orderId, limit, orderCategory) {
126
- return this.getPrivate('/spot/v3/private/history-orders', {
46
+ getMergedOrderBook(symbol, scale, limit) {
47
+ return this.get('/spot/v3/public/quote/depth/merged', {
127
48
  symbol,
128
- orderId,
49
+ scale,
129
50
  limit,
130
- orderCategory,
131
51
  });
132
52
  }
133
- /**
134
- * Get your trade history.
135
- * If startTime is not specified, you can only query for records in the last 7 days.
136
- * If you want to query for records older than 7 days, startTime is required.
137
- */
138
- getMyTrades(params) {
139
- return this.getPrivate('/spot/v3/private/my-trades', params);
140
- }
141
- /**
142
- *
143
- * Wallet Data Endpoints
144
- *
145
- */
146
- /** Get Wallet Balance */
147
- getBalances() {
148
- return this.getPrivate('/spot/v3/private/account');
149
- }
150
53
  /**
151
54
  *
152
55
  * API Data Endpoints
@@ -155,74 +58,6 @@ class SpotClientV3 extends BaseRestClient_1.default {
155
58
  getServerTime() {
156
59
  return this.get('/v2/public/time');
157
60
  }
158
- /**
159
- *
160
- * Leveraged Token Endpoints
161
- *
162
- */
163
- /** Get all asset infos */
164
- getLeveragedTokenAssetInfos(ltCode) {
165
- return this.get('/spot/v3/public/infos', { ltCode });
166
- }
167
- /** Get leveraged token market info */
168
- getLeveragedTokenMarketInfo(ltCode) {
169
- return this.getPrivate('/spot/v3/private/reference', { ltCode });
170
- }
171
- /** Purchase leveraged token */
172
- purchaseLeveragedToken(ltCode, ltAmount, serialNo) {
173
- return this.postPrivate('/spot/v3/private/purchase', {
174
- ltCode,
175
- ltAmount,
176
- serialNo,
177
- });
178
- }
179
- /** Redeem leveraged token */
180
- redeemLeveragedToken(ltCode, ltAmount, serialNo) {
181
- return this.postPrivate('/spot/v3/private/redeem', {
182
- ltCode,
183
- ltAmount,
184
- serialNo,
185
- });
186
- }
187
- /** Get leveraged token purchase/redemption history */
188
- getLeveragedTokenPRHistory(params) {
189
- return this.getPrivate('/spot/v3/private/record', params);
190
- }
191
- /**
192
- *
193
- * Cross Margin Trading Endpoints
194
- *
195
- */
196
- /** Borrow margin loan */
197
- borrowCrossMarginLoan(coin, qty) {
198
- return this.postPrivate('/spot/v3/private/cross-margin-loan', {
199
- coin,
200
- qty,
201
- });
202
- }
203
- /** Repay margin loan */
204
- repayCrossMarginLoan(coin, qty) {
205
- return this.postPrivate('/spot/v3/private/cross-margin-repay', {
206
- coin,
207
- qty,
208
- });
209
- }
210
- /** Query borrowing info */
211
- getCrossMarginBorrowingInfo(params) {
212
- return this.getPrivate('/spot/v3/private/cross-margin-orders', params);
213
- }
214
- /** Query account info */
215
- getCrossMarginAccountInfo() {
216
- return this.getPrivate('/spot/v3/private/cross-margin-account');
217
- }
218
- /** Query interest & quota */
219
- getCrossMarginInterestQuota(coin) {
220
- return this.getPrivate('/spot/v3/private/cross-margin-loan-info', { coin });
221
- }
222
- /** Query repayment history */
223
- getCrossMarginRepaymentHistory(params) {
224
- return this.getPrivate('/spot/v3/private/cross-margin-repay-history', params);
225
- }
226
61
  }
227
62
  exports.SpotClientV3 = SpotClientV3;
228
63
  //# sourceMappingURL=spot-client-v3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spot-client-v3.js","sourceRoot":"","sources":["../src/spot-client-v3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAcA,iCAA+C;AAC/C,2EAAmD;AAEnD;;;;;;GAMG;AACH,MAAa,YAAa,SAAQ,wBAAc;IAC9C,aAAa;QACX,yEAAyE;QACzE,OAAO,4BAAqB,CAAC,EAAE,CAAC;IAClC,CAAC;IAEK,eAAe;;YACnB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;YACvC,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC9B,CAAC;KAAA;IAED;;;;OAIG;IAEH,sBAAsB;IACtB,UAAU;QACR,OAAO,IAAI,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,+BAA+B;IAC/B,YAAY,CAAC,MAAc,EAAE,KAAc;QACzC,OAAO,IAAI,CAAC,GAAG,CAAC,6BAA6B,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IACpE,CAAC;IAED,sCAAsC;IACtC,kBAAkB,CAChB,MAAc,EACd,KAAc,EACd,KAAc;QAEd,OAAO,IAAI,CAAC,GAAG,CAAC,oCAAoC,EAAE;YACpD,MAAM;YACN,KAAK;YACL,KAAK;SACN,CAAC,CAAC;IACL,CAAC;IAED,8CAA8C;IAC9C,SAAS,CAAC,MAAc,EAAE,KAAc;QACtC,OAAO,IAAI,CAAC,GAAG,CAAC,8BAA8B,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IACrE,CAAC;IAED,yBAAyB;IACzB,UAAU,CACR,MAAc,EACd,QAAuB,EACvB,KAAc,EACd,SAAkB,EAClB,OAAgB;QAEhB,OAAO,IAAI,C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D,oCA0RC"}
1
+ {"version":3,"file":"spot-client-v3.js","sourceRoot":"","sources":["../src/spot-client-v3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,iCAA+C;AAC/C,2EAAmD;AAEnD;;;;;;GAMG;AACH,MAAa,YAAa,SAAQ,wBAAc;IAC9C,aAAa;QACX,uFAAuF;QACvF,OAAO,4BAAqB,CAAC,EAAE,CAAC;IAClC,CAAC;IAEK,eAAe;;YACnB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;YACvC,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC9B,CAAC;KAAA;IAED;;;;OAIG;IAEH;;;;OAIG;IACH,kBAAkB,CAChB,MAAc,EACd,KAAc,EACd,KAAc;QAEd,OAAO,IAAI,CAAC,GAAG,CAAC,oCAAoC,EAAE;YACpD,MAAM;YACN,KAAK;YACL,KAAK;SACN,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IAEH,aAAa;QACX,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;CACF;AA3CD,oCA2CC"}
@@ -1,6 +1,5 @@
1
1
  export * from './response';
2
2
  export * from './request';
3
3
  export * from './shared';
4
- export * from './v5-shared';
4
+ export * from './shared-v5';
5
5
  export * from './websockets';
6
- export * from './websocket.events';
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./response"), exports);
18
18
  __exportStar(require("./request"), exports);
19
19
  __exportStar(require("./shared"), exports);
20
- __exportStar(require("./v5-shared"), exports);
20
+ __exportStar(require("./shared-v5"), exports);
21
21
  __exportStar(require("./websockets"), exports);
22
- __exportStar(require("./websocket.events"), exports);
23
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,2CAAyB;AACzB,8CAA4B;AAC5B,+CAA6B;AAC7B,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,2CAAyB;AACzB,8CAA4B;AAC5B,+CAA6B"}
@@ -3,7 +3,6 @@ export * from './copy-trading';
3
3
  export * from './contract';
4
4
  export * from './linear';
5
5
  export * from './inverse';
6
- export * from './spot';
7
6
  export * from './usdc-perp';
8
7
  export * from './usdc-options';
9
8
  export * from './usdc-shared';
@@ -19,7 +19,6 @@ __exportStar(require("./copy-trading"), exports);
19
19
  __exportStar(require("./contract"), exports);
20
20
  __exportStar(require("./linear"), exports);
21
21
  __exportStar(require("./inverse"), exports);
22
- __exportStar(require("./spot"), exports);
23
22
  __exportStar(require("./usdc-perp"), exports);
24
23
  __exportStar(require("./usdc-options"), exports);
25
24
  __exportStar(require("./usdc-shared"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/request/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,iDAA+B;AAC/B,6CAA2B;AAC3B,2CAAyB;AACzB,4CAA0B;AAC1B,yCAAuB;AACvB,8CAA4B;AAC5B,iDAA+B;AAC/B,gDAA8B;AAC9B,mDAAiC;AACjC,+CAA6B;AAC7B,6CAA2B;AAC3B,8CAA4B;AAC5B,gDAA8B;AAC9B,mDAAiC;AACjC,6CAA2B;AAC3B,4CAA0B;AAC1B,2DAAyC;AACzC,8CAA4B;AAC5B,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/request/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,iDAA+B;AAC/B,6CAA2B;AAC3B,2CAAyB;AACzB,4CAA0B;AAC1B,8CAA4B;AAC5B,iDAA+B;AAC/B,gDAA8B;AAC9B,mDAAiC;AACjC,+CAA6B;AAC7B,6CAA2B;AAC3B,8CAA4B;AAC5B,gDAA8B;AAC9B,mDAAiC;AACjC,6CAA2B;AAC3B,4CAA0B;AAC1B,2DAAyC;AACzC,8CAA4B;AAC5B,mDAAiC"}
@@ -1,4 +1,4 @@
1
- import { AccountTypeV5, CategoryV5, TransactionTypeV5 } from '../v5-shared';
1
+ import { AccountTypeV5, CategoryV5, TransactionTypeV5 } from '../shared-v5';
2
2
  export interface GetWalletBalanceParamsV5 {
3
3
  accountType: AccountTypeV5;
4
4
  coin?: string;
@@ -1,4 +1,4 @@
1
- import { AccountTypeV5, CategoryV5 } from '../v5-shared';
1
+ import { AccountTypeV5, CategoryV5 } from '../shared-v5';
2
2
  export interface GetCoinExchangeRecordParamsV5 {
3
3
  fromCoin?: string;
4
4
  toCoin?: string;
@@ -1,5 +1,5 @@
1
1
  import { KlineIntervalV3 } from '../shared';
2
- import { CategoryV5, InstrumentStatusV5, OptionTypeV5 } from '../v5-shared';
2
+ import { CategoryV5, InstrumentStatusV5, OptionTypeV5 } from '../shared-v5';
3
3
  export interface GetKlineParamsV5 {
4
4
  category: 'spot' | 'linear' | 'inverse';
5
5
  symbol: string;
@@ -1,4 +1,4 @@
1
- import { CategoryV5, ExecTypeV5, OrderTriggerByV5, OrderTypeV5, PositionIdx, TPSLModeV5 } from '../v5-shared';
1
+ import { CategoryV5, ExecTypeV5, OrderTriggerByV5, OrderTypeV5, PositionIdx, TPSLModeV5 } from '../shared-v5';
2
2
  export interface PositionInfoParamsV5 {
3
3
  category: CategoryV5;
4
4
  symbol?: string;
@@ -1,4 +1,4 @@
1
- import { ExecTypeV5 } from '../v5-shared';
1
+ import { ExecTypeV5 } from '../shared-v5';
2
2
  export interface GetPreUpgradeOrderHistoryParamsV5 {
3
3
  category: 'linear' | 'inverse';
4
4
  symbol?: string;
@@ -1,4 +1,4 @@
1
- import { LTOrderTypeV5 } from '../v5-shared';
1
+ import { LTOrderTypeV5 } from '../shared-v5';
2
2
  export interface PurchaseSpotLeveragedTokenParamsV5 {
3
3
  ltCoin: string;
4
4
  amount: string;
@@ -1,4 +1,4 @@
1
- import { CategoryV5, OrderFilterV5, OrderSMPTypeV5, OrderSideV5, OrderStatusV5, OrderTimeInForceV5, OrderTriggerByV5, OrderTypeV5, PositionIdx } from '../v5-shared';
1
+ import { CategoryV5, OrderFilterV5, OrderSMPTypeV5, OrderSideV5, OrderStatusV5, OrderTimeInForceV5, OrderTriggerByV5, OrderTypeV5, PositionIdx } from '../shared-v5';
2
2
  export interface OrderParamsV5 {
3
3
  category: CategoryV5;
4
4
  symbol: string;
@@ -1,4 +1,4 @@
1
- import { PermissionsV5 } from '../v5-shared';
1
+ import { PermissionsV5 } from '../shared-v5';
2
2
  export interface CreateSubMemberParamsV5 {
3
3
  username: string;
4
4
  password?: string;
@@ -1,4 +1,4 @@
1
- import { AccountMarginModeV5, AccountTypeV5, CategoryV5, TransactionTypeV5, UnifiedUpdateStatusV5 } from '../v5-shared';
1
+ import { AccountMarginModeV5, AccountTypeV5, CategoryV5, TransactionTypeV5, UnifiedUpdateStatusV5 } from '../shared-v5';
2
2
  export interface WalletBalanceV5Coin {
3
3
  coin: string;
4
4
  equity: string;
@@ -1,4 +1,4 @@
1
- import { AccountTypeV5, OrderSideV5, WithdrawalTypeV5 } from '../v5-shared';
1
+ import { AccountTypeV5, OrderSideV5, WithdrawalTypeV5 } from '../shared-v5';
2
2
  export interface CoinExchangeRecordV5 {
3
3
  fromCoin: string;
4
4
  fromAmount: string;
@@ -1,4 +1,4 @@
1
- import { CategoryCursorListV5, CategoryV5, ContractTypeV5, CopyTradingV5, InstrumentStatusV5, MarginTradingV5, OptionTypeV5, OrderSideV5 } from '../v5-shared';
1
+ import { CategoryCursorListV5, CategoryV5, ContractTypeV5, CopyTradingV5, InstrumentStatusV5, MarginTradingV5, OptionTypeV5, OrderSideV5 } from '../shared-v5';
2
2
  /**
3
3
  * OHLCVT candle used by v5 APIs
4
4
  *
@@ -1,4 +1,4 @@
1
- import { CategoryV5, ExecTypeV5, OrderSideV5, OrderTypeV5, PositionIdx, PositionSideV5, PositionStatusV5, StopOrderTypeV5, TPSLModeV5, TradeModeV5 } from '../v5-shared';
1
+ import { CategoryV5, ExecTypeV5, OrderSideV5, OrderTypeV5, PositionIdx, PositionSideV5, PositionStatusV5, StopOrderTypeV5, TPSLModeV5, TradeModeV5 } from '../shared-v5';
2
2
  export interface PositionV5 {
3
3
  positionIdx: PositionIdx;
4
4
  riskId: number;
@@ -1,4 +1,4 @@
1
- import { LTOrderStatusV5, LTOrderTypeV5, LeverageTokenStatusV5 } from '../v5-shared';
1
+ import { LTOrderStatusV5, LTOrderTypeV5, LeverageTokenStatusV5 } from '../shared-v5';
2
2
  export interface LeverageTokenInfoV5 {
3
3
  ltCoin: string;
4
4
  ltName: string;
@@ -1,4 +1,4 @@
1
- import { CategoryV5, OrderCancelTypeV5, OrderCreateTypeV5, OrderRejectReasonV5, OrderSideV5, OrderStatusV5, OrderTimeInForceV5, OrderTriggerByV5, OrderTypeV5, PositionIdx, StopOrderTypeV5 } from '../v5-shared';
1
+ import { CategoryV5, OrderCancelTypeV5, OrderCreateTypeV5, OrderRejectReasonV5, OrderSideV5, OrderStatusV5, OrderTimeInForceV5, OrderTriggerByV5, OrderTypeV5, PositionIdx, StopOrderTypeV5 } from '../shared-v5';
2
2
  export interface OrderResultV5 {
3
3
  orderId: string;
4
4
  orderLinkId: string;
@@ -1,4 +1,4 @@
1
- import { PermissionsV5 } from '../v5-shared';
1
+ import { PermissionsV5 } from '../shared-v5';
2
2
  export interface CreateSubMemberResultV5 {
3
3
  uid: string;
4
4
  username: string;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=spot.js.map
3
+ //# sourceMappingURL=shared-v5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-v5.js","sourceRoot":"","sources":["../../src/types/shared-v5.ts"],"names":[],"mappings":""}
@@ -1,24 +1,10 @@
1
- import { ContractClient } from '../contract-client';
2
- import { InverseClient } from '../inverse-client';
3
- import { LinearClient } from '../linear-client';
4
1
  import { RestClientV5 } from '../rest-client-v5';
5
- import { SpotClient } from '../spot-client';
6
2
  import { SpotClientV3 } from '../spot-client-v3';
7
- import { UnifiedMarginClient } from '../unified-margin-client';
8
- import { USDCOptionClient } from '../usdc-option-client';
9
- import { USDCPerpetualClient } from '../usdc-perpetual-client';
10
- export type RESTClient = InverseClient | LinearClient | SpotClient | SpotClientV3 | USDCOptionClient | USDCPerpetualClient | UnifiedMarginClient | ContractClient | RestClientV5;
3
+ export type RESTClient = SpotClientV3 | RestClientV5;
11
4
  export type numberInString = string;
12
5
  export type OrderSide = 'Buy' | 'Sell';
13
6
  export type KlineInterval = '1m' | '3m' | '5m' | '15m' | '30m' | '1h' | '2h' | '4h' | '6h' | '12h' | '1d' | '1w' | '1M';
14
7
  export type KlineIntervalV3 = '1' | '3' | '5' | '15' | '30' | '60' | '120' | '240' | '360' | '720' | 'D' | 'W' | 'M';
15
- export interface APIResponse<T> {
16
- ret_code: number;
17
- ret_msg: 'OK' | string;
18
- ext_code: string | null;
19
- ext_info: string | null;
20
- result: T;
21
- }
22
8
  export interface APIRateLimit {
23
9
  /** Remaining requests to this endpoint before the next reset */
24
10
  remainingRequests: number;
@@ -46,10 +32,6 @@ export interface APIResponseV3<T> {
46
32
  export type APIResponseV3WithTime<T> = APIResponseV3<T> & {
47
33
  time: number;
48
34
  };
49
- export interface APIResponseWithTime<T = {}> extends APIResponse<T> {
50
- /** UTC timestamp */
51
- time_now: numberInString;
52
- }
53
35
  /**
54
36
  * Request Parameter Types
55
37
  */
@@ -0,0 +1,3 @@
1
+ export * from './ws-general';
2
+ export * from './ws-events';
3
+ export * from './ws-confirmations';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ws-general"), exports);
18
+ __exportStar(require("./ws-events"), exports);
19
+ __exportStar(require("./ws-confirmations"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/websockets/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,8CAA4B;AAC5B,qDAAmC"}