bybit-api 3.4.1 → 3.5.0-beta.0
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/README.md +5 -4
- package/lib/account-asset-client-v3.d.ts +1 -1
- package/lib/account-asset-client-v3.js.map +1 -1
- package/lib/account-asset-client.d.ts +1 -1
- package/lib/account-asset-client.js.map +1 -1
- package/lib/constants/enum.d.ts +1 -0
- package/lib/constants/enum.js +1 -0
- package/lib/constants/enum.js.map +1 -1
- package/lib/contract-client.d.ts +1 -1
- package/lib/contract-client.js.map +1 -1
- package/lib/copy-trading-client.d.ts +1 -1
- package/lib/copy-trading-client.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/inverse-client.js +1 -0
- package/lib/inverse-client.js.map +1 -1
- package/lib/inverse-futures-client.js +1 -0
- package/lib/inverse-futures-client.js.map +1 -1
- package/lib/linear-client.js +1 -0
- package/lib/linear-client.js.map +1 -1
- package/lib/rest-client-v5.d.ts +626 -0
- package/lib/rest-client-v5.js +801 -0
- package/lib/rest-client-v5.js.map +1 -0
- package/lib/spot-client-v3.d.ts +1 -1
- package/lib/spot-client-v3.js +1 -0
- package/lib/spot-client-v3.js.map +1 -1
- package/lib/spot-client.d.ts +1 -1
- package/lib/spot-client.js.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/index.js.map +1 -1
- package/lib/types/request/index.d.ts +8 -1
- package/lib/types/request/index.js +8 -1
- package/lib/types/request/index.js.map +1 -1
- package/lib/types/request/linear.d.ts +1 -0
- package/lib/types/request/spot.d.ts +1 -1
- package/lib/types/request/v5-account.d.ts +30 -0
- package/lib/types/request/v5-account.js +3 -0
- package/lib/types/request/v5-account.js.map +1 -0
- package/lib/types/request/v5-asset.d.ts +120 -0
- package/lib/types/request/v5-asset.js +3 -0
- package/lib/types/request/v5-asset.js.map +1 -0
- package/lib/types/request/v5-market.d.ts +97 -0
- package/lib/types/request/v5-market.js +3 -0
- package/lib/types/request/v5-market.js.map +1 -0
- package/lib/types/request/v5-position.d.ts +78 -0
- package/lib/types/request/v5-position.js +3 -0
- package/lib/types/request/v5-position.js.map +1 -0
- package/lib/types/request/v5-spot-leverage-token.d.ts +20 -0
- package/lib/types/request/v5-spot-leverage-token.js +3 -0
- package/lib/types/request/v5-spot-leverage-token.js.map +1 -0
- package/lib/types/request/v5-trade.d.ts +91 -0
- package/lib/types/request/v5-trade.js +3 -0
- package/lib/types/request/v5-trade.js.map +1 -0
- package/lib/types/request/v5-user.d.ts +18 -0
- package/lib/types/request/v5-user.js +3 -0
- package/lib/types/request/v5-user.js.map +1 -0
- package/lib/types/response/index.d.ts +7 -0
- package/lib/types/response/index.js +7 -0
- package/lib/types/response/index.js.map +1 -1
- package/lib/types/response/v5-account.d.ts +101 -0
- package/lib/types/response/v5-account.js +3 -0
- package/lib/types/response/v5-account.js.map +1 -0
- package/lib/types/response/v5-asset.d.ts +133 -0
- package/lib/types/response/v5-asset.js +3 -0
- package/lib/types/response/v5-asset.js.map +1 -0
- package/lib/types/response/v5-market.d.ts +234 -0
- package/lib/types/response/v5-market.js +3 -0
- package/lib/types/response/v5-market.js.map +1 -0
- package/lib/types/response/v5-position.d.ts +78 -0
- package/lib/types/response/v5-position.js +3 -0
- package/lib/types/response/v5-position.js.map +1 -0
- package/lib/types/response/v5-spot-leverage-token.d.ts +62 -0
- package/lib/types/response/v5-spot-leverage-token.js +3 -0
- package/lib/types/response/v5-spot-leverage-token.js.map +1 -0
- package/lib/types/response/v5-trade.d.ts +78 -0
- package/lib/types/response/v5-trade.js +3 -0
- package/lib/types/response/v5-trade.js.map +1 -0
- package/lib/types/response/v5-user.d.ts +53 -0
- package/lib/types/response/v5-user.js +3 -0
- package/lib/types/response/v5-user.js.map +1 -0
- package/lib/types/v5-shared.d.ts +87 -0
- package/lib/types/v5-shared.js +3 -0
- package/lib/types/v5-shared.js.map +1 -0
- package/lib/unified-margin-client.d.ts +1 -1
- package/lib/unified-margin-client.js.map +1 -1
- package/lib/usdc-option-client.d.ts +9 -3
- package/lib/usdc-option-client.js +8 -2
- package/lib/usdc-option-client.js.map +1 -1
- package/lib/usdc-perpetual-client.d.ts +4 -2
- package/lib/usdc-perpetual-client.js +3 -1
- package/lib/usdc-perpetual-client.js.map +1 -1
- package/lib/util/BaseRestClient.js +4 -2
- package/lib/util/BaseRestClient.js.map +1 -1
- package/lib/util/WsStore.d.ts +2 -1
- package/lib/util/WsStore.js.map +1 -1
- package/lib/util/browser-support.js +2 -0
- package/lib/util/browser-support.js.map +1 -1
- package/lib/util/logger.js.map +1 -1
- package/lib/util/requestUtils.js +1 -0
- package/lib/util/requestUtils.js.map +1 -1
- package/lib/util/websocket-util.js +2 -2
- package/lib/websocket-client.js +16 -12
- package/lib/websocket-client.js.map +1 -1
- package/package.json +6 -4
|
@@ -0,0 +1,626 @@
|
|
|
1
|
+
import { APIResponseV3, APIResponseV3WithTime, AccountCoinBalanceV5, AccountInfoV5, AccountMarginModeV5, AccountOrderV5, AccountTypeV5, AllCoinsBalanceV5, AllowedDepositCoinInfoV5, AmendOrderParamsV5, ApiKeyInfoV5, AssetInfoV5, BatchAmendOrderParamsV5, BatchAmendOrderResult, BatchCancelOrderParamsV5, BatchCancelOrderResult, BatchOrderParamsV5, BatchOrderResult, BatchOrdersResult, BorrowHistoryRecordV5, CancelAllOrdersParamsV5, CancelOrderParamsV5, CategoryCursorListV5, CategoryListV5, CategorySymbolListV5, CategoryV5, ClosedPnLV5, CoinExchangeRecordV5, CoinGreeksV5, CoinInfoV5, CollateralInfoV5, CreateSubApiKeyParamsV5, CreateSubApiKeyResultV5, CreateSubMemberParamsV5, CreateSubMemberResultV5, CursorListV5, DeliveryRecordV5, DepositAddressResultV5, DepositRecordV5, ExecutionV5, FeeRateV5, FundingRateHistoryResponseV5, GetAccountCoinBalanceParamsV5, GetAccountOrdersParams, GetAllCoinsBalanceParamsV5, GetAllowedDepositCoinInfoParamsV5, GetAssetInfoParamsV5, GetBorrowHistoryParamsV5, GetClosedPnLParamsV5, GetCoinExchangeRecordParamsV5, GetDeliveryRecordParamsV5, GetDepositRecordParamsV5, GetExecutionListParamsV5, GetFundingRateHistoryParamsV5, GetHistoricalVolatilityParamsV5, GetIndexPriceKlineParamsV5, GetInstrumentsInfoParamsV5, GetInsuranceParamsV5, GetInternalTransferParamsV5, GetKlineParamsV5, GetMarkPriceKlineParamsV5, GetOpenInterestParamsV5, GetOptionDeliveryPriceParamsV5, GetOrderbookParamsV5, GetPremiumIndexPriceKlineParams, GetPublicTradingHistoryParamsV5, GetRiskLimitParamsV5, GetSettlementRecordParamsV5, GetSpotLeveragedTokenOrderHistoryParamsV5, GetSubAccountDepositRecordParamsV5, GetTickersParamsV5, GetTransactionLogParamsV5, GetUniversalTransferRecordsParamsV5, GetWalletBalanceParamsV5, GetWithdrawalRecordsParamsV5, HistoricalVolatilityV5, InstrumentInfoResponseV5, InsuranceResponseV5, InternalTransferRecordV5, LeverageTokenInfoV5, LeveragedTokenMarketResultV5, MMPModifyParamsV5, MMPStateV5, OHLCKlineV5, OHLCVKlineV5, OpenInterestResponseV5, OptionDeliveryPriceV5, OrderParamsV5, OrderResultV5, OrderSideV5, OrderbookResponseV5, PositionInfoParamsV5, PositionV5, PublicTradeV5, PurchaseSpotLeveragedTokenParamsV5, PurchaseSpotLeveragedTokenResultV5, RedeemSpotLeveragedTokenParamsV5, RedeemSpotLeveragedTokenResultV5, RiskLimitV5, SetAutoAddMarginParamsV5, SetLeverageParamsV5, SetRiskLimitParamsV5, SetRiskLimitResultV5, SetTPSLModeParamsV5, SetTradingStopParamsV5, SettlementRecordV5, SpotBorrowCheckResult, SpotLeveragedTokenOrderHistoryV5, SubMemberV5, SwitchIsolatedMarginParamsV5, SwitchPositionModeParamsV5, TPSLModeV5, TickerLinearInverseV5, TickerOptionV5, TickerSpotV5, TransactionLogV5, UnifiedAccountUpgradeResultV5, UniversalTransferParamsV5, UniversalTransferRecordV5, UpdateApiKeyParamsV5, UpdateApiKeyResultV5, WalletBalanceV5, WithdrawParamsV5, WithdrawalRecordV5 } from './types';
|
|
2
|
+
import BaseRestClient from './util/BaseRestClient';
|
|
3
|
+
/**
|
|
4
|
+
* REST API client for V5 REST APIs
|
|
5
|
+
*
|
|
6
|
+
* https://bybit-exchange.github.io/docs/v5/intro
|
|
7
|
+
*/
|
|
8
|
+
export declare class RestClientV5 extends BaseRestClient {
|
|
9
|
+
getClientType(): "v3";
|
|
10
|
+
fetchServerTime(): Promise<number>;
|
|
11
|
+
getServerTime(): Promise<APIResponseV3WithTime<{
|
|
12
|
+
timeSecond: string;
|
|
13
|
+
timeNano: string;
|
|
14
|
+
}>>;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
****** Market APIs
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Query the kline data. Charts are returned in groups based on the requested interval.
|
|
22
|
+
*
|
|
23
|
+
* Covers: Spot / Linear contract / Inverse contract
|
|
24
|
+
*/
|
|
25
|
+
getKline(params: GetKlineParamsV5): Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCVKlineV5[], 'spot' | 'linear' | 'inverse'>>>;
|
|
26
|
+
/**
|
|
27
|
+
* Query the mark price kline data. Charts are returned in groups based on the requested interval.
|
|
28
|
+
*
|
|
29
|
+
* Covers: Linear contract / Inverse contract
|
|
30
|
+
*/
|
|
31
|
+
getMarkPriceKline(params: GetMarkPriceKlineParamsV5): Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCKlineV5[], 'linear' | 'inverse'>>>;
|
|
32
|
+
/**
|
|
33
|
+
* Query the index price kline data. Charts are returned in groups based on the requested interval.
|
|
34
|
+
*
|
|
35
|
+
* Covers: Linear contract / Inverse contract
|
|
36
|
+
*/
|
|
37
|
+
getIndexPriceKline(params: GetIndexPriceKlineParamsV5): Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCKlineV5[], 'linear' | 'inverse'>>>;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieve the premium index price kline data. Charts are returned in groups based on the requested interval.
|
|
40
|
+
*
|
|
41
|
+
* Covers: Linear contract
|
|
42
|
+
*/
|
|
43
|
+
getPremiumIndexPriceKline(params: GetPremiumIndexPriceKlineParams): Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCKlineV5[], 'linear'>>>;
|
|
44
|
+
/**
|
|
45
|
+
* Query a list of instruments of online trading pair.
|
|
46
|
+
*
|
|
47
|
+
* Covers: Spot / Linear contract / Inverse contract / Option
|
|
48
|
+
*
|
|
49
|
+
* Note: Spot does not support pagination, so limit & cursor are invalid.
|
|
50
|
+
*/
|
|
51
|
+
getInstrumentsInfo(params: GetInstrumentsInfoParamsV5): Promise<APIResponseV3WithTime<InstrumentInfoResponseV5>>;
|
|
52
|
+
/**
|
|
53
|
+
* Query orderbook data
|
|
54
|
+
*
|
|
55
|
+
* Covers: Spot / Linear contract / Inverse contract / Option
|
|
56
|
+
*/
|
|
57
|
+
getOrderbook(params: GetOrderbookParamsV5): Promise<APIResponseV3WithTime<OrderbookResponseV5>>;
|
|
58
|
+
/**
|
|
59
|
+
* Query the latest price snapshot, best bid/ask price, and trading volume in the last 24 hours.
|
|
60
|
+
*
|
|
61
|
+
* Covers: Spot / Linear contract / Inverse contract / Option
|
|
62
|
+
*/
|
|
63
|
+
getTickers(params: GetTickersParamsV5): Promise<APIResponseV3WithTime<CategoryListV5<TickerLinearInverseV5[], 'linear' | 'inverse'> | CategoryListV5<TickerOptionV5[], 'option'> | CategoryListV5<TickerSpotV5[], 'spot'>>>;
|
|
64
|
+
/**
|
|
65
|
+
* Query historical funding rate. Each symbol has a different funding interval.
|
|
66
|
+
*
|
|
67
|
+
* Covers: Linear contract / Inverse perpetual
|
|
68
|
+
*/
|
|
69
|
+
getFundingRateHistory(params: GetFundingRateHistoryParamsV5): Promise<APIResponseV3WithTime<CategoryListV5<FundingRateHistoryResponseV5[], 'linear' | 'inverse'>>>;
|
|
70
|
+
/**
|
|
71
|
+
* Query recent public trading data in Bybit.
|
|
72
|
+
*
|
|
73
|
+
* Covers: Spot / Linear contract / Inverse contract / Option
|
|
74
|
+
*/
|
|
75
|
+
getPublicTradingHistory(params: GetPublicTradingHistoryParamsV5): Promise<APIResponseV3WithTime<CategoryListV5<PublicTradeV5[], CategoryV5>>>;
|
|
76
|
+
/**
|
|
77
|
+
* Get open interest of each symbol.
|
|
78
|
+
*
|
|
79
|
+
* Covers: Linear contract / Inverse contract
|
|
80
|
+
*/
|
|
81
|
+
getOpenInterest(params: GetOpenInterestParamsV5): Promise<APIResponseV3WithTime<OpenInterestResponseV5>>;
|
|
82
|
+
/**
|
|
83
|
+
* Query option historical volatility
|
|
84
|
+
* Covers: Option
|
|
85
|
+
*/
|
|
86
|
+
getHistoricalVolatility(params: GetHistoricalVolatilityParamsV5): Promise<APIResponseV3WithTime<CategoryListV5<HistoricalVolatilityV5[], 'option'>>>;
|
|
87
|
+
/**
|
|
88
|
+
* Query Bybit insurance pool data (BTC/USDT/USDC etc). The data is updated every 24 hours.
|
|
89
|
+
*/
|
|
90
|
+
getInsurance(params?: GetInsuranceParamsV5): Promise<APIResponseV3WithTime<InsuranceResponseV5>>;
|
|
91
|
+
/**
|
|
92
|
+
* Query risk limit of futures
|
|
93
|
+
*
|
|
94
|
+
* Covers: Linear contract / Inverse contract
|
|
95
|
+
*/
|
|
96
|
+
getRiskLimit(params?: GetRiskLimitParamsV5): Promise<APIResponseV3WithTime<CategoryListV5<RiskLimitV5[], 'inverse' | 'linear'>>>;
|
|
97
|
+
/**
|
|
98
|
+
* Get the delivery price for option
|
|
99
|
+
*
|
|
100
|
+
* Covers: Option
|
|
101
|
+
*/
|
|
102
|
+
getOptionDeliveryPrice(params: GetOptionDeliveryPriceParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<OptionDeliveryPriceV5[]>>>;
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
****** Trade APIs
|
|
106
|
+
*
|
|
107
|
+
*/
|
|
108
|
+
submitOrder(params: OrderParamsV5): Promise<APIResponseV3WithTime<OrderResultV5>>;
|
|
109
|
+
amendOrder(params: AmendOrderParamsV5): Promise<APIResponseV3WithTime<OrderResultV5>>;
|
|
110
|
+
cancelOrder(params: CancelOrderParamsV5): Promise<APIResponseV3WithTime<OrderResultV5>>;
|
|
111
|
+
/**
|
|
112
|
+
* Query unfilled or partially filled orders in real-time. To query older order records, please use the order history interface.
|
|
113
|
+
*/
|
|
114
|
+
getActiveOrders(params: GetAccountOrdersParams): Promise<APIResponseV3WithTime<CategoryCursorListV5<AccountOrderV5[]>>>;
|
|
115
|
+
cancelAllOrders(params: CancelAllOrdersParamsV5): Promise<APIResponseV3WithTime<{
|
|
116
|
+
list: OrderResultV5[];
|
|
117
|
+
}>>;
|
|
118
|
+
/**
|
|
119
|
+
* Query order history. As order creation/cancellation is asynchronous, the data returned from this endpoint may delay.
|
|
120
|
+
*
|
|
121
|
+
* If you want to get real-time order information, you could query this endpoint or rely on the websocket stream (recommended).
|
|
122
|
+
*/
|
|
123
|
+
getHistoricOrders(params: GetAccountOrdersParams): Promise<APIResponseV3WithTime<CategoryCursorListV5<AccountOrderV5[]>>>;
|
|
124
|
+
/**
|
|
125
|
+
* This endpoint allows you to place more than one order in a single request. Covers: option (unified account).
|
|
126
|
+
*
|
|
127
|
+
* Make sure you have sufficient funds in your account when placing an order.
|
|
128
|
+
* Once an order is placed, according to the funds required by the order,
|
|
129
|
+
* the funds in your account will be frozen by the corresponding amount during the life cycle of the order.
|
|
130
|
+
*
|
|
131
|
+
* A maximum of 20 orders can be placed per request. The returned data list is divided into two lists.
|
|
132
|
+
* The first list indicates whether or not the order creation was successful and the second list details the created order information.
|
|
133
|
+
* The structure of the two lists are completely consistent.
|
|
134
|
+
*/
|
|
135
|
+
batchSubmitOrders(category: 'option', orders: BatchOrderParamsV5[]): Promise<APIResponseV3WithTime<BatchOrdersResult<BatchOrderResult[]>>>;
|
|
136
|
+
/**
|
|
137
|
+
* This endpoint allows you to amend more than one open order in a single request. Covers: option (unified account).
|
|
138
|
+
*
|
|
139
|
+
* You can modify unfilled or partially filled orders. Conditional orders are not supported.
|
|
140
|
+
*
|
|
141
|
+
* A maximum of 20 orders can be amended per request.
|
|
142
|
+
*/
|
|
143
|
+
batchAmendOrders(category: 'option', orders: BatchAmendOrderParamsV5[]): Promise<APIResponseV3WithTime<BatchOrdersResult<BatchAmendOrderResult[]>>>;
|
|
144
|
+
/**
|
|
145
|
+
* This endpoint allows you to cancel more than one open order in a single request. Covers: option (unified account).
|
|
146
|
+
*
|
|
147
|
+
* You must specify orderId or orderLinkId. If orderId and orderLinkId is not matched, the system will process orderId first.
|
|
148
|
+
*
|
|
149
|
+
* You can cancel unfilled or partially filled orders. A maximum of 20 orders can be cancelled per request.
|
|
150
|
+
*/
|
|
151
|
+
batchCancelOrders(category: 'option', orders: BatchCancelOrderParamsV5[]): Promise<APIResponseV3WithTime<BatchOrdersResult<BatchCancelOrderResult[]>>>;
|
|
152
|
+
/**
|
|
153
|
+
* Query the qty and amount of borrowable coins in spot account.
|
|
154
|
+
*
|
|
155
|
+
* Covers: Spot (Unified Account)
|
|
156
|
+
*/
|
|
157
|
+
getSpotBorrowCheck(symbol: string, side: OrderSideV5): Promise<APIResponseV3WithTime<SpotBorrowCheckResult>>;
|
|
158
|
+
/**
|
|
159
|
+
* This endpoint allows you to set the disconnection protect time window. Covers: option (unified account).
|
|
160
|
+
*
|
|
161
|
+
* If you need to turn it on/off, you can contact your client manager for consultation and application.
|
|
162
|
+
* The default time window is 10 seconds.
|
|
163
|
+
*/
|
|
164
|
+
setDisconnectCancelAllWindow(category: 'option', timeWindow: number): Promise<APIResponseV3<undefined>>;
|
|
165
|
+
/**
|
|
166
|
+
*
|
|
167
|
+
****** Position APIs
|
|
168
|
+
*
|
|
169
|
+
*/
|
|
170
|
+
/**
|
|
171
|
+
* Query real-time position data, such as position size, cumulative realizedPNL.
|
|
172
|
+
*
|
|
173
|
+
* Unified account covers: Linear contract / Options
|
|
174
|
+
*
|
|
175
|
+
* Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures
|
|
176
|
+
*
|
|
177
|
+
* Note: this will give a 404 error if you query the `option` category if your account is not unified
|
|
178
|
+
*/
|
|
179
|
+
getPositionInfo(params: PositionInfoParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<PositionV5[]>>>;
|
|
180
|
+
/**
|
|
181
|
+
* Set the leverage
|
|
182
|
+
*
|
|
183
|
+
* Unified account covers: Linear contract
|
|
184
|
+
*
|
|
185
|
+
* Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures
|
|
186
|
+
*
|
|
187
|
+
* Note: Under one-way mode, buyLeverage must be the same as sellLeverage
|
|
188
|
+
*/
|
|
189
|
+
setLeverage(params: SetLeverageParamsV5): Promise<APIResponseV3WithTime<{}>>;
|
|
190
|
+
/**
|
|
191
|
+
* Select cross margin mode or isolated margin mode.
|
|
192
|
+
*
|
|
193
|
+
* Covers: USDT perpetual (Normal account) / Inverse contract (Normal account).
|
|
194
|
+
*
|
|
195
|
+
* Switching margin modes will cause orders in progress to be cancelled.
|
|
196
|
+
* Please make sure that there are no open orders before you switch margin modes.
|
|
197
|
+
*/
|
|
198
|
+
switchIsolatedMargin(params: SwitchIsolatedMarginParamsV5): Promise<APIResponseV3WithTime<{}>>;
|
|
199
|
+
/**
|
|
200
|
+
* This endpoint sets the take profit/stop loss (TP/SL) mode to full or partial.
|
|
201
|
+
*
|
|
202
|
+
* Unified account covers: Linear contract; normal account covers: USDT perpetual, inverse perpetual, inverse futures.
|
|
203
|
+
*
|
|
204
|
+
* For partial TP/SL mode, you can set the TP/SL size smaller than position size.
|
|
205
|
+
*/
|
|
206
|
+
setTPSLMode(params: SetTPSLModeParamsV5): Promise<APIResponseV3WithTime<{
|
|
207
|
+
tpSlMode: TPSLModeV5;
|
|
208
|
+
}>>;
|
|
209
|
+
/**
|
|
210
|
+
* Switches the position mode for USDT perpetual and Inverse futures.
|
|
211
|
+
*
|
|
212
|
+
* If you are in one-way Mode, you can only open one position on Buy or Sell side.
|
|
213
|
+
*
|
|
214
|
+
* If you are in hedge mode, you can open both Buy and Sell side positions simultaneously.
|
|
215
|
+
*
|
|
216
|
+
* Position mode. 0: Merged Single. 3: Both Sides.
|
|
217
|
+
*/
|
|
218
|
+
switchPositionMode(params: SwitchPositionModeParamsV5): Promise<APIResponseV3WithTime<{}>>;
|
|
219
|
+
/**
|
|
220
|
+
* The risk limit will limit the maximum position value you can hold under different margin requirements.
|
|
221
|
+
* If you want to hold a bigger position size, you need more margin.
|
|
222
|
+
*
|
|
223
|
+
* This interface can set the risk limit of a single position.
|
|
224
|
+
* If the order exceeds the current risk limit when placing an order, it will be rejected.
|
|
225
|
+
*/
|
|
226
|
+
setRiskLimit(params: SetRiskLimitParamsV5): Promise<APIResponseV3WithTime<SetRiskLimitResultV5>>;
|
|
227
|
+
/**
|
|
228
|
+
* This endpoint allows you to set the take profit, stop loss or trailing stop for a position.
|
|
229
|
+
* Passing these parameters will create conditional orders by the system internally.
|
|
230
|
+
*
|
|
231
|
+
* The system will cancel these orders if the position is closed, and adjust the qty according to the size of the open position.
|
|
232
|
+
*
|
|
233
|
+
* Unified account covers: Linear contract.
|
|
234
|
+
* Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures.
|
|
235
|
+
*/
|
|
236
|
+
setTradingStop(params: SetTradingStopParamsV5): Promise<APIResponseV3WithTime<{}>>;
|
|
237
|
+
/**
|
|
238
|
+
* This endpoint allows you to turn on/off auto-add-margin for an isolated margin position.
|
|
239
|
+
*
|
|
240
|
+
* Covers: USDT perpetual (Normal Account).
|
|
241
|
+
*/
|
|
242
|
+
setAutoAddMargin(params: SetAutoAddMarginParamsV5): Promise<APIResponseV3WithTime<{}>>;
|
|
243
|
+
/**
|
|
244
|
+
* Query users' execution records, sorted by execTime in descending order
|
|
245
|
+
*
|
|
246
|
+
* Unified account covers: Spot / Linear contract / Options
|
|
247
|
+
* Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures
|
|
248
|
+
*/
|
|
249
|
+
getExecutionList(params: GetExecutionListParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<ExecutionV5[]>>>;
|
|
250
|
+
/**
|
|
251
|
+
* Query user's closed profit and loss records. The results are sorted by createdTime in descending order.
|
|
252
|
+
*
|
|
253
|
+
* Unified account covers: Linear contract
|
|
254
|
+
* Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures
|
|
255
|
+
*/
|
|
256
|
+
getClosedPnL(params: GetClosedPnLParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<ClosedPnLV5[]>>>;
|
|
257
|
+
/**
|
|
258
|
+
*
|
|
259
|
+
****** Account APIs
|
|
260
|
+
*
|
|
261
|
+
*/
|
|
262
|
+
/**
|
|
263
|
+
* Obtain wallet balance, query asset information of each currency, and account risk rate information under unified margin mode.
|
|
264
|
+
*
|
|
265
|
+
* By default, currency information with assets or liabilities of 0 is not returned.
|
|
266
|
+
*/
|
|
267
|
+
getWalletBalance(params: GetWalletBalanceParamsV5): Promise<APIResponseV3WithTime<WalletBalanceV5>>;
|
|
268
|
+
/**
|
|
269
|
+
* Upgrade to unified account.
|
|
270
|
+
*
|
|
271
|
+
* Banned/OTC loan/Net asset unsatisfying/Express path users cannot upgrade the account to Unified Account for now.
|
|
272
|
+
*/
|
|
273
|
+
upgradeToUnifiedAccount(): Promise<APIResponseV3WithTime<UnifiedAccountUpgradeResultV5>>;
|
|
274
|
+
/**
|
|
275
|
+
* Get interest records, sorted in reverse order of creation time.
|
|
276
|
+
*
|
|
277
|
+
* Unified account
|
|
278
|
+
*/
|
|
279
|
+
getBorrowHistory(params?: GetBorrowHistoryParamsV5): Promise<APIResponseV3WithTime<CursorListV5<BorrowHistoryRecordV5[]>>>;
|
|
280
|
+
/**
|
|
281
|
+
* Get the collateral information of the current unified margin account, including loan interest rate,
|
|
282
|
+
* loanable amount, collateral conversion rate, whether it can be mortgaged as margin, etc.
|
|
283
|
+
*/
|
|
284
|
+
getCollateralInfo(currency?: string): Promise<APIResponseV3WithTime<{
|
|
285
|
+
list: CollateralInfoV5[];
|
|
286
|
+
}>>;
|
|
287
|
+
/**
|
|
288
|
+
* Get current account Greeks information
|
|
289
|
+
*/
|
|
290
|
+
getCoinGreeks(baseCoin?: string): Promise<APIResponseV3WithTime<{
|
|
291
|
+
list: CoinGreeksV5[];
|
|
292
|
+
}>>;
|
|
293
|
+
/**
|
|
294
|
+
* Get the trading fee rate of derivatives.
|
|
295
|
+
* Covers: USDT perpetual / Inverse perpetual / Inverse futures
|
|
296
|
+
*/
|
|
297
|
+
getFeeRate(symbol?: string): Promise<APIResponseV3WithTime<{
|
|
298
|
+
list: FeeRateV5[];
|
|
299
|
+
}>>;
|
|
300
|
+
/**
|
|
301
|
+
* Query the margin mode and the upgraded status of account
|
|
302
|
+
*/
|
|
303
|
+
getAccountInfo(): Promise<APIResponseV3<AccountInfoV5>>;
|
|
304
|
+
/**
|
|
305
|
+
* Query transaction logs in Unified account.
|
|
306
|
+
*/
|
|
307
|
+
getTransactionLog(params?: GetTransactionLogParamsV5): Promise<APIResponseV3WithTime<CursorListV5<TransactionLogV5[]>>>;
|
|
308
|
+
/**
|
|
309
|
+
* Default is regular margin mode.
|
|
310
|
+
*
|
|
311
|
+
* This mode is valid for USDT Perp, USDC Perp and USDC Option.
|
|
312
|
+
*/
|
|
313
|
+
setMarginMode(marginMode: AccountMarginModeV5): Promise<APIResponseV3<{
|
|
314
|
+
reasons: {
|
|
315
|
+
reasonCode: string;
|
|
316
|
+
reasonMsg: string;
|
|
317
|
+
}[];
|
|
318
|
+
}>>;
|
|
319
|
+
/**
|
|
320
|
+
* Configure Market Maker Protection (MMP)
|
|
321
|
+
*/
|
|
322
|
+
setMMP(params: MMPModifyParamsV5): Promise<APIResponseV3<undefined>>;
|
|
323
|
+
/**
|
|
324
|
+
* Once the mmp triggered, you can unfreeze the account via this endpoint
|
|
325
|
+
*/
|
|
326
|
+
resetMMP(baseCoin: string): Promise<APIResponseV3<undefined>>;
|
|
327
|
+
/**
|
|
328
|
+
* Get MMP State
|
|
329
|
+
*/
|
|
330
|
+
getMMPState(baseCoin: string): Promise<APIResponseV3WithTime<{
|
|
331
|
+
result: MMPStateV5[];
|
|
332
|
+
}>>;
|
|
333
|
+
/**
|
|
334
|
+
*
|
|
335
|
+
****** Asset APIs
|
|
336
|
+
*
|
|
337
|
+
*/
|
|
338
|
+
/**
|
|
339
|
+
* Query the coin exchange records.
|
|
340
|
+
*
|
|
341
|
+
* CAUTION: You may experience long delays with this endpoint.
|
|
342
|
+
*/
|
|
343
|
+
getCoinExchangeRecords(params?: GetCoinExchangeRecordParamsV5): Promise<APIResponseV3WithTime<{
|
|
344
|
+
orderBody: CoinExchangeRecordV5[];
|
|
345
|
+
nextPageCursor?: string;
|
|
346
|
+
}>>;
|
|
347
|
+
/**
|
|
348
|
+
* Query option delivery records, sorted by deliveryTime in descending order.
|
|
349
|
+
*
|
|
350
|
+
* Covers: Option
|
|
351
|
+
*/
|
|
352
|
+
getDeliveryRecord(params: GetDeliveryRecordParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<DeliveryRecordV5[]>>>;
|
|
353
|
+
/**
|
|
354
|
+
* Query session settlement records of USDC perpetual
|
|
355
|
+
*
|
|
356
|
+
* Covers: Linear contract (USDC Perpetual only, Unified Account)
|
|
357
|
+
*/
|
|
358
|
+
getSettlementRecords(params: GetSettlementRecordParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<SettlementRecordV5[]>>>;
|
|
359
|
+
/**
|
|
360
|
+
* Query asset information.
|
|
361
|
+
*
|
|
362
|
+
* INFO
|
|
363
|
+
* For now, it can query SPOT only.
|
|
364
|
+
*/
|
|
365
|
+
getAssetInfo(params: GetAssetInfoParamsV5): Promise<APIResponseV3WithTime<{
|
|
366
|
+
spot: AssetInfoV5;
|
|
367
|
+
}>>;
|
|
368
|
+
/**
|
|
369
|
+
* Query all coin balances of all account types under the master account and sub accounts.
|
|
370
|
+
*
|
|
371
|
+
* It is not allowed to get the master account coin balance via sub account API key.
|
|
372
|
+
*/
|
|
373
|
+
getAllCoinsBalance(params: GetAllCoinsBalanceParamsV5): Promise<APIResponseV3WithTime<AllCoinsBalanceV5>>;
|
|
374
|
+
/**
|
|
375
|
+
* Query the balance of a specific coin in a specific account type. Supports querying sub UID's balance.
|
|
376
|
+
*
|
|
377
|
+
* CAUTION: Can query by the master UID's api key only.
|
|
378
|
+
*/
|
|
379
|
+
getCoinBalance(params: GetAccountCoinBalanceParamsV5): Promise<APIResponseV3<AccountCoinBalanceV5>>;
|
|
380
|
+
/**
|
|
381
|
+
* Query the transferable coin list between each account type.
|
|
382
|
+
*/
|
|
383
|
+
getTransferableCoinList(fromAccountType: AccountTypeV5, toAccountType: AccountTypeV5): Promise<APIResponseV3WithTime<{
|
|
384
|
+
list: string[];
|
|
385
|
+
}>>;
|
|
386
|
+
/**
|
|
387
|
+
* Create the internal transfer between different account types under the same UID.
|
|
388
|
+
* Each account type has its own acceptable coins, e.g, you cannot transfer USDC from SPOT to CONTRACT.
|
|
389
|
+
*
|
|
390
|
+
* Please refer to the getTransferableCoinList() API to find out more.
|
|
391
|
+
*/
|
|
392
|
+
createInternalTransfer(transferId: string, coin: string, amount: string, fromAccountType: AccountTypeV5, toAccountType: AccountTypeV5): Promise<APIResponseV3WithTime<{
|
|
393
|
+
transferId: string;
|
|
394
|
+
}>>;
|
|
395
|
+
/**
|
|
396
|
+
* Query the internal transfer records between different account types under the same UID.
|
|
397
|
+
*/
|
|
398
|
+
getInternalTransferRecords(params?: GetInternalTransferParamsV5): Promise<APIResponseV3WithTime<CursorListV5<InternalTransferRecordV5[]>>>;
|
|
399
|
+
/**
|
|
400
|
+
* Query the sub UIDs under a main UID
|
|
401
|
+
*
|
|
402
|
+
* CAUTION: Can query by the master UID's api key only
|
|
403
|
+
*/
|
|
404
|
+
getSubUID(): Promise<APIResponseV3WithTime<{
|
|
405
|
+
subMemberIds: string[];
|
|
406
|
+
transferableSubMemberIds: string[];
|
|
407
|
+
}>>;
|
|
408
|
+
/**
|
|
409
|
+
* Enable Universal Transfer for Sub UID
|
|
410
|
+
*
|
|
411
|
+
* Use this endpoint to enable a subaccount to take part in a universal transfer.
|
|
412
|
+
* It is a one-time switch which, once thrown, enables a subaccount permanently.
|
|
413
|
+
* If not set, your subaccount cannot use universal transfers.
|
|
414
|
+
*/
|
|
415
|
+
enableUniversalTransferForSubUIDs(subMemberIds: string[]): Promise<APIResponseV3WithTime<{}>>;
|
|
416
|
+
/**
|
|
417
|
+
* Transfer between sub-sub or main-sub. Please make sure you have enabled universal transfer on your sub UID in advance.
|
|
418
|
+
*/
|
|
419
|
+
createUniversalTransfer(params: UniversalTransferParamsV5): Promise<APIResponseV3WithTime<{
|
|
420
|
+
transferId: string;
|
|
421
|
+
}>>;
|
|
422
|
+
/**
|
|
423
|
+
* Query universal transfer records
|
|
424
|
+
*
|
|
425
|
+
* CAUTION
|
|
426
|
+
* Can query by the master UID's API key only
|
|
427
|
+
*/
|
|
428
|
+
getUniversalTransferRecords(params?: GetUniversalTransferRecordsParamsV5): Promise<APIResponseV3WithTime<CursorListV5<UniversalTransferRecordV5[]>>>;
|
|
429
|
+
/**
|
|
430
|
+
* Query allowed deposit coin information.
|
|
431
|
+
* To find out paired chain of coin, please refer to the coin info api.
|
|
432
|
+
*/
|
|
433
|
+
getAllowedDepositCoinInfo(params?: GetAllowedDepositCoinInfoParamsV5): Promise<APIResponseV3WithTime<{
|
|
434
|
+
configList: AllowedDepositCoinInfoV5[];
|
|
435
|
+
nextPageCursor: string;
|
|
436
|
+
}>>;
|
|
437
|
+
/**
|
|
438
|
+
* Query deposit records.
|
|
439
|
+
*
|
|
440
|
+
* TIP
|
|
441
|
+
* endTime - startTime should be less than 30 days. Query last 30 days records by default.
|
|
442
|
+
*
|
|
443
|
+
* Can use main or sub UID api key to query deposit records respectively.
|
|
444
|
+
*/
|
|
445
|
+
getDepositRecords(params?: GetDepositRecordParamsV5): Promise<APIResponseV3WithTime<{
|
|
446
|
+
rows: DepositRecordV5[];
|
|
447
|
+
nextPageCursor: string;
|
|
448
|
+
}>>;
|
|
449
|
+
/**
|
|
450
|
+
* Query subaccount's deposit records by MAIN UID's API key.
|
|
451
|
+
*
|
|
452
|
+
* TIP: Query deposit records of SPOT only
|
|
453
|
+
* endTime - startTime should be less than 30 days.
|
|
454
|
+
* Queries for the last 30 days worth of records by default.
|
|
455
|
+
*/
|
|
456
|
+
getSubAccountDepositRecords(params: GetSubAccountDepositRecordParamsV5): Promise<APIResponseV3WithTime<{
|
|
457
|
+
rows: DepositRecordV5[];
|
|
458
|
+
nextPageCursor: string;
|
|
459
|
+
}>>;
|
|
460
|
+
/**
|
|
461
|
+
* Query the deposit address information of MASTER account.
|
|
462
|
+
*/
|
|
463
|
+
getMasterDepositAddress(coin: string, chainType?: string): Promise<APIResponseV3WithTime<DepositAddressResultV5>>;
|
|
464
|
+
/**
|
|
465
|
+
* Query the deposit address information of SUB account.
|
|
466
|
+
*
|
|
467
|
+
* CAUTION
|
|
468
|
+
* Can use master UID's api key only
|
|
469
|
+
*/
|
|
470
|
+
querySubMemberAddress(coin: string, chainType: string, subMemberId: string): Promise<APIResponseV3<DepositAddressResultV5>>;
|
|
471
|
+
/**
|
|
472
|
+
* Query coin information, including chain information, withdraw and deposit status.
|
|
473
|
+
*/
|
|
474
|
+
getCoinInfo(coin?: string): Promise<APIResponseV3WithTime<{
|
|
475
|
+
rows: CoinInfoV5[];
|
|
476
|
+
}>>;
|
|
477
|
+
/**
|
|
478
|
+
* Query withdrawal records.
|
|
479
|
+
*/
|
|
480
|
+
getWithdrawalRecords(params?: GetWithdrawalRecordsParamsV5): Promise<APIResponseV3<{
|
|
481
|
+
rows: WithdrawalRecordV5[];
|
|
482
|
+
}>>;
|
|
483
|
+
/**
|
|
484
|
+
* Withdraw assets from the SPOT account.
|
|
485
|
+
*
|
|
486
|
+
* CAUTION: Make sure you have whitelisted your wallet address before calling this endpoint.
|
|
487
|
+
*
|
|
488
|
+
* You can make an off-chain transfer if the target wallet address is from Bybit. This means that no blockchain fee will be charged.
|
|
489
|
+
*/
|
|
490
|
+
submitWithdrawal(params: WithdrawParamsV5): Promise<APIResponseV3WithTime<{
|
|
491
|
+
id: string;
|
|
492
|
+
}>>;
|
|
493
|
+
/**
|
|
494
|
+
* Cancel the withdrawal
|
|
495
|
+
*
|
|
496
|
+
* CAUTION: Can query by the master UID's api key only
|
|
497
|
+
*/
|
|
498
|
+
cancelWithdrawal(id: string): Promise<APIResponseV3WithTime<{
|
|
499
|
+
status: 0 | 1;
|
|
500
|
+
}>>;
|
|
501
|
+
/**
|
|
502
|
+
*
|
|
503
|
+
****** User APIs
|
|
504
|
+
*
|
|
505
|
+
*/
|
|
506
|
+
/**
|
|
507
|
+
* Create a new sub user id. Use master user's api key only.
|
|
508
|
+
*
|
|
509
|
+
* The API key must own one of permissions will be allowed to call the following API endpoint.
|
|
510
|
+
*
|
|
511
|
+
* master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
|
|
512
|
+
*/
|
|
513
|
+
createSubMember(params: CreateSubMemberParamsV5): Promise<APIResponseV3WithTime<CreateSubMemberResultV5>>;
|
|
514
|
+
/**
|
|
515
|
+
* To create new API key for those newly created sub UID. Use master user's api key only.
|
|
516
|
+
*
|
|
517
|
+
* TIP
|
|
518
|
+
* The API key must own one of permissions will be allowed to call the following API endpoint.
|
|
519
|
+
* master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
|
|
520
|
+
*/
|
|
521
|
+
createSubUIDAPIKey(params: CreateSubApiKeyParamsV5): Promise<APIResponseV3WithTime<CreateSubApiKeyResultV5>>;
|
|
522
|
+
/**
|
|
523
|
+
* This endpoint allows you to get a list of all sub UID of master account.
|
|
524
|
+
*/
|
|
525
|
+
getSubUIDList(): Promise<APIResponseV3WithTime<{
|
|
526
|
+
subMembers: SubMemberV5[];
|
|
527
|
+
}>>;
|
|
528
|
+
/**
|
|
529
|
+
* Froze sub uid. Use master user's api key only.
|
|
530
|
+
*
|
|
531
|
+
* TIP: The API key must own one of the following permissions will be allowed to call the following API endpoint.
|
|
532
|
+
*
|
|
533
|
+
* master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
|
|
534
|
+
*/
|
|
535
|
+
setSubUIDFrozenState(subuid: number, frozen: 0 | 1): Promise<APIResponseV3WithTime<{}>>;
|
|
536
|
+
/**
|
|
537
|
+
* Get the information of the api key. Use the api key pending to be checked to call the endpoint.
|
|
538
|
+
* Both master and sub user's api key are applicable.
|
|
539
|
+
*
|
|
540
|
+
* TIP: Any permission can access this endpoint.
|
|
541
|
+
*/
|
|
542
|
+
getQueryApiKey(): Promise<APIResponseV3WithTime<ApiKeyInfoV5>>;
|
|
543
|
+
/**
|
|
544
|
+
* Modify the settings of a master API key. Use the API key pending to be modified to call the endpoint. Use master user's API key only.
|
|
545
|
+
*
|
|
546
|
+
* TIP: The API key must own one of the permissions to call the following API endpoint.
|
|
547
|
+
*
|
|
548
|
+
* Master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
|
|
549
|
+
*/
|
|
550
|
+
updateMasterApiKey(params: UpdateApiKeyParamsV5): Promise<APIResponseV3WithTime<UpdateApiKeyResultV5>>;
|
|
551
|
+
/**
|
|
552
|
+
* This endpoint modifies the settings of a sub API key.
|
|
553
|
+
* Use the API key pending to be modified to call the endpoint.
|
|
554
|
+
* Only the API key that calls this interface can be modified.
|
|
555
|
+
*
|
|
556
|
+
* The API key must own "Account Transfer" permission to be allowed to call this API endpoint.
|
|
557
|
+
*/
|
|
558
|
+
updateSubApiKey(params: UpdateApiKeyParamsV5): Promise<APIResponseV3<UpdateApiKeyResultV5>>;
|
|
559
|
+
/**
|
|
560
|
+
* Delete the api key of master account. Use the api key pending to be delete to call the endpoint. Use master user's api key only.
|
|
561
|
+
*
|
|
562
|
+
* TIP: The API key must own one of permissions will be allowed to call the following API endpoint.
|
|
563
|
+
* master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
|
|
564
|
+
*
|
|
565
|
+
* DANGER: BE CAREFUL! The API key used to call this interface will be invalid immediately.
|
|
566
|
+
*/
|
|
567
|
+
deleteMasterApiKey(): Promise<APIResponseV3WithTime<{}>>;
|
|
568
|
+
/**
|
|
569
|
+
* Delete the api key of sub account. Use the api key pending to be delete to call the endpoint. Use sub user's api key only.
|
|
570
|
+
*
|
|
571
|
+
* TIP
|
|
572
|
+
* The API key must own one of permissions will be allowed to call the following API endpoint.
|
|
573
|
+
* sub API key: "Account Transfer"
|
|
574
|
+
*
|
|
575
|
+
* DANGER: BE CAREFUL! The API key used to call this interface will be invalid immediately.
|
|
576
|
+
*/
|
|
577
|
+
deleteSubApiKey(): Promise<APIResponseV3WithTime<{}>>;
|
|
578
|
+
/**
|
|
579
|
+
*
|
|
580
|
+
****** Spot Leverage Token APIs
|
|
581
|
+
*
|
|
582
|
+
*/
|
|
583
|
+
/**
|
|
584
|
+
* Query leverage token information
|
|
585
|
+
*/
|
|
586
|
+
getLeveragedTokenInfo(ltCoin?: string): Promise<APIResponseV3WithTime<{
|
|
587
|
+
list: LeverageTokenInfoV5[];
|
|
588
|
+
}>>;
|
|
589
|
+
/**
|
|
590
|
+
* Get leverage token market information.
|
|
591
|
+
*/
|
|
592
|
+
getLeveragedTokenMarket(ltCoin: string): Promise<APIResponseV3WithTime<LeveragedTokenMarketResultV5>>;
|
|
593
|
+
/**
|
|
594
|
+
* This endpoint allows you to purchase a leveraged token with a specified amount.
|
|
595
|
+
*/
|
|
596
|
+
purchaseSpotLeveragedToken(params: PurchaseSpotLeveragedTokenParamsV5): Promise<APIResponseV3WithTime<PurchaseSpotLeveragedTokenResultV5>>;
|
|
597
|
+
/**
|
|
598
|
+
* Redeem leveraged token.
|
|
599
|
+
*/
|
|
600
|
+
redeemSpotLeveragedToken(params: RedeemSpotLeveragedTokenParamsV5): Promise<APIResponseV3WithTime<RedeemSpotLeveragedTokenResultV5>>;
|
|
601
|
+
/**
|
|
602
|
+
* Get purchase or redemption history
|
|
603
|
+
*/
|
|
604
|
+
getSpotLeveragedTokenOrderHistory(params?: GetSpotLeveragedTokenOrderHistoryParamsV5): Promise<APIResponseV3WithTime<{
|
|
605
|
+
list: SpotLeveragedTokenOrderHistoryV5[];
|
|
606
|
+
}>>;
|
|
607
|
+
/**
|
|
608
|
+
*
|
|
609
|
+
****** Spot Margin Trade APIs
|
|
610
|
+
*
|
|
611
|
+
*/
|
|
612
|
+
/**
|
|
613
|
+
* Turn spot margin trade on / off.
|
|
614
|
+
*
|
|
615
|
+
* CAUTION
|
|
616
|
+
* Your account needs to turn on spot margin first
|
|
617
|
+
*/
|
|
618
|
+
toggleSpotMarginTrade(spotMarginMode: '1' | '0'): Promise<APIResponseV3WithTime<{
|
|
619
|
+
spotMarginMode: '1' | '0';
|
|
620
|
+
}>>;
|
|
621
|
+
/**
|
|
622
|
+
* Set the user's maximum leverage in spot cross margin.
|
|
623
|
+
* CAUTION: Your account needs to enable spot margin first; i.e., you must have finished the quiz on web / app.
|
|
624
|
+
*/
|
|
625
|
+
setSpotMarginLeverage(leverage: string): Promise<APIResponseV3WithTime<{}>>;
|
|
626
|
+
}
|