bybit-api 3.6.1 → 3.7.1-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/lib/contract-client.d.ts +17 -3
- package/lib/contract-client.js +17 -3
- package/lib/contract-client.js.map +1 -1
- package/lib/rest-client-v5.d.ts +259 -10
- package/lib/rest-client-v5.js +196 -7
- package/lib/rest-client-v5.js.map +1 -1
- package/lib/types/request/contract.d.ts +21 -11
- package/lib/types/request/index.d.ts +1 -0
- package/lib/types/request/index.js +1 -0
- package/lib/types/request/index.js.map +1 -1
- package/lib/types/request/v5-account.d.ts +5 -0
- package/lib/types/request/v5-market.d.ts +10 -2
- package/lib/types/request/v5-position.d.ts +13 -2
- package/lib/types/request/v5-pre-upgrade.d.ts +34 -0
- package/lib/types/request/v5-pre-upgrade.js +3 -0
- package/lib/types/request/v5-pre-upgrade.js.map +1 -0
- package/lib/types/request/v5-trade.d.ts +24 -1
- package/lib/types/response/contract.d.ts +22 -12
- package/lib/types/response/v5-account.d.ts +1 -0
- package/lib/types/response/v5-market.d.ts +6 -0
- package/lib/types/response/v5-position.d.ts +26 -0
- package/lib/types/response/v5-trade.d.ts +7 -0
- package/lib/types/v5-shared.d.ts +4 -1
- package/lib/util/websocket-util.d.ts +2 -1
- package/lib/util/websocket-util.js +2 -2
- package/lib/util/websocket-util.js.map +1 -1
- package/lib/websocket-client.js +1 -1
- package/lib/websocket-client.js.map +1 -1
- package/package.json +13 -1
- package/src/account-asset-client-v3.ts +310 -0
- package/src/account-asset-client.ts +149 -0
- package/src/constants/enum.ts +105 -0
- package/src/contract-client.ts +360 -0
- package/src/copy-trading-client.ts +159 -0
- package/src/index.ts +18 -0
- package/src/inverse-client.ts +337 -0
- package/src/inverse-futures-client.ts +403 -0
- package/src/linear-client.ts +387 -0
- package/src/rest-client-v5.ts +1638 -0
- package/src/spot-client-v3.ts +303 -0
- package/src/spot-client.ts +180 -0
- package/src/types/index.ts +5 -0
- package/src/types/request/account-asset.ts +258 -0
- package/src/types/request/contract.ts +139 -0
- package/src/types/request/copy-trading.ts +53 -0
- package/src/types/request/index.ts +18 -0
- package/src/types/request/inverse.ts +135 -0
- package/src/types/request/linear.ts +201 -0
- package/src/types/request/spot.ts +89 -0
- package/src/types/request/unified-margin.ts +247 -0
- package/src/types/request/usdc-options.ts +134 -0
- package/src/types/request/usdc-perp.ts +100 -0
- package/src/types/request/usdc-shared.ts +39 -0
- package/src/types/request/v5-account.ts +40 -0
- package/src/types/request/v5-asset.ts +133 -0
- package/src/types/request/v5-market.ts +127 -0
- package/src/types/request/v5-position.ts +107 -0
- package/src/types/request/v5-pre-upgrade.ts +37 -0
- package/src/types/request/v5-spot-leverage-token.ts +23 -0
- package/src/types/request/v5-trade.ts +133 -0
- package/src/types/request/v5-user.ts +21 -0
- package/src/types/response/account-asset.ts +236 -0
- package/src/types/response/contract.ts +74 -0
- package/src/types/response/index.ts +13 -0
- package/src/types/response/shared.ts +19 -0
- package/src/types/response/spot.ts +17 -0
- package/src/types/response/unified-margin.ts +71 -0
- package/src/types/response/usdt-perp.ts +58 -0
- package/src/types/response/v5-account.ts +122 -0
- package/src/types/response/v5-asset.ts +170 -0
- package/src/types/response/v5-market.ts +271 -0
- package/src/types/response/v5-position.ts +118 -0
- package/src/types/response/v5-spot-leverage-token.ts +70 -0
- package/src/types/response/v5-trade.ts +103 -0
- package/src/types/response/v5-user.ts +58 -0
- package/src/types/shared.ts +175 -0
- package/src/types/v5-shared.ts +213 -0
- package/src/types/websockets.ts +115 -0
- package/src/types/ws-events/failed-topic-subscription-confirmation.ts +6 -0
- package/src/types/ws-events/succeeded-topic-subscription-confirmation.ts +6 -0
- package/src/types/ws-events/topic-subscription-confirmation.ts +7 -0
- package/src/unified-margin-client.ts +400 -0
- package/src/usdc-option-client.ts +333 -0
- package/src/usdc-perpetual-client.ts +312 -0
- package/src/util/BaseRestClient.ts +502 -0
- package/src/util/WsStore.ts +160 -0
- package/src/util/browser-support.ts +29 -0
- package/src/util/index.ts +5 -0
- package/src/util/logger.ts +26 -0
- package/src/util/node-support.ts +9 -0
- package/src/util/requestUtils.ts +171 -0
- package/src/util/websocket-util.ts +550 -0
- package/src/websocket-client.ts +1262 -0
package/lib/contract-client.d.ts
CHANGED
|
@@ -47,13 +47,25 @@ export declare class ContractClient extends BaseRestClient {
|
|
|
47
47
|
/** -> Order API */
|
|
48
48
|
/** Place an order */
|
|
49
49
|
submitOrder(params: ContractOrderRequest): Promise<APIResponseV3<any>>;
|
|
50
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Query order history.
|
|
52
|
+
*
|
|
53
|
+
* As order creation/cancellation is asynchronous, the data returned from the interface may be delayed.
|
|
54
|
+
* To access order information in real-time, call getActiveOrders().
|
|
55
|
+
*/
|
|
51
56
|
getHistoricOrders(params: ContractHistoricOrdersRequest): Promise<APIResponseV3<PaginatedResult<ContractHistoricOrder>>>;
|
|
52
57
|
/** Cancel order */
|
|
53
58
|
cancelOrder(params: ContractCancelOrderRequest): Promise<APIResponseV3<any>>;
|
|
54
59
|
/** Cancel all orders */
|
|
55
60
|
cancelAllOrders(symbol: string): Promise<APIResponseV3<any>>;
|
|
56
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* Replace order
|
|
63
|
+
*
|
|
64
|
+
* Active order parameters (such as quantity, price) and stop order parameters
|
|
65
|
+
* cannot be modified in one request at the same time.
|
|
66
|
+
*
|
|
67
|
+
* Please request modification separately.
|
|
68
|
+
*/
|
|
57
69
|
modifyOrder(params: ContractModifyOrderRequest): Promise<APIResponseV3<any>>;
|
|
58
70
|
/** Query Open Order(s) (real-time) */
|
|
59
71
|
getActiveOrders(params: ContractActiveOrdersRequest): Promise<APIResponseV3<any>>;
|
|
@@ -104,7 +116,9 @@ export declare class ContractClient extends BaseRestClient {
|
|
|
104
116
|
getTradingFeeRate(symbol?: string): Promise<APIResponseV3<any>>;
|
|
105
117
|
/**
|
|
106
118
|
* Get wallet fund records.
|
|
107
|
-
* This endpoint also shows exchanges from the Asset Exchange,
|
|
119
|
+
* This endpoint also shows exchanges from the Asset Exchange,
|
|
120
|
+
* where the types for the exchange are ExchangeOrderWithdraw and ExchangeOrderDeposit.
|
|
121
|
+
*
|
|
108
122
|
* This endpoint returns incomplete information for transfers involving the derivatives wallet.
|
|
109
123
|
* Use the account asset API for creating and querying internal transfers.
|
|
110
124
|
*/
|
package/lib/contract-client.js
CHANGED
|
@@ -101,7 +101,12 @@ class ContractClient extends BaseRestClient_1.default {
|
|
|
101
101
|
submitOrder(params) {
|
|
102
102
|
return this.postPrivate('/contract/v3/private/order/create', params);
|
|
103
103
|
}
|
|
104
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Query order history.
|
|
106
|
+
*
|
|
107
|
+
* As order creation/cancellation is asynchronous, the data returned from the interface may be delayed.
|
|
108
|
+
* To access order information in real-time, call getActiveOrders().
|
|
109
|
+
*/
|
|
105
110
|
getHistoricOrders(params) {
|
|
106
111
|
return this.getPrivate('/contract/v3/private/order/list', params);
|
|
107
112
|
}
|
|
@@ -115,7 +120,14 @@ class ContractClient extends BaseRestClient_1.default {
|
|
|
115
120
|
symbol,
|
|
116
121
|
});
|
|
117
122
|
}
|
|
118
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* Replace order
|
|
125
|
+
*
|
|
126
|
+
* Active order parameters (such as quantity, price) and stop order parameters
|
|
127
|
+
* cannot be modified in one request at the same time.
|
|
128
|
+
*
|
|
129
|
+
* Please request modification separately.
|
|
130
|
+
*/
|
|
119
131
|
modifyOrder(params) {
|
|
120
132
|
return this.postPrivate('/contract/v3/private/order/replace', params);
|
|
121
133
|
}
|
|
@@ -213,7 +225,9 @@ class ContractClient extends BaseRestClient_1.default {
|
|
|
213
225
|
}
|
|
214
226
|
/**
|
|
215
227
|
* Get wallet fund records.
|
|
216
|
-
* This endpoint also shows exchanges from the Asset Exchange,
|
|
228
|
+
* This endpoint also shows exchanges from the Asset Exchange,
|
|
229
|
+
* where the types for the exchange are ExchangeOrderWithdraw and ExchangeOrderDeposit.
|
|
230
|
+
*
|
|
217
231
|
* This endpoint returns incomplete information for transfers involving the derivatives wallet.
|
|
218
232
|
* Use the account asset API for creating and querying internal transfers.
|
|
219
233
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-client.js","sourceRoot":"","sources":["../src/contract-client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AA6BA,iCAA+C;AAC/C,2EAAmD;AAEnD;;GAEG;AACH,MAAa,cAAe,SAAQ,wBAAc;IAChD,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,iEAAiE;IACjE,YAAY,CACV,MAAc,EACd,QAAiB,EACjB,KAAc;QAEd,OAAO,IAAI,CAAC,GAAG,CAAC,sCAAsC,EAAE;YACtD,QAAQ;YACR,MAAM;YACN,KAAK;SACN,CAAC,CAAC;IACL,CAAC;IAED,yBAAyB;IACzB,UAAU,CAAC,MAAwB;QACjC,OAAO,IAAI,CAAC,GAAG,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC;IAED,2CAA2C;IAC3C,eAAe,CACb,QAAyB,EACzB,MAAe;QAEf,OAAO,IAAI,CAAC,GAAG,CAAC,gCAAgC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,sFAAsF;IACtF,iBAAiB,CACf,MAA+B;QAE/B,OAAO,IAAI,CAAC,GAAG,CAAC,yCAAyC,EAAE,MAAM,CAAC,CAAC;IACrE,CAAC;IAED,qEAAqE;IACrE,mBAAmB,CAAC,MAAwB;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,yCAAyC,EAAE,MAAM,CAAC,CAAC;IACrE,CAAC;IAED,8BAA8B;IAC9B,oBAAoB,CAAC,MAAwB;QAC3C,OAAO,IAAI,CAAC,GAAG,CAAC,0CAA0C,EAAE,MAAM,CAAC,CAAC;IACtE,CAAC;IAED;;;OAGG;IACH,qBAAqB,CACnB,MAAmC;QAEnC,OAAO,IAAI,CAAC,GAAG,CACb,qDAAqD,EACrD,MAAM,CACP,CAAC;IACJ,CAAC;IAED,qBAAqB;IACrB,YAAY,CACV,QAAoB,EACpB,MAAc;QAEd,OAAO,IAAI,CAAC,GAAG,CAAC,wCAAwC,EAAE;YACxD,QAAQ;YACR,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAED,gCAAgC;IAChC,sBAAsB,CACpB,MAAoC;QAEpC,OAAO,IAAI,CAAC,GAAG,CAAC,uCAAuC,EAAE,MAAM,CAAC,CAAC;IACnE,CAAC;IAED,iCAAiC;IACjC,SAAS,CAAC,MAA6B;QACrC,OAAO,IAAI,CAAC,GAAG,CAAC,qCAAqC,EAAE,MAAM,CAAC,CAAC;IACjE,CAAC;IAED;;;OAGG;IACH,eAAe,CAAC,MAA6B;QAC3C,OAAO,IAAI,CAAC,GAAG,CAAC,sCAAsC,EAAE,MAAM,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IAEH,mBAAmB;IAEnB,qBAAqB;IACrB,WAAW,CAAC,MAA4B;QACtC,OAAO,IAAI,CAAC,WAAW,CAAC,mCAAmC,EAAE,MAAM,CAAC,CAAC;IACvE,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"contract-client.js","sourceRoot":"","sources":["../src/contract-client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AA6BA,iCAA+C;AAC/C,2EAAmD;AAEnD;;GAEG;AACH,MAAa,cAAe,SAAQ,wBAAc;IAChD,aAAa;QACX,yEAAyE;QACzE,OAAO,4BAAqB,CAAC,EAAE,CAAC;IAClC,CAAC;IAEK,eAAe;;YACnB,MAAM,GAAG,GAAG,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;IAC7E,CAAC;IAED,kDAAkD;IAClD,wBAAwB,CAAC,MAAc;QACrC,OAAO,IAAI,CAAC,UAAU,CAAC,0CAA0C,EAAE;YACjE,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAED,qBAAqB;IAErB,2BAA2B;IAC3B,WAAW,CAAC,IAAa;QACvB,OAAO,IAAI,CAAC,UAAU,CAAC,6CAA6C,EAAE;YACpE,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,gCAAgC;IAChC,iBAAiB,CAAC,MAAe;QAC/B,OAAO,IAAI,CAAC,UAAU,CAAC,uCAAuC,EAAE;YAC9D,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,oBAAoB,CAClB,MAAwC;QAExC,OAAO,IAAI,CAAC,UAAU,CACpB,kDAAkD,EAClD,MAAM,CACP,CAAC;IACJ,CAAC;IAED;;;;OAIG;IAEH,aAAa;QACX,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;CACF;AApUD,wCAoUC"}
|
package/lib/rest-client-v5.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APIResponseV3, APIResponseV3WithTime, AccountCoinBalanceV5, AccountInfoV5, AccountMarginModeV5, AccountOrderV5, AccountTypeV5, AllCoinsBalanceV5, AllowedDepositCoinInfoV5, AmendOrderParamsV5, ApiKeyInfoV5, AssetInfoV5, BatchAmendOrderParamsV5, BatchAmendOrderResultV5, BatchCancelOrderParamsV5, BatchCancelOrderResultV5, BatchCreateOrderResultV5, BatchOrderParamsV5, BatchOrdersResponseV5, 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, GetInternalDepositRecordParamsV5, GetInternalTransferParamsV5, GetKlineParamsV5, GetMarkPriceKlineParamsV5, GetOpenInterestParamsV5, GetOptionDeliveryPriceParamsV5, GetOrderbookParamsV5, GetPremiumIndexPriceKlineParamsV5, GetPublicTradingHistoryParamsV5, GetRiskLimitParamsV5, GetSettlementRecordParamsV5, GetSpotLeveragedTokenOrderHistoryParamsV5, GetSubAccountDepositRecordParamsV5, GetTickersParamsV5, GetTransactionLogParamsV5, GetUniversalTransferRecordsParamsV5, GetWalletBalanceParamsV5, GetWithdrawalRecordsParamsV5, HistoricalVolatilityV5, InstrumentInfoResponseV5, InsuranceResponseV5, InternalDepositRecordV5, 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, SpotBorrowCheckResultV5, SpotLeveragedTokenOrderHistoryV5, SubMemberV5, SwitchIsolatedMarginParamsV5, SwitchPositionModeParamsV5, TPSLModeV5, TickerLinearInverseV5, TickerOptionV5, TickerSpotV5, TransactionLogV5, UnifiedAccountUpgradeResultV5, UniversalTransferParamsV5, UniversalTransferRecordV5, UpdateApiKeyParamsV5, UpdateApiKeyResultV5, WalletBalanceV5, WithdrawParamsV5, WithdrawalRecordV5 } from './types';
|
|
1
|
+
import { APIResponseV3, APIResponseV3WithTime, AccountCoinBalanceV5, AccountInfoV5, AccountMarginModeV5, AccountOrderV5, AccountTypeV5, AddOrReduceMarginParamsV5, AddOrReduceMarginResultV5, AllCoinsBalanceV5, AllowedDepositCoinInfoV5, AmendOrderParamsV5, ApiKeyInfoV5, AssetInfoV5, BatchAmendOrderParamsV5, BatchAmendOrderResultV5, BatchCancelOrderParamsV5, BatchCancelOrderResultV5, BatchCreateOrderResultV5, BatchOrderParamsV5, BatchOrdersResponseV5, BorrowHistoryRecordV5, CancelAllOrdersParamsV5, CancelOrderParamsV5, CategoryCursorListV5, CategoryListV5, CategorySymbolListV5, CategoryV5, ClosedPnLV5, CoinExchangeRecordV5, CoinGreeksV5, CoinInfoV5, CollateralInfoV5, CreateSubApiKeyParamsV5, CreateSubApiKeyResultV5, CreateSubMemberParamsV5, CreateSubMemberResultV5, CursorListV5, DeliveryPriceV5, DeliveryRecordV5, DepositAddressResultV5, DepositRecordV5, ExecutionV5, FeeRateV5, FundingRateHistoryResponseV5, GetAccountCoinBalanceParamsV5, GetAccountHistoricOrdersPArams, GetAccountOrdersParams, GetAllCoinsBalanceParamsV5, GetAllowedDepositCoinInfoParamsV5, GetAssetInfoParamsV5, GetBorrowHistoryParamsV5, GetClosedPnLParamsV5, GetCoinExchangeRecordParamsV5, GetDeliveryPriceParamsV5, GetDeliveryRecordParamsV5, GetDepositRecordParamsV5, GetExecutionListParamsV5, GetFeeRateParamsV5, GetFundingRateHistoryParamsV5, GetHistoricalVolatilityParamsV5, GetIndexPriceKlineParamsV5, GetInstrumentsInfoParamsV5, GetInsuranceParamsV5, GetInternalDepositRecordParamsV5, GetInternalTransferParamsV5, GetKlineParamsV5, GetMarkPriceKlineParamsV5, GetOpenInterestParamsV5, GetOptionDeliveryPriceParamsV5, GetOrderbookParamsV5, GetPreUpgradeClosedPnlParamsV5, GetPreUpgradeOrderHistoryParamsV5, GetPreUpgradeTradeHistoryParamsV5, GetPremiumIndexPriceKlineParamsV5, GetPublicTradingHistoryParamsV5, GetRiskLimitParamsV5, GetSettlementRecordParamsV5, GetSpotLeveragedTokenOrderHistoryParamsV5, GetSubAccountDepositRecordParamsV5, GetTickersParamsV5, GetTransactionLogParamsV5, GetUniversalTransferRecordsParamsV5, GetWalletBalanceParamsV5, GetWithdrawalRecordsParamsV5, HistoricalVolatilityV5, InstrumentInfoResponseV5, InsuranceResponseV5, InternalDepositRecordV5, 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, SpotBorrowCheckResultV5, SpotLeveragedTokenOrderHistoryV5, SubMemberV5, SwitchIsolatedMarginParamsV5, SwitchPositionModeParamsV5, TPSLModeV5, TickerLinearInverseV5, TickerOptionV5, TickerSpotV5, TransactionLogV5, UnifiedAccountUpgradeResultV5, UniversalTransferParamsV5, UniversalTransferRecordV5, UpdateApiKeyParamsV5, UpdateApiKeyResultV5, WalletBalanceV5, WithdrawParamsV5, WithdrawalRecordV5 } from './types';
|
|
2
2
|
import BaseRestClient from './util/BaseRestClient';
|
|
3
3
|
/**
|
|
4
4
|
* REST API client for V5 REST APIs
|
|
@@ -98,8 +98,16 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
98
98
|
* Get the delivery price for option
|
|
99
99
|
*
|
|
100
100
|
* Covers: Option
|
|
101
|
+
*
|
|
102
|
+
* @deprecated use getDeliveryPrice() instead
|
|
101
103
|
*/
|
|
102
104
|
getOptionDeliveryPrice(params: GetOptionDeliveryPriceParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<OptionDeliveryPriceV5[]>>>;
|
|
105
|
+
/**
|
|
106
|
+
* Get the delivery price of Inverse futures, USDC futures and Options
|
|
107
|
+
*
|
|
108
|
+
* Covers: USDC futures / Inverse futures / Option
|
|
109
|
+
*/
|
|
110
|
+
getDeliveryPrice(params: GetDeliveryPriceParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<DeliveryPriceV5[]>>>;
|
|
103
111
|
/**
|
|
104
112
|
*
|
|
105
113
|
****** Trade APIs
|
|
@@ -120,7 +128,7 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
120
128
|
*
|
|
121
129
|
* If you want to get real-time order information, you could query this endpoint or rely on the websocket stream (recommended).
|
|
122
130
|
*/
|
|
123
|
-
getHistoricOrders(params:
|
|
131
|
+
getHistoricOrders(params: GetAccountHistoricOrdersPArams): Promise<APIResponseV3WithTime<CategoryCursorListV5<AccountOrderV5[]>>>;
|
|
124
132
|
/**
|
|
125
133
|
* This endpoint allows you to place more than one order in a single request. Covers: option (unified account).
|
|
126
134
|
*
|
|
@@ -243,6 +251,13 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
243
251
|
* Covers: USDT perpetual (Normal Account).
|
|
244
252
|
*/
|
|
245
253
|
setAutoAddMargin(params: SetAutoAddMarginParamsV5): Promise<APIResponseV3WithTime<{}>>;
|
|
254
|
+
/**
|
|
255
|
+
* Manually add or reduce margin for isolated margin position
|
|
256
|
+
*
|
|
257
|
+
* Unified account covers: USDT perpetual / USDC perpetual / USDC futures / Inverse contract
|
|
258
|
+
* Normal account covers: USDT perpetual / Inverse contract
|
|
259
|
+
*/
|
|
260
|
+
addOrReduceMargin(params: AddOrReduceMarginParamsV5): Promise<APIResponseV3WithTime<AddOrReduceMarginResultV5>>;
|
|
246
261
|
/**
|
|
247
262
|
* Query users' execution records, sorted by execTime in descending order
|
|
248
263
|
*
|
|
@@ -257,6 +272,36 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
257
272
|
* Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures
|
|
258
273
|
*/
|
|
259
274
|
getClosedPnL(params: GetClosedPnLParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<ClosedPnLV5[]>>>;
|
|
275
|
+
/**
|
|
276
|
+
*
|
|
277
|
+
****** Pre-upgrade APIs
|
|
278
|
+
*
|
|
279
|
+
*/
|
|
280
|
+
/**
|
|
281
|
+
* Get those orders which occurred before you upgrade the account to Unified account.
|
|
282
|
+
*
|
|
283
|
+
* For now, it only supports to query USDT perpetual, USDC perpetual, Inverse perpetual and futures.
|
|
284
|
+
*
|
|
285
|
+
* - can get all status in 7 days
|
|
286
|
+
* - can only get filled orders beyond 7 days
|
|
287
|
+
*/
|
|
288
|
+
getPreUpgradeOrderHistory(params: GetPreUpgradeOrderHistoryParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<AccountOrderV5[]>>>;
|
|
289
|
+
/**
|
|
290
|
+
* Get users' execution records which occurred before you upgrade the account to Unified account, sorted by execTime in descending order
|
|
291
|
+
*
|
|
292
|
+
* For now, it only supports to query USDT perpetual, Inverse perpetual and futures.
|
|
293
|
+
*
|
|
294
|
+
* - You may have multiple executions in a single order.
|
|
295
|
+
* - You can query by symbol, baseCoin, orderId and orderLinkId, and if you pass multiple params,
|
|
296
|
+
* the system will process them according to this priority: orderId > orderLinkId > symbol > baseCoin.
|
|
297
|
+
*/
|
|
298
|
+
getPreUpgradeTradeHistory(params: GetPreUpgradeTradeHistoryParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<ExecutionV5[]>>>;
|
|
299
|
+
/**
|
|
300
|
+
* Query user's closed profit and loss records. The results are sorted by createdTime in descending order.
|
|
301
|
+
*
|
|
302
|
+
* For now, it only supports to query USDT perpetual, Inverse perpetual and futures.
|
|
303
|
+
*/
|
|
304
|
+
getPreUpgradeClosedPnl(params: GetPreUpgradeClosedPnlParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<ClosedPnLV5[]>>>;
|
|
260
305
|
/**
|
|
261
306
|
*
|
|
262
307
|
****** Account APIs
|
|
@@ -296,12 +341,10 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
296
341
|
list: CoinGreeksV5[];
|
|
297
342
|
}>>;
|
|
298
343
|
/**
|
|
299
|
-
* Get the trading fee rate
|
|
300
|
-
* Covers: USDT perpetual / Inverse perpetual / Inverse futures
|
|
344
|
+
* Get the trading fee rate.
|
|
345
|
+
* Covers: Spot / USDT perpetual / Inverse perpetual / Inverse futures / Options
|
|
301
346
|
*/
|
|
302
|
-
getFeeRate(
|
|
303
|
-
list: FeeRateV5[];
|
|
304
|
-
}>>;
|
|
347
|
+
getFeeRate(params: GetFeeRateParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<FeeRateV5[]>>>;
|
|
305
348
|
/**
|
|
306
349
|
* Query the margin mode and the upgraded status of account
|
|
307
350
|
*/
|
|
@@ -439,6 +482,14 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
439
482
|
configList: AllowedDepositCoinInfoV5[];
|
|
440
483
|
nextPageCursor: string;
|
|
441
484
|
}>>;
|
|
485
|
+
/**
|
|
486
|
+
* Set auto transfer account after deposit. The same function as the setting for Deposit on web GUI
|
|
487
|
+
*/
|
|
488
|
+
setDepositAccount(params: {
|
|
489
|
+
accountType: AccountTypeV5;
|
|
490
|
+
}): Promise<APIResponseV3WithTime<{
|
|
491
|
+
status: 0 | 1;
|
|
492
|
+
}>>;
|
|
442
493
|
/**
|
|
443
494
|
* Query deposit records.
|
|
444
495
|
*
|
|
@@ -478,6 +529,10 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
478
529
|
* Query the deposit address information of MASTER account.
|
|
479
530
|
*/
|
|
480
531
|
getMasterDepositAddress(coin: string, chainType?: string): Promise<APIResponseV3WithTime<DepositAddressResultV5>>;
|
|
532
|
+
/**
|
|
533
|
+
* Query the deposit address information of SUB account.
|
|
534
|
+
*/
|
|
535
|
+
getSubDepositAddress(coin: string, chainType: string, subMemberId: string): Promise<APIResponseV3WithTime<DepositAddressResultV5>>;
|
|
481
536
|
/**
|
|
482
537
|
* Query the deposit address information of SUB account.
|
|
483
538
|
*
|
|
@@ -497,6 +552,14 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
497
552
|
getWithdrawalRecords(params?: GetWithdrawalRecordsParamsV5): Promise<APIResponseV3<{
|
|
498
553
|
rows: WithdrawalRecordV5[];
|
|
499
554
|
}>>;
|
|
555
|
+
/**
|
|
556
|
+
* Query withdrawable amount.
|
|
557
|
+
*/
|
|
558
|
+
getWithdrawableAmount(params: {
|
|
559
|
+
coin: string;
|
|
560
|
+
}): Promise<APIResponseV3<{
|
|
561
|
+
rows: WithdrawalRecordV5[];
|
|
562
|
+
}>>;
|
|
500
563
|
/**
|
|
501
564
|
* Withdraw assets from the SPOT account.
|
|
502
565
|
*
|
|
@@ -623,14 +686,14 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
623
686
|
}>>;
|
|
624
687
|
/**
|
|
625
688
|
*
|
|
626
|
-
****** Spot Margin Trade APIs
|
|
689
|
+
****** Spot Margin Trade APIs (UTA)
|
|
627
690
|
*
|
|
628
691
|
*/
|
|
629
692
|
/**
|
|
630
|
-
* Turn spot margin trade on / off.
|
|
693
|
+
* Turn spot margin trade on / off in your UTA account.
|
|
631
694
|
*
|
|
632
695
|
* CAUTION
|
|
633
|
-
* Your account needs to turn on spot margin first
|
|
696
|
+
* Your account needs to turn on spot margin first.
|
|
634
697
|
*/
|
|
635
698
|
toggleSpotMarginTrade(spotMarginMode: '1' | '0'): Promise<APIResponseV3WithTime<{
|
|
636
699
|
spotMarginMode: '1' | '0';
|
|
@@ -640,4 +703,190 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
640
703
|
* CAUTION: Your account needs to enable spot margin first; i.e., you must have finished the quiz on web / app.
|
|
641
704
|
*/
|
|
642
705
|
setSpotMarginLeverage(leverage: string): Promise<APIResponseV3WithTime<{}>>;
|
|
706
|
+
/**
|
|
707
|
+
*
|
|
708
|
+
****** Spot Margin Trade APIs (Normal)
|
|
709
|
+
*
|
|
710
|
+
*/
|
|
711
|
+
/**
|
|
712
|
+
* Get Margin Coin Info
|
|
713
|
+
*/
|
|
714
|
+
getSpotMarginCoinInfo(coin?: string): Promise<APIResponseV3WithTime<{
|
|
715
|
+
list: {
|
|
716
|
+
coin: string;
|
|
717
|
+
conversionRate: string;
|
|
718
|
+
liquidationOrder: number;
|
|
719
|
+
}[];
|
|
720
|
+
}>>;
|
|
721
|
+
/**
|
|
722
|
+
* Get Borrowable Coin Info
|
|
723
|
+
*/
|
|
724
|
+
getSpotMarginBorrowableCoinInfo(coin?: string): Promise<APIResponseV3WithTime<{
|
|
725
|
+
list: {
|
|
726
|
+
coin: string;
|
|
727
|
+
borrowingPrecision: number;
|
|
728
|
+
repaymentPrecision: number;
|
|
729
|
+
}[];
|
|
730
|
+
}>>;
|
|
731
|
+
/**
|
|
732
|
+
* Get Interest & Quota
|
|
733
|
+
*/
|
|
734
|
+
getSpotMarginInterestAndQuota(coin: string): Promise<APIResponseV3WithTime<{
|
|
735
|
+
list: {
|
|
736
|
+
coin: string;
|
|
737
|
+
interestRate: string;
|
|
738
|
+
loanAbleAmount: string;
|
|
739
|
+
maxLoanAmount: string;
|
|
740
|
+
}[];
|
|
741
|
+
}>>;
|
|
742
|
+
/**
|
|
743
|
+
* Get Loan Account Info
|
|
744
|
+
*/
|
|
745
|
+
getSpotMarginLoanAccountInfo(): Promise<APIResponseV3WithTime<{
|
|
746
|
+
acctBalanceSum: string;
|
|
747
|
+
debtBalanceSum: string;
|
|
748
|
+
loanAccountList: {
|
|
749
|
+
free: string;
|
|
750
|
+
interest: string;
|
|
751
|
+
loan: string;
|
|
752
|
+
remainAmount: string;
|
|
753
|
+
locked: string;
|
|
754
|
+
tokenId: string;
|
|
755
|
+
total: string;
|
|
756
|
+
}[];
|
|
757
|
+
riskRate: string;
|
|
758
|
+
status: number;
|
|
759
|
+
switchStatus: number;
|
|
760
|
+
}>>;
|
|
761
|
+
/**
|
|
762
|
+
* Borrow
|
|
763
|
+
*/
|
|
764
|
+
spotMarginBorrow(params: {
|
|
765
|
+
coin: string;
|
|
766
|
+
qty: string;
|
|
767
|
+
}): Promise<APIResponseV3WithTime<{
|
|
768
|
+
transactId: string;
|
|
769
|
+
}>>;
|
|
770
|
+
/**
|
|
771
|
+
* Repay
|
|
772
|
+
*/
|
|
773
|
+
spotMarginRepay(params: {
|
|
774
|
+
coin: string;
|
|
775
|
+
qty?: string;
|
|
776
|
+
completeRepayment: 0 | 1;
|
|
777
|
+
}): Promise<APIResponseV3WithTime<{
|
|
778
|
+
repayId: string;
|
|
779
|
+
}>>;
|
|
780
|
+
/**
|
|
781
|
+
* Get Borrow Order Detail
|
|
782
|
+
*/
|
|
783
|
+
getSpotMarginBorrowOrderDetail(params?: {
|
|
784
|
+
startTime?: number;
|
|
785
|
+
endTime?: number;
|
|
786
|
+
coin?: string;
|
|
787
|
+
status?: 0 | 1 | 2;
|
|
788
|
+
limit?: number;
|
|
789
|
+
}): Promise<APIResponseV3WithTime<{
|
|
790
|
+
list: {
|
|
791
|
+
accountId: string;
|
|
792
|
+
coin: string;
|
|
793
|
+
createdTime: number;
|
|
794
|
+
id: string;
|
|
795
|
+
interestAmount: string;
|
|
796
|
+
interestBalance: string;
|
|
797
|
+
loanAmount: string;
|
|
798
|
+
loanBalance: string;
|
|
799
|
+
remainAmount: string;
|
|
800
|
+
status: string;
|
|
801
|
+
type: string;
|
|
802
|
+
}[];
|
|
803
|
+
}>>;
|
|
804
|
+
/**
|
|
805
|
+
* Get Repayment Order Detail
|
|
806
|
+
*/
|
|
807
|
+
getSpotMarginRepaymentOrderDetail(params?: {
|
|
808
|
+
startTime?: number;
|
|
809
|
+
endTime?: number;
|
|
810
|
+
coin?: string;
|
|
811
|
+
limit?: number;
|
|
812
|
+
}): Promise<APIResponseV3WithTime<{
|
|
813
|
+
list: {
|
|
814
|
+
accountId: string;
|
|
815
|
+
coin: string;
|
|
816
|
+
repaidAmount: string;
|
|
817
|
+
repayId: string;
|
|
818
|
+
repayMarginOrderId: string;
|
|
819
|
+
repayTime: string;
|
|
820
|
+
transactIds: {
|
|
821
|
+
repaidInterest: string;
|
|
822
|
+
repaidPrincipal: string;
|
|
823
|
+
repaidSerialNumber: string;
|
|
824
|
+
transactId: string;
|
|
825
|
+
}[];
|
|
826
|
+
}[];
|
|
827
|
+
}>>;
|
|
828
|
+
/**
|
|
829
|
+
* Turn spot margin trade on / off in your NORMAL account.
|
|
830
|
+
*/
|
|
831
|
+
toggleSpotCrossMarginTrade(params: {
|
|
832
|
+
switch: 1 | 0;
|
|
833
|
+
}): Promise<APIResponseV3WithTime<{
|
|
834
|
+
switchStatus: '1' | '0';
|
|
835
|
+
}>>;
|
|
836
|
+
/**
|
|
837
|
+
*
|
|
838
|
+
****** Institutional Lending
|
|
839
|
+
*
|
|
840
|
+
*/
|
|
841
|
+
/**
|
|
842
|
+
* Get Product Info
|
|
843
|
+
*/
|
|
844
|
+
getInstitutionalLendingProductInfo(productId?: string): Promise<APIResponseV3WithTime<{
|
|
845
|
+
marginProductInfo: any[];
|
|
846
|
+
}>>;
|
|
847
|
+
/**
|
|
848
|
+
* Get Margin Coin Info
|
|
849
|
+
*/
|
|
850
|
+
getInstitutionalLendingMarginCoinInfo(productId?: string): Promise<APIResponseV3WithTime<{
|
|
851
|
+
marginToken: any[];
|
|
852
|
+
}>>;
|
|
853
|
+
/**
|
|
854
|
+
* Get Margin Coin Info With Conversion Rate
|
|
855
|
+
*/
|
|
856
|
+
getInstitutionalLendingMarginCoinInfoWithConversionRate(productId?: string): Promise<APIResponseV3WithTime<{
|
|
857
|
+
marginToken: any[];
|
|
858
|
+
}>>;
|
|
859
|
+
/**
|
|
860
|
+
* Get Loan Orders
|
|
861
|
+
*/
|
|
862
|
+
getInstitutionalLendingLoanOrders(params?: {
|
|
863
|
+
orderId?: string;
|
|
864
|
+
startTime?: number;
|
|
865
|
+
endTime?: number;
|
|
866
|
+
limit?: number;
|
|
867
|
+
}): Promise<APIResponseV3WithTime<{
|
|
868
|
+
marginToken: any[];
|
|
869
|
+
}>>;
|
|
870
|
+
/**
|
|
871
|
+
* Get Repay Orders
|
|
872
|
+
*/
|
|
873
|
+
getInstitutionalLendingRepayOrders(params?: {
|
|
874
|
+
startTime?: number;
|
|
875
|
+
endTime?: number;
|
|
876
|
+
limit?: number;
|
|
877
|
+
}): Promise<APIResponseV3WithTime<{
|
|
878
|
+
repayInfo: any[];
|
|
879
|
+
}>>;
|
|
880
|
+
/**
|
|
881
|
+
* Get LTV
|
|
882
|
+
*/
|
|
883
|
+
getInstitutionalLendingLTV(): Promise<APIResponseV3WithTime<{
|
|
884
|
+
ltvInfo: any[];
|
|
885
|
+
}>>;
|
|
886
|
+
/**
|
|
887
|
+
* Get LTV with Ladder Conversion Rate
|
|
888
|
+
*/
|
|
889
|
+
getInstitutionalLendingLTVWithLadderConversionRate(): Promise<APIResponseV3WithTime<{
|
|
890
|
+
ltvInfo: any[];
|
|
891
|
+
}>>;
|
|
643
892
|
}
|