diff --git a/docs/endpointFunctionList.md b/docs/endpointFunctionList.md
index 2505cb1..98ded34 100644
--- a/docs/endpointFunctionList.md
+++ b/docs/endpointFunctionList.md
@@ -4,8 +4,8 @@
-
-
+
+
@@ -14,7 +14,7 @@ Each REST client is a JavaScript class, which provides functions individually ma
The following table shows all methods available in each REST client, whether the method requires authentication (automatically handled if API keys are provided), as well as the exact endpoint each method is connected to.
-This can be used to easily find which method to call, once you have [found which endpoint you're looking to use](https://github.com/tiagosiebler/awesome-crypto-examples/wiki/How-to-find-SDK-functions-that-match-API-docs-endpoint).
+This can be used to easily find which method to call, once you have [found which endpoint you're looking to use](https://github.com/sieblyio/awesome-crypto-examples/wiki/How-to-find-SDK-functions-that-match-API-docs-endpoint).
All REST clients are in the [src](/src) folder. For usage examples, make sure to check the [examples](/examples) folder.
@@ -50,297 +50,310 @@ This table includes all endpoints from the official Exchange API docs and corres
| Function | AUTH | HTTP Method | Endpoint |
| -------- | :------: | :------: | -------- |
-| [getAnnouncements()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L482) | | GET | `/api/v2/public/annoucements` |
-| [getServerTime()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L494) | | GET | `/api/v2/public/time` |
-| [getTradeRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L502) | :closed_lock_with_key: | GET | `/api/v2/common/trade-rate` |
-| [getSpotTransactionRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L517) | :closed_lock_with_key: | GET | `/api/v2/tax/spot-record` |
-| [getFuturesTransactionRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L523) | :closed_lock_with_key: | GET | `/api/v2/tax/future-record` |
-| [getMarginTransactionRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L529) | :closed_lock_with_key: | GET | `/api/v2/tax/margin-record` |
-| [getP2PTransactionRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L535) | :closed_lock_with_key: | GET | `/api/v2/tax/p2p-record` |
-| [getP2PMerchantList()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L547) | :closed_lock_with_key: | GET | `/api/v2/p2p/merchantList` |
-| [getP2PMerchantInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L556) | :closed_lock_with_key: | GET | `/api/v2/p2p/merchantInfo` |
-| [getP2PMerchantOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L560) | :closed_lock_with_key: | GET | `/api/v2/p2p/orderList` |
-| [getP2PMerchantAdvertisementList()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L569) | :closed_lock_with_key: | GET | `/api/v2/p2p/advList` |
-| [getSpotWhaleNetFlowData()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L586) | :closed_lock_with_key: | GET | `/api/v2/spot/market/whale-net-flow` |
-| [getFuturesActiveTakerBuySellVolumeData()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L592) | | GET | `/api/v2/mix/market/taker-buy-sell` |
-| [getFuturesActiveLongShortPositionData()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L599) | | GET | `/api/v2/mix/market/position-long-short` |
-| [getFuturesLongShortRatio()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L606) | | GET | `/api/v2/mix/market/long-short-ratio` |
-| [getMarginLoanGrowthRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L614) | | GET | `/api/v2/mix/market/loan-growth` |
-| [getIsolatedMarginBorrowingRatio()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L622) | | GET | `/api/v2/mix/market/isolated-borrow-rate` |
-| [getFuturesActiveBuySellVolumeData()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L629) | | GET | `/api/v2/mix/market/long-short` |
-| [getSpotFundFlow()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L636) | | GET | `/api/v2/spot/market/fund-flow` |
-| [getTradeDataSupportSymbols()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L643) | | GET | `/api/v2/spot/market/support-symbols` |
-| [getSpotFundNetFlowData()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L652) | | GET | `/api/v2/spot/market/fund-net-flow` |
-| [getFuturesActiveLongShortAccountData()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L663) | | GET | `/api/v2/mix/market/account-long-short` |
-| [createVirtualSubaccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L676) | :closed_lock_with_key: | POST | `/api/v2/user/create-virtual-subaccount` |
-| [modifyVirtualSubaccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L682) | :closed_lock_with_key: | POST | `/api/v2/user/modify-virtual-subaccount` |
-| [batchCreateVirtualSubaccountAndAPIKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L690) | :closed_lock_with_key: | POST | `/api/v2/user/batch-create-subaccount-and-apikey` |
-| [getVirtualSubaccounts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L699) | :closed_lock_with_key: | GET | `/api/v2/user/virtual-subaccount-list` |
-| [createVirtualSubaccountAPIKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L712) | :closed_lock_with_key: | POST | `/api/v2/user/create-virtual-subaccount-apikey` |
-| [modifyVirtualSubaccountAPIKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L721) | :closed_lock_with_key: | POST | `/api/v2/user/modify-virtual-subaccount-apikey` |
-| [getVirtualSubaccountAPIKeys()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L730) | :closed_lock_with_key: | GET | `/api/v2/user/virtual-subaccount-apikey-list` |
-| [createAgentSubaccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L743) | :closed_lock_with_key: | POST | `/api/v2/user/create-agent-subaccount` |
-| [getFundingAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L754) | :closed_lock_with_key: | GET | `/api/v2/account/funding-assets` |
-| [getBotAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L760) | :closed_lock_with_key: | GET | `/api/v2/account/bot-assets` |
-| [getBalances()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L767) | :closed_lock_with_key: | GET | `/api/v2/account/all-account-balance` |
-| [getConvertCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L784) | :closed_lock_with_key: | GET | `/api/v2/convert/currencies` |
-| [getConvertQuotedPrice()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L788) | :closed_lock_with_key: | GET | `/api/v2/convert/quoted-price` |
-| [convert()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L794) | :closed_lock_with_key: | POST | `/api/v2/convert/trade` |
-| [getConvertHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L800) | :closed_lock_with_key: | GET | `/api/v2/convert/convert-record` |
-| [getConvertBGBCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L815) | :closed_lock_with_key: | GET | `/api/v2/convert/bgb-convert-coin-list` |
-| [convertBGB()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L823) | :closed_lock_with_key: | POST | `/api/v2/convert/bgb-convert` |
-| [getConvertBGBHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L829) | :closed_lock_with_key: | GET | `/api/v2/convert/bgb-convert-records` |
-| [getSpotCoinInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L849) | :closed_lock_with_key: | GET | `/api/v2/spot/public/coins` |
-| [getSpotSymbolInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L855) | :closed_lock_with_key: | GET | `/api/v2/spot/public/symbols` |
-| [getSpotVIPFeeRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L861) | :closed_lock_with_key: | GET | `/api/v2/spot/market/vip-fee-rate` |
-| [getSpotTicker()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L865) | :closed_lock_with_key: | GET | `/api/v2/spot/market/tickers` |
-| [getSpotMergeDepth()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L871) | :closed_lock_with_key: | GET | `/api/v2/spot/market/merge-depth` |
-| [getSpotOrderBookDepth()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L879) | :closed_lock_with_key: | GET | `/api/v2/spot/market/orderbook` |
-| [getSpotCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L887) | :closed_lock_with_key: | GET | `/api/v2/spot/market/candles` |
-| [getSpotHistoricCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L893) | :closed_lock_with_key: | GET | `/api/v2/spot/market/history-candles` |
-| [getSpotRecentTrades()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L899) | :closed_lock_with_key: | GET | `/api/v2/spot/market/fills` |
-| [getSpotHistoricTrades()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L906) | :closed_lock_with_key: | GET | `/api/v2/spot/market/fills-history` |
-| [spotSubmitOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L918) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/place-order` |
-| [spotCancelandSubmitOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L927) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/cancel-replace-order` |
-| [spotBatchCancelandSubmitOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L933) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/batch-cancel-replace-order` |
-| [spotCancelOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L942) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/cancel-order` |
-| [spotBatchSubmitOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L951) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/batch-orders` |
-| [spotBatchCancelOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L957) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/batch-cancel-order` |
-| [spotCancelSymbolOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L963) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/cancel-symbol-order` |
-| [getSpotOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L971) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/orderInfo` |
-| [getSpotOpenOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L977) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/unfilled-orders` |
-| [getSpotHistoricOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L983) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/history-orders` |
-| [getSpotFills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L989) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/fills` |
-| [spotSubmitPlanOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1001) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/place-plan-order` |
-| [spotModifyPlanOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1010) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/modify-plan-order` |
-| [spotCancelPlanOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1019) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/cancel-plan-order` |
-| [getSpotCurrentPlanOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1030) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/current-plan-order` |
-| [getSpotPlanSubOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1040) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/plan-sub-order` |
-| [getSpotHistoricPlanOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1046) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/history-plan-order` |
-| [spotCancelPlanOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1056) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/batch-cancel-plan-order` |
-| [getSpotAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1071) | :closed_lock_with_key: | GET | `/api/v2/spot/account/info` |
-| [getSpotAccountAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1075) | :closed_lock_with_key: | GET | `/api/v2/spot/account/assets` |
-| [getSpotSubAccountAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1082) | :closed_lock_with_key: | GET | `/api/v2/spot/account/subaccount-assets` |
-| [spotModifyDepositAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1086) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/modify-deposit-account` |
-| [getSpotAccountBills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1096) | :closed_lock_with_key: | GET | `/api/v2/spot/account/bills` |
-| [spotTransfer()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1102) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/transfer` |
-| [getSpotTransferableCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1111) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/transfer-coin-info` |
-| [spotSubTransfer()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1118) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/subaccount-transfer` |
-| [spotWithdraw()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1127) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/withdrawal` |
-| [getSpotMainSubTransferRecord()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1136) | :closed_lock_with_key: | GET | `/api/v2/spot/account/sub-main-trans-record` |
-| [getSpotTransferHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1145) | :closed_lock_with_key: | GET | `/api/v2/spot/account/transferRecords` |
-| [spotSwitchBGBDeduct()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1151) | :closed_lock_with_key: | POST | `/api/v2/spot/account/switch-deduct` |
-| [getSpotDepositAddress()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1157) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/deposit-address` |
-| [getSpotSubDepositAddress()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1165) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/subaccount-deposit-address` |
-| [getSpotBGBDeductInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1177) | :closed_lock_with_key: | GET | `/api/v2/spot/account/deduct-info` |
-| [spotCancelWithdrawal()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1185) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/cancel-withdrawal` |
-| [getSubAccountDepositRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1191) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/subaccount-deposit-records` |
-| [getSpotWithdrawalHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1200) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/withdrawal-records` |
-| [getSpotDepositHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1206) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/deposit-records` |
-| [upgradeToUnifiedAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1221) | :closed_lock_with_key: | POST | `/api/v2/spot/account/upgrade` |
-| [getUnifiedAccountSwitchStatus()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1231) | :closed_lock_with_key: | GET | `/api/v2/spot/account/upgrade-status` |
-| [getFuturesVIPFeeRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1253) | | GET | `/api/v2/mix/market/vip-fee-rate` |
-| [getFuturesInterestRateHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1257) | | GET | `/api/v2/mix/market/union-interest-rate-history` |
-| [getFuturesInterestExchangeRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1266) | | GET | `/api/v2/mix/market/exchange-rate` |
-| [getFuturesDiscountRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1277) | | GET | `/api/v2/mix/market/discount-rate` |
-| [getFuturesMergeDepth()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1281) | | GET | `/api/v2/mix/market/merge-depth` |
-| [getFuturesTicker()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1287) | | GET | `/api/v2/mix/market/ticker` |
-| [getFuturesAllTickers()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1294) | | GET | `/api/v2/mix/market/tickers` |
-| [getFuturesRecentTrades()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1300) | | GET | `/api/v2/mix/market/fills` |
-| [getFuturesHistoricTrades()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1306) | | GET | `/api/v2/mix/market/fills-history` |
-| [getFuturesCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1312) | | GET | `/api/v2/mix/market/candles` |
-| [getFuturesHistoricCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1318) | | GET | `/api/v2/mix/market/history-candles` |
-| [getFuturesHistoricIndexPriceCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1324) | | GET | `/api/v2/mix/market/history-index-candles` |
-| [getFuturesHistoricMarkPriceCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1330) | | GET | `/api/v2/mix/market/history-mark-candles` |
-| [getFuturesOpenInterest()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1336) | | GET | `/api/v2/mix/market/open-interest` |
-| [getFuturesNextFundingTime()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1348) | | GET | `/api/v2/mix/market/funding-time` |
-| [getFuturesSymbolPrice()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1355) | | GET | `/api/v2/mix/market/symbol-price` |
-| [getFuturesHistoricFundingRates()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1362) | | GET | `/api/v2/mix/market/history-fund-rate` |
-| [getFuturesCurrentFundingRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1371) | | GET | `/api/v2/mix/market/current-fund-rate` |
-| [getFuturesContractConfig()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1389) | | GET | `/api/v2/mix/market/contracts` |
-| [getFuturesAccountAsset()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1402) | :closed_lock_with_key: | GET | `/api/v2/mix/account/account` |
-| [getFuturesAccountAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1408) | :closed_lock_with_key: | GET | `/api/v2/mix/account/accounts` |
-| [getFuturesSubAccountAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1414) | :closed_lock_with_key: | GET | `/api/v2/mix/account/sub-account-assets` |
-| [getFuturesInterestHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1427) | :closed_lock_with_key: | GET | `/api/v2/mix/account/interest-history` |
-| [getFuturesOpenCount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1433) | :closed_lock_with_key: | GET | `/api/v2/mix/account/open-count` |
-| [setFuturesPositionAutoMargin()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1441) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-auto-margin` |
-| [setFuturesLeverage()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1447) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-leverage` |
-| [setFuturesPositionMargin()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1453) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-margin` |
-| [setFuturesAssetMode()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1459) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-asset-mode` |
-| [setFuturesMarginMode()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1466) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-margin-mode` |
-| [setFuturesPositionMode()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1472) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-position-mode` |
-| [getFuturesAccountBills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1483) | :closed_lock_with_key: | GET | `/api/v2/mix/account/bill` |
-| [getUnionTransferLimits()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1498) | :closed_lock_with_key: | GET | `/api/v2/mix/account/transfer-limits` |
-| [getUnionConfig()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1510) | :closed_lock_with_key: | GET | `/api/v2/mix/account/union-config` |
-| [getSwitchUnionUsdt()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1520) | :closed_lock_with_key: | GET | `/api/v2/mix/account/switch-union-usdt` |
-| [unionConvert()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1530) | :closed_lock_with_key: | POST | `/api/v2/mix/account/union-convert` |
-| [getFuturesMaxOpenableQuantity()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1542) | :closed_lock_with_key: | GET | `/api/v2/mix/account/max-open` |
-| [getFuturesLiquidationPrice()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1554) | :closed_lock_with_key: | GET | `/api/v2/mix/account/liq-price` |
-| [getFuturesIsolatedSymbols()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1566) | :closed_lock_with_key: | GET | `/api/v2/mix/account/isolated-symbols` |
-| [getFuturesPositionTier()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1578) | | GET | `/api/v2/mix/market/query-position-lever` |
-| [getFuturesPosition()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1585) | :closed_lock_with_key: | GET | `/api/v2/mix/position/single-position` |
-| [getFuturesPositions()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1593) | :closed_lock_with_key: | GET | `/api/v2/mix/position/all-position` |
-| [getFuturesHistoricPositions()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1600) | :closed_lock_with_key: | GET | `/api/v2/mix/position/history-position` |
-| [futuresSubmitOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1617) | :closed_lock_with_key: | POST | `/api/v2/mix/order/place-order` |
-| [futuresSubmitReversal()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1626) | :closed_lock_with_key: | POST | `/api/v2/mix/order/click-backhand` |
-| [futuresBatchSubmitOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1635) | :closed_lock_with_key: | POST | `/api/v2/mix/order/batch-place-order` |
-| [futuresModifyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1641) | :closed_lock_with_key: | POST | `/api/v2/mix/order/modify-order` |
-| [futuresCancelOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1650) | :closed_lock_with_key: | POST | `/api/v2/mix/order/cancel-order` |
-| [futuresBatchCancelOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1659) | :closed_lock_with_key: | POST | `/api/v2/mix/order/batch-cancel-orders` |
-| [futuresFlashClosePositions()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1665) | :closed_lock_with_key: | POST | `/api/v2/mix/order/close-positions` |
-| [getFuturesOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1671) | :closed_lock_with_key: | GET | `/api/v2/mix/order/detail` |
-| [getFuturesFills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1677) | :closed_lock_with_key: | GET | `/api/v2/mix/order/fills` |
-| [getFuturesHistoricOrderFills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1686) | :closed_lock_with_key: | GET | `/api/v2/mix/order/fill-history` |
-| [getFuturesOpenOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1697) | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-pending` |
-| [getFuturesHistoricOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1706) | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-history` |
-| [futuresCancelAllOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1715) | :closed_lock_with_key: | POST | `/api/v2/mix/order/cancel-all-orders` |
-| [getFuturesTriggerSubOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1727) | :closed_lock_with_key: | GET | `/api/v2/mix/order/plan-sub-order` |
-| [futuresSubmitTPSLOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1735) | :closed_lock_with_key: | POST | `/api/v2/mix/order/place-tpsl-order` |
-| [futuresSubmitPlanOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1744) | :closed_lock_with_key: | POST | `/api/v2/mix/order/place-plan-order` |
-| [futuresModifyTPSLPOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1753) | :closed_lock_with_key: | POST | `/api/v2/mix/order/modify-tpsl-order` |
-| [futuresModifyPlanOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1762) | :closed_lock_with_key: | POST | `/api/v2/mix/order/modify-plan-order` |
-| [getFuturesPlanOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1771) | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-plan-pending` |
-| [futuresCancelPlanOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1780) | :closed_lock_with_key: | POST | `/api/v2/mix/order/cancel-plan-order` |
-| [getFuturesHistoricPlanOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1786) | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-plan-history` |
-| [modifySubaccountEmail()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1811) | :closed_lock_with_key: | POST | `/api/v2/broker/account/modify-subaccount-email` |
-| [getBrokerInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1821) | :closed_lock_with_key: | GET | `/api/v2/broker/account/info` |
-| [createSubaccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1831) | :closed_lock_with_key: | POST | `/api/v2/broker/account/create-subaccount` |
-| [getSubaccounts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1838) | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-list` |
-| [modifySubaccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1848) | :closed_lock_with_key: | POST | `/api/v2/broker/account/modify-subaccount` |
-| [getSubaccountEmail()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1854) | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-email` |
-| [getSubaccountSpotAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1860) | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-spot-assets` |
-| [getSubaccountFuturesAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1875) | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-future-assets` |
-| [createSubaccountDepositAddress()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1889) | :closed_lock_with_key: | POST | `/api/v2/broker/account/subaccount-address` |
-| [subaccountWithdrawal()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1900) | :closed_lock_with_key: | POST | `/api/v2/broker/account/subaccount-withdrawal` |
-| [subaccountSetAutoTransfer()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1912) | :closed_lock_with_key: | POST | `/api/v2/broker/account/set-subaccount-autotransfer` |
-| [subaccountDepositRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1928) | :closed_lock_with_key: | GET | `/api/v2/broker/subaccount-deposit` |
-| [subaccountWithdrawalRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1939) | :closed_lock_with_key: | GET | `/api/v2/broker/subaccount-withdrawal` |
-| [createSubaccountApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1954) | :closed_lock_with_key: | POST | `/api/v2/broker/manage/create-subaccount-apikey` |
-| [getSubaccountApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1963) | :closed_lock_with_key: | GET | `/api/v2/broker/manage/subaccount-apikey-list` |
-| [modifySubaccountApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1972) | :closed_lock_with_key: | POST | `/api/v2/broker/manage/modify-subaccount-apikey` |
-| [getAllSubDepositWithdrawalRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1988) | :closed_lock_with_key: | GET | `/api/v2/broker/all-sub-deposit-withdrawal` |
-| [getBrokerSubaccounts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2005) | :closed_lock_with_key: | GET | `/api/v2/broker/subaccounts` |
-| [getBrokerCommissions()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2017) | :closed_lock_with_key: | GET | `/api/v2/broker/commissions` |
-| [getBrokerTradeVolume()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2029) | :closed_lock_with_key: | GET | `/api/v2/broker/trade-volume` |
-| [getBrokerTotalCommission()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2049) | :closed_lock_with_key: | GET | `/api/v2/broker/total-commission` |
-| [getBrokerOrderCommission()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2071) | :closed_lock_with_key: | GET | `/api/v2/broker/order-commission` |
-| [getBrokerRebateInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2084) | :closed_lock_with_key: | GET | `/api/v2/broker/rebate-info` |
-| [getAgentCustomerCommissions()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2096) | :closed_lock_with_key: | GET | `/api/v2/broker/customer-commissions` |
-| [getAgentSubCustomerList()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2105) | :closed_lock_with_key: | GET | `/api/v2/broker/sub-customer-list` |
-| [getAgentCustomerTradeVolume()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2111) | :closed_lock_with_key: | POST | `/api/v2/broker/customer-trade-volume` |
-| [getAgentCustomerList()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2120) | :closed_lock_with_key: | POST | `/api/v2/broker/customer-list` |
-| [getAgentCustomerKycResult()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2126) | :closed_lock_with_key: | GET | `/api/v2/broker/customer-kyc-result` |
-| [getAgentCustomerDeposits()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2132) | :closed_lock_with_key: | POST | `/api/v2/broker/customer-deposit` |
-| [getAgentCustomerAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2138) | :closed_lock_with_key: | POST | `/api/v2/broker/customer-asset` |
-| [getAgentCommissionDetail()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2144) | :closed_lock_with_key: | GET | `/api/v2/broker/agent-commission` |
-| [getMarginCurrencies()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2164) | | GET | `/api/v2/margin/currencies` |
-| [getMarginBorrowHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2174) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/borrow-history` |
-| [getMarginRepayHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2191) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/repay-history` |
-| [getMarginInterestHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2208) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/interest-history` |
-| [getMarginLiquidationHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2225) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/liquidation-history` |
-| [getMarginFinancialHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2242) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/financial-records` |
-| [getMarginAccountAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2265) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/assets` |
-| [marginBorrow()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2276) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/account/borrow` |
-| [marginRepay()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2299) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/account/repay` |
-| [getMarginRiskRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2324) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/risk-rate` |
-| [getMarginMaxBorrowable()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2336) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/max-borrowable-amount` |
-| [getMarginMaxTransferable()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2349) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/max-transfer-out-amount` |
-| [getMarginInterestRateAndMaxBorrowable()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2364) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/interest-rate-and-limit` |
-| [getMarginTierConfiguration()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2380) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/tier-data` |
-| [marginFlashRepay()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2392) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/account/flash-repay` |
-| [getMarginFlashRepayResult()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2410) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/query-flash-repay-status` |
-| [marginSubmitOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2434) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/place-order` |
-| [marginBatchSubmitOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2447) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/batch-place-order` |
-| [marginCancelOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2458) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/cancel-order` |
-| [marginBatchCancelOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2478) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/batch-cancel-order` |
-| [getMarginOpenOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2492) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/open-orders` |
-| [getMarginHistoricOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2506) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/history-orders` |
-| [getMarginHistoricOrderFills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2523) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/fills` |
-| [getMarginLiquidationOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2537) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/liquidation-order` |
-| [getFuturesTraderCurrentOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2569) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/order-current-track` |
-| [getFuturesTraderHistoryOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2578) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/order-history-track` |
-| [modifyFuturesTraderOrderTPSL()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2587) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/order-modify-tpsl` |
-| [getFuturesTraderOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2596) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/order-total-detail` |
-| [getFuturesTraderProfitHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2602) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profit-history-summarys` |
-| [getFuturesTraderProfitShareHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2608) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profit-history-details` |
-| [closeFuturesTraderOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2617) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/order-close-positions` |
-| [getFuturesTraderProfitShare()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2636) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profit-details` |
-| [getFuturesTraderProfitShareGroup()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2652) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profits-group-coin-date` |
-| [getFuturesTraderSymbolSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2670) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/config-query-symbols` |
-| [updateFuturesTraderSymbolSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2679) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/config-setting-symbols` |
-| [updateFuturesTraderGlobalSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2688) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/config-settings-base` |
-| [getFuturesTraderFollowers()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2699) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/config-query-followers` |
-| [removeFuturesTraderFollower()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2708) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/config-remove-follower` |
-| [getFuturesFollowerCurrentOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2725) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-current-orders` |
-| [getFuturesFollowerHistoryOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2734) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-history-orders` |
-| [updateFuturesFollowerTPSL()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2743) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/setting-tpsl` |
-| [updateFuturesFollowerSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2749) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/settings` |
-| [getFuturesFollowerSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2755) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-settings` |
-| [closeFuturesFollowerPositions()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2761) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/close-positions` |
-| [getFuturesFollowerTraders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2774) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-traders` |
-| [getFuturesFollowerFollowLimit()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2780) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-quantity-limit` |
-| [unfollowFuturesTrader()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2798) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/cancel-trader` |
-| [getBrokerTraders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2812) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-broker/query-traders` |
-| [getBrokerTradersHistoricalOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2816) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-broker/query-history-traces` |
-| [getBrokerTradersPendingOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2823) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-broker/query-current-traces` |
-| [getSpotTraderProfit()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2838) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/profit-summarys` |
-| [getSpotTraderHistoryProfit()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2842) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/profit-history-details` |
-| [getSpotTraderUnrealizedProfit()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2851) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/profit-details` |
-| [getSpotTraderOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2859) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/order-total-detail` |
-| [modifySpotTraderOrderTPSL()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2863) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/order-modify-tpsl` |
-| [getSpotTraderHistoryOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2874) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/order-history-track` |
-| [getSpotTraderCurrentOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2883) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/order-current-track` |
-| [sellSpotTrader()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2892) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/order-close-tracking` |
-| [getSpotTraderSymbolSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2902) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/config-setting-symbols` |
-| [removeSpotTraderFollowers()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2912) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/config-remove-follower` |
-| [getSpotTraderConfiguration()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2921) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/config-query-settings` |
-| [getSpotTraderFollowers()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2925) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/config-query-followers` |
-| [cancelSpotFollowerOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2942) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/stop-order` |
-| [updateSpotFollowerSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2948) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/settings` |
-| [updateSpotFollowerTPSL()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2957) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/setting-tpsl` |
-| [getSpotFollowerTraders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2965) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-traders` |
-| [getSpotFollowerCurrentTraderSymbols()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2974) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-trader-symbols` |
-| [getSpotFollowerSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2985) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-settings` |
-| [getSpotFollowerHistoryOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2991) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-history-orders` |
-| [getSpotFollowerOpenOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3000) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-current-orders` |
-| [sellSpotFollower()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3009) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/order-close-tracking` |
-| [unfollowSpotTrader()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3019) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/cancel-trader` |
-| [getEarnSavingsProducts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3033) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/product` |
-| [getEarnSavingsAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3040) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/account` |
-| [getEarnSavingsAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3044) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/assets` |
-| [getEarnSavingsRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3050) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/records` |
-| [getEarnSavingsSubscription()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3056) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/subscribe-info` |
-| [earnSubscribeSavings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3063) | :closed_lock_with_key: | POST | `/api/v2/earn/savings/subscribe` |
-| [getEarnSavingsSubscriptionResult()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3076) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/subscribe-result` |
-| [earnRedeemSavings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3088) | :closed_lock_with_key: | POST | `/api/v2/earn/savings/redeem` |
-| [getEarnSavingsRedemptionResult()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3097) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/redeem-result` |
-| [getEarnAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3117) | :closed_lock_with_key: | GET | `/api/v2/earn/account/assets` |
-| [getEarnEliteProducts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3136) | :closed_lock_with_key: | GET | `/api/v2/earn/elite/product` |
-| [getEarnEliteAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3140) | :closed_lock_with_key: | GET | `/api/v2/earn/elite/assets` |
-| [getEarnEliteRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3144) | :closed_lock_with_key: | GET | `/api/v2/earn/elite/records` |
-| [getEarnEliteSubscribeInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3150) | :closed_lock_with_key: | GET | `/api/v2/earn/elite/subscribe-info` |
-| [subscribeEarnElite()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3156) | :closed_lock_with_key: | POST | `/api/v2/earn/elite/subscribe` |
-| [getEarnEliteSubscribeResult()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3162) | :closed_lock_with_key: | GET | `/api/v2/earn/elite/subscribe-result` |
-| [getEarnEliteRedeemInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3168) | :closed_lock_with_key: | GET | `/api/v2/earn/elite/redeem-info` |
-| [redeemEarnElite()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3174) | :closed_lock_with_key: | POST | `/api/v2/earn/elite/redeem` |
-| [getSharkfinProducts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3188) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/product` |
-| [getSharkfinAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3196) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/account` |
-| [getSharkfinAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3200) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/assets` |
-| [getSharkfinRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3206) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/records` |
-| [getSharkfinSubscription()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3212) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/subscribe-info` |
-| [subscribeSharkfin()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3218) | :closed_lock_with_key: | POST | `/api/v2/earn/sharkfin/subscribe` |
-| [getSharkfinSubscriptionResult()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3227) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/subscribe-result` |
-| [getLoanCurrencies()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3244) | | GET | `/api/v2/earn/loan/public/coinInfos` |
-| [getLoanEstInterestAndBorrowable()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3250) | | GET | `/api/v2/earn/loan/public/hour-interest` |
-| [borrowLoan()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3261) | :closed_lock_with_key: | POST | `/api/v2/earn/loan/borrow` |
-| [getOngoingLoanOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3269) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/ongoing-orders` |
-| [repayLoan()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3277) | :closed_lock_with_key: | POST | `/api/v2/earn/loan/repay` |
-| [getRepayHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3283) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/repay-history` |
-| [updateLoanPledgeRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3289) | :closed_lock_with_key: | POST | `/api/v2/earn/loan/revise-pledge` |
-| [getLoanPledgeRateHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3299) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/revise-history` |
-| [getLoanHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3305) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/borrow-history` |
-| [getLoanDebts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3311) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/debts` |
-| [getLoanLiquidationRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L3315) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/reduces` |
+| [getAnnouncements()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L506) | | GET | `/api/v2/public/annoucements` |
+| [getServerTime()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L518) | | GET | `/api/v2/public/time` |
+| [getTradeRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L526) | :closed_lock_with_key: | GET | `/api/v2/common/trade-rate` |
+| [getAllTradeRates()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L535) | :closed_lock_with_key: | GET | `/api/v2/common/all-trade-rate` |
+| [getSpotTransactionRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L553) | :closed_lock_with_key: | GET | `/api/v2/tax/spot-record` |
+| [getFuturesTransactionRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L559) | :closed_lock_with_key: | GET | `/api/v2/tax/future-record` |
+| [getMarginTransactionRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L565) | :closed_lock_with_key: | GET | `/api/v2/tax/margin-record` |
+| [getP2PTransactionRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L571) | :closed_lock_with_key: | GET | `/api/v2/tax/p2p-record` |
+| [getP2PMerchantList()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L583) | :closed_lock_with_key: | GET | `/api/v2/p2p/merchantList` |
+| [getP2PMerchantInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L592) | :closed_lock_with_key: | GET | `/api/v2/p2p/merchantInfo` |
+| [getP2PMerchantOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L596) | :closed_lock_with_key: | GET | `/api/v2/p2p/orderList` |
+| [getP2PMerchantAdvertisementList()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L605) | :closed_lock_with_key: | GET | `/api/v2/p2p/advList` |
+| [getSpotWhaleNetFlowData()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L622) | :closed_lock_with_key: | GET | `/api/v2/spot/market/whale-net-flow` |
+| [getFuturesActiveTakerBuySellVolumeData()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L628) | | GET | `/api/v2/mix/market/taker-buy-sell` |
+| [getFuturesActiveLongShortPositionData()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L635) | | GET | `/api/v2/mix/market/position-long-short` |
+| [getFuturesLongShortRatio()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L642) | | GET | `/api/v2/mix/market/long-short-ratio` |
+| [getMarginLoanGrowthRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L650) | | GET | `/api/v2/mix/market/loan-growth` |
+| [getIsolatedMarginBorrowingRatio()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L658) | | GET | `/api/v2/mix/market/isolated-borrow-rate` |
+| [getFuturesActiveBuySellVolumeData()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L665) | | GET | `/api/v2/mix/market/long-short` |
+| [getSpotFundFlow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L672) | | GET | `/api/v2/spot/market/fund-flow` |
+| [getTradeDataSupportSymbols()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L679) | | GET | `/api/v2/spot/market/support-symbols` |
+| [getSpotFundNetFlowData()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L688) | | GET | `/api/v2/spot/market/fund-net-flow` |
+| [getFuturesActiveLongShortAccountData()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L699) | | GET | `/api/v2/mix/market/account-long-short` |
+| [createVirtualSubaccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L712) | :closed_lock_with_key: | POST | `/api/v2/user/create-virtual-subaccount` |
+| [modifyVirtualSubaccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L718) | :closed_lock_with_key: | POST | `/api/v2/user/modify-virtual-subaccount` |
+| [batchCreateVirtualSubaccountAndAPIKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L726) | :closed_lock_with_key: | POST | `/api/v2/user/batch-create-subaccount-and-apikey` |
+| [getVirtualSubaccounts()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L735) | :closed_lock_with_key: | GET | `/api/v2/user/virtual-subaccount-list` |
+| [createVirtualSubaccountAPIKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L748) | :closed_lock_with_key: | POST | `/api/v2/user/create-virtual-subaccount-apikey` |
+| [modifyVirtualSubaccountAPIKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L757) | :closed_lock_with_key: | POST | `/api/v2/user/modify-virtual-subaccount-apikey` |
+| [getVirtualSubaccountAPIKeys()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L766) | :closed_lock_with_key: | GET | `/api/v2/user/virtual-subaccount-apikey-list` |
+| [createAgentSubaccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L779) | :closed_lock_with_key: | POST | `/api/v2/user/create-agent-subaccount` |
+| [getFundingAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L790) | :closed_lock_with_key: | GET | `/api/v2/account/funding-assets` |
+| [getBotAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L796) | :closed_lock_with_key: | GET | `/api/v2/account/bot-assets` |
+| [getBalances()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L803) | :closed_lock_with_key: | GET | `/api/v2/account/all-account-balance` |
+| [getConvertCoins()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L820) | :closed_lock_with_key: | GET | `/api/v2/convert/currencies` |
+| [getConvertQuotedPrice()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L824) | :closed_lock_with_key: | GET | `/api/v2/convert/quoted-price` |
+| [convert()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L830) | :closed_lock_with_key: | POST | `/api/v2/convert/trade` |
+| [getConvertHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L836) | :closed_lock_with_key: | GET | `/api/v2/convert/convert-record` |
+| [getConvertBGBCoins()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L851) | :closed_lock_with_key: | GET | `/api/v2/convert/bgb-convert-coin-list` |
+| [convertBGB()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L859) | :closed_lock_with_key: | POST | `/api/v2/convert/bgb-convert` |
+| [getConvertBGBHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L865) | :closed_lock_with_key: | GET | `/api/v2/convert/bgb-convert-records` |
+| [getSpotCoinInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L885) | :closed_lock_with_key: | GET | `/api/v2/spot/public/coins` |
+| [getSpotSymbolInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L891) | :closed_lock_with_key: | GET | `/api/v2/spot/public/symbols` |
+| [getSpotVIPFeeRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L897) | :closed_lock_with_key: | GET | `/api/v2/spot/market/vip-fee-rate` |
+| [getSpotTicker()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L901) | :closed_lock_with_key: | GET | `/api/v2/spot/market/tickers` |
+| [getSpotMergeDepth()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L907) | :closed_lock_with_key: | GET | `/api/v2/spot/market/merge-depth` |
+| [getSpotOrderBookDepth()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L915) | :closed_lock_with_key: | GET | `/api/v2/spot/market/orderbook` |
+| [getSpotCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L923) | :closed_lock_with_key: | GET | `/api/v2/spot/market/candles` |
+| [getSpotHistoricCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L929) | :closed_lock_with_key: | GET | `/api/v2/spot/market/history-candles` |
+| [getSpotRecentTrades()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L935) | :closed_lock_with_key: | GET | `/api/v2/spot/market/fills` |
+| [getSpotHistoricTrades()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L942) | :closed_lock_with_key: | GET | `/api/v2/spot/market/fills-history` |
+| [getSpotCallAuction()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L948) | | GET | `/api/v2/spot/market/auction` |
+| [spotSubmitOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L960) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/place-order` |
+| [spotCancelandSubmitOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L969) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/cancel-replace-order` |
+| [spotBatchCancelandSubmitOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L975) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/batch-cancel-replace-order` |
+| [spotCancelOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L984) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/cancel-order` |
+| [spotBatchSubmitOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L993) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/batch-orders` |
+| [spotBatchCancelOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L999) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/batch-cancel-order` |
+| [spotCancelSymbolOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1005) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/cancel-symbol-order` |
+| [getSpotOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1013) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/orderInfo` |
+| [getSpotOpenOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1019) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/unfilled-orders` |
+| [getSpotHistoricOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1025) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/history-orders` |
+| [getSpotFills()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1031) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/fills` |
+| [spotSubmitPlanOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1043) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/place-plan-order` |
+| [spotModifyPlanOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1052) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/modify-plan-order` |
+| [spotCancelPlanOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1061) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/cancel-plan-order` |
+| [getSpotCurrentPlanOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1072) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/current-plan-order` |
+| [getSpotPlanSubOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1082) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/plan-sub-order` |
+| [getSpotHistoricPlanOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1088) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/history-plan-order` |
+| [spotCancelPlanOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1098) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/batch-cancel-plan-order` |
+| [getSpotAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1113) | :closed_lock_with_key: | GET | `/api/v2/spot/account/info` |
+| [getSpotAccountAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1117) | :closed_lock_with_key: | GET | `/api/v2/spot/account/assets` |
+| [getSpotSubAccountAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1124) | :closed_lock_with_key: | GET | `/api/v2/spot/account/subaccount-assets` |
+| [spotModifyDepositAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1128) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/modify-deposit-account` |
+| [getSpotAccountBills()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1138) | :closed_lock_with_key: | GET | `/api/v2/spot/account/bills` |
+| [spotTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1144) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/transfer` |
+| [getSpotTransferableCoins()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1153) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/transfer-coin-info` |
+| [spotSubTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1160) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/subaccount-transfer` |
+| [spotWithdraw()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1169) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/withdrawal` |
+| [getSpotMainSubTransferRecord()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1178) | :closed_lock_with_key: | GET | `/api/v2/spot/account/sub-main-trans-record` |
+| [getSpotTransferHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1187) | :closed_lock_with_key: | GET | `/api/v2/spot/account/transferRecords` |
+| [spotSwitchBGBDeduct()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1193) | :closed_lock_with_key: | POST | `/api/v2/spot/account/switch-deduct` |
+| [getSpotDepositAddress()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1199) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/deposit-address` |
+| [getSpotSubDepositAddress()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1207) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/subaccount-deposit-address` |
+| [getSpotBGBDeductInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1219) | :closed_lock_with_key: | GET | `/api/v2/spot/account/deduct-info` |
+| [spotCancelWithdrawal()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1227) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/cancel-withdrawal` |
+| [getSubAccountDepositRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1233) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/subaccount-deposit-records` |
+| [getSpotWithdrawalHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1242) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/withdrawal-records` |
+| [getSpotDepositHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1248) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/deposit-records` |
+| [upgradeToUnifiedAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1263) | :closed_lock_with_key: | POST | `/api/v2/spot/account/upgrade` |
+| [getUnifiedAccountSwitchStatus()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1273) | :closed_lock_with_key: | GET | `/api/v2/spot/account/upgrade-status` |
+| [getFuturesVIPFeeRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1295) | | GET | `/api/v2/mix/market/vip-fee-rate` |
+| [getFuturesInterestRateHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1299) | | GET | `/api/v2/mix/market/union-interest-rate-history` |
+| [getFuturesInterestExchangeRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1308) | | GET | `/api/v2/mix/market/exchange-rate` |
+| [getFuturesDiscountRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1319) | | GET | `/api/v2/mix/market/discount-rate` |
+| [getFuturesMergeDepth()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1323) | | GET | `/api/v2/mix/market/merge-depth` |
+| [getFuturesTicker()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1329) | | GET | `/api/v2/mix/market/ticker` |
+| [getFuturesAllTickers()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1336) | | GET | `/api/v2/mix/market/tickers` |
+| [getFuturesRecentTrades()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1342) | | GET | `/api/v2/mix/market/fills` |
+| [getFuturesHistoricTrades()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1348) | | GET | `/api/v2/mix/market/fills-history` |
+| [getFuturesCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1354) | | GET | `/api/v2/mix/market/candles` |
+| [getFuturesHistoricCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1360) | | GET | `/api/v2/mix/market/history-candles` |
+| [getFuturesHistoricIndexPriceCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1366) | | GET | `/api/v2/mix/market/history-index-candles` |
+| [getFuturesHistoricMarkPriceCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1372) | | GET | `/api/v2/mix/market/history-mark-candles` |
+| [getFuturesOpenInterest()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1378) | | GET | `/api/v2/mix/market/open-interest` |
+| [getFuturesNextFundingTime()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1390) | | GET | `/api/v2/mix/market/funding-time` |
+| [getFuturesSymbolPrice()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1397) | | GET | `/api/v2/mix/market/symbol-price` |
+| [getFuturesHistoricFundingRates()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1404) | | GET | `/api/v2/mix/market/history-fund-rate` |
+| [getFuturesCurrentFundingRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1413) | | GET | `/api/v2/mix/market/current-fund-rate` |
+| [getFuturesContractConfig()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1431) | | GET | `/api/v2/mix/market/contracts` |
+| [getFuturesOiLimit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1438) | | GET | `/api/v2/mix/market/oi-limit` |
+| [getFuturesAccountAsset()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1456) | :closed_lock_with_key: | GET | `/api/v2/mix/account/account` |
+| [getFuturesAccountAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1462) | :closed_lock_with_key: | GET | `/api/v2/mix/account/accounts` |
+| [getFuturesSubAccountAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1468) | :closed_lock_with_key: | GET | `/api/v2/mix/account/sub-account-assets` |
+| [getFuturesInterestHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1481) | :closed_lock_with_key: | GET | `/api/v2/mix/account/interest-history` |
+| [getFuturesOpenCount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1487) | :closed_lock_with_key: | GET | `/api/v2/mix/account/open-count` |
+| [setFuturesPositionAutoMargin()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1495) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-auto-margin` |
+| [setFuturesLeverage()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1501) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-leverage` |
+| [setFuturesPositionMargin()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1507) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-margin` |
+| [setFuturesAssetMode()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1513) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-asset-mode` |
+| [setFuturesMarginMode()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1520) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-margin-mode` |
+| [setFuturesPositionMode()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1526) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-position-mode` |
+| [getFuturesAccountBills()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1537) | :closed_lock_with_key: | GET | `/api/v2/mix/account/bill` |
+| [getUnionTransferLimits()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1552) | :closed_lock_with_key: | GET | `/api/v2/mix/account/transfer-limits` |
+| [getUnionConfig()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1564) | :closed_lock_with_key: | GET | `/api/v2/mix/account/union-config` |
+| [getSwitchUnionUsdt()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1574) | :closed_lock_with_key: | GET | `/api/v2/mix/account/switch-union-usdt` |
+| [unionConvert()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1584) | :closed_lock_with_key: | POST | `/api/v2/mix/account/union-convert` |
+| [getFuturesMaxOpenableQuantity()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1596) | :closed_lock_with_key: | GET | `/api/v2/mix/account/max-open` |
+| [getFuturesLiquidationPrice()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1608) | :closed_lock_with_key: | GET | `/api/v2/mix/account/liq-price` |
+| [getFuturesIsolatedSymbols()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1620) | :closed_lock_with_key: | GET | `/api/v2/mix/account/isolated-symbols` |
+| [getFuturesPositionTier()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1632) | | GET | `/api/v2/mix/market/query-position-lever` |
+| [getFuturesPosition()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1639) | :closed_lock_with_key: | GET | `/api/v2/mix/position/single-position` |
+| [getFuturesPositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1647) | :closed_lock_with_key: | GET | `/api/v2/mix/position/all-position` |
+| [getFuturesHistoricPositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1654) | :closed_lock_with_key: | GET | `/api/v2/mix/position/history-position` |
+| [getFuturesPositionAdlRank()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1665) | :closed_lock_with_key: | GET | `/api/v2/mix/position/adlRank` |
+| [futuresSubmitOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1677) | :closed_lock_with_key: | POST | `/api/v2/mix/order/place-order` |
+| [futuresSubmitReversal()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1686) | :closed_lock_with_key: | POST | `/api/v2/mix/order/click-backhand` |
+| [futuresBatchSubmitOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1695) | :closed_lock_with_key: | POST | `/api/v2/mix/order/batch-place-order` |
+| [futuresModifyOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1701) | :closed_lock_with_key: | POST | `/api/v2/mix/order/modify-order` |
+| [futuresCancelOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1710) | :closed_lock_with_key: | POST | `/api/v2/mix/order/cancel-order` |
+| [futuresBatchCancelOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1719) | :closed_lock_with_key: | POST | `/api/v2/mix/order/batch-cancel-orders` |
+| [futuresFlashClosePositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1725) | :closed_lock_with_key: | POST | `/api/v2/mix/order/close-positions` |
+| [getFuturesOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1731) | :closed_lock_with_key: | GET | `/api/v2/mix/order/detail` |
+| [getFuturesFills()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1737) | :closed_lock_with_key: | GET | `/api/v2/mix/order/fills` |
+| [getFuturesHistoricOrderFills()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1746) | :closed_lock_with_key: | GET | `/api/v2/mix/order/fill-history` |
+| [getFuturesOpenOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1757) | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-pending` |
+| [getFuturesHistoricOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1766) | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-history` |
+| [futuresCancelAllOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1775) | :closed_lock_with_key: | POST | `/api/v2/mix/order/cancel-all-orders` |
+| [getFuturesTriggerSubOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1787) | :closed_lock_with_key: | GET | `/api/v2/mix/order/plan-sub-order` |
+| [futuresSubmitTPSLOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1795) | :closed_lock_with_key: | POST | `/api/v2/mix/order/place-tpsl-order` |
+| [futuresSubmitPositionTPSL()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1804) | :closed_lock_with_key: | POST | `/api/v2/mix/order/place-pos-tpsl` |
+| [futuresSubmitPlanOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1816) | :closed_lock_with_key: | POST | `/api/v2/mix/order/place-plan-order` |
+| [futuresModifyTPSLPOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1825) | :closed_lock_with_key: | POST | `/api/v2/mix/order/modify-tpsl-order` |
+| [futuresModifyPlanOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1834) | :closed_lock_with_key: | POST | `/api/v2/mix/order/modify-plan-order` |
+| [getFuturesPlanOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1843) | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-plan-pending` |
+| [futuresCancelPlanOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1852) | :closed_lock_with_key: | POST | `/api/v2/mix/order/cancel-plan-order` |
+| [getFuturesHistoricPlanOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1858) | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-plan-history` |
+| [modifySubaccountEmail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1883) | :closed_lock_with_key: | POST | `/api/v2/broker/account/modify-subaccount-email` |
+| [getBrokerInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1893) | :closed_lock_with_key: | GET | `/api/v2/broker/account/info` |
+| [createSubaccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1903) | :closed_lock_with_key: | POST | `/api/v2/broker/account/create-subaccount` |
+| [getSubaccounts()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1910) | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-list` |
+| [modifySubaccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1920) | :closed_lock_with_key: | POST | `/api/v2/broker/account/modify-subaccount` |
+| [getSubaccountEmail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1926) | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-email` |
+| [getSubaccountSpotAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1932) | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-spot-assets` |
+| [getSubaccountFuturesAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1947) | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-future-assets` |
+| [createSubaccountDepositAddress()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1961) | :closed_lock_with_key: | POST | `/api/v2/broker/account/subaccount-address` |
+| [subaccountWithdrawal()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1972) | :closed_lock_with_key: | POST | `/api/v2/broker/account/subaccount-withdrawal` |
+| [subaccountSetAutoTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1984) | :closed_lock_with_key: | POST | `/api/v2/broker/account/set-subaccount-autotransfer` |
+| [subaccountDepositRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2000) | :closed_lock_with_key: | GET | `/api/v2/broker/subaccount-deposit` |
+| [subaccountWithdrawalRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2011) | :closed_lock_with_key: | GET | `/api/v2/broker/subaccount-withdrawal` |
+| [createSubaccountApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2026) | :closed_lock_with_key: | POST | `/api/v2/broker/manage/create-subaccount-apikey` |
+| [getSubaccountApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2035) | :closed_lock_with_key: | GET | `/api/v2/broker/manage/subaccount-apikey-list` |
+| [modifySubaccountApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2044) | :closed_lock_with_key: | POST | `/api/v2/broker/manage/modify-subaccount-apikey` |
+| [deleteSubaccountApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2053) | :closed_lock_with_key: | POST | `/api/v2/broker/manage/delete-subaccount-apikey` |
+| [getAllSubDepositWithdrawalRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2069) | :closed_lock_with_key: | GET | `/api/v2/broker/all-sub-deposit-withdrawal` |
+| [getBrokerSubaccounts()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2086) | :closed_lock_with_key: | GET | `/api/v2/broker/subaccounts` |
+| [getBrokerCommissions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2098) | :closed_lock_with_key: | GET | `/api/v2/broker/commissions` |
+| [getBrokerTradeVolume()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2110) | :closed_lock_with_key: | GET | `/api/v2/broker/trade-volume` |
+| [getBrokerTotalCommission()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2130) | :closed_lock_with_key: | GET | `/api/v2/broker/total-commission` |
+| [getBrokerOrderCommission()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2152) | :closed_lock_with_key: | GET | `/api/v2/broker/order-commission` |
+| [getBrokerRebateInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2165) | :closed_lock_with_key: | GET | `/api/v2/broker/rebate-info` |
+| [getAgentCustomerCommissions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2177) | :closed_lock_with_key: | GET | `/api/v2/broker/customer-commissions` |
+| [getAgentSubCustomerList()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2186) | :closed_lock_with_key: | GET | `/api/v2/broker/sub-customer-list` |
+| [getAgentCustomerTradeVolume()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2192) | :closed_lock_with_key: | POST | `/api/v2/broker/customer-trade-volume` |
+| [getAgentCustomerList()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2201) | :closed_lock_with_key: | POST | `/api/v2/broker/customer-list` |
+| [getAgentCustomerKycResult()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2207) | :closed_lock_with_key: | GET | `/api/v2/broker/customer-kyc-result` |
+| [getAgentCustomerDeposits()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2213) | :closed_lock_with_key: | POST | `/api/v2/broker/customer-deposit` |
+| [getAgentCustomerAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2219) | :closed_lock_with_key: | POST | `/api/v2/broker/customer-asset` |
+| [getAgentCommissionDetail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2225) | :closed_lock_with_key: | GET | `/api/v2/broker/agent-commission` |
+| [getMarginCurrencies()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2245) | | GET | `/api/v2/margin/currencies` |
+| [getMarginBorrowHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2255) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/borrow-history` |
+| [getMarginRepayHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2272) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/repay-history` |
+| [getMarginInterestHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2289) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/interest-history` |
+| [getMarginLiquidationHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2306) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/liquidation-history` |
+| [getMarginFinancialHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2323) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/financial-records` |
+| [getMarginAccountAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2346) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/assets` |
+| [marginBorrow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2357) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/account/borrow` |
+| [marginRepay()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2380) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/account/repay` |
+| [getMarginRiskRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2405) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/risk-rate` |
+| [getMarginMaxBorrowable()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2417) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/max-borrowable-amount` |
+| [getMarginMaxTransferable()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2430) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/max-transfer-out-amount` |
+| [getMarginInterestRateAndMaxBorrowable()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2445) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/interest-rate-and-limit` |
+| [getMarginTierConfiguration()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2461) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/tier-data` |
+| [marginFlashRepay()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2473) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/account/flash-repay` |
+| [getMarginFlashRepayResult()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2491) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/query-flash-repay-status` |
+| [marginSubmitOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2515) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/place-order` |
+| [marginBatchSubmitOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2528) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/batch-place-order` |
+| [marginCancelOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2539) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/cancel-order` |
+| [marginBatchCancelOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2559) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/batch-cancel-order` |
+| [getMarginOpenOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2573) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/open-orders` |
+| [getMarginHistoricOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2587) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/history-orders` |
+| [getMarginHistoricOrderFills()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2604) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/fills` |
+| [getMarginLiquidationOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2618) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/liquidation-order` |
+| [getFuturesTraderCurrentOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2650) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/order-current-track` |
+| [getFuturesTraderHistoryOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2659) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/order-history-track` |
+| [modifyFuturesTraderOrderTPSL()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2668) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/order-modify-tpsl` |
+| [getFuturesTraderOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2677) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/order-total-detail` |
+| [getFuturesTraderProfitHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2683) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profit-history-summarys` |
+| [getFuturesTraderProfitShareHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2689) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profit-history-details` |
+| [closeFuturesTraderOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2698) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/order-close-positions` |
+| [getFuturesTraderProfitShare()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2717) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profit-details` |
+| [getFuturesTraderProfitShareGroup()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2733) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profits-group-coin-date` |
+| [getFuturesTraderSymbolSettings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2751) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/config-query-symbols` |
+| [updateFuturesTraderSymbolSettings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2760) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/config-setting-symbols` |
+| [updateFuturesTraderGlobalSettings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2769) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/config-settings-base` |
+| [getFuturesTraderFollowers()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2780) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/config-query-followers` |
+| [removeFuturesTraderFollower()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2789) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/config-remove-follower` |
+| [getFuturesFollowerCurrentOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2806) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-current-orders` |
+| [getFuturesFollowerHistoryOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2815) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-history-orders` |
+| [updateFuturesFollowerTPSL()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2824) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/setting-tpsl` |
+| [updateFuturesFollowerSettings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2830) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/settings` |
+| [getFuturesFollowerSettings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2836) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-settings` |
+| [closeFuturesFollowerPositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2842) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/close-positions` |
+| [getFuturesFollowerTraders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2855) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-traders` |
+| [getFuturesFollowerFollowLimit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2861) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-quantity-limit` |
+| [unfollowFuturesTrader()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2879) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/cancel-trader` |
+| [getBrokerTraders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2893) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-broker/query-traders` |
+| [getBrokerTradersHistoricalOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2897) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-broker/query-history-traces` |
+| [getBrokerTradersPendingOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2904) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-broker/query-current-traces` |
+| [getSpotTraderProfit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2919) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/profit-summarys` |
+| [getSpotTraderHistoryProfit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2923) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/profit-history-details` |
+| [getSpotTraderUnrealizedProfit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2932) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/profit-details` |
+| [getSpotTraderOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2940) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/order-total-detail` |
+| [modifySpotTraderOrderTPSL()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2944) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/order-modify-tpsl` |
+| [getSpotTraderHistoryOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2955) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/order-history-track` |
+| [getSpotTraderCurrentOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2964) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/order-current-track` |
+| [sellSpotTrader()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2973) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/order-close-tracking` |
+| [getSpotTraderSymbolSettings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2983) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/config-setting-symbols` |
+| [removeSpotTraderFollowers()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2993) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/config-remove-follower` |
+| [getSpotTraderConfiguration()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3002) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/config-query-settings` |
+| [getSpotTraderFollowers()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3006) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/config-query-followers` |
+| [cancelSpotFollowerOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3023) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/stop-order` |
+| [updateSpotFollowerSettings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3029) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/settings` |
+| [updateSpotFollowerTPSL()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3038) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/setting-tpsl` |
+| [getSpotFollowerTraders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3046) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-traders` |
+| [getSpotFollowerCurrentTraderSymbols()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3055) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-trader-symbols` |
+| [getSpotFollowerSettings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3066) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-settings` |
+| [getSpotFollowerHistoryOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3072) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-history-orders` |
+| [getSpotFollowerOpenOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3081) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-current-orders` |
+| [sellSpotFollower()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3090) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/order-close-tracking` |
+| [unfollowSpotTrader()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3100) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/cancel-trader` |
+| [getEarnSavingsProducts()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3114) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/product` |
+| [getEarnSavingsAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3121) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/account` |
+| [getEarnSavingsAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3125) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/assets` |
+| [getEarnSavingsRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3131) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/records` |
+| [getEarnSavingsSubscription()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3137) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/subscribe-info` |
+| [earnSubscribeSavings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3144) | :closed_lock_with_key: | POST | `/api/v2/earn/savings/subscribe` |
+| [getEarnSavingsSubscriptionResult()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3157) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/subscribe-result` |
+| [earnRedeemSavings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3169) | :closed_lock_with_key: | POST | `/api/v2/earn/savings/redeem` |
+| [getEarnSavingsRedemptionResult()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3178) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/redeem-result` |
+| [getEarnAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3198) | :closed_lock_with_key: | GET | `/api/v2/earn/account/assets` |
+| [getEarnEliteProducts()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3217) | :closed_lock_with_key: | GET | `/api/v2/earn/elite/product` |
+| [getEarnEliteAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3221) | :closed_lock_with_key: | GET | `/api/v2/earn/elite/assets` |
+| [getEarnEliteRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3225) | :closed_lock_with_key: | GET | `/api/v2/earn/elite/records` |
+| [getEarnEliteSubscribeInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3231) | :closed_lock_with_key: | GET | `/api/v2/earn/elite/subscribe-info` |
+| [subscribeEarnElite()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3237) | :closed_lock_with_key: | POST | `/api/v2/earn/elite/subscribe` |
+| [getEarnEliteSubscribeResult()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3243) | :closed_lock_with_key: | GET | `/api/v2/earn/elite/subscribe-result` |
+| [getEarnEliteRedeemInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3249) | :closed_lock_with_key: | GET | `/api/v2/earn/elite/redeem-info` |
+| [redeemEarnElite()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3255) | :closed_lock_with_key: | POST | `/api/v2/earn/elite/redeem` |
+| [getSharkfinProducts()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3269) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/product` |
+| [getSharkfinAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3277) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/account` |
+| [getSharkfinAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3281) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/assets` |
+| [getSharkfinRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3287) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/records` |
+| [getSharkfinSubscription()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3293) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/subscribe-info` |
+| [subscribeSharkfin()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3299) | :closed_lock_with_key: | POST | `/api/v2/earn/sharkfin/subscribe` |
+| [getSharkfinSubscriptionResult()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3308) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/subscribe-result` |
+| [getLoanCurrencies()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3325) | | GET | `/api/v2/earn/loan/public/coinInfos` |
+| [getLoanEstInterestAndBorrowable()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3331) | | GET | `/api/v2/earn/loan/public/hour-interest` |
+| [borrowLoan()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3342) | :closed_lock_with_key: | POST | `/api/v2/earn/loan/borrow` |
+| [getOngoingLoanOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3350) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/ongoing-orders` |
+| [repayLoan()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3358) | :closed_lock_with_key: | POST | `/api/v2/earn/loan/repay` |
+| [getRepayHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3364) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/repay-history` |
+| [updateLoanPledgeRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3370) | :closed_lock_with_key: | POST | `/api/v2/earn/loan/revise-pledge` |
+| [getLoanPledgeRateHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3380) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/revise-history` |
+| [getLoanHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3386) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/borrow-history` |
+| [getLoanDebts()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3392) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/debts` |
+| [getLoanLiquidationRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3396) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/reduces` |
+| [getLoanProductInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3408) | :closed_lock_with_key: | GET | `/api/v2/spot/ins-loan/product-infos` |
+| [getLoanSymbols()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3414) | :closed_lock_with_key: | GET | `/api/v2/spot/ins-loan/symbols` |
+| [getLoanMarginCoinInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3420) | :closed_lock_with_key: | GET | `/api/v2/spot/ins-loan/ensure-coins-convert` |
+| [getLoanRiskUnit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3438) | :closed_lock_with_key: | GET | `/api/v2/spot/ins-loan/risk-unit` |
+| [getLoanLTVConvert()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3446) | :closed_lock_with_key: | GET | `/api/v2/spot/ins-loan/ltv-convert` |
+| [getLoanRepaidHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3458) | :closed_lock_with_key: | GET | `/api/v2/spot/ins-loan/repaid-history` |
+| [getLoanOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3464) | :closed_lock_with_key: | GET | `/api/v2/spot/ins-loan/loan-order` |
# rest-client-v3.ts
@@ -348,177 +361,216 @@ This table includes all endpoints from the official Exchange API docs and corres
| Function | AUTH | HTTP Method | Endpoint |
| -------- | :------: | :------: | -------- |
-| [getServerTime()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L402) | | GET | `/api/v3/public/time` |
-| [getInstruments()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L419) | | GET | `/api/v3/market/instruments` |
-| [getMarketFeeGroup()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L428) | | GET | `/api/v3/market/fee-group` |
-| [getLiquidations()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L437) | | GET | `/api/v3/market/liquidations` |
-| [getRpiSymbols()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L446) | | GET | `/api/v3/market/rpi-symbols` |
-| [getRpiOrderBook()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L453) | | GET | `/api/v3/market/rpi-orderbook` |
-| [getCashDividendRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L462) | | GET | `/api/v3/market/cash-dividend-records` |
-| [getSpotWhaleFlow()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L471) | | GET | `/api/v3/market/spot-whale-flow` |
-| [getSpotFundFlow()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L480) | | GET | `/api/v3/market/spot-fund-flow` |
-| [getSpotNetFlow()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L489) | | GET | `/api/v3/market/spot-net-flow` |
-| [getMarginLongShort()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L498) | | GET | `/api/v3/market/margin-long-short` |
-| [getMarginLoanGrowth()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L507) | | GET | `/api/v3/market/margin-loan-growth` |
-| [getMarginIsolatedBorrow()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L516) | | GET | `/api/v3/market/margin-isolated-borrow` |
-| [getFuturesActiveBuySell()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L525) | | GET | `/api/v3/market/futures-active-buy-sell` |
-| [getFuturesLongShort()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L534) | | GET | `/api/v3/market/futures-long-short` |
-| [getFuturesPositionLongShort()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L543) | | GET | `/api/v3/market/futures-position-long-short` |
-| [getFuturesAccountLongShort()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L552) | | GET | `/api/v3/market/futures-account-long-short` |
-| [getMarketScoreWeights()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L561) | | GET | `/api/v3/market/score-weights` |
-| [getTickers()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L570) | | GET | `/api/v3/market/tickers` |
-| [getOrderBook()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L577) | | GET | `/api/v3/market/orderbook` |
-| [getFills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L586) | | GET | `/api/v3/market/fills` |
-| [getProofOfReserves()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L595) | | GET | `/api/v3/market/proof-of-reserves` |
-| [getOpenInterest()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L602) | | GET | `/api/v3/market/open-interest` |
-| [getCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L612) | | GET | `/api/v3/market/candles` |
-| [getHistoryCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L621) | | GET | `/api/v3/market/history-candles` |
-| [getCurrentFundingRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L630) | | GET | `/api/v3/market/current-fund-rate` |
-| [getHistoryFundingRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L639) | | GET | `/api/v3/market/history-fund-rate` |
-| [getRiskReserve()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L648) | | GET | `/api/v3/market/risk-reserve` |
-| [getRiskReserveHour()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L657) | | GET | `/api/v3/market/risk-reserve-hour` |
-| [getRiskReserveAll()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L666) | | GET | `/api/v3/market/risk-reserve-all` |
-| [getDiscountRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L675) | | GET | `/api/v3/market/discount-rate` |
-| [getMarginLoans()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L682) | | GET | `/api/v3/market/margin-loans` |
-| [getPositionTier()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L691) | | GET | `/api/v3/market/position-tier` |
-| [getContractsOi()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L700) | | GET | `/api/v3/market/oi-limit` |
-| [getIndexComponents()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L709) | | GET | `/api/v3/market/index-components` |
-| [getCopyFuturesTradingPairs()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L726) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/trading-pairs` |
-| [getCopyFuturesPositionSummary()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L737) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/position-summary` |
-| [getCopyFuturesMaxTransferable()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L747) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/max-transferable` |
-| [copyFuturesTransfer()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L757) | :closed_lock_with_key: | POST | `/api/v3/copy/futures/transfer` |
-| [getCopyFuturesTransferRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L767) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/transfer-record` |
-| [getBalances()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L782) | :closed_lock_with_key: | GET | `/api/v3/account/assets` |
-| [getFundingAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L789) | :closed_lock_with_key: | GET | `/api/v3/account/funding-assets` |
-| [getAccountInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L799) | :closed_lock_with_key: | GET | `/api/v3/account/info` |
-| [getAccountSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L807) | :closed_lock_with_key: | GET | `/api/v3/account/settings` |
-| [adjustAccountMode()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L814) | :closed_lock_with_key: | POST | `/api/v3/account/adjust-account-mode` |
-| [getDeltaInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L824) | :closed_lock_with_key: | GET | `/api/v3/account/delta-info` |
-| [setLeverage()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L831) | :closed_lock_with_key: | POST | `/api/v3/account/set-leverage` |
-| [setHoldMode()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L838) | :closed_lock_with_key: | POST | `/api/v3/account/set-hold-mode` |
-| [getCollateralType()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L847) | :closed_lock_with_key: | GET | `/api/v3/account/collateral-type` |
-| [setCollateralType()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L854) | :closed_lock_with_key: | POST | `/api/v3/account/set-collateral-type` |
-| [getCustomCollateralCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L863) | | GET | `/api/v3/account/custom-collateral-coins` |
-| [preSetLeverage()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L870) | :closed_lock_with_key: | GET | `/api/v3/account/pre-set-leverage` |
-| [setMargin()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L879) | :closed_lock_with_key: | POST | `/api/v3/account/set-margin` |
-| [getMaxWithdrawal()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L886) | :closed_lock_with_key: | GET | `/api/v3/account/max-withdrawal` |
-| [getFinancialRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L895) | :closed_lock_with_key: | GET | `/api/v3/account/financial-records` |
-| [getRepayableCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L907) | :closed_lock_with_key: | GET | `/api/v3/account/repayable-coins` |
-| [getPaymentCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L919) | :closed_lock_with_key: | GET | `/api/v3/account/payment-coins` |
-| [submitRepay()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L931) | :closed_lock_with_key: | POST | `/api/v3/account/repay` |
-| [getConvertRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L938) | :closed_lock_with_key: | GET | `/api/v3/account/convert-records` |
-| [setDepositAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L953) | :closed_lock_with_key: | POST | `/api/v3/account/deposit-account` |
-| [switchDeduct()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L962) | :closed_lock_with_key: | POST | `/api/v3/account/switch-deduct` |
-| [getDeductInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L969) | :closed_lock_with_key: | GET | `/api/v3/account/deduct-info` |
-| [getFeeRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L980) | :closed_lock_with_key: | GET | `/api/v3/account/fee-rate` |
-| [getAllFeeRates()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L992) | :closed_lock_with_key: | GET | `/api/v3/account/all-fee-rate` |
-| [getMaxTransferable()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1005) | :closed_lock_with_key: | GET | `/api/v3/account/max-transferable` |
-| [getOpenInterestLimit()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1017) | :closed_lock_with_key: | GET | `/api/v3/account/open-interest-limit` |
-| [downgradeAccountToClassic()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1032) | :closed_lock_with_key: | POST | `/api/v3/account/switch` |
-| [getUnifiedAccountSwitchStatus()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1040) | :closed_lock_with_key: | GET | `/api/v3/account/switch-status` |
-| [getTaxRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1056) | :closed_lock_with_key: | GET | `/api/v3/tax/records` |
-| [createSubAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1071) | :closed_lock_with_key: | POST | `/api/v3/user/create-sub` |
-| [freezeSubAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1080) | :closed_lock_with_key: | POST | `/api/v3/user/freeze-sub` |
-| [getSubUnifiedAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1089) | :closed_lock_with_key: | GET | `/api/v3/account/sub-unified-assets` |
-| [getSubAccountList()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1098) | :closed_lock_with_key: | GET | `/api/v3/user/sub-list` |
-| [createSubAccountApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1111) | :closed_lock_with_key: | POST | `/api/v3/user/create-sub-api` |
-| [updateSubAccountApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1120) | :closed_lock_with_key: | POST | `/api/v3/user/update-sub-api` |
-| [deleteSubAccountApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1129) | :closed_lock_with_key: | POST | `/api/v3/user/delete-sub-api` |
-| [getSubAccountApiKeys()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1138) | :closed_lock_with_key: | GET | `/api/v3/user/sub-api-list` |
-| [getTransferableCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1157) | :closed_lock_with_key: | GET | `/api/v3/account/transferable-coins` |
-| [submitTransfer()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1166) | :closed_lock_with_key: | POST | `/api/v3/account/transfer` |
-| [subAccountTransfer()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1175) | :closed_lock_with_key: | POST | `/api/v3/account/sub-transfer` |
-| [getSubTransferRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1187) | :closed_lock_with_key: | GET | `/api/v3/account/sub-transfer-record` |
-| [getDepositAddress()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1205) | :closed_lock_with_key: | GET | `/api/v3/account/deposit-address` |
-| [getSubDepositAddress()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1214) | :closed_lock_with_key: | GET | `/api/v3/account/sub-deposit-address` |
-| [getDepositRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1223) | :closed_lock_with_key: | GET | `/api/v3/account/deposit-records` |
-| [getSubDepositRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1232) | :closed_lock_with_key: | POST | `/api/v3/account/sub-deposit-records` |
-| [submitWithdraw()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1247) | :closed_lock_with_key: | POST | `/api/v3/account/withdraw` |
-| [getWithdrawRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1256) | :closed_lock_with_key: | GET | `/api/v3/account/withdrawal-records` |
-| [getWithdrawAddressBook()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1265) | :closed_lock_with_key: | GET | `/api/v3/account/withdraw-address` |
-| [cancelWithdrawal()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1274) | :closed_lock_with_key: | POST | `/api/v3/account/cancel-withdrawal` |
-| [submitNewOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1289) | :closed_lock_with_key: | POST | `/api/v3/trade/place-order` |
-| [modifyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1298) | :closed_lock_with_key: | POST | `/api/v3/trade/modify-order` |
-| [placeRealityOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1307) | :closed_lock_with_key: | POST | `/api/v3/trade/place-reality-order` |
-| [cancelRealityOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1316) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-reality-order` |
-| [getLoanData()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1325) | :closed_lock_with_key: | GET | `/api/v3/trade/loan-data` |
-| [cancelOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1332) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-order` |
-| [placeBatchOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1341) | :closed_lock_with_key: | POST | `/api/v3/trade/place-batch` |
-| [batchModifyOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1350) | :closed_lock_with_key: | POST | `/api/v3/trade/batch-modify-order` |
-| [cancelBatchOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1359) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-batch` |
-| [cancelAllOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1368) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-symbol-order` |
-| [closeAllPositions()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1377) | :closed_lock_with_key: | POST | `/api/v3/trade/close-positions` |
-| [getOrderInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1386) | :closed_lock_with_key: | GET | `/api/v3/trade/order-info` |
-| [getUnfilledOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1395) | :closed_lock_with_key: | GET | `/api/v3/trade/unfilled-orders` |
-| [getHistoryOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1407) | :closed_lock_with_key: | GET | `/api/v3/trade/history-orders` |
-| [getTradeFills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1419) | :closed_lock_with_key: | GET | `/api/v3/trade/fills` |
-| [getCurrentPosition()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1431) | :closed_lock_with_key: | GET | `/api/v3/position/current-position` |
-| [getPositionHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1442) | :closed_lock_with_key: | GET | `/api/v3/position/history-position` |
-| [getMaxOpenAvailable()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1454) | :closed_lock_with_key: | POST | `/api/v3/account/max-open-available` |
-| [getPositionAdlRank()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1463) | :closed_lock_with_key: | GET | `/api/v3/position/adlRank` |
-| [countdownCancelAll()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1470) | :closed_lock_with_key: | POST | `/api/v3/trade/countdown-cancel-all` |
-| [getLoanTransfered()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1485) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/transfered` |
-| [getLoanSymbols()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1494) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/symbols` |
-| [getLoanRiskUnit()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1503) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/risk-unit` |
-| [getLoanRepaidHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1514) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/repaid-history` |
-| [getLoanProductInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1523) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/product-infos` |
-| [getLoanOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1532) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/loan-order` |
-| [getLoanLTVConvert()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1541) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/ltv-convert` |
-| [getLoanMarginCoinInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1550) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/ensure-coins-convert` |
-| [bindLoanUid()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1562) | :closed_lock_with_key: | POST | `/api/v3/ins-loan/bind-uid` |
-| [getLoanCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1577) | :closed_lock_with_key: | GET | `/api/v3/loan/coins` |
-| [getLoanInterest()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1586) | :closed_lock_with_key: | GET | `/api/v3/loan/interest` |
-| [loanBorrow()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1595) | :closed_lock_with_key: | POST | `/api/v3/loan/borrow` |
-| [getLoanBorrowOngoing()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1604) | :closed_lock_with_key: | GET | `/api/v3/loan/borrow-ongoing` |
-| [getLoanBorrowHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1613) | :closed_lock_with_key: | GET | `/api/v3/loan/borrow-history` |
-| [loanRepay()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1622) | :closed_lock_with_key: | POST | `/api/v3/loan/repay` |
-| [getLoanRepayHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1631) | :closed_lock_with_key: | GET | `/api/v3/loan/repay-history` |
-| [loanRevisePledge()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1640) | :closed_lock_with_key: | POST | `/api/v3/loan/revise-pledge` |
-| [getLoanPledgeRateHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1649) | :closed_lock_with_key: | GET | `/api/v3/loan/pledge-rate-history` |
-| [getLoanDebts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1658) | :closed_lock_with_key: | GET | `/api/v3/loan/debts` |
-| [getLoanReduces()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1665) | :closed_lock_with_key: | GET | `/api/v3/loan/reduces` |
-| [submitStrategyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1680) | :closed_lock_with_key: | POST | `/api/v3/trade/place-strategy-order` |
-| [modifyStrategyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1689) | :closed_lock_with_key: | POST | `/api/v3/trade/modify-strategy-order` |
-| [cancelStrategyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1698) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-strategy-order` |
-| [getUnfilledStrategyOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1707) | :closed_lock_with_key: | GET | `/api/v3/trade/unfilled-strategy-orders` |
-| [getHistoryStrategyOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1716) | :closed_lock_with_key: | GET | `/api/v3/trade/history-strategy-orders` |
-| [createBrokerSubAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1737) | :closed_lock_with_key: | POST | `/api/v3/broker/create-sub` |
-| [getBrokerSubAccountList()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1749) | :closed_lock_with_key: | GET | `/api/v3/broker/sub-list` |
-| [modifyBrokerSubAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1761) | :closed_lock_with_key: | POST | `/api/v3/broker/modify-sub` |
-| [brokerSubWithdrawal()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1776) | :closed_lock_with_key: | POST | `/api/v3/broker/sub-withdrawal` |
-| [getBrokerSubDepositAddress()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1788) | :closed_lock_with_key: | POST | `/api/v3/broker/sub-deposit-address` |
-| [getBrokerAllSubDepositWithdrawal()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1800) | :closed_lock_with_key: | GET | `/api/v3/broker/all-sub-deposit-withdrawal` |
-| [getBrokerCommission()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1812) | :closed_lock_with_key: | GET | `/api/v3/broker/commission` |
-| [createBrokerSubApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1824) | :closed_lock_with_key: | POST | `/api/v3/broker/create-sub-apikey` |
-| [modifyBrokerSubApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1836) | :closed_lock_with_key: | POST | `/api/v3/broker/modify-sub-apikey` |
-| [deleteBrokerSubApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1852) | :closed_lock_with_key: | POST | `/api/v3/broker/delete-sub-apikey` |
-| [getBrokerSubApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1864) | :closed_lock_with_key: | GET | `/api/v3/broker/query-sub-apikey` |
-| [getP2pAdList()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1876) | :closed_lock_with_key: | GET | `/api/v3/p2p/ad-list` |
-| [getP2pExchangeRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1882) | :closed_lock_with_key: | GET | `/api/v3/p2p/exchange-rate` |
-| [simulateP2pFee()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1888) | :closed_lock_with_key: | POST | `/api/v3/p2p/fee-simulate` |
-| [getP2pAdLimit()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1894) | :closed_lock_with_key: | GET | `/api/v3/p2p/ad-limit` |
-| [createP2pAd()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1900) | :closed_lock_with_key: | POST | `/api/v3/p2p/ad-create` |
-| [updateP2pAd()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1906) | :closed_lock_with_key: | POST | `/api/v3/p2p/ad-update` |
-| [operateP2pAd()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1910) | :closed_lock_with_key: | POST | `/api/v3/p2p/ad-operate` |
-| [getP2pAdInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1914) | :closed_lock_with_key: | GET | `/api/v3/p2p/ad-info` |
-| [getP2pMyAds()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1920) | :closed_lock_with_key: | GET | `/api/v3/p2p/my-ads` |
-| [getP2pPendingOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1926) | :closed_lock_with_key: | GET | `/api/v3/p2p/pending-orders` |
-| [getP2pAllOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1932) | :closed_lock_with_key: | GET | `/api/v3/p2p/all-orders` |
-| [getP2pOrderInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1938) | :closed_lock_with_key: | GET | `/api/v3/p2p/order-info` |
-| [confirmP2pOrderPayment()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1944) | :closed_lock_with_key: | POST | `/api/v3/p2p/order-pay` |
-| [releaseP2pOrderAsset()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1950) | :closed_lock_with_key: | POST | `/api/v3/p2p/order-release` |
-| [getP2pUserInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1956) | :closed_lock_with_key: | GET | `/api/v3/p2p/user-info` |
-| [getP2pCurrencies()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1960) | :closed_lock_with_key: | GET | `/api/v3/p2p/currencies` |
-| [getP2pPayMethods()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1964) | :closed_lock_with_key: | GET | `/api/v3/p2p/pay-method` |
-| [getP2pBalance()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1968) | :closed_lock_with_key: | GET | `/api/v3/p2p/balance` |
-| [getEarnEliteProducts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1980) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-product` |
-| [getEarnEliteAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1984) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-assets` |
-| [getEarnEliteRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1988) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-records` |
-| [getEarnEliteSubscribeInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L1994) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-subscribe-info` |
-| [subscribeEarnElite()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L2000) | :closed_lock_with_key: | POST | `/api/v3/earn/elite-subscribe` |
-| [getEarnEliteSubscribeResult()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L2006) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-subscribe-result` |
-| [getEarnEliteRedeemInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L2012) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-redeem-info` |
-| [redeemEarnElite()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L2018) | :closed_lock_with_key: | POST | `/api/v3/earn/elite-redeem` |
+| [getServerTime()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L480) | | GET | `/api/v3/public/time` |
+| [getInstruments()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L497) | | GET | `/api/v3/market/instruments` |
+| [getMarketFeeGroup()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L506) | | GET | `/api/v3/market/fee-group` |
+| [getLiquidations()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L515) | | GET | `/api/v3/market/liquidations` |
+| [getRpiSymbols()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L524) | | GET | `/api/v3/market/rpi-symbols` |
+| [getRpiOrderBook()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L531) | | GET | `/api/v3/market/rpi-orderbook` |
+| [getCashDividendRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L540) | | GET | `/api/v3/market/cash-dividend-records` |
+| [getSpotWhaleFlow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L549) | | GET | `/api/v3/market/spot-whale-flow` |
+| [getSpotFundFlow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L558) | | GET | `/api/v3/market/spot-fund-flow` |
+| [getSpotNetFlow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L567) | | GET | `/api/v3/market/spot-net-flow` |
+| [getMarginLongShort()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L576) | | GET | `/api/v3/market/margin-long-short` |
+| [getMarginLoanGrowth()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L585) | | GET | `/api/v3/market/margin-loan-growth` |
+| [getMarginIsolatedBorrow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L594) | | GET | `/api/v3/market/margin-isolated-borrow` |
+| [getFuturesActiveBuySell()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L603) | | GET | `/api/v3/market/futures-active-buy-sell` |
+| [getFuturesLongShort()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L612) | | GET | `/api/v3/market/futures-long-short` |
+| [getFuturesPositionLongShort()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L621) | | GET | `/api/v3/market/futures-position-long-short` |
+| [getFuturesAccountLongShort()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L630) | | GET | `/api/v3/market/futures-account-long-short` |
+| [getMarketScoreWeights()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L639) | | GET | `/api/v3/market/score-weights` |
+| [getTickers()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L648) | | GET | `/api/v3/market/tickers` |
+| [getOrderBook()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L655) | | GET | `/api/v3/market/orderbook` |
+| [getFills()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L664) | | GET | `/api/v3/market/fills` |
+| [getProofOfReserves()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L673) | | GET | `/api/v3/market/proof-of-reserves` |
+| [getOpenInterest()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L680) | | GET | `/api/v3/market/open-interest` |
+| [getCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L690) | | GET | `/api/v3/market/candles` |
+| [getHistoryCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L699) | | GET | `/api/v3/market/history-candles` |
+| [getCurrentFundingRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L708) | | GET | `/api/v3/market/current-fund-rate` |
+| [getHistoryFundingRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L717) | | GET | `/api/v3/market/history-fund-rate` |
+| [getRiskReserve()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L726) | | GET | `/api/v3/market/risk-reserve` |
+| [getRiskReserveHour()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L735) | | GET | `/api/v3/market/risk-reserve-hour` |
+| [getRiskReserveAll()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L744) | | GET | `/api/v3/market/risk-reserve-all` |
+| [getDiscountRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L753) | | GET | `/api/v3/market/discount-rate` |
+| [getMarginLoans()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L760) | | GET | `/api/v3/market/margin-loans` |
+| [getPositionTier()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L769) | | GET | `/api/v3/market/position-tier` |
+| [getContractsOi()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L778) | | GET | `/api/v3/market/oi-limit` |
+| [getIndexComponents()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L787) | | GET | `/api/v3/market/index-components` |
+| [getRealityOrderBook()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L796) | :closed_lock_with_key: | GET | `/api/v3/account/reality-orderbook` |
+| [getRealityFills()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L805) | :closed_lock_with_key: | GET | `/api/v3/account/reality-fills` |
+| [getCopyFuturesTradingPairs()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L822) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/trading-pairs` |
+| [getCopyFuturesPositionSummary()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L833) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/position-summary` |
+| [getCopyFuturesMaxTransferable()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L843) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/max-transferable` |
+| [copyFuturesTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L853) | :closed_lock_with_key: | POST | `/api/v3/copy/futures/transfer` |
+| [getCopyFuturesTransferRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L863) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/transfer-record` |
+| [getCopyFuturesCurrentFollowers()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L869) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/current-follower` |
+| [getCopyFuturesHistoryFollowers()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L875) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/history-follower` |
+| [getCopyFuturesProfitSummary()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L881) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/profit-summary` |
+| [getCopyFuturesProfitDetails()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L887) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/profit-details` |
+| [getStockPlusOptionQuote()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L899) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/option-quote` |
+| [getStockPlusOptionChainInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L905) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/option-chain-info` |
+| [getStockPlusOptionExpiryDate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L914) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/option-expiry-date` |
+| [getStockPlusOptionVolume()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L923) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/option-volume` |
+| [getStockPlusStaticInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L929) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/static` |
+| [getStockPlusQuote()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L935) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/quote` |
+| [getStockPlusTradeDetail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L941) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/trade` |
+| [getStockPlusIntraday()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L947) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/intraday` |
+| [getStockPlusHistoryCandlestick()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L953) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/history-candlestick` |
+| [getStockPlusCandlestick()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L962) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/candlestick` |
+| [getStockPlusDepth()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L968) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/depth` |
+| [placeStockPlusOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L974) | :closed_lock_with_key: | POST | `/api/v3/stockplus/trade/place-order` |
+| [cancelStockPlusOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L980) | :closed_lock_with_key: | POST | `/api/v3/stockplus/trade/cancel-order` |
+| [modifyStockPlusOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L986) | :closed_lock_with_key: | POST | `/api/v3/stockplus/trade/modify-order` |
+| [getStockPlusTodayOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L992) | :closed_lock_with_key: | GET | `/api/v3/stockplus/trade/today-orders` |
+| [getStockPlusHistoryOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L998) | :closed_lock_with_key: | GET | `/api/v3/stockplus/trade/history-orders` |
+| [getStockPlusOrderDetail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1004) | :closed_lock_with_key: | GET | `/api/v3/stockplus/trade/order-detail` |
+| [getStockPlusTodayExecutions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1010) | :closed_lock_with_key: | GET | `/api/v3/stockplus/trade/today-executions` |
+| [getStockPlusHistoryExecutions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1016) | :closed_lock_with_key: | GET | `/api/v3/stockplus/trade/history-executions` |
+| [getStockPlusAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1025) | :closed_lock_with_key: | GET | `/api/v3/stockplus/asset/account` |
+| [getStockPlusCashFlow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1031) | :closed_lock_with_key: | GET | `/api/v3/stockplus/asset/cash-flow` |
+| [getStockPlusStockPosition()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1037) | :closed_lock_with_key: | GET | `/api/v3/stockplus/asset/stock-position` |
+| [stockPlusTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1043) | :closed_lock_with_key: | POST | `/api/v3/stockplus/asset/transfer` |
+| [getStockPlusTransferRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1049) | :closed_lock_with_key: | GET | `/api/v3/stockplus/asset/transfer-records` |
+| [getBalances()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1064) | :closed_lock_with_key: | GET | `/api/v3/account/assets` |
+| [getFundingAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1071) | :closed_lock_with_key: | GET | `/api/v3/account/funding-assets` |
+| [getAccountInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1081) | :closed_lock_with_key: | GET | `/api/v3/account/info` |
+| [getAccountSettings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1089) | :closed_lock_with_key: | GET | `/api/v3/account/settings` |
+| [adjustAccountMode()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1096) | :closed_lock_with_key: | POST | `/api/v3/account/adjust-account-mode` |
+| [getDeltaInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1106) | :closed_lock_with_key: | GET | `/api/v3/account/delta-info` |
+| [setLeverage()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1113) | :closed_lock_with_key: | POST | `/api/v3/account/set-leverage` |
+| [setHoldMode()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1120) | :closed_lock_with_key: | POST | `/api/v3/account/set-hold-mode` |
+| [getCollateralType()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1129) | :closed_lock_with_key: | GET | `/api/v3/account/collateral-type` |
+| [setCollateralType()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1136) | :closed_lock_with_key: | POST | `/api/v3/account/set-collateral-type` |
+| [getCustomCollateralCoins()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1145) | | GET | `/api/v3/account/custom-collateral-coins` |
+| [preSetLeverage()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1152) | :closed_lock_with_key: | GET | `/api/v3/account/pre-set-leverage` |
+| [setMargin()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1161) | :closed_lock_with_key: | POST | `/api/v3/account/set-margin` |
+| [getMaxWithdrawal()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1168) | :closed_lock_with_key: | GET | `/api/v3/account/max-withdrawal` |
+| [getFinancialRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1177) | :closed_lock_with_key: | GET | `/api/v3/account/financial-records` |
+| [getRepayableCoins()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1189) | :closed_lock_with_key: | GET | `/api/v3/account/repayable-coins` |
+| [getPaymentCoins()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1201) | :closed_lock_with_key: | GET | `/api/v3/account/payment-coins` |
+| [submitRepay()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1213) | :closed_lock_with_key: | POST | `/api/v3/account/repay` |
+| [getConvertRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1220) | :closed_lock_with_key: | GET | `/api/v3/account/convert-records` |
+| [setDepositAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1235) | :closed_lock_with_key: | POST | `/api/v3/account/deposit-account` |
+| [switchDeduct()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1244) | :closed_lock_with_key: | POST | `/api/v3/account/switch-deduct` |
+| [getDeductInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1251) | :closed_lock_with_key: | GET | `/api/v3/account/deduct-info` |
+| [getFeeRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1262) | :closed_lock_with_key: | GET | `/api/v3/account/fee-rate` |
+| [getAllFeeRates()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1274) | :closed_lock_with_key: | GET | `/api/v3/account/all-fee-rate` |
+| [getMaxTransferable()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1287) | :closed_lock_with_key: | GET | `/api/v3/account/max-transferable` |
+| [getOpenInterestLimit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1299) | :closed_lock_with_key: | GET | `/api/v3/account/open-interest-limit` |
+| [getEligibleSymbols()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1305) | :closed_lock_with_key: | GET | `/api/v3/account/eligible-symbols` |
+| [getEligibleMarginTier()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1311) | :closed_lock_with_key: | GET | `/api/v3/account/eligible-margin-tier` |
+| [getEligibleLoanInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1317) | :closed_lock_with_key: | GET | `/api/v3/account/eligible-loan-info` |
+| [downgradeAccountToClassic()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1332) | :closed_lock_with_key: | POST | `/api/v3/account/switch` |
+| [getUnifiedAccountSwitchStatus()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1340) | :closed_lock_with_key: | GET | `/api/v3/account/switch-status` |
+| [getTaxRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1356) | :closed_lock_with_key: | GET | `/api/v3/tax/records` |
+| [createSubAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1371) | :closed_lock_with_key: | POST | `/api/v3/user/create-sub` |
+| [createAgentSubAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1380) | :closed_lock_with_key: | POST | `/api/v3/user/sub-account/agent-create` |
+| [freezeSubAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1389) | :closed_lock_with_key: | POST | `/api/v3/user/freeze-sub` |
+| [getSubUnifiedAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1398) | :closed_lock_with_key: | GET | `/api/v3/account/sub-unified-assets` |
+| [getSubAccountList()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1407) | :closed_lock_with_key: | GET | `/api/v3/user/sub-list` |
+| [createSubAccountApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1420) | :closed_lock_with_key: | POST | `/api/v3/user/create-sub-api` |
+| [updateSubAccountApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1429) | :closed_lock_with_key: | POST | `/api/v3/user/update-sub-api` |
+| [deleteSubAccountApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1438) | :closed_lock_with_key: | POST | `/api/v3/user/delete-sub-api` |
+| [getSubAccountApiKeys()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1447) | :closed_lock_with_key: | GET | `/api/v3/user/sub-api-list` |
+| [getRateLimitQuota()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1457) | :closed_lock_with_key: | GET | `/api/v3/user/rate-limit-quota` |
+| [setRateLimitQuota()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1463) | :closed_lock_with_key: | POST | `/api/v3/user/set-rate-limit-quota` |
+| [getTransferableCoins()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1478) | :closed_lock_with_key: | GET | `/api/v3/account/transferable-coins` |
+| [submitTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1487) | :closed_lock_with_key: | POST | `/api/v3/account/transfer` |
+| [subAccountTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1496) | :closed_lock_with_key: | POST | `/api/v3/account/sub-transfer` |
+| [getSubTransferRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1508) | :closed_lock_with_key: | GET | `/api/v3/account/sub-transfer-record` |
+| [subMasterTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1520) | :closed_lock_with_key: | POST | `/api/v3/account/sub-master-transfer` |
+| [getDepositAddress()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1538) | :closed_lock_with_key: | GET | `/api/v3/account/deposit-address` |
+| [getSubDepositAddress()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1547) | :closed_lock_with_key: | GET | `/api/v3/account/sub-deposit-address` |
+| [getDepositRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1556) | :closed_lock_with_key: | GET | `/api/v3/account/deposit-records` |
+| [getSubDepositRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1565) | :closed_lock_with_key: | POST | `/api/v3/account/sub-deposit-records` |
+| [submitWithdraw()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1580) | :closed_lock_with_key: | POST | `/api/v3/account/withdraw` |
+| [getWithdrawRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1589) | :closed_lock_with_key: | GET | `/api/v3/account/withdrawal-records` |
+| [getWithdrawAddressBook()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1598) | :closed_lock_with_key: | GET | `/api/v3/account/withdraw-address` |
+| [cancelWithdrawal()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1607) | :closed_lock_with_key: | POST | `/api/v3/account/cancel-withdrawal` |
+| [submitNewOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1622) | :closed_lock_with_key: | POST | `/api/v3/trade/place-order` |
+| [modifyOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1631) | :closed_lock_with_key: | POST | `/api/v3/trade/modify-order` |
+| [placeRealityOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1640) | :closed_lock_with_key: | POST | `/api/v3/trade/place-reality-order` |
+| [cancelRealityOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1649) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-reality-order` |
+| [getLoanData()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1658) | :closed_lock_with_key: | GET | `/api/v3/trade/loan-data` |
+| [cancelOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1665) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-order` |
+| [placeBatchOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1674) | :closed_lock_with_key: | POST | `/api/v3/trade/place-batch` |
+| [batchModifyOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1683) | :closed_lock_with_key: | POST | `/api/v3/trade/batch-modify-order` |
+| [cancelBatchOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1692) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-batch` |
+| [cancelAllOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1701) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-symbol-order` |
+| [closeAllPositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1710) | :closed_lock_with_key: | POST | `/api/v3/trade/close-positions` |
+| [getOrderInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1719) | :closed_lock_with_key: | GET | `/api/v3/trade/order-info` |
+| [getUnfilledOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1728) | :closed_lock_with_key: | GET | `/api/v3/trade/unfilled-orders` |
+| [getHistoryOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1740) | :closed_lock_with_key: | GET | `/api/v3/trade/history-orders` |
+| [movePositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1752) | :closed_lock_with_key: | POST | `/api/v3/account/move-positions` |
+| [getMovePositionHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1761) | :closed_lock_with_key: | GET | `/api/v3/account/move-position-history` |
+| [getTradeFills()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1773) | :closed_lock_with_key: | GET | `/api/v3/trade/fills` |
+| [getCurrentPosition()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1785) | :closed_lock_with_key: | GET | `/api/v3/position/current-position` |
+| [getPositionHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1796) | :closed_lock_with_key: | GET | `/api/v3/position/history-position` |
+| [getMaxOpenAvailable()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1808) | :closed_lock_with_key: | POST | `/api/v3/account/max-open-available` |
+| [getPositionAdlRank()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1817) | :closed_lock_with_key: | GET | `/api/v3/position/adlRank` |
+| [countdownCancelAll()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1824) | :closed_lock_with_key: | POST | `/api/v3/trade/countdown-cancel-all` |
+| [getLoanTransfered()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1839) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/transfered` |
+| [getLoanSymbols()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1848) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/symbols` |
+| [getLoanRiskUnit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1857) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/risk-unit` |
+| [getLoanRepaidHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1868) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/repaid-history` |
+| [getLoanProductInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1877) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/product-infos` |
+| [getLoanOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1886) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/loan-order` |
+| [getLoanLTVConvert()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1895) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/ltv-convert` |
+| [getLoanMarginCoinInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1904) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/ensure-coins-convert` |
+| [bindLoanUid()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1916) | :closed_lock_with_key: | POST | `/api/v3/ins-loan/bind-uid` |
+| [getLoanCoins()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1931) | :closed_lock_with_key: | GET | `/api/v3/loan/coins` |
+| [getLoanInterest()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1940) | :closed_lock_with_key: | GET | `/api/v3/loan/interest` |
+| [loanBorrow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1949) | :closed_lock_with_key: | POST | `/api/v3/loan/borrow` |
+| [getLoanBorrowOngoing()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1958) | :closed_lock_with_key: | GET | `/api/v3/loan/borrow-ongoing` |
+| [getLoanBorrowHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1967) | :closed_lock_with_key: | GET | `/api/v3/loan/borrow-history` |
+| [loanRepay()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1976) | :closed_lock_with_key: | POST | `/api/v3/loan/repay` |
+| [getLoanRepayHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1985) | :closed_lock_with_key: | GET | `/api/v3/loan/repay-history` |
+| [loanRevisePledge()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1994) | :closed_lock_with_key: | POST | `/api/v3/loan/revise-pledge` |
+| [getLoanPledgeRateHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2003) | :closed_lock_with_key: | GET | `/api/v3/loan/pledge-rate-history` |
+| [getLoanDebts()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2012) | :closed_lock_with_key: | GET | `/api/v3/loan/debts` |
+| [getLoanReduces()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2019) | :closed_lock_with_key: | GET | `/api/v3/loan/reduces` |
+| [submitStrategyOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2034) | :closed_lock_with_key: | POST | `/api/v3/trade/place-strategy-order` |
+| [modifyStrategyOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2043) | :closed_lock_with_key: | POST | `/api/v3/trade/modify-strategy-order` |
+| [cancelStrategyOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2052) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-strategy-order` |
+| [getUnfilledStrategyOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2061) | :closed_lock_with_key: | GET | `/api/v3/trade/unfilled-strategy-orders` |
+| [getHistoryStrategyOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2070) | :closed_lock_with_key: | GET | `/api/v3/trade/history-strategy-orders` |
+| [createBrokerSubAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2091) | :closed_lock_with_key: | POST | `/api/v3/broker/create-sub` |
+| [getBrokerSubAccountList()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2103) | :closed_lock_with_key: | GET | `/api/v3/broker/sub-list` |
+| [modifyBrokerSubAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2115) | :closed_lock_with_key: | POST | `/api/v3/broker/modify-sub` |
+| [brokerSubWithdrawal()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2130) | :closed_lock_with_key: | POST | `/api/v3/broker/sub-withdrawal` |
+| [getBrokerSubDepositAddress()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2142) | :closed_lock_with_key: | POST | `/api/v3/broker/sub-deposit-address` |
+| [getBrokerAllSubDepositWithdrawal()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2154) | :closed_lock_with_key: | GET | `/api/v3/broker/all-sub-deposit-withdrawal` |
+| [getBrokerCommission()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2166) | :closed_lock_with_key: | GET | `/api/v3/broker/commission` |
+| [createBrokerSubApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2178) | :closed_lock_with_key: | POST | `/api/v3/broker/create-sub-apikey` |
+| [modifyBrokerSubApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2190) | :closed_lock_with_key: | POST | `/api/v3/broker/modify-sub-apikey` |
+| [deleteBrokerSubApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2206) | :closed_lock_with_key: | POST | `/api/v3/broker/delete-sub-apikey` |
+| [getBrokerSubApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2218) | :closed_lock_with_key: | GET | `/api/v3/broker/query-sub-apikey` |
+| [getP2pAdList()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2230) | :closed_lock_with_key: | GET | `/api/v3/p2p/ad-list` |
+| [getP2pExchangeRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2236) | :closed_lock_with_key: | GET | `/api/v3/p2p/exchange-rate` |
+| [simulateP2pFee()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2242) | :closed_lock_with_key: | POST | `/api/v3/p2p/fee-simulate` |
+| [getP2pAdLimit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2248) | :closed_lock_with_key: | GET | `/api/v3/p2p/ad-limit` |
+| [createP2pAd()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2254) | :closed_lock_with_key: | POST | `/api/v3/p2p/ad-create` |
+| [updateP2pAd()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2260) | :closed_lock_with_key: | POST | `/api/v3/p2p/ad-update` |
+| [operateP2pAd()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2264) | :closed_lock_with_key: | POST | `/api/v3/p2p/ad-operate` |
+| [getP2pAdInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2268) | :closed_lock_with_key: | GET | `/api/v3/p2p/ad-info` |
+| [getP2pMyAds()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2274) | :closed_lock_with_key: | GET | `/api/v3/p2p/my-ads` |
+| [getP2pPendingOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2280) | :closed_lock_with_key: | GET | `/api/v3/p2p/pending-orders` |
+| [getP2pAllOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2286) | :closed_lock_with_key: | GET | `/api/v3/p2p/all-orders` |
+| [getP2pOrderInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2292) | :closed_lock_with_key: | GET | `/api/v3/p2p/order-info` |
+| [confirmP2pOrderPayment()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2298) | :closed_lock_with_key: | POST | `/api/v3/p2p/order-pay` |
+| [releaseP2pOrderAsset()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2304) | :closed_lock_with_key: | POST | `/api/v3/p2p/order-release` |
+| [getP2pUserInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2310) | :closed_lock_with_key: | GET | `/api/v3/p2p/user-info` |
+| [getP2pCurrencies()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2314) | :closed_lock_with_key: | GET | `/api/v3/p2p/currencies` |
+| [getP2pPayMethods()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2318) | :closed_lock_with_key: | GET | `/api/v3/p2p/pay-method` |
+| [getP2pBalance()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2322) | :closed_lock_with_key: | GET | `/api/v3/p2p/balance` |
+| [getEarnEliteProducts()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2334) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-product` |
+| [getEarnEliteAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2338) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-assets` |
+| [getEarnEliteRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2342) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-records` |
+| [getEarnEliteSubscribeInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2348) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-subscribe-info` |
+| [subscribeEarnElite()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2354) | :closed_lock_with_key: | POST | `/api/v3/earn/elite-subscribe` |
+| [getEarnEliteSubscribeResult()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2360) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-subscribe-result` |
+| [getEarnEliteRedeemInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2366) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-redeem-info` |
+| [redeemEarnElite()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2372) | :closed_lock_with_key: | POST | `/api/v3/earn/elite-redeem` |
# websocket-api-client.ts
@@ -528,7 +580,7 @@ This client provides WebSocket API endpoints which allow for faster interactions
| Function | AUTH | HTTP Method | Endpoint |
| -------- | :------: | :------: | -------- |
-| [submitNewOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/websocket-api-client.ts#L79) | | WS | `place-order` |
-| [placeBatchOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/websocket-api-client.ts#L98) | | WS | `batch-place` |
-| [cancelOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/websocket-api-client.ts#L122) | | WS | `cancel-order` |
-| [cancelBatchOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/websocket-api-client.ts#L141) | | WS | `batch-cancel` |
\ No newline at end of file
+| [submitNewOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/websocket-api-client.ts#L79) | | WS | `place-order` |
+| [placeBatchOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/websocket-api-client.ts#L98) | | WS | `batch-place` |
+| [cancelOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/websocket-api-client.ts#L122) | | WS | `cancel-order` |
+| [cancelBatchOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/websocket-api-client.ts#L141) | | WS | `batch-cancel` |
\ No newline at end of file
diff --git a/examples/apidoc/RestClientV3/Account/get-eligible-loan-info.js b/examples/apidoc/RestClientV3/Account/get-eligible-loan-info.js
new file mode 100644
index 0000000..1a87d19
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Account/get-eligible-loan-info.js
@@ -0,0 +1,18 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getEligibleLoanInfo()
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Account/get-eligible-margin-tier.js b/examples/apidoc/RestClientV3/Account/get-eligible-margin-tier.js
new file mode 100644
index 0000000..aa13e22
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Account/get-eligible-margin-tier.js
@@ -0,0 +1,18 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getEligibleMarginTier()
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Account/get-eligible-symbols.js b/examples/apidoc/RestClientV3/Account/get-eligible-symbols.js
new file mode 100644
index 0000000..d732bc2
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Account/get-eligible-symbols.js
@@ -0,0 +1,18 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getEligibleSymbols()
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Copy-Trading/copy-trading-transfer.js b/examples/apidoc/RestClientV3/Copy-Trading/copy-trading-transfer.js
index a6c8b31..810f4da 100644
--- a/examples/apidoc/RestClientV3/Copy-Trading/copy-trading-transfer.js
+++ b/examples/apidoc/RestClientV3/Copy-Trading/copy-trading-transfer.js
@@ -13,6 +13,7 @@ client
type: 'in',
coin: 'USDT',
amount: '100',
+ inAccountType: 'funding,uta,otc',
})
.then((response) => {
console.log(response);
diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-current-followers.js b/examples/apidoc/RestClientV3/Copy-Trading/get-current-followers.js
new file mode 100644
index 0000000..46ca48d
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Copy-Trading/get-current-followers.js
@@ -0,0 +1,18 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getCopyFuturesCurrentFollowers()
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-history-followers.js b/examples/apidoc/RestClientV3/Copy-Trading/get-history-followers.js
new file mode 100644
index 0000000..422cb39
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Copy-Trading/get-history-followers.js
@@ -0,0 +1,18 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getCopyFuturesHistoryFollowers()
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-profit-details.js b/examples/apidoc/RestClientV3/Copy-Trading/get-profit-details.js
new file mode 100644
index 0000000..aad3cf8
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Copy-Trading/get-profit-details.js
@@ -0,0 +1,18 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getCopyFuturesProfitDetails()
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-profit-summary.js b/examples/apidoc/RestClientV3/Copy-Trading/get-profit-summary.js
new file mode 100644
index 0000000..f3c745e
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Copy-Trading/get-profit-summary.js
@@ -0,0 +1,18 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getCopyFuturesProfitSummary()
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Asset/get-account.js b/examples/apidoc/RestClientV3/Stock+/Asset/get-account.js
new file mode 100644
index 0000000..063e22f
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Asset/get-account.js
@@ -0,0 +1,18 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusAccount()
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Asset/get-cash-flow.js b/examples/apidoc/RestClientV3/Stock+/Asset/get-cash-flow.js
new file mode 100644
index 0000000..9afdd54
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Asset/get-cash-flow.js
@@ -0,0 +1,21 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusCashFlow({
+ startTime: '1650037563',
+ endTime: '1650747581',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Asset/get-stock-position.js b/examples/apidoc/RestClientV3/Stock+/Asset/get-stock-position.js
new file mode 100644
index 0000000..f035a3d
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Asset/get-stock-position.js
@@ -0,0 +1,20 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusStockPosition({
+ symbol: 'AAPL.US,MSTR.US',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Asset/get-transfer-records.js b/examples/apidoc/RestClientV3/Stock+/Asset/get-transfer-records.js
new file mode 100644
index 0000000..b5b79a9
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Asset/get-transfer-records.js
@@ -0,0 +1,18 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusTransferRecords()
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Asset/transfer.js b/examples/apidoc/RestClientV3/Stock+/Asset/transfer.js
new file mode 100644
index 0000000..4db770c
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Asset/transfer.js
@@ -0,0 +1,22 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .stockPlusTransfer({
+ coin: 'USDC',
+ amount: '100',
+ direction: 'in',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Market/Options/get-option-chain-info.js b/examples/apidoc/RestClientV3/Stock+/Market/Options/get-option-chain-info.js
new file mode 100644
index 0000000..04c126b
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Market/Options/get-option-chain-info.js
@@ -0,0 +1,21 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusOptionChainInfo({
+ symbol: 'AAPL.US',
+ expiryDate: '20220429',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Market/Options/get-option-expiry-date.js b/examples/apidoc/RestClientV3/Stock+/Market/Options/get-option-expiry-date.js
new file mode 100644
index 0000000..c5ce3f4
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Market/Options/get-option-expiry-date.js
@@ -0,0 +1,20 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusOptionExpiryDate({
+ symbol: 'AAPL.US',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Market/Options/get-option-quote.js b/examples/apidoc/RestClientV3/Stock+/Market/Options/get-option-quote.js
new file mode 100644
index 0000000..f89f1cb
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Market/Options/get-option-quote.js
@@ -0,0 +1,20 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusOptionQuote({
+ symbol: 'AAPL220429P162500.US',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Market/Options/get-option-volume.js b/examples/apidoc/RestClientV3/Stock+/Market/Options/get-option-volume.js
new file mode 100644
index 0000000..32901c4
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Market/Options/get-option-volume.js
@@ -0,0 +1,20 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusOptionVolume({
+ symbol: 'AAPL.US',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-candlestick.js b/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-candlestick.js
new file mode 100644
index 0000000..06cb47f
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-candlestick.js
@@ -0,0 +1,23 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusCandlestick({
+ symbol: 'AAPL.US',
+ period: 'Min_1',
+ count: '10',
+ adjustType: 'NoAdjust',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-depth.js b/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-depth.js
new file mode 100644
index 0000000..fc249d1
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-depth.js
@@ -0,0 +1,20 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusDepth({
+ symbol: 'AAPL.US',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-history-candlestick.js b/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-history-candlestick.js
new file mode 100644
index 0000000..6fbb1a8
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-history-candlestick.js
@@ -0,0 +1,23 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusHistoryCandlestick({
+ symbol: 'AAPL.US',
+ period: 'Min_1',
+ count: '10',
+ adjustType: 'NoAdjust',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-intraday.js b/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-intraday.js
new file mode 100644
index 0000000..e193276
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-intraday.js
@@ -0,0 +1,20 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusIntraday({
+ symbol: 'AAPL.US',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-quote.js b/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-quote.js
new file mode 100644
index 0000000..2786c58
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-quote.js
@@ -0,0 +1,20 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusQuote({
+ symbol: 'AAPL.US',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-static-info.js b/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-static-info.js
new file mode 100644
index 0000000..cc1d308
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-static-info.js
@@ -0,0 +1,20 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusStaticInfo({
+ symbol: 'AAPL.US',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-trade-detail.js b/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-trade-detail.js
new file mode 100644
index 0000000..b7fc3cb
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Market/equity-etf/get-trade-detail.js
@@ -0,0 +1,21 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusTradeDetail({
+ symbol: 'AAPL.US',
+ count: '10',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Trade/cancel-order.js b/examples/apidoc/RestClientV3/Stock+/Trade/cancel-order.js
new file mode 100644
index 0000000..f8e53da
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Trade/cancel-order.js
@@ -0,0 +1,21 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .cancelStockPlusOrder({
+ symbol: 'AAPL220429C150000.US',
+ orderId: '701276261045858304',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Trade/get-history-executions.js b/examples/apidoc/RestClientV3/Stock+/Trade/get-history-executions.js
new file mode 100644
index 0000000..8e535a0
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Trade/get-history-executions.js
@@ -0,0 +1,20 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusHistoryExecutions({
+ symbol: 'AAPL.US',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Trade/get-history-orders.js b/examples/apidoc/RestClientV3/Stock+/Trade/get-history-orders.js
new file mode 100644
index 0000000..60f189f
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Trade/get-history-orders.js
@@ -0,0 +1,20 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusHistoryOrders({
+ symbol: 'AAPL.US',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Trade/get-order-detail.js b/examples/apidoc/RestClientV3/Stock+/Trade/get-order-detail.js
new file mode 100644
index 0000000..16fea7d
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Trade/get-order-detail.js
@@ -0,0 +1,20 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusOrderDetail({
+ orderId: '701276261045858304',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Trade/get-today-executions.js b/examples/apidoc/RestClientV3/Stock+/Trade/get-today-executions.js
new file mode 100644
index 0000000..a4464f0
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Trade/get-today-executions.js
@@ -0,0 +1,20 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusTodayExecutions({
+ symbol: 'AAPL.US',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Trade/get-today-orders.js b/examples/apidoc/RestClientV3/Stock+/Trade/get-today-orders.js
new file mode 100644
index 0000000..09b83c1
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Trade/get-today-orders.js
@@ -0,0 +1,20 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getStockPlusTodayOrders({
+ symbol: 'AAPL.US',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Trade/modify-order.js b/examples/apidoc/RestClientV3/Stock+/Trade/modify-order.js
new file mode 100644
index 0000000..72c82b6
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Trade/modify-order.js
@@ -0,0 +1,22 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .modifyStockPlusOrder({
+ orderId: '701276261045858304',
+ quantity: '200',
+ price: '155.00',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Stock+/Trade/place-order.js b/examples/apidoc/RestClientV3/Stock+/Trade/place-order.js
new file mode 100644
index 0000000..57b0cb0
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Stock+/Trade/place-order.js
@@ -0,0 +1,26 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .placeStockPlusOrder({
+ symbol: 'AAPL.US',
+ orderType: 'LO',
+ side: 'Buy',
+ submittedQuantity: '100',
+ timeInForce: 'Day',
+ submittedPrice: '150.00',
+ outsideRth: 'RTHOnly',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Sub-Account/get-ratelimit-quota.js b/examples/apidoc/RestClientV3/Sub-Account/get-ratelimit-quota.js
new file mode 100644
index 0000000..188311d
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Sub-Account/get-ratelimit-quota.js
@@ -0,0 +1,20 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .getRateLimitQuota({
+ category: 'futures',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Sub-Account/set-ratelimit-quota.js b/examples/apidoc/RestClientV3/Sub-Account/set-ratelimit-quota.js
new file mode 100644
index 0000000..2f86546
--- /dev/null
+++ b/examples/apidoc/RestClientV3/Sub-Account/set-ratelimit-quota.js
@@ -0,0 +1,22 @@
+import { RestClientV3 } from 'bitget-api';
+// or, if require is preferred:
+// const { RestClientV3 } = require('bitget-api');
+
+const client = new RestClientV3({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+ apiPass: 'insert_api_pass_here',
+});
+
+client
+ .setRateLimitQuota({
+ category: 'futures',
+ uids: ['123456', '123457'],
+ quota: '100',
+ })
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClientV3/Trade/cancel-reality-order.js b/examples/apidoc/RestClientV3/Trade/cancel-reality-order.js
index b2d1d2e..9766a31 100644
--- a/examples/apidoc/RestClientV3/Trade/cancel-reality-order.js
+++ b/examples/apidoc/RestClientV3/Trade/cancel-reality-order.js
@@ -10,6 +10,7 @@ const client = new RestClientV3({
client
.cancelRealityOrder({
+ category: 'SPOT',
symbol: 'rAAPLUSDT',
orderId: '121211212122',
})
diff --git a/examples/apidoc/RestClientV3/Trade/place-reality-order.js b/examples/apidoc/RestClientV3/Trade/place-reality-order.js
index 8fd6c37..76b1d0b 100644
--- a/examples/apidoc/RestClientV3/Trade/place-reality-order.js
+++ b/examples/apidoc/RestClientV3/Trade/place-reality-order.js
@@ -10,6 +10,7 @@ const client = new RestClientV3({
client
.placeRealityOrder({
+ category: 'SPOT',
symbol: 'rAAPLUSDT',
side: 'buy',
orderType: 'limit',
diff --git a/llms.txt b/llms.txt
index a7dc479..5091c9c 100644
--- a/llms.txt
+++ b/llms.txt
@@ -48,6 +48,8 @@ Notes:
================================================================
Directory Structure
================================================================
+docs/
+ BITGET_SDK_QUICKSTART_GUIDE.md
examples/
auth/
fasterHmacSign.ts
@@ -90,6 +92,7 @@ src/
copytrading.ts
earn.ts
futures.ts
+ instloan.ts
margin.ts
spot.ts
v3/
@@ -100,6 +103,7 @@ src/
loan.ts
p2p.ts
public.ts
+ stockplus.ts
strategy.ts
trade.ts
shared.ts
@@ -110,6 +114,7 @@ src/
copy-trading.ts
earn.ts
futures.ts
+ instloan.ts
margin.ts
spot.ts
v3/
@@ -120,6 +125,7 @@ src/
loan.ts
p2p.ts
public.ts
+ stockplus.ts
strategy.ts
trade.ts
websockets/
@@ -745,535 +751,377 @@ export interface GetMarginLiquidationOrdersRequestV2 {
}
================
-File: src/types/request/v2/spot.ts
+File: src/types/request/shared.ts
================
-type SpotKlineIntervalV2 =
- | '1min'
- | '5min'
- | '15min'
- | '30min'
- | '1h'
- | '4h'
- | '6h'
- | '12h'
- | '1day'
- | '3day'
- | '1week'
- | '1M'
- | '6Hutc'
- | '12Hutc'
- | '1Dutc'
- | '3Dutc'
- | '1Wutc'
- | '1Mutc';
-⋮----
-export interface SpotCandlesRequestV2 {
- symbol: string;
- granularity: SpotKlineIntervalV2;
- startTime?: string;
- endTime?: string;
+/** Pagination */
+export interface Pagination {
+ /** Time after */
+ after?: string;
+ /** Time before */
+ before?: string;
+ /** Elements per page */
limit?: string;
}
⋮----
-export interface SpotHistoricCandlesRequestV2 {
- symbol: string;
- granularity: SpotKlineIntervalV2;
- endTime?: string;
- limit?: string;
-}
+/** Time after */
⋮----
-export interface SpotHistoricTradesRequestV2 {
+/** Time before */
+⋮----
+/** Elements per page */
+⋮----
+export type OrderTimeInForce = 'normal' | 'post_only' | 'fok' | 'ioc';
+⋮----
+export interface GetHistoricTradesParams {
symbol: string;
limit?: string;
- idLessThan?: string;
+ tradeId?: string;
startTime?: string;
endTime?: string;
}
⋮----
/**
- *
- * * Spot | Trade
- *
+ * The margin type, used directly in building the endpoint URL
*/
+export type MarginType = 'crossed' | 'isolated';
⋮----
-export type SpotOrderSideV2 = 'buy' | 'sell';
-⋮----
-export type SpotOrderTypeV2 = 'limit' | 'market';
-⋮----
-export type SpotOrderForceV2 = 'gtc' | 'post_only' | 'fok' | 'ioc';
+export type FuturesProductTypeV2 =
+ | 'USDT-FUTURES'
+ | 'COIN-FUTURES'
+ | 'USDC-FUTURES'
+ | 'SUSDT-FUTURES'
+ | 'SCOIN-FUTURES'
+ | 'SUSDC-FUTURES';
⋮----
-export type SpotTPSLTypeV2 = 'normal' | 'tpsl';
+export type FuturesPlanTypeV2 =
+ | 'profit_plan'
+ | 'loss_plan'
+ | 'moving_plan'
+ | 'pos_profit'
+ | 'pos_loss';
+
+================
+File: src/types/response/v2/copy-trading.ts
+================
+/**
+ *
+ *
+ * Copy Trading | Future copy trading | Trader Api
+ *
+ *
+ */
⋮----
-export type SpotSTPModeV2 =
- | 'none'
- | 'cancel_taker'
- | 'cancel_maker'
- | 'cancel_both';
+export interface CTFuturesTraderCurrentOrderV2 {
+ trackingNo: string;
+ openOrderId: string;
+ symbol: string;
+ posSide: string;
+ openLeverage: string;
+ openPriceAvg: string;
+ openTime: string;
+ openSize: string;
+ presetStopSurplusPrice: string;
+ presetStopLossPrice: string;
+ openFee: string;
+ followCount: string;
+}
⋮----
-export type SpotBatchModeV2 = 'single' | 'multiple';
+export interface CTFuturesTraderCurrentOrdersV2 {
+ trackingList: CTFuturesTraderCurrentOrderV2[];
+ endId: string;
+}
⋮----
-export interface SpotOrderRequestV2 {
+export interface CTFuturesTraderHistoryOrderV2 {
+ trackingNo: string;
symbol: string;
- side: SpotOrderSideV2;
- orderType: SpotOrderTypeV2;
- force: SpotOrderForceV2;
- price?: string;
- size: string;
- clientOid?: string;
- triggerPrice?: string;
- tpslType?: SpotTPSLTypeV2;
- requestTime?: string;
- receiveWindow?: string;
- stpMode?: SpotSTPModeV2;
- presetTakeProfitPrice?: string;
- executeTakeProfitPrice?: string;
- presetStopLossPrice?: string;
- executeStopLossPrice?: string;
+ openOrderId: string;
+ closeOrderId: string;
+ productType: string;
+ posSide: string;
+ openLeverage: string;
+ openPriceAvg: string;
+ openTime: string;
+ openSize: string;
+ closeSize: string;
+ closeTime: string;
+ closePriceAvg: string;
+ stopType: string;
+ achievedPL: string;
+ openFee: string;
+ closeFee: string;
+ cTime: string;
}
⋮----
-export interface SpotCancelandSubmitOrderRequestV2 {
- symbol: string;
- price: string;
- size: string;
- orderId?: string;
- clientOid?: string;
- newClientOid?: string;
- presetTakeProfitPrice?: string;
- executeTakeProfitPrice?: string;
- presetStopLossPrice?: string;
- executeStopLossPrice?: string;
+export interface CTFuturesTraderHistoryOrderV2 {
+ trackingList: CTFuturesTraderHistoryOrderV2[];
+ endId: string;
}
⋮----
-export interface SpotCancelOrderRequestV2 {
- symbol: string;
- tpslType?: SpotTPSLTypeV2;
- orderId?: string;
- clientOid?: string;
+export interface CTRateCTimeV2 {
+ rate: string;
+ ctime: string;
}
⋮----
-export interface SpotBatchOrderRequestItemV2 {
- symbol?: string;
- side: SpotOrderSideV2;
- orderType: SpotOrderTypeV2;
- force: SpotOrderForceV2;
- price?: string;
- size: string;
- clientOid?: string;
- stpMode?: SpotSTPModeV2;
- presetTakeProfitPrice?: string;
- executeTakeProfitPrice?: string;
- presetStopLossPrice?: string;
- executeStopLossPrice?: string;
+export interface CTAmountCTimeV2 {
+ amount: string;
+ ctime: string;
}
⋮----
-export interface SpotBatchOrderRequestV2 {
- symbol?: string;
- batchMode?: SpotBatchModeV2;
- orderList: SpotBatchOrderRequestItemV2[];
+export interface CTFuturesTraderTotalOrderSummaryV2 {
+ roi: string;
+ tradingOrderNum: string;
+ totalFollowerNum: string;
+ currentFollowerNum: string;
+ totalpl: string;
+ gainNum: string;
+ lossNum: string;
+ winRate: string;
+ tradingPairsAvailableList: string[];
+ lastWeekRoiList: CTRateCTimeV2[];
+ lastWeekProfitList: CTAmountCTimeV2[];
+ lastMonthRoiList: CTRateCTimeV2[];
+ lastMonthProfitList: CTAmountCTimeV2[];
+ totalEquity: string;
}
⋮----
-export interface SpotBatchCancelOrderRequestV2 {
- symbol?: string;
- batchMode?: SpotBatchModeV2;
- orderList: {
- symbol?: string;
- orderId?: string;
- clientOid?: string;
- }[];
+export interface CTFuturesTraderProfitHistoryItemV2 {
+ coin: string;
+ profitCount: string;
+ lastProfitTime: string;
}
⋮----
-export interface GetSpotOrderInfoRequestV2 {
- orderId?: string;
- clientOid?: string;
- requestTime?: string;
- receiveWindow?: string;
+export interface CTFuturesTraderHistoryProfitSummaryV2 {
+ profitSummary: {
+ yesterdayProfit: string;
+ sumProfit: string;
+ waitProfit: string;
+ yesterdayTime: string;
+ };
+ profitHistoryList: CTFuturesTraderProfitHistoryItemV2[];
}
⋮----
-export interface GetSpotOpenOrdersRequestV2 {
- symbol?: string;
- startTime?: string;
- endTime?: string;
- idLessThan?: string;
- limit?: string;
- orderId?: string;
- tpslType?: SpotTPSLTypeV2;
- requestTime?: string;
- receiveWindow?: string;
+export interface CTFuturesTraderProfitShare {
+ profitId: string;
+ coin: string;
+ profit: string;
+ nickName: string;
+ profitTime: string;
}
⋮----
-export interface GetSpotHistoryOrdersRequestV2 {
- symbol?: string;
- startTime?: string;
- endTime?: string;
- idLessThan?: string;
- limit?: string;
- orderId?: string;
- tpslType?: SpotTPSLTypeV2;
- requestTime?: string;
- receiveWindow?: string;
+export interface CTFuturesTraderProfitShareHistoryV2 {
+ profitList: CTFuturesTraderProfitShare[];
+ endId: string;
}
⋮----
-export interface GetSpotFillsRequestV2 {
+export interface CTFuturesTraderSymbolSettingsV2 {
symbol: string;
- orderId?: string;
- startTime?: string;
- endTime?: string;
- limit?: string;
- idLessThan?: string;
+ openTrader: string;
+ minOpenCount: string;
+ maxLeverage: string;
+ stopSurplusRatio: string;
+ stopLossRatio: string;
+}
+⋮----
+export interface CTFuturesTraderMyFollowersV2 {
+ accountEquity: string;
+ isRemove: string;
+ followerHeadPic: string;
+ followerName: string;
+ followerUid: string;
+ followerTime: string;
}
⋮----
/**
*
- * * Spot | Trigger Orders
+ *
+ * Copy Trading | Future copy trading | Follower Api
+ *
*
*/
⋮----
-export type SpotPlanTypeV2 = 'amount' | 'total';
-⋮----
-export type SpotTriggerTypeV2 = 'fill_price' | 'mark_price';
+export interface CTFuturesFollowerCurrentOrdersV2 {
+ trackingNo: string;
+ traderName: string;
+ openOrderId: string;
+ closeOrderId: string;
+ traderId: string;
+ symbol: string;
+ posSide: string;
+ openLeverage: string;
+ openAvgPrice: string;
+ openTime: string;
+ openSize: string;
+ closeAvgPrice: string;
+ closeSize: string;
+ openMarginSz: string;
+ closeTime: string;
+}
⋮----
-export interface SpotPlanOrderRequestV2 {
+export interface CTFuturesFollowerHistoryOrderV2 {
+ trackingNo: string;
+ posSide: string;
+ openLeverage: string;
+ openSize: string;
+ closeSize: string;
+ openPriceAvg: string;
+ closePriceAvg: string;
+ achievedPL: string;
+ openFee: string;
+ closeFee: string;
symbol: string;
- side: SpotOrderSideV2;
- triggerPrice: string;
- orderType: SpotOrderTypeV2;
- executePrice?: string;
- planType?: SpotPlanTypeV2;
- size: string;
- triggerType: SpotTriggerTypeV2;
- clientOid?: string;
- force?: SpotOrderForceV2;
- stpMode?: SpotSTPModeV2;
+ profitRate: string;
+ netProfit: string;
+ openOrderId: string;
+ closeOrderId: string;
+ openTime: string;
+ closeTime: string;
+ traderId: string;
+ productType: string;
}
⋮----
-export interface SpotModifyPlanOrderRequestV2 {
- orderId?: string;
- clientOid?: string;
- triggerPrice: string;
- orderType: SpotOrderTypeV2;
- executePrice?: string;
- size: string;
+export interface CTFuturesFollowerHistoryOrdersV2 {
+ trackingList: CTFuturesFollowerHistoryOrderV2[];
+ endId: string;
}
⋮----
-export interface GetSpotCurrentPlanOrdersRequestV2 {
+export interface CTFuturesFollowerSettingV2 {
symbol: string;
- limit?: string;
- idLessThan?: string;
- startTime?: string;
- endTime?: string;
+ productType: string;
+ marginType: string;
+ marginCoin: string;
+ leverType: string;
+ longLeverage: string;
+ shortLeverage: string;
+ traceType: string;
}
⋮----
-export interface GetSpotHistoryPlanOrdersRequestV2 {
- symbol: string;
- startTime: string;
- endTime: string;
- limit?: string;
+export interface CTFuturesFollowerSettingsV2 {
+ followerEnable: string;
+ detailList: CTFuturesFollowerSettingV2[];
+}
+⋮----
+export interface CTFuturesFollowerMyTradersV2 {
+ certificationType: string;
+ traderId: string;
+ traderName: string;
+ maxFollowLimit: string;
+ followCount: string;
+ traceTotalMarginAmount: string;
+ traceTotalNetProfit: string;
+ traceTotalProfit: string;
+ currentTradingPairs: string[];
+ followerTime: string;
+ bgbMaxFollowLimit: string;
+ bgbFollowCount: string;
}
⋮----
/**
*
- * * Spot | Account
+ *
+ * Copy Trading | Spot copy trading | Trader api
+ *
*
*/
⋮----
-export type SpotBillGroupTypeV2 =
- | 'deposit'
- | 'withdraw'
- | 'transaction'
- | 'transfer'
- | 'other';
-⋮----
-export type SpotBusinessTypeV2 =
- | 'deposit'
- | 'withdraw'
- | 'buy'
- | 'sell'
- | 'deduction of handling fee'
- | 'transfer-in'
- | 'transfer-out'
- | 'rebate rewards'
- | 'airdrop rewards'
- | 'USDT contract rewards'
- | 'mix contract rewards'
- | 'system lock'
- | 'user lock';
-⋮----
-export type SpotAccountTypeV2 =
- | 'spot'
- | 'p2p'
- | 'coin_futures'
- | 'usdt_futures'
- | 'usdc_futures'
- | 'crossed_margin'
- | 'isolated_margin';
-⋮----
-export interface GetSpotAccountBillsRequestV2 {
- coin?: string;
- groupType?: SpotBillGroupTypeV2;
- businessType?: SpotBusinessTypeV2;
- startTime?: string;
- endTime?: string;
- limit?: string;
- idLessThan?: string;
+export interface CTSpotTraderProfitSummaryV2 {
+ profitSummarys: {
+ yesterdayProfit: string;
+ yesterdayTime: string;
+ sumProfit: string;
+ waitProfit: string;
+ };
+ profitHistoryList: {
+ coin: string;
+ profitCount: string;
+ lastProfitTime: string;
+ historysByDateList: {
+ profit: string;
+ profitTime: string;
+ }[];
+ }[];
}
⋮----
-export interface SpotTransferRequestV2 {
- fromType: SpotAccountTypeV2;
- toType: SpotAccountTypeV2;
- amount: string;
+export interface CTSpotTraderHistoryProfitShareItemV2 {
+ profitId: string;
coin: string;
- symbol: string;
- clientOid?: string;
+ distributeRatio: string;
+ profit: string;
+ followerName: string;
+ profitTime: string;
}
⋮----
-export interface SpotSubAccountTransferRequestV2 {
- fromType: SpotAccountTypeV2;
- toType: SpotAccountTypeV2;
- amount: string;
- coin: string;
- symbol?: string;
- clientOid?: string;
- fromUserId: string;
- toUserId: string;
+export interface CTSpotTraderHistoryProfitSharingV2 {
+ endId: string;
+ profitList: CTSpotTraderHistoryProfitShareItemV2[];
}
⋮----
-export interface SpotWithdrawalRequestV2 {
+export interface CTSpotTraderUnrealizedProfitV2 {
+ distributeRatio: string;
coin: string;
- transferType: 'on_chain' | 'internal_transfer';
- address: string;
- chain?: string;
- innerToType?: 'email' | 'mobile' | 'uid';
- areaCode?: string;
- tag?: string;
- size: string;
- remark?: string;
- clientOid?: string;
-}
-⋮----
-export interface SpotMainSubTransferRecordRequestV2 {
- coin?: string;
- role?: 'initiator' | 'receiver';
- subUid?: string;
- startTime?: string;
- endTime?: string;
- clientOid?: string;
- limit?: string;
- idLessThan?: string;
+ profit: string;
+ followerName: string;
}
⋮----
-export interface GetSpotTransferRecordRequestV2 {
- coin: string;
- fromType: SpotAccountTypeV2;
- startTime?: string;
- endTime?: string;
- clientOid?: string;
- limit?: string;
- idLessThan?: string;
+export interface CTSpotTraderTotalOrderDetailV2 {
+ totalFollowerNum: string;
+ currentFollowerNum: string;
+ maxFollowerNum: string;
+ tradingOrderNum: string;
+ totalpl: string;
+ gainNum: string;
+ lossNum: string;
+ totalEquity: string;
+ winRate: string;
+ lastWeekRoiList: CTAmountCTimeV2[];
+ lastMonthRoiList: CTRateCTimeV2[];
+ lastWeekProfitList: CTAmountCTimeV2[];
+ lastMonthProfitList: CTAmountCTimeV2[];
}
⋮----
-export interface GetSpotSubAccountDepositRecordRequestV2 {
- subUid: string;
- coin?: string;
- startTime?: string;
- endTime?: string;
- idLessThan?: string;
- limit?: string;
-}
-⋮----
-export interface GetSpotWithdrawalRecordRequestV2 {
- coin?: string;
- clientOid?: string;
- startTime: string;
- endTime: string;
- idLessThan?: string;
- orderId?: string;
- limit?: string;
-}
-⋮----
-export interface GetSpotDepositRecordRequestV2 {
- coin?: string;
- orderId?: string;
- startTime: string;
- endTime: string;
- idLessThan?: string;
- limit?: string;
-}
-
-================
-File: src/types/request/shared.ts
-================
-/** Pagination */
-export interface Pagination {
- /** Time after */
- after?: string;
- /** Time before */
- before?: string;
- /** Elements per page */
- limit?: string;
-}
-⋮----
-/** Time after */
-⋮----
-/** Time before */
-⋮----
-/** Elements per page */
-⋮----
-export type OrderTimeInForce = 'normal' | 'post_only' | 'fok' | 'ioc';
-⋮----
-export interface GetHistoricTradesParams {
- symbol: string;
- limit?: string;
- tradeId?: string;
- startTime?: string;
- endTime?: string;
-}
-⋮----
-/**
- * The margin type, used directly in building the endpoint URL
- */
-export type MarginType = 'crossed' | 'isolated';
-⋮----
-export type FuturesProductTypeV2 =
- | 'USDT-FUTURES'
- | 'COIN-FUTURES'
- | 'USDC-FUTURES'
- | 'SUSDT-FUTURES'
- | 'SCOIN-FUTURES'
- | 'SUSDC-FUTURES';
-⋮----
-export type FuturesPlanTypeV2 =
- | 'profit_plan'
- | 'loss_plan'
- | 'moving_plan'
- | 'pos_profit'
- | 'pos_loss';
-
-================
-File: src/types/response/v2/copy-trading.ts
-================
-/**
- *
- *
- * Copy Trading | Future copy trading | Trader Api
- *
- *
- */
-⋮----
-export interface CTFuturesTraderCurrentOrderV2 {
+export interface CTSpotTraderHistoryOrderV2 {
trackingNo: string;
- openOrderId: string;
+ fillSize: string;
+ buyPrice: string;
+ sellPrice: string;
+ achievedPL: string;
+ buyTime: string;
+ sellTime: string;
+ buyFee: string;
+ sellFee: string;
+ achievedPLR: string;
symbol: string;
- posSide: string;
- openLeverage: string;
- openPriceAvg: string;
- openTime: string;
- openSize: string;
- presetStopSurplusPrice: string;
- presetStopLossPrice: string;
- openFee: string;
+ netProfit: string;
followCount: string;
}
-⋮----
-export interface CTFuturesTraderCurrentOrdersV2 {
- trackingList: CTFuturesTraderCurrentOrderV2[];
+export interface CTSpotTraderHistoryOrdersV2 {
endId: string;
+ trackingList: CTSpotTraderHistoryOrderV2[];
}
⋮----
-export interface CTFuturesTraderHistoryOrderV2 {
+export interface CTSpotTraderCurrentTrackingOrderV2 {
trackingNo: string;
+ orderId: string;
+ buyFillSize: string;
+ buyDelegateSize: string;
+ buyPrice: string;
+ unrealizedPL: string;
+ buyTime: string;
+ buyFee: string;
+ unrealizedPLR: string;
symbol: string;
- openOrderId: string;
- closeOrderId: string;
- productType: string;
- posSide: string;
- openLeverage: string;
- openPriceAvg: string;
- openTime: string;
- openSize: string;
- closeSize: string;
- closeTime: string;
- closePriceAvg: string;
- stopType: string;
- achievedPL: string;
- openFee: string;
- closeFee: string;
- cTime: string;
-}
-⋮----
-export interface CTFuturesTraderHistoryOrderV2 {
- trackingList: CTFuturesTraderHistoryOrderV2[];
- endId: string;
-}
-⋮----
-export interface CTRateCTimeV2 {
- rate: string;
- ctime: string;
-}
-⋮----
-export interface CTAmountCTimeV2 {
- amount: string;
- ctime: string;
-}
-⋮----
-export interface CTFuturesTraderTotalOrderSummaryV2 {
- roi: string;
- tradingOrderNum: string;
- totalFollowerNum: string;
- currentFollowerNum: string;
- totalpl: string;
- gainNum: string;
- lossNum: string;
- winRate: string;
- tradingPairsAvailableList: string[];
- lastWeekRoiList: CTRateCTimeV2[];
- lastWeekProfitList: CTAmountCTimeV2[];
- lastMonthRoiList: CTRateCTimeV2[];
- lastMonthProfitList: CTAmountCTimeV2[];
- totalEquity: string;
-}
-⋮----
-export interface CTFuturesTraderProfitHistoryItemV2 {
- coin: string;
- profitCount: string;
- lastProfitTime: string;
-}
-⋮----
-export interface CTFuturesTraderHistoryProfitSummaryV2 {
- profitSummary: {
- yesterdayProfit: string;
- sumProfit: string;
- waitProfit: string;
- yesterdayTime: string;
- };
- profitHistoryList: CTFuturesTraderProfitHistoryItemV2[];
-}
-⋮----
-export interface CTFuturesTraderProfitShare {
- profitId: string;
- coin: string;
- profit: string;
- nickName: string;
- profitTime: string;
+ stopLossPrice: string | null;
+ stopSurplusPrice: string | null;
+ followCount: string;
}
⋮----
-export interface CTFuturesTraderProfitShareHistoryV2 {
- profitList: CTFuturesTraderProfitShare[];
+export interface CTSpotTraderCurrentTrackingOrdersV2 {
endId: string;
+ trackingList: CTSpotTraderCurrentTrackingOrderV2[];
}
⋮----
-export interface CTFuturesTraderSymbolSettingsV2 {
- symbol: string;
- openTrader: string;
- minOpenCount: string;
- maxLeverage: string;
- stopSurplusRatio: string;
- stopLossRatio: string;
-}
-⋮----
-export interface CTFuturesTraderMyFollowersV2 {
+export interface CTSpotTraderFollowerListV2 {
accountEquity: string;
isRemove: string;
- followerHeadPic: string;
+ followerHeadPic: string | null;
followerName: string;
followerUid: string;
followerTime: string;
@@ -1282,230 +1130,33 @@ export interface CTFuturesTraderMyFollowersV2 {
/**
*
*
- * Copy Trading | Future copy trading | Follower Api
+ * Copy Trading | Spot copy trading | Follower api
*
*
*/
⋮----
-export interface CTFuturesFollowerCurrentOrdersV2 {
- trackingNo: string;
+export interface CTSpotFollowerMyTraderV2 {
+ certificationType: string;
+ traceTotalAmount: string;
+ traceTotalNetProfit: string;
+ traceTotalProfit: string;
traderName: string;
- openOrderId: string;
- closeOrderId: string;
traderId: string;
- symbol: string;
- posSide: string;
- openLeverage: string;
- openAvgPrice: string;
- openTime: string;
- openSize: string;
- closeAvgPrice: string;
- closeSize: string;
- openMarginSz: string;
- closeTime: string;
+ maxFollowLimit: string;
+ bgbMaxFollowLimit: string;
+ followCount: string;
+ bgbFollowCount: string;
+ followerTime: string;
}
⋮----
-export interface CTFuturesFollowerHistoryOrderV2 {
- trackingNo: string;
- posSide: string;
- openLeverage: string;
- openSize: string;
- closeSize: string;
- openPriceAvg: string;
- closePriceAvg: string;
- achievedPL: string;
- openFee: string;
- closeFee: string;
- symbol: string;
- profitRate: string;
- netProfit: string;
- openOrderId: string;
- closeOrderId: string;
- openTime: string;
- closeTime: string;
- traderId: string;
- productType: string;
-}
-⋮----
-export interface CTFuturesFollowerHistoryOrdersV2 {
- trackingList: CTFuturesFollowerHistoryOrderV2[];
- endId: string;
-}
-⋮----
-export interface CTFuturesFollowerSettingV2 {
- symbol: string;
- productType: string;
- marginType: string;
- marginCoin: string;
- leverType: string;
- longLeverage: string;
- shortLeverage: string;
- traceType: string;
-}
-⋮----
-export interface CTFuturesFollowerSettingsV2 {
- followerEnable: string;
- detailList: CTFuturesFollowerSettingV2[];
-}
-⋮----
-export interface CTFuturesFollowerMyTradersV2 {
- certificationType: string;
- traderId: string;
- traderName: string;
- maxFollowLimit: string;
- followCount: string;
- traceTotalMarginAmount: string;
- traceTotalNetProfit: string;
- traceTotalProfit: string;
- currentTradingPairs: string[];
- followerTime: string;
- bgbMaxFollowLimit: string;
- bgbFollowCount: string;
-}
-⋮----
-/**
- *
- *
- * Copy Trading | Spot copy trading | Trader api
- *
- *
- */
-⋮----
-export interface CTSpotTraderProfitSummaryV2 {
- profitSummarys: {
- yesterdayProfit: string;
- yesterdayTime: string;
- sumProfit: string;
- waitProfit: string;
- };
- profitHistoryList: {
- coin: string;
- profitCount: string;
- lastProfitTime: string;
- historysByDateList: {
- profit: string;
- profitTime: string;
- }[];
- }[];
-}
-⋮----
-export interface CTSpotTraderHistoryProfitShareItemV2 {
- profitId: string;
- coin: string;
- distributeRatio: string;
- profit: string;
- followerName: string;
- profitTime: string;
-}
-⋮----
-export interface CTSpotTraderHistoryProfitSharingV2 {
- endId: string;
- profitList: CTSpotTraderHistoryProfitShareItemV2[];
-}
-⋮----
-export interface CTSpotTraderUnrealizedProfitV2 {
- distributeRatio: string;
- coin: string;
- profit: string;
- followerName: string;
-}
-⋮----
-export interface CTSpotTraderTotalOrderDetailV2 {
- totalFollowerNum: string;
- currentFollowerNum: string;
- maxFollowerNum: string;
- tradingOrderNum: string;
- totalpl: string;
- gainNum: string;
- lossNum: string;
- totalEquity: string;
- winRate: string;
- lastWeekRoiList: CTAmountCTimeV2[];
- lastMonthRoiList: CTRateCTimeV2[];
- lastWeekProfitList: CTAmountCTimeV2[];
- lastMonthProfitList: CTAmountCTimeV2[];
-}
-⋮----
-export interface CTSpotTraderHistoryOrderV2 {
- trackingNo: string;
- fillSize: string;
- buyPrice: string;
- sellPrice: string;
- achievedPL: string;
- buyTime: string;
- sellTime: string;
- buyFee: string;
- sellFee: string;
- achievedPLR: string;
- symbol: string;
- netProfit: string;
- followCount: string;
-}
-export interface CTSpotTraderHistoryOrdersV2 {
- endId: string;
- trackingList: CTSpotTraderHistoryOrderV2[];
-}
-⋮----
-export interface CTSpotTraderCurrentTrackingOrderV2 {
- trackingNo: string;
- orderId: string;
- buyFillSize: string;
- buyDelegateSize: string;
- buyPrice: string;
- unrealizedPL: string;
- buyTime: string;
- buyFee: string;
- unrealizedPLR: string;
- symbol: string;
- stopLossPrice: string | null;
- stopSurplusPrice: string | null;
- followCount: string;
-}
-⋮----
-export interface CTSpotTraderCurrentTrackingOrdersV2 {
- endId: string;
- trackingList: CTSpotTraderCurrentTrackingOrderV2[];
-}
-⋮----
-export interface CTSpotTraderFollowerListV2 {
- accountEquity: string;
- isRemove: string;
- followerHeadPic: string | null;
- followerName: string;
- followerUid: string;
- followerTime: string;
-}
-⋮----
-/**
- *
- *
- * Copy Trading | Spot copy trading | Follower api
- *
- *
- */
-⋮----
-export interface CTSpotFollowerMyTraderV2 {
- certificationType: string;
- traceTotalAmount: string;
- traceTotalNetProfit: string;
- traceTotalProfit: string;
- traderName: string;
- traderId: string;
- maxFollowLimit: string;
- bgbMaxFollowLimit: string;
- followCount: string;
- bgbFollowCount: string;
- followerTime: string;
-}
-⋮----
-export interface CTSpotFollowerMyTradersV2 {
- resultList: CTSpotFollowerMyTraderV2[];
-}
-⋮----
-export interface CTSpotFollowerTradeSettingV2 {
- maxTraceAmount: string;
- stopLossRation: string;
- stopSurplusRation: string;
+export interface CTSpotFollowerMyTradersV2 {
+ resultList: CTSpotFollowerMyTraderV2[];
+}
+⋮----
+export interface CTSpotFollowerTradeSettingV2 {
+ maxTraceAmount: string;
+ stopLossRation: string;
+ stopSurplusRation: string;
symbol: string;
traceType: string;
}
@@ -1891,110 +1542,153 @@ export interface WSAPIPlaceOrderResponseV3 {
}
================
-File: src/types/websockets/ws-events.ts
+File: src/websocket-api-client.ts
================
-export interface MessageEventLike {
- target: WebSocket;
- type: 'message';
- data: string;
-}
-⋮----
-export function isMessageEvent(msg: unknown): msg is MessageEventLike
-⋮----
-export interface WsBaseEvent {
- action: TAction;
- arg: unknown;
- data: TData[];
-}
+import { CancelOrderRequestV3 } from './types/request/v3/trade.js';
+import { CancelOrderResponseV3 } from './types/response/v3/trade.js';
+import { WSAPIResponse } from './types/websockets/ws-api.js';
+import { WSAPIPlaceOrderRequestV3 } from './types/websockets/ws-api-request.js';
+import { WSAPIPlaceOrderResponseV3 } from './types/websockets/ws-api-response.js';
+import {
+ BitgetInstTypeV3,
+ WSClientConfigurableOptions,
+} from './types/websockets/ws-general.js';
+import { DefaultLogger } from './util/logger.js';
+import { WS_KEY_MAP } from './util/websocket-util.js';
+import { WebsocketClientV3 } from './websocket-client-v3.js';
⋮----
-export interface WsSnapshotChannelEvent extends WsBaseEvent<'snapshot'> {
- arg: {
- instType: string;
- channel: string;
- instId: string;
- };
+/**
+ * Configurable options specific to only the REST-like WebsocketAPIClient
+ */
+export interface WSAPIClientConfigurableOptions {
+ /**
+ * Default: true
+ *
+ * Attach default event listeners, which will console log any high level
+ * events (opened/reconnecting/reconnected/etc).
+ *
+ * If you disable this, you should set your own event listeners
+ * on the embedded WS Client `wsApiClient.getWSClient().on(....)`.
+ */
+ attachEventListeners: boolean;
}
⋮----
-export interface WsSnapshotAccountEvent extends WsBaseEvent<'snapshot'> {
- arg: {
- instType: string;
- channel: 'account';
- instId: string;
- };
-}
+/**
+ * Default: true
+ *
+ * Attach default event listeners, which will console log any high level
+ * events (opened/reconnecting/reconnected/etc).
+ *
+ * If you disable this, you should set your own event listeners
+ * on the embedded WS Client `wsApiClient.getWSClient().on(....)`.
+ */
⋮----
-export interface WsSnapshotPositionsEvent extends WsBaseEvent<'snapshot'> {
- arg: {
- instType: string;
- channel: 'positions';
- instId: string;
- };
-}
+/**
+ * This is a minimal Websocket API wrapper around the WebsocketClient.
+ *
+ * Note: You can also directly use the sendWSAPIRequest() method to make WS API calls, but some
+ * may find the below methods slightly more intuitive.
+ *
+ * Refer to the WS API promises example for a more detailed example on using sendWSAPIRequest() directly:
+ * https://github.com/tiagosiebler/bitget-api/blob/master/examples/V3/ws-api-trade-raw.ts
+ */
+export class WebsocketAPIClient
⋮----
-export interface WsAccountSnapshotDataUMCBL {
- marginCoin: string;
- locked: string;
- available: string;
- maxOpenPosAvailable: string;
- maxTransferOut: string;
- equity: string;
- usdtEquity: string;
-}
+constructor(
+ options?: WSClientConfigurableOptions &
+ Partial,
+ logger?: DefaultLogger,
+)
⋮----
-export interface WsAccountSnapshotUMCBL extends WsBaseEvent<'snapshot'> {
- arg: {
- instType: 'umcbl';
- channel: 'account';
- instId: string;
- };
- data: WsAccountSnapshotDataUMCBL[];
-}
+public getWSClient(): WebsocketClientV3
⋮----
-export interface WsPositionSnapshotDataUMCBL {
- posId: string;
- instId: string;
- instName: string;
- marginCoin: string;
- margin: string;
- marginMode: string;
- holdSide: string;
- holdMode: string;
- total: string;
- available: string;
- locked: string;
- averageOpenPrice: string;
- leverage: number;
- achievedProfits: string;
- upl: string;
- uplRate: string;
- liqPx: string;
- keepMarginRate: string;
- marginRate: string;
- cTime: string;
- uTime: string;
- markPrice: string;
-}
+public setTimeOffsetMs(newOffset: number): void
⋮----
-export interface WSPositionSnapshotUMCBL extends WsBaseEvent<'snapshot'> {
- arg: {
- instType: 'umcbl';
- channel: 'positions';
- instId: string;
- };
- data: WsPositionSnapshotDataUMCBL[];
-}
+/*
+ * Bitget WebSocket API Methods
+ * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel
+ */
⋮----
-/** Classic V2 depth channel push data. checksum removed May 2026 - use seq instead */
-export interface WsDepthBookDataV2 {
- asks: [string, string][];
- bids: [string, string][];
- ts: string;
- seq: string;
- /** Futures books channel only - previous push serial number */
- pseq?: string;
-}
+/**
+ * Submit a new order
+ *
+ * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel
+ *
+ * @returns
+ */
+submitNewOrder(
+ category: BitgetInstTypeV3,
+ params: WSAPIPlaceOrderRequestV3,
+): Promise>
⋮----
-/** Futures books channel only - previous push serial number */
+/**
+ * Submit a new order
+ *
+ * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel
+ *
+ * @returns
+ */
+placeBatchOrders(
+ category: BitgetInstTypeV3,
+ params: WSAPIPlaceOrderRequestV3[],
+): Promise>
+⋮----
+/*
+ * Bitget WebSocket API Methods
+ * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel
+ */
+⋮----
+/**
+ * Cancel Order
+ *
+ * https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel
+ *
+ * @returns
+ */
+cancelOrder(
+ category: BitgetInstTypeV3,
+ params: CancelOrderRequestV3,
+): Promise>
+⋮----
+/**
+ * Batch Cancel Order
+ *
+ * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel
+ *
+ * @returns
+ */
+cancelBatchOrders(
+ category: BitgetInstTypeV3,
+ params: CancelOrderRequestV3[],
+): Promise>
+⋮----
+/**
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * Private methods for handling some of the convenience/automation provided by the WS API Client
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+⋮----
+private setupDefaultEventListeners()
+⋮----
+/**
+ * General event handlers for monitoring the WebsocketClient
+ */
+⋮----
+// Blind JSON.stringify can fail on circular references
+⋮----
+// JSON.stringify({ ...data, target: 'WebSocket' }),
================
File: src/websocket-client-v2.ts
@@ -2217,6 +1911,42 @@ File: .eslintrc.cjs
================
// 'no-unused-vars': ['warn'],
+================
+File: .gitignore
+================
+!.gitkeep
+.DS_STORE
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+lerna-debug.log*
+report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
+pids
+*.pid
+*.seed
+*.pid.lock
+node_modules/
+.npm
+.eslintcache
+.node_repl_history
+*.tgz
+.yarn-integrity
+.env
+.env.test
+.cache
+lib
+bundleReport.html
+.history/
+tiagoSpot.ts
+restClientRegex.ts
+localtest.sh
+privaterepotracker
+testfile.ts
+dist
+repomix.sh
+coverage
+
================
File: .jshintrc
================
@@ -2227,11 +1957,6 @@ File: .jshintrc
"predef": [ "-Promise" ]
}
-================
-File: .nvmrc
-================
-v22.17.1
-
================
File: .prettierrc
================
@@ -2672,256 +2397,58 @@ import { RestClientV3 } from '../../../src/index.js';
// import { RestClientV3 } from 'bitget-api';
================
-File: src/types/request/v2/common.ts
+File: src/constants/enum.ts
+================
+/** Parameter verification exception margin mode == FIXED */
+
+================
+File: src/types/request/v2/earn.ts
================
-import { FuturesProductTypeV2, MarginType } from '../shared.js';
-⋮----
/**
*
- * * Common | Notice
+ *
+ * Earn | Savings
+ *
*
*/
⋮----
-export interface GetAnnouncementsRequestV2 {
- annType?: string;
+export interface GetEarnSavingsAssetsRequestV2 {
+ periodType: string;
startTime?: string;
endTime?: string;
- language: string;
+ limit?: string;
+ idLessThan?: string;
}
⋮----
-/**
- *
- * * Common | Public
- *
- */
+export interface GetEarnSavingsRecordsRequestV2 {
+ coin?: string;
+ periodType: string;
+ orderType?: string;
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
+ idLessThan?: string;
+}
⋮----
-export interface GetTradeRateRequestV2 {
- symbol: string;
- businessType: string;
+export interface RedeemSavingsRequestV2 {
+ productId: string;
+ orderId?: string;
+ periodType: string;
+ amount: string;
}
⋮----
/**
*
- * * Common | Tax
+ *
+ * Earn | Shark Fin
+ *
*
*/
⋮----
-export interface GetSpotTransactionsRequestV2 {
- coin?: string;
- startTime: string;
- endTime: string;
- limit?: string;
- idLessThan?: string;
-}
-⋮----
-export interface GetFuturesTransactionsRequestV2 {
- productType?: FuturesProductTypeV2;
- marginCoin?: string;
- startTime: string;
- endTime: string;
- limit?: string;
- idLessThan?: string;
-}
-⋮----
-export interface GetMarginTransactionsRequestV2 {
- marginType?: MarginType;
- coin?: string;
- startTime: string;
- endTime: string;
- limit?: string;
- idLessThan?: string;
-}
-⋮----
-export interface GetP2PTransactionsRequestV2 {
- coin?: string;
- startTime: string;
- endTime: string;
- limit?: string;
- idLessThan?: string;
-}
-⋮----
-/**
- *
- * * Common | P2P
- *
- */
-⋮----
-export interface GetP2PMerchantsRequestV2 {
- online?: 'yes' | 'no';
- idLessThan?: string;
- limit?: string;
-}
-⋮----
-export interface GetMerchantP2POrdersRequestV2 {
- startTime: string;
- endTime?: string;
- idLessThan?: string;
- limit?: string;
- status?: string;
- advNo: string;
- side?: string;
- coin?: string;
- language: string;
- fiat?: string;
- orderNo?: string;
-}
-⋮----
-export interface GetMerchantAdvertisementsRequestV2 {
- startTime: string;
- endTime?: string;
- idLessThan?: string;
- limit?: string;
- status: string;
- advNo?: string;
- side: string;
- coin: string;
- language?: string;
- fiat: string;
- orderBy?: string;
- payMethodId?: string;
- sourceType?: string;
-}
-⋮----
-/**
- *
- * * Common | Virtual Subaccount
- *
- */
-⋮----
-export interface ModifyVirtualSubRequestV2 {
- subAccountUid: string;
- permList: string[];
- status: string;
-}
-⋮----
-export interface CreateVirtualSubRequestV2 {
- subAccountName: string;
- passphrase: string;
- label: string;
- ipList?: string[];
- permList?: string[];
-}
-⋮----
-export interface CreateVirtualSubApiKeyRequestV2 {
- subAccountUid: string;
- passphrase: string;
- label: string;
- ipList?: string[];
- permList?: string[];
-}
-⋮----
-export interface ModifyVirtualSubApiKeyRequestV2 {
- subAccountUid: string;
- subAccountApiKey: string;
- passphrase: string;
- label: string;
- ipList?: string[];
- permList?: string[];
-}
-⋮----
-export interface CreateAgentSubaccountRequestV2 {
- /** Lowercase letters only; max 20 characters */
- username: string;
- /** 8–32 characters, letters and numbers */
- passphrase: string;
- note?: string;
-}
-⋮----
-/** Lowercase letters only; max 20 characters */
-⋮----
-/** 8–32 characters, letters and numbers */
-⋮----
-/**
- *
- * * Common | Convert
- *
- */
-⋮----
-export interface ConvertQuoteRequestV2 {
- fromCoin: string;
- fromCoinSize?: string;
- toCoin: string;
- toCoinSize?: string;
-}
-⋮----
-export interface ConvertRequestV2 {
- fromCoin: string;
- fromCoinSize: string;
- cnvtPrice: string;
- toCoin: string;
- toCoinSize: string;
- traceId: string;
-}
-⋮----
-export interface GetConvertHistoryRequestV2 {
- startTime: string;
- endTime: string;
- limit?: string;
- idLessThan?: string;
-}
-⋮----
-/**
- *
- * * Common | BGB Convert
- *
- */
-⋮----
-export interface GetConvertBGBHistoryRequestV2 {
- orderId?: string;
- startTime: string;
- endTime: string;
- limit?: string;
- idLessThan?: string;
-}
-
-================
-File: src/types/request/v2/earn.ts
-================
-/**
- *
- *
- * Earn | Savings
- *
- *
- */
-⋮----
-export interface GetEarnSavingsAssetsRequestV2 {
- periodType: string;
- startTime?: string;
- endTime?: string;
- limit?: string;
- idLessThan?: string;
-}
-⋮----
-export interface GetEarnSavingsRecordsRequestV2 {
- coin?: string;
- periodType: string;
- orderType?: string;
- startTime?: string;
- endTime?: string;
- limit?: string;
- idLessThan?: string;
-}
-⋮----
-export interface RedeemSavingsRequestV2 {
- productId: string;
- orderId?: string;
- periodType: string;
- amount: string;
-}
-⋮----
-/**
- *
- *
- * Earn | Shark Fin
- *
- *
- */
-⋮----
-export interface GetSharkfinAssetsRequestV2 {
- status: string;
- startTime?: string;
- endTime?: string;
+export interface GetSharkfinAssetsRequestV2 {
+ status: string;
+ startTime?: string;
+ endTime?: string;
limit?: string;
idLessThan?: string;
}
@@ -3060,3018 +2587,3124 @@ export interface RedeemEarnEliteRequestV2 {
}
================
-File: src/types/request/v3/copytrading.ts
+File: src/types/request/v2/instloan.ts
================
-export interface GetCopyFuturesMaxTransferableRequestV3 {
- coin: string;
+export interface GetInstLoanProductInfoRequestV2 {
+ productId: string;
}
⋮----
-export interface CopyFuturesTransferRequestV3 {
- type: 'in' | 'out';
- coin: string;
- amount: string;
+export interface GetInstLoanSymbolsRequestV2 {
+ productId: string;
}
⋮----
-export interface GetCopyFuturesTransferRecordRequestV3 {
+export interface GetInstLoanRepaidHistoryRequestV2 {
startTime?: string;
endTime?: string;
limit?: string;
- /** Pass transferId from the previous page to paginate forward */
- cursor?: string;
}
⋮----
-/** Pass transferId from the previous page to paginate forward */
-
-================
-File: src/types/request/v3/earn.ts
-================
-/**
- *
- *
- * Earn | On-Chain Elite (UTA)
- *
- *
- */
-⋮----
-export interface GetEarnEliteRecordsRequestV3 {
- type: 'subscribe' | 'redeem' | 'interest';
+export interface GetInstLoanOrderRequestV2 {
+ orderId?: string;
startTime?: string;
endTime?: string;
- limit?: string;
- cursor?: string;
-}
-⋮----
-export interface GetEarnEliteSubscribeInfoRequestV3 {
- productId: string;
}
⋮----
-export interface EarnEliteSubscribeRequestV3 {
- productSubId: string;
- amount: string;
- coin?: string;
- paymentAccount?: 'spot' | 'unified';
+export interface GetInstLoanLTVConvertRequestV2 {
+ riskUnitId?: string;
}
⋮----
-export interface GetEarnEliteSubscribeResultRequestV3 {
- orderId: string;
-}
-⋮----
-export interface GetEarnEliteRedeemInfoRequestV3 {
- productId: string;
-}
-⋮----
-export interface RedeemEarnEliteRequestV3 {
- productId: string;
- productSubId: string;
- redeemType: 'fast' | 'standard';
- amount: string;
- receiveAccount: 'spot' | 'unified';
- advancedSettle?: 'yes' | 'no';
- coin?: string;
+export interface GetInstLoanMarginCoinInfoRequestV2 {
+ productId: string;
}
================
-File: src/types/request/v3/loan.ts
+File: src/types/request/v2/spot.ts
================
-export interface GetTransferedRequestV3 {
- userId?: string;
- coin: string;
-}
-⋮----
-export interface GetSymbolsRequestV3 {
- productId: string;
-}
+type SpotKlineIntervalV2 =
+ | '1min'
+ | '5min'
+ | '15min'
+ | '30min'
+ | '1h'
+ | '4h'
+ | '6h'
+ | '12h'
+ | '1day'
+ | '3day'
+ | '1week'
+ | '1M'
+ | '6Hutc'
+ | '12Hutc'
+ | '1Dutc'
+ | '3Dutc'
+ | '1Wutc'
+ | '1Mutc';
⋮----
-export interface GetRepaidHistoryRequestV3 {
+export interface SpotCandlesRequestV2 {
+ symbol: string;
+ granularity: SpotKlineIntervalV2;
startTime?: string;
endTime?: string;
limit?: string;
}
⋮----
-export interface GetProductInfosRequestV3 {
- productId: string;
+export interface SpotHistoricCandlesRequestV2 {
+ symbol: string;
+ granularity: SpotKlineIntervalV2;
+ endTime?: string;
+ limit?: string;
}
⋮----
-export interface GetLoanOrderRequestV3 {
- orderId?: string;
+export interface SpotHistoricTradesRequestV2 {
+ symbol: string;
+ limit?: string;
+ idLessThan?: string;
startTime?: string;
endTime?: string;
}
⋮----
-export interface GetEnsureCoinsRequestV3 {
- productId: string;
+export interface SpotCallAuctionRequestV2 {
+ symbol: string;
}
⋮----
-export interface BindUidRequestV3 {
- riskUnitId?: string;
- uid: string;
- operate: 'bind' | 'unbind';
-}
+/**
+ *
+ * * Spot | Trade
+ *
+ */
⋮----
-export interface GetLTVConvertRequestV3 {
- riskUnitId?: string;
-}
+export type SpotOrderSideV2 = 'buy' | 'sell';
⋮----
-/* Unified Account Staking & Lending (Crypto Loans) - /api/v3/loan/* */
+export type SpotOrderTypeV2 = 'limit' | 'market';
⋮----
-export interface GetLoanCoinsRequestV3 {
- coin?: string;
-}
+export type SpotOrderForceV2 = 'gtc' | 'post_only' | 'fok' | 'ioc';
⋮----
-export interface GetLoanInterestRequestV3 {
- loanCoin: string;
- pledgeCoin: string;
- daily: 'SEVEN' | 'THIRTY' | 'FLEXIBLE';
- pledgeAmount: string;
-}
+export type SpotTPSLTypeV2 = 'normal' | 'tpsl';
⋮----
-export interface LoanBorrowRequestV3 {
- loanCoin: string;
- pledgeCoin: string;
- daily: 'SEVEN' | 'THIRTY' | 'FLEXIBLE';
- pledgeAmount?: string;
- loanAmount?: string;
+export type SpotSTPModeV2 =
+ | 'none'
+ | 'cancel_taker'
+ | 'cancel_maker'
+ | 'cancel_both';
+⋮----
+export type SpotBatchModeV2 = 'single' | 'multiple';
+⋮----
+export interface SpotOrderRequestV2 {
+ symbol: string;
+ side: SpotOrderSideV2;
+ orderType: SpotOrderTypeV2;
+ force: SpotOrderForceV2;
+ price?: string;
+ size: string;
+ clientOid?: string;
+ triggerPrice?: string;
+ tpslType?: SpotTPSLTypeV2;
+ requestTime?: string;
+ receiveWindow?: string;
+ stpMode?: SpotSTPModeV2;
+ presetTakeProfitPrice?: string;
+ executeTakeProfitPrice?: string;
+ presetStopLossPrice?: string;
+ executeStopLossPrice?: string;
}
⋮----
-export interface GetLoanBorrowOngoingRequestV3 {
+export interface SpotCancelandSubmitOrderRequestV2 {
+ symbol: string;
+ price: string;
+ size: string;
orderId?: string;
- loanCoin?: string;
- pledgeCoin?: string;
+ clientOid?: string;
+ newClientOid?: string;
+ presetTakeProfitPrice?: string;
+ executeTakeProfitPrice?: string;
+ presetStopLossPrice?: string;
+ executeStopLossPrice?: string;
}
⋮----
-export interface GetLoanBorrowHistoryRequestV3 {
+export interface SpotCancelOrderRequestV2 {
+ symbol: string;
+ tpslType?: SpotTPSLTypeV2;
orderId?: string;
- loanCoin?: string;
- pledgeCoin?: string;
- status?: 'ROLLBACK' | 'FORCE' | 'REPAY';
- startTime: string;
- endTime: string;
- pageNum?: string;
- pageSize?: string;
+ clientOid?: string;
}
⋮----
-export interface LoanRepayRequestV3 {
- orderId: string;
- method: 'borrowed_coin' | 'collateral';
- repayAll: 'yes' | 'no';
- amount?: string;
- repayUnlock?: 'yes' | 'no';
+export interface SpotBatchOrderRequestItemV2 {
+ symbol?: string;
+ side: SpotOrderSideV2;
+ orderType: SpotOrderTypeV2;
+ force: SpotOrderForceV2;
+ price?: string;
+ size: string;
+ clientOid?: string;
+ stpMode?: SpotSTPModeV2;
+ presetTakeProfitPrice?: string;
+ executeTakeProfitPrice?: string;
+ presetStopLossPrice?: string;
+ executeStopLossPrice?: string;
}
⋮----
-export interface GetLoanRepayHistoryRequestV3 {
- orderId?: string;
- loanCoin?: string;
- pledgeCoin?: string;
- startTime: string;
- endTime: string;
- pageNum?: string;
- pageSize?: string;
+export interface SpotBatchOrderRequestV2 {
+ symbol?: string;
+ batchMode?: SpotBatchModeV2;
+ orderList: SpotBatchOrderRequestItemV2[];
}
⋮----
-export interface LoanRevisePledgeRequestV3 {
- orderId: string;
- amount: string;
- pledgeCoin: string;
- reviseType?: 'OUT' | 'IN';
+export interface SpotBatchCancelOrderRequestV2 {
+ symbol?: string;
+ batchMode?: SpotBatchModeV2;
+ orderList: {
+ symbol?: string;
+ orderId?: string;
+ clientOid?: string;
+ }[];
}
⋮----
-export interface GetLoanPledgeRateHistoryRequestV3 {
+export interface GetSpotOrderInfoRequestV2 {
orderId?: string;
- reviseSide?: 'down' | 'up';
- pledgeCoin?: string;
- startTime: string;
- endTime: string;
- pageNum?: string;
- pageSize?: string;
+ clientOid?: string;
+ requestTime?: string;
+ receiveWindow?: string;
}
⋮----
-export interface GetLoanReducesRequestV3 {
+export interface GetSpotOpenOrdersRequestV2 {
+ symbol?: string;
+ startTime?: string;
+ endTime?: string;
+ idLessThan?: string;
+ limit?: string;
orderId?: string;
- loanCoin?: string;
- pledgeCoin?: string;
- status?: 'COMPLETE' | 'WAIT';
- startTime: string;
- endTime: string;
- pageNum?: string;
- pageSize?: string;
+ tpslType?: SpotTPSLTypeV2;
+ requestTime?: string;
+ receiveWindow?: string;
}
-
-================
-File: src/types/request/v3/p2p.ts
-================
-export type P2pSideV3 = 'buy' | 'sell';
⋮----
-export type P2pPriceTypeV3 = 'fixed' | 'floating';
+export interface GetSpotHistoryOrdersRequestV2 {
+ symbol?: string;
+ startTime?: string;
+ endTime?: string;
+ idLessThan?: string;
+ limit?: string;
+ orderId?: string;
+ tpslType?: SpotTPSLTypeV2;
+ requestTime?: string;
+ receiveWindow?: string;
+}
⋮----
-export type P2pMarketTypeV3 = 'public' | 'private';
+export interface GetSpotFillsRequestV2 {
+ symbol: string;
+ orderId?: string;
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
+ idLessThan?: string;
+}
⋮----
-export type P2pAdStatusV3 = 'publish' | 'delist' | 'remove';
+/**
+ *
+ * * Spot | Trigger Orders
+ *
+ */
⋮----
-export type P2pAdOperationV3 = 'publish' | 'delist' | 'remove';
+export type SpotPlanTypeV2 = 'amount' | 'total';
⋮----
-export type P2pOrderStatusV3 =
- | 'pending_payment'
- | 'pending_release'
- | 'completed'
- | 'cancelled'
- | 'in_appeal';
+export type SpotTriggerTypeV2 = 'fill_price' | 'mark_price';
⋮----
-export interface P2pPayMethodIdRefV3 {
- payMethodId: string;
- userPayMethodId?: string;
+export interface SpotPlanOrderRequestV2 {
+ symbol: string;
+ side: SpotOrderSideV2;
+ triggerPrice: string;
+ orderType: SpotOrderTypeV2;
+ executePrice?: string;
+ planType?: SpotPlanTypeV2;
+ size: string;
+ triggerType: SpotTriggerTypeV2;
+ clientOid?: string;
+ force?: SpotOrderForceV2;
+ stpMode?: SpotSTPModeV2;
}
⋮----
-export interface GetP2pAdListRequestV3 {
- token: string;
- fiat: string;
- side: P2pSideV3;
- amount?: string;
- pageNum: string;
- limit: string;
+export interface SpotModifyPlanOrderRequestV2 {
+ orderId?: string;
+ clientOid?: string;
+ triggerPrice: string;
+ orderType: SpotOrderTypeV2;
+ executePrice?: string;
+ size: string;
}
⋮----
-export interface GetP2pExchangeRateRequestV3 {
- token: string;
- fiat: string;
+export interface GetSpotCurrentPlanOrdersRequestV2 {
+ symbol: string;
+ limit?: string;
+ idLessThan?: string;
+ startTime?: string;
+ endTime?: string;
}
⋮----
-export interface P2pFeeSimulateRequestV3 {
- token: string;
- fiat: string;
- side: P2pSideV3;
- marketType: P2pMarketTypeV3;
- amount: string;
+export interface GetSpotHistoryPlanOrdersRequestV2 {
+ symbol: string;
+ startTime: string;
+ endTime: string;
+ limit?: string;
}
⋮----
-export interface GetP2pAdLimitRequestV3 {
- token: string;
- fiat: string;
- side: P2pSideV3;
+/**
+ *
+ * * Spot | Account
+ *
+ */
+⋮----
+export type SpotBillGroupTypeV2 =
+ | 'deposit'
+ | 'withdraw'
+ | 'transaction'
+ | 'transfer'
+ | 'other';
+⋮----
+export type SpotBusinessTypeV2 =
+ | 'deposit'
+ | 'withdraw'
+ | 'buy'
+ | 'sell'
+ | 'deduction of handling fee'
+ | 'transfer-in'
+ | 'transfer-out'
+ | 'rebate rewards'
+ | 'airdrop rewards'
+ | 'USDT contract rewards'
+ | 'mix contract rewards'
+ | 'system lock'
+ | 'user lock';
+⋮----
+export type SpotAccountTypeV2 =
+ | 'spot'
+ | 'p2p'
+ | 'coin_futures'
+ | 'usdt_futures'
+ | 'usdc_futures'
+ | 'crossed_margin'
+ | 'isolated_margin';
+⋮----
+export interface GetSpotAccountBillsRequestV2 {
+ coin?: string;
+ groupType?: SpotBillGroupTypeV2;
+ businessType?: SpotBusinessTypeV2;
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
+ idLessThan?: string;
}
⋮----
-export interface CreateP2pAdRequestV3 {
- token: string;
- fiat: string;
- side: P2pSideV3;
- priceType: P2pPriceTypeV3;
- price?: string;
- premium?: string;
- minAmount: string;
- maxAmount: string;
- quantity: string;
- payMethodIds: P2pPayMethodIdRefV3[];
- remark?: string;
- tradeTerms?: string;
- payTimeLimit: string;
+export interface SpotTransferRequestV2 {
+ fromType: SpotAccountTypeV2;
+ toType: SpotAccountTypeV2;
+ amount: string;
+ coin: string;
+ symbol: string;
+ clientOid?: string;
}
⋮----
-export interface UpdateP2pAdRequestV3 {
- advId: string;
- priceType?: P2pPriceTypeV3;
- price?: string;
- premium?: string;
- minAmount?: string;
- maxAmount?: string;
- quantity?: string;
- payMethodIds?: P2pPayMethodIdRefV3[];
- payTimeLimit?: string;
- remark?: string;
- tradeTerms?: string;
+export interface SpotSubAccountTransferRequestV2 {
+ fromType: SpotAccountTypeV2;
+ toType: SpotAccountTypeV2;
+ amount: string;
+ coin: string;
+ symbol?: string;
+ clientOid?: string;
+ fromUserId: string;
+ toUserId: string;
}
⋮----
-export interface OperateP2pAdRequestV3 {
- advId: string;
- operation: P2pAdOperationV3;
+export interface SpotWithdrawalRequestV2 {
+ coin: string;
+ transferType: 'on_chain' | 'internal_transfer';
+ address: string;
+ chain?: string;
+ innerToType?: 'email' | 'mobile' | 'uid';
+ areaCode?: string;
+ tag?: string;
+ size: string;
+ remark?: string;
+ clientOid?: string;
}
⋮----
-export interface GetP2pAdInfoRequestV3 {
- advId: string;
+export interface SpotMainSubTransferRecordRequestV2 {
+ coin?: string;
+ role?: 'initiator' | 'receiver';
+ subUid?: string;
+ startTime?: string;
+ endTime?: string;
+ clientOid?: string;
+ limit?: string;
+ idLessThan?: string;
}
⋮----
-export interface GetP2pMyAdsRequestV3 {
+export interface GetSpotTransferRecordRequestV2 {
+ coin: string;
+ fromType: SpotAccountTypeV2;
startTime?: string;
endTime?: string;
+ clientOid?: string;
limit?: string;
- cursor?: string;
- advId?: string;
- token?: string;
- fiat?: string;
- status?: P2pAdStatusV3;
+ idLessThan?: string;
}
⋮----
-export interface GetP2pPendingOrdersRequestV3 {
- orderId?: string;
- side?: P2pSideV3;
+export interface GetSpotSubAccountDepositRecordRequestV2 {
+ subUid: string;
+ coin?: string;
startTime?: string;
endTime?: string;
- cursor?: string;
+ idLessThan?: string;
limit?: string;
}
⋮----
-export interface GetP2pAllOrdersRequestV3 {
+export interface GetSpotWithdrawalRecordRequestV2 {
+ coin?: string;
+ clientOid?: string;
+ startTime: string;
+ endTime: string;
+ idLessThan?: string;
+ orderId?: string;
+ limit?: string;
+}
+⋮----
+export interface GetSpotDepositRecordRequestV2 {
+ coin?: string;
+ orderId?: string;
+ startTime: string;
+ endTime: string;
+ idLessThan?: string;
+ limit?: string;
+}
+
+================
+File: src/types/request/v3/earn.ts
+================
+/**
+ *
+ *
+ * Earn | On-Chain Elite (UTA)
+ *
+ *
+ */
+⋮----
+export interface GetEarnEliteRecordsRequestV3 {
+ type: 'subscribe' | 'redeem' | 'interest';
startTime?: string;
endTime?: string;
limit?: string;
cursor?: string;
- orderId?: string;
- side?: P2pSideV3;
- status?: P2pOrderStatusV3;
}
⋮----
-export interface GetP2pOrderInfoRequestV3 {
- orderId: string;
+export interface GetEarnEliteSubscribeInfoRequestV3 {
+ productId: string;
}
⋮----
-export interface P2pOrderActionRequestV3 {
+export interface EarnEliteSubscribeRequestV3 {
+ productSubId: string;
+ amount: string;
+ coin?: string;
+ paymentAccount?: 'spot' | 'unified';
+}
+⋮----
+export interface GetEarnEliteSubscribeResultRequestV3 {
orderId: string;
}
⋮----
-export interface GetP2pBalanceRequestV3 {
- token: string;
+export interface GetEarnEliteRedeemInfoRequestV3 {
+ productId: string;
+}
+⋮----
+export interface RedeemEarnEliteRequestV3 {
+ productId: string;
+ productSubId: string;
+ redeemType: 'fast' | 'standard';
+ amount: string;
+ receiveAccount: 'spot' | 'unified';
+ advancedSettle?: 'yes' | 'no';
+ coin?: string;
}
================
-File: src/types/request/v3/strategy.ts
+File: src/types/request/v3/loan.ts
================
-export type StrategyOrderTypeV3 = 'tpsl' | 'trigger';
+export interface GetTransferedRequestV3 {
+ userId?: string;
+ coin: string;
+}
⋮----
-export type StrategyOrderStatusV3 =
- | 'pending'
- | 'success'
- | 'failed'
- | 'cancelled'
- | 'submitting';
-⋮----
-export type StrategyTriggerByV3 = 'market' | 'mark';
-⋮----
-export type StrategyTriggerOrderTypeV3 = 'limit' | 'market';
-⋮----
-export interface PlaceStrategyOrderRequestV3 {
- category:
- | 'SPOT'
- | 'MARGIN'
- | 'USDT-FUTURES'
- | 'COIN-FUTURES'
- | 'USDC-FUTURES';
- symbol: string;
- clientOid?: string;
- type?: StrategyOrderTypeV3;
- tpslMode?: 'full' | 'partial';
- /** Required when tpslMode=partial or for trigger orders */
- qty?: string;
- side?: 'buy' | 'sell';
- posSide?: 'long' | 'short';
- reduceOnly?: 'yes' | 'no';
- tpTriggerBy?: StrategyTriggerByV3;
- slTriggerBy?: StrategyTriggerByV3;
- takeProfit?: string;
- stopLoss?: string;
- tpOrderType?: StrategyTriggerOrderTypeV3;
- slOrderType?: StrategyTriggerOrderTypeV3;
- tpLimitPrice?: string;
- slLimitPrice?: string;
- triggerBy?: StrategyTriggerByV3;
- triggerPrice?: string;
- triggerOrderType?: StrategyTriggerOrderTypeV3;
- triggerOrderPrice?: string;
-}
-⋮----
-/** Required when tpslMode=partial or for trigger orders */
-⋮----
-export interface ModifyStrategyOrderRequestV3 {
- orderId?: string;
- clientOid?: string;
- qty: string;
- tpTriggerBy?: StrategyTriggerByV3;
- slTriggerBy?: StrategyTriggerByV3;
- takeProfit?: string;
- stopLoss?: string;
- tpOrderType?: StrategyTriggerOrderTypeV3;
- slOrderType?: StrategyTriggerOrderTypeV3;
- tpLimitPrice?: string;
- slLimitPrice?: string;
- triggerBy?: StrategyTriggerByV3;
- triggerPrice?: string;
- triggerOrderType?: StrategyTriggerOrderTypeV3;
- triggerOrderPrice?: string;
+export interface GetSymbolsRequestV3 {
+ productId: string;
}
⋮----
-export interface CancelStrategyOrderRequestV3 {
- orderId?: string;
- clientOid?: string;
+export interface GetRepaidHistoryRequestV3 {
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
}
⋮----
-export interface GetUnfilledStrategyOrdersRequestV3 {
- category:
- | 'SPOT'
- | 'MARGIN'
- | 'USDT-FUTURES'
- | 'COIN-FUTURES'
- | 'USDC-FUTURES';
- type?: StrategyOrderTypeV3;
+export interface GetProductInfosRequestV3 {
+ productId: string;
}
⋮----
-export interface GetHistoryStrategyOrdersRequestV3 {
- category:
- | 'SPOT'
- | 'MARGIN'
- | 'USDT-FUTURES'
- | 'COIN-FUTURES'
- | 'USDC-FUTURES';
- type?: StrategyOrderTypeV3;
+export interface GetLoanOrderRequestV3 {
+ orderId?: string;
startTime?: string;
endTime?: string;
- limit?: string;
- cursor?: string;
}
-
-================
-File: src/types/request/v3/trade.ts
-================
-export interface BatchModifyOrderRequestV3 {
- orderId?: string;
- clientOid?: string;
- qty?: string;
- price?: string;
- autoCancel?: 'yes' | 'no';
+⋮----
+export interface GetEnsureCoinsRequestV3 {
+ productId: string;
}
⋮----
-export interface CancelAllOrdersRequestV3 {
- category:
- | 'SPOT'
- | 'MARGIN'
- | 'USDT-FUTURES'
- | 'COIN-FUTURES'
- | 'USDC-FUTURES';
- symbol?: string;
+export interface BindUidRequestV3 {
+ riskUnitId?: string;
+ uid: string;
+ operate: 'bind' | 'unbind';
}
⋮----
-export interface CancelBatchOrdersRequestV3 {
- orderId?: string;
- clientOid?: string;
- category:
- | 'SPOT'
- | 'MARGIN'
- | 'USDT-FUTURES'
- | 'COIN-FUTURES'
- | 'USDC-FUTURES';
- symbol: string;
+export interface GetLTVConvertRequestV3 {
+ riskUnitId?: string;
}
⋮----
-export interface CloseAllPositionsRequestV3 {
- category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
- symbol?: string;
- posSide?: 'long' | 'short';
+/* Unified Account Staking & Lending (Crypto Loans) - /api/v3/loan/* */
+⋮----
+export interface GetLoanCoinsRequestV3 {
+ coin?: string;
}
⋮----
-export interface CancelOrderRequestV3 {
- orderId?: string;
- clientOid?: string;
+export interface GetLoanInterestRequestV3 {
+ loanCoin: string;
+ pledgeCoin: string;
+ daily: 'SEVEN' | 'THIRTY' | 'FLEXIBLE';
+ pledgeAmount: string;
}
⋮----
-export interface GetMaxOpenAvailableRequestV3 {
- category:
- | 'SPOT'
- | 'MARGIN'
- | 'USDT-FUTURES'
- | 'COIN-FUTURES'
- | 'USDC-FUTURES';
- symbol: string;
- orderType: 'limit' | 'market';
- side: 'buy' | 'sell';
- price?: string;
- size?: string;
+export interface LoanBorrowRequestV3 {
+ loanCoin: string;
+ pledgeCoin: string;
+ daily: 'SEVEN' | 'THIRTY' | 'FLEXIBLE';
+ pledgeAmount?: string;
+ loanAmount?: string;
}
⋮----
-export interface GetOrderInfoRequestV3 {
+export interface GetLoanBorrowOngoingRequestV3 {
orderId?: string;
- clientOid?: string;
+ loanCoin?: string;
+ pledgeCoin?: string;
}
⋮----
-export interface GetFillsRequestV3 {
+export interface GetLoanBorrowHistoryRequestV3 {
orderId?: string;
- startTime?: string;
- endTime?: string;
- limit?: string;
- cursor?: string;
+ loanCoin?: string;
+ pledgeCoin?: string;
+ status?: 'ROLLBACK' | 'FORCE' | 'REPAY';
+ startTime: string;
+ endTime: string;
+ pageNum?: string;
+ pageSize?: string;
}
⋮----
-export interface GetUnfilledOrdersRequestV3 {
- category?:
- | 'SPOT'
- | 'MARGIN'
- | 'USDT-FUTURES'
- | 'COIN-FUTURES'
- | 'USDC-FUTURES';
- symbol?: string;
- startTime?: string;
- endTime?: string;
- limit?: string;
- cursor?: string;
+export interface LoanRepayRequestV3 {
+ orderId: string;
+ method: 'borrowed_coin' | 'collateral';
+ repayAll: 'yes' | 'no';
+ amount?: string;
+ repayUnlock?: 'yes' | 'no';
}
⋮----
-export interface GetHistoryOrdersRequestV3 {
- category:
- | 'SPOT'
- | 'MARGIN'
- | 'USDT-FUTURES'
- | 'COIN-FUTURES'
- | 'USDC-FUTURES';
- startTime?: string;
- endTime?: string;
- limit?: string;
- cursor?: string;
+export interface GetLoanRepayHistoryRequestV3 {
+ orderId?: string;
+ loanCoin?: string;
+ pledgeCoin?: string;
+ startTime: string;
+ endTime: string;
+ pageNum?: string;
+ pageSize?: string;
}
⋮----
-export interface GetPositionHistoryRequestV3 {
- category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
- symbol?: string;
- startTime?: string;
- endTime?: string;
- limit?: string;
- cursor?: string;
+export interface LoanRevisePledgeRequestV3 {
+ orderId: string;
+ amount: string;
+ pledgeCoin: string;
+ reviseType?: 'OUT' | 'IN';
}
⋮----
-export interface GetCurrentPositionRequestV3 {
- category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
- symbol?: string;
- posSide?: 'long' | 'short';
+export interface GetLoanPledgeRateHistoryRequestV3 {
+ orderId?: string;
+ reviseSide?: 'down' | 'up';
+ pledgeCoin?: string;
+ startTime: string;
+ endTime: string;
+ pageNum?: string;
+ pageSize?: string;
}
⋮----
-export interface ModifyOrderRequestV3 {
+export interface GetLoanReducesRequestV3 {
orderId?: string;
- clientOid?: string;
- qty?: string;
- price?: string;
- autoCancel?: 'yes' | 'no';
- symbol?: string;
- category?:
- | 'SPOT'
- | 'MARGIN'
- | 'USDT-FUTURES'
- | 'COIN-FUTURES'
- | 'USDC-FUTURES';
- tpTriggerBy?: 'market' | 'mark';
- slTriggerBy?: 'market' | 'mark';
- takeProfit?: string;
- stopLoss?: string;
- tpOrderType?: 'limit' | 'market';
- slOrderType?: 'limit' | 'market';
- tpLimitPrice?: string;
- slLimitPrice?: string;
+ loanCoin?: string;
+ pledgeCoin?: string;
+ status?: 'COMPLETE' | 'WAIT';
+ startTime: string;
+ endTime: string;
+ pageNum?: string;
+ pageSize?: string;
}
+
+================
+File: src/types/request/v3/p2p.ts
+================
+export type P2pSideV3 = 'buy' | 'sell';
⋮----
-export interface PlaceRealityOrderRequestV3 {
- symbol: string;
- side: 'buy' | 'sell';
- orderType: 'limit' | 'market';
- qty: string;
- price?: string;
- clientOid?: string;
+export type P2pPriceTypeV3 = 'fixed' | 'floating';
+⋮----
+export type P2pMarketTypeV3 = 'public' | 'private';
+⋮----
+export type P2pAdStatusV3 = 'publish' | 'delist' | 'remove';
+⋮----
+export type P2pAdOperationV3 = 'publish' | 'delist' | 'remove';
+⋮----
+export type P2pOrderStatusV3 =
+ | 'pending_payment'
+ | 'pending_release'
+ | 'completed'
+ | 'cancelled'
+ | 'in_appeal';
+⋮----
+export interface P2pPayMethodIdRefV3 {
+ payMethodId: string;
+ userPayMethodId?: string;
}
⋮----
-export interface CancelRealityOrderRequestV3 {
- symbol: string;
- orderId?: string;
- clientOid?: string;
+export interface GetP2pAdListRequestV3 {
+ token: string;
+ fiat: string;
+ side: P2pSideV3;
+ amount?: string;
+ pageNum: string;
+ limit: string;
}
⋮----
-export interface PlaceBatchOrdersRequestV3 {
- category:
- | 'SPOT'
- | 'MARGIN'
- | 'USDT-FUTURES'
- | 'COIN-FUTURES'
- | 'USDC-FUTURES';
- symbol: string;
- qty: string;
- price?: string;
- side: 'buy' | 'sell';
- orderType: 'limit' | 'market';
- timeInForce?: 'ioc' | 'fok' | 'gtc' | 'post_only';
- posSide?: 'long' | 'short';
- clientOid?: string;
- reduceOnly?: 'yes' | 'no';
+export interface GetP2pExchangeRateRequestV3 {
+ token: string;
+ fiat: string;
}
⋮----
-export type FuturesMarginModeV3 = 'crossed' | 'isolated';
+export interface P2pFeeSimulateRequestV3 {
+ token: string;
+ fiat: string;
+ side: P2pSideV3;
+ marketType: P2pMarketTypeV3;
+ amount: string;
+}
⋮----
-export interface PlaceOrderRequestV3 {
- category:
- | 'SPOT'
- | 'MARGIN'
- | 'USDT-FUTURES'
- | 'COIN-FUTURES'
- | 'USDC-FUTURES';
- symbol: string;
- qty: string;
+export interface GetP2pAdLimitRequestV3 {
+ token: string;
+ fiat: string;
+ side: P2pSideV3;
+}
+⋮----
+export interface CreateP2pAdRequestV3 {
+ token: string;
+ fiat: string;
+ side: P2pSideV3;
+ priceType: P2pPriceTypeV3;
price?: string;
- side: 'buy' | 'sell';
- orderType: 'limit' | 'market';
- timeInForce?: 'ioc' | 'fok' | 'gtc' | 'post_only';
- posSide?: 'long' | 'short';
- clientOid?: string;
- reduceOnly?: 'yes' | 'no';
- /** Futures only. Defaults to crossed */
- marginMode?: FuturesMarginModeV3;
- stpMode?: 'none' | 'cancel_taker' | 'cancel_maker' | 'cancel_both';
- takeProfitPrice?: string;
- stopLossPrice?: string;
- takeProfitTriggerType?: 'mark_price' | 'last_price';
- stopLossTriggerType?: 'mark_price' | 'last_price';
+ premium?: string;
+ minAmount: string;
+ maxAmount: string;
+ quantity: string;
+ payMethodIds: P2pPayMethodIdRefV3[];
+ remark?: string;
+ tradeTerms?: string;
+ payTimeLimit: string;
}
⋮----
-/** Futures only. Defaults to crossed */
+export interface UpdateP2pAdRequestV3 {
+ advId: string;
+ priceType?: P2pPriceTypeV3;
+ price?: string;
+ premium?: string;
+ minAmount?: string;
+ maxAmount?: string;
+ quantity?: string;
+ payMethodIds?: P2pPayMethodIdRefV3[];
+ payTimeLimit?: string;
+ remark?: string;
+ tradeTerms?: string;
+}
⋮----
-export interface CountdownCancelAllRequestV3 {
- countdown: string; // seconds until auto-cancel (5-60, or 0 to disable)
+export interface OperateP2pAdRequestV3 {
+ advId: string;
+ operation: P2pAdOperationV3;
}
⋮----
-countdown: string; // seconds until auto-cancel (5-60, or 0 to disable)
+export interface GetP2pAdInfoRequestV3 {
+ advId: string;
+}
+⋮----
+export interface GetP2pMyAdsRequestV3 {
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
+ cursor?: string;
+ advId?: string;
+ token?: string;
+ fiat?: string;
+ status?: P2pAdStatusV3;
+}
+⋮----
+export interface GetP2pPendingOrdersRequestV3 {
+ orderId?: string;
+ side?: P2pSideV3;
+ startTime?: string;
+ endTime?: string;
+ cursor?: string;
+ limit?: string;
+}
+⋮----
+export interface GetP2pAllOrdersRequestV3 {
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
+ cursor?: string;
+ orderId?: string;
+ side?: P2pSideV3;
+ status?: P2pOrderStatusV3;
+}
+⋮----
+export interface GetP2pOrderInfoRequestV3 {
+ orderId: string;
+}
+⋮----
+export interface P2pOrderActionRequestV3 {
+ orderId: string;
+}
+⋮----
+export interface GetP2pBalanceRequestV3 {
+ token: string;
+}
================
-File: src/types/response/v2/common.ts
+File: src/types/request/v3/stockplus.ts
================
/**
*
- * * Common | Notice
+ *
+ * Stock+ (UTA)
+ *
*
*/
⋮----
-export interface AnnouncementV2 {
- annId: string;
- annTitle: string;
- annDesc: string;
- cTime: string;
- language: string;
- annUrl: string;
+export interface GetStockPlusOptionQuoteRequestV3 {
+ symbol: string;
}
⋮----
-/**
- *
- * * Common | Public
- *
- */
+export interface GetStockPlusOptionChainInfoRequestV3 {
+ symbol: string;
+ expiryDate: string;
+}
⋮----
-/**
- *
- * * Common | Tax
- *
- */
+export interface GetStockPlusOptionExpiryDateRequestV3 {
+ symbol: string;
+}
⋮----
-export interface SpotTransactionRecordV2 {
- id: string;
- coin: string;
- spotTaxType: string;
- amount: string;
- fee: string;
- balance: string;
- ts: string;
+export interface GetStockPlusOptionVolumeRequestV3 {
+ symbol: string;
}
⋮----
-export interface FuturesTransactionRecordV2 {
- id: string;
+export interface GetStockPlusStaticInfoRequestV3 {
symbol: string;
- marginCoin: string;
- futureTaxType: string;
- amount: string;
- fee: string;
- ts: string;
}
⋮----
-export interface MarginTransactionRecordV2 {
- id: string;
- coin: string;
- marginTaxType: string;
- amount: string;
- fee: string;
- total: string;
+export interface GetStockPlusQuoteRequestV3 {
symbol: string;
- ts: string;
}
⋮----
-export interface P2PMerchantOrdersV2 {
- id: string;
- coin: string;
- p2pTaxType: string;
- total: string;
- ts: string;
+export interface GetStockPlusTradeDetailRequestV3 {
+ symbol: string;
+ count?: string;
}
⋮----
-/**
- *
- * * Common | P2P
- *
- */
+export interface GetStockPlusIntradayRequestV3 {
+ symbol: string;
+}
⋮----
-export interface P2PMerchantV2 {
- registerTime: string;
- nickName: string;
- isOnline: string;
- avgPaymentTime: string;
- avgReleaseTime: string;
- totalTrades: string;
- totalBuy: string;
- totalSell: string;
- totalCompletionRate: string;
- trades30d: string;
- sell30d: string;
- buy30d: string;
- completionRate30d: string;
+export interface GetStockPlusHistoryCandlestickRequestV3 {
+ symbol: string;
+ period: string;
+ count?: string;
+ adjustType?: string;
+ forward?: boolean;
+ time?: string;
+ tradeSessions?: string;
}
⋮----
-export interface P2PMerchantInfoV2 {
- registerTime: string;
- nickName: string;
- merchantId: string;
- avgPaymentTime: string;
- avgReleaseTime: string;
- totalTrades: string;
- totalBuy: string;
- totalSell: string;
- totalCompletionRate: string;
- trades30d: string;
- sell30d: string;
- buy30d: string;
- completionRate30d: string;
- kycStatus: boolean;
- emailBindStatus: boolean;
- mobileBindStatus: boolean;
- email: string;
- mobile: string;
+export interface GetStockPlusCandlestickRequestV3 {
+ symbol: string;
+ period: string;
+ count?: string;
+ adjustType?: string;
+ tradeSessions?: string;
}
⋮----
-export interface P2PMerchantOrderV2 {
- orderId: string;
- orderNo: string;
- advNo: string;
- side: string;
- count: string;
- coin: string;
- price: string;
- fiat: string;
- withdrawTime: string;
- representTime: string;
- releaseTime: string;
- paymentTime: string;
- amount: string;
- status: string;
- buyerRealName: string;
- sellerRealName: string;
- ctime: string;
- utime: string;
- paymentInfo: {
- paymethodName: string;
- paymethodId: string;
- paymethodInfo: {
- name: string;
- required: string;
- type: string;
- value: string;
- }[];
- };
+export interface GetStockPlusDepthRequestV3 {
+ symbol: string;
}
⋮----
-export interface P2PMerchantAdvertismentV2 {
- advId: string;
- advNo: string;
- side: string;
- advSize: string;
- size: string;
- coin: string;
- price: string;
- coinPrecision: string;
- fiat: string;
- fiatPrecision: string;
- fiatSymbol: string;
- status: string;
- hide: string;
- maxTradeAmount: string;
- minTradeAmount: string;
- payDuration: string;
- turnoverNum: string;
- turnoverRate: string;
- label: string | null;
- userLimitList: {
- minCompleteNum: string;
- maxCompleteNum: string;
- placeOrderNum: string;
- allowMerchantPlace: string;
- completeRate30d: string;
- country: string;
- };
- paymentMethodList: {
- paymentMethod: string;
- paymentId: string;
- paymentInfo: {
- name: string;
- required: boolean;
- type: string;
- }[];
- }[];
- merchantCertifiedList: {
- imageUrl: string;
- desc: string;
- }[];
- utime: string;
- ctime: string;
+export interface PlaceStockPlusOrderRequestV3 {
+ symbol: string;
+ orderType: 'LO' | 'MO' | 'LIT' | 'MIT' | 'TSLPAMT' | 'TSLPPCT';
+ side: 'Buy' | 'Sell';
+ submittedQuantity: string;
+ timeInForce: 'Day' | 'GoodTilCanceled' | 'GoodTilDate';
+ submittedPrice?: string;
+ triggerPrice?: string;
+ limitOffset?: string;
+ trailingAmount?: string;
+ trailingPercent?: string;
+ expireDate?: string;
+ outsideRth?: 'RTHOnly' | 'AnyTime' | 'Overnight';
+ limitDepthLevel?: number;
+ triggerCount?: number;
+ monitorPrice?: string;
+ remark?: string;
}
⋮----
-/**
- *
- * * Common | Trading insights
- *
- */
+export interface CancelStockPlusOrderRequestV3 {
+ symbol: string;
+ orderId?: string;
+ clientOid?: string;
+}
⋮----
-export interface SpotWhaleNetFlowV2 {
- volume: string;
- date: string;
+export interface ModifyStockPlusOrderRequestV3 {
+ orderId: string;
+ quantity: string;
+ price?: string;
+ triggerPrice?: string;
+ limitOffset?: string;
+ trailingAmount?: string;
+ trailingPercent?: string;
+ limitDepthLevel?: number;
+ triggerCount?: number;
+ monitorPrice?: string;
+ remark?: string;
}
⋮----
-export interface FuturesActiveBuySellVolumeV2 {
- buyVolume: string;
- sellVolume: string;
- ts: string;
+export interface GetStockPlusTodayOrdersRequestV3 {
+ symbol?: string;
+ status?: string | string[];
+ side?: string;
+ market?: string;
+ orderId?: string;
}
⋮----
-export interface FuturesActiveLongShortPositionV2 {
- longPositionRatio: string;
- shortPositionRatio: string;
- longShortPositionRatio: string;
- ts: string;
+export interface GetStockPlusHistoryOrdersRequestV3 {
+ symbol?: string;
+ status?: string | string[];
+ side?: string;
+ market?: string;
+ startAt?: string;
+ endAt?: string;
}
⋮----
-export interface LeveragedLongShortRatioV2 {
- ts: string;
- longShortRatio: string;
+export interface GetStockPlusOrderDetailRequestV3 {
+ orderId: string;
}
⋮----
-export interface MarginLoanGrowthRateV2 {
- ts: string;
- growthRate: string;
+export interface GetStockPlusTodayExecutionsRequestV3 {
+ symbol?: string;
+ orderId?: string;
}
⋮----
-export interface IsolatedMarginBorrowingRatioV2 {
- ts: string;
- borrowRate: string;
+export interface GetStockPlusHistoryExecutionsRequestV3 {
+ symbol?: string;
+ startAt?: string;
+ endAt?: string;
}
⋮----
-export interface FuturesLongShortRatioV2 {
- longRatio: string;
- shortRatio: string;
- longShortRatio: string;
- ts: string;
+export interface GetStockPlusAccountRequestV3 {
+ currency?: string;
}
⋮----
-export interface SpotFundFlowV2 {
- whaleBuyVolume: string;
- dolphinBuyVolume: string;
- fishBuyVolume: string;
- whaleSellVolume: string;
- dolphinSellVolume: string;
- fishSellVolume: string;
- whaleBuyRatio: string;
- dolphinBuyRatio: string;
- fishBuyRatio: string;
- whaleSellRatio: string;
- dolphinSellRatio: string;
- fishSellRatio: string;
+export interface GetStockPlusCashFlowRequestV3 {
+ startTime: string;
+ endTime: string;
+ businessType?: string;
+ symbol?: string;
+ page?: string;
+ size?: string;
}
⋮----
-export interface FuturesActiveLongShortAccountV2 {
- longAccountRatio: string;
- shortAccountRatio: string;
- longShortAccountRatio: string;
- ts: string;
+export interface GetStockPlusStockPositionRequestV3 {
+ symbol?: string;
+}
+⋮----
+export interface StockPlusTransferRequestV3 {
+ coin?: string;
+ amount?: string;
+ direction?: 'in' | 'out';
}
⋮----
+export interface GetStockPlusTransferRecordsRequestV3 {
+ transferId?: string;
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
+ cursor?: string;
+}
+
+================
+File: src/types/response/v2/broker.ts
+================
/**
*
- * * Common | Virtual Subaccount
+ * * Broker | Subaccount
*
*/
⋮----
-export interface CreateVirtualSubAccountV2 {
- failureList: {
- subaAccountName: string;
- }[];
- successList: {
- subaAccountUid: string;
- subaAccountName: string;
- status: string;
- label: string;
- permList: string[];
- cTime: string;
- uTime: string;
- }[];
-}
-⋮----
-export interface CreateVirtualSubAccountAndApiKeyV2 {
- subAccountUid: string;
- subAccountName: string;
- label: string;
- subAccountApiKey: string;
- secretKey: string;
+export interface CreateSubaccountResponseV2 {
+ subUid: string;
+ subaccountName: string;
+ status: string;
permList: string[];
- ipList: string[];
+ label: string;
+ cTime: string;
}
⋮----
-export interface VirtualSubAccountV2 {
- subAccountUid: string;
- subAccountName: string;
+export interface BrokerSubaccountV2 {
+ subUid: string;
+ subaccountName: string;
status: string;
permList: string[];
label: string;
- accountType: string;
- bindingTime: string;
+ language: string;
cTime: string;
uTime: string;
}
⋮----
-export interface CreateVirtualSubAccountApiKeyV2 {
- subAccountUid: string;
- label: string;
- subAccountApiKey: string;
- secretKey: string;
+export interface ModifySubaccountResponseV2 {
+ subUid: string;
+ subaccountName: string;
+ status: string;
permList: string[];
- ipList: string[];
-}
-⋮----
-export interface ModifyVirtualSubAccountApiKeyV2 {
- subAccountUid: string;
label: string;
- subAccountApiKey: string;
- secretKey: string;
- permList: string[];
- ipList: string[];
+ language: string;
+ cTime: string;
+ uTime: string;
}
⋮----
-export interface CreateAgentSubaccountV2 {
- username: string;
+export interface SubaccountEmailV2 {
subUid: string;
- apiKey: string;
- secret: string;
- note: string;
- createdTime: string;
-}
-⋮----
-export interface SubAccountApiKeyItemV2 {
- subAccountUid: string;
- label: string;
- subAccountApiKey: string;
- permList: string[];
- ipList: string[];
+ subaccountName: string;
+ subaccountEmail: string;
+ cTime: string;
+ uTime: string;
}
⋮----
-/**
- *
- * * Common | Assets
- *
- */
-⋮----
-export interface FundingAssetV2 {
+export interface BrokerSubaccountSpotAssetV2 {
coin: string;
available: string;
frozen: string;
- usdtValue: string;
+ locked: string;
+ uTime: string;
}
⋮----
-export interface BotAssetV2 {
- coin: string;
+export interface BrokerSubaccountFutureAssetV2 {
+ marginCoin: string;
available: string;
- equity: string;
- bonus: string;
frozen: string;
- usdtValue: string;
+ locked: string;
+ crossedMaxAvailable: string;
+ isolatedMaxAvailable: string;
+ maxTransferOut: string;
+ accountEquity: string;
+ usdtEquity: string;
+ btcEquity: string;
+ uTime: string;
}
⋮----
-/**
- *
- * * Common | Convert
- *
- */
-⋮----
-export interface ConvertCurrencyV2 {
+export interface CreateSubaccountDepositAddressV2 {
+ subUid: string;
coin: string;
- available: string;
- maxAmount: string;
- minAmount: string;
+ address: string;
+ chain: string;
+ tag: string;
+ url: string;
+ cTime: string;
}
⋮----
-export interface ConvertQuotedPriceV2 {
+export interface SubaccountDepositV2 {
+ orderId: string;
+ txId: string;
+ coin: string;
+ type: string;
+ dest: string;
+ amount: string;
+ status: string;
+ fromAddress: string;
+ toAddress: string;
fee: string;
- fromCoinSize: string;
- fromCoin: string;
- cnvtPrice: string;
- toCoinSize: string;
- toCoin: string;
- traceId: string;
-}
-⋮----
-export interface ConvertTradeResponseV2 {
- ts: string;
- cnvtPrice: string;
- toCoinSize: string;
- toCoin: string;
+ chain: string;
+ confirm: string;
+ tag: string;
+ cTime: string;
+ uTime: string;
}
⋮----
-export interface ConvertRecordV2 {
- id: string;
- ts: string;
- cnvtPrice: string;
+export interface BrokerSubaccountWithdrawalV2 {
+ orderId: string;
+ txId: string;
+ coin: string;
+ type: string;
+ dest: string;
+ amount: string;
+ status: string;
+ fromAddress: string;
+ toAddress: string;
fee: string;
- fromCoinSize: string;
- fromCoin: string;
- toCoinSize: string;
- toCoin: string;
+ chain: string;
+ confirm: string;
+ tag: string;
+ userId: string;
+ cTime: string;
+ uTime: string;
}
⋮----
/**
*
- * * Common | BGB Convert
+ * Broker | Api Key
*
*/
⋮----
-export interface BGBConvertCoinV2 {
- coin: string;
- available: string;
- bgbEstAmount: string;
- precision: string;
- feeDetail: {
- feeRate: string;
- fee: string;
- }[];
- cTime: string;
+export interface CreateSubaccountApiKeyResponseV2 {
+ subUid: string;
+ apiKey: string;
+ secretKey: string;
+ label: string;
+ ipList: string[];
+ permType: string;
+ permList: string[];
}
⋮----
-export interface ConvertBGBResponseV2 {
- orderList: {
- coin: string;
- orderId: string;
- }[];
+export interface SubaccountApiKeyV2 {
+ subUid: string;
+ label: string;
+ apiKey: string;
+ secretKey: string;
+ permType: string;
+ permList: string[];
+ ipList: string[];
}
⋮----
-export interface BGBConvertHistoryV2 {
- orderId: string;
- fromCoin: string;
- fromAmount: string;
- fromCoinPrice: string;
- toCoin: string;
- toAmount: string;
- toCoinPrice: string;
- feeDetail: {
- feeCoin: string;
- fee: string;
- }[];
- status: string;
- ctime: string;
+export interface ModifySubaccountApiKeyResponseV2 {
+ subUid: string;
+ apiKey: string;
+ label: string;
+ ipList: string[];
+ permType: string;
+ permList: string[];
}
-
-================
-File: src/types/response/v2/earn.ts
-================
+⋮----
/**
*
- *
- * Earn | Savings
- *
+ * * Broker | All Sub-accounts Deposit and Withdrawal Records
*
*/
⋮----
-export interface EarnSavingsProductsV2 {
- productId: string;
+export interface AllSubDepositWithdrawalRecordV2 {
+ uid: string;
+ txId: string;
+ type: 'deposit' | 'withdrawal';
+ subType: 'onchain' | 'internal' | 'fast';
coin: string;
- periodType: string;
- period: string;
- apyType: string;
- advanceRedeem: string;
- settleMethod: string;
- apyList: {
- rateLevel: string;
- minStepVal: string;
- maxStepVal: string;
- currentApy: string;
- }[];
- status: string;
- productLevel: string;
+ amount: string;
+ status: 'pending' | 'fail' | 'success';
+ ts: string;
}
⋮----
-export interface EarnSavingsAccountV2 {
- btcAmount: string;
- usdtAmount: string;
- btc24hEarning: string;
- usdt24hEarning: string;
- btcTotalEarning: string;
- usdtTotalEarning: string;
-}
+/**
+ *
+ * * Broker | Subaccounts
+ *
+ */
⋮----
-export interface EarnSavingsAssetV2 {
- productId: string;
- orderId: string;
- productCoin: string;
- interestCoin: string;
- periodType: string;
- period: string;
- holdAmount: string;
- lastProfit: string;
- totalProfit: string;
- holdDays: string;
- status: string;
- allowRedemption: string;
- productLevel: string;
- apy: {
- rateLevel: string;
- minApy: string;
- maxApy: string;
- currentApy: string;
- }[];
+export interface BrokerSubaccountInfoV2 {
+ uid: string;
+ asset: string;
+ firstTimeDeposit: string;
+ firstTimeTrade: string;
+ registerTime: string;
}
⋮----
-export interface EarnSavingsAssetsV2 {
- resultList: EarnSavingsAssetV2[];
- endId: string;
+/**
+ *
+ * * Broker | Commissions
+ *
+ */
+⋮----
+export interface BrokerCommissionV2 {
+ uid: string;
+ coin: string;
+ symbol: string;
+ dealtAmount: string;
+ totalFee: string;
+ deductedFee: string;
+ paidFee: string;
+ markUpFee: string;
+ totalCommission: string;
}
⋮----
-export interface EarnSavingsRecordV2 {
- orderId: string;
- coinName: string;
- settleCoinName: string;
- productType: string;
- period: string;
- productLevel: string;
- amount: string;
- ts: string;
- orderType: string;
-}
-⋮----
-export interface EarnSavingsRecordsV2 {
- resultList: EarnSavingsRecordV2[];
- endId: string;
-}
+/**
+ *
+ * * Broker | Trade Volume
+ *
+ */
⋮----
-export interface EarnSavingsSubscriptionDetailV2 {
- singleMinAmount: string;
- singleMaxAmount: string;
- remainingAmount: string;
- subscribePrecision: string;
- profitPrecision: string;
- subscribeTime: string;
- interestTime: string;
- settleTime: string;
- expireTime: string;
- redeemTime: string;
- settleMethod: string;
- apyList: {
- rateLevel: string;
- minStepVal: string;
- maxStepVal: string;
- currentApy: string;
- }[];
- redeemDelay: string;
+export interface BrokerTradeVolumeV2 {
+ uid: string;
+ volume: string;
+ spotVolume: string;
+ futureVolume: string;
}
⋮----
/**
*
- *
- * Earn | Earn Account
- *
+ * * Broker | Total Commission
*
*/
⋮----
+export interface BrokerTotalCommissionV2 {
+ date: string;
+ totalTradingVolume: string;
+ totalActiveTraders: string;
+ totalCommission: string;
+ spot: {
+ spotTradingVolume: string;
+ spotTradingFee: string;
+ spotPureTradingFee: string;
+ spotCommission: string;
+ };
+ futures: {
+ futuresTradingVolume: string;
+ futuresTradingFee: string;
+ futuresPureTradingFee: string;
+ futuresCommission: string;
+ };
+}
+⋮----
/**
*
- *
- * Earn | Shark Fin
- *
+ * * Broker | Order Commission
*
*/
⋮----
-export interface EarnSharkfinProductV2 {
- productId: string;
- productName: string;
- productCoin: string;
- subscribeCoin: string;
- farmingStartTime: string;
- farmingEndTime: string;
- lowerRate: string;
- defaultRate: string;
- upperRate: string;
- period: string;
- interestStartTime: string;
- status: string;
- minAmount: string;
- limitAmount: string;
- soldAmount: string;
- endTime: string;
- startTime: string;
+export interface BrokerOrderCommissionItemV2 {
+ fillId: string;
+ orderId: string;
+ ts: string;
+ clientOid: string;
+ bizType: 'spot' | 'futures';
+ subBizType:
+ | 'spot_trade'
+ | 'spot_margin'
+ | 'usdt_futures'
+ | 'coin_futures'
+ | 'usdc_futures';
+ symbol: string;
+ volume: string;
+ fee: string;
+ pureFee: string;
+ rebateAmount: string;
}
⋮----
-export interface EarnSharkfinProductsV2 {
- resultList: EarnSharkfinProductV2[];
+export interface BrokerOrderCommissionV2 {
+ commissionlist: BrokerOrderCommissionItemV2[];
endId: string;
}
⋮----
-export interface EarnSharkfinAccountV2 {
- btcSubscribeAmount: string;
- usdtSubscribeAmount: string;
- btcHistoricalAmount: string;
- usdtHistoricalAmount: string;
- btcTotalEarning: string;
- usdtTotalEarning: string;
+/**
+ *
+ * * Broker | Rebate Info
+ *
+ */
+⋮----
+export interface BrokerRebateInfoV2 {
+ affiliationType: 'affiliate' | 'official';
+ userLevel: string;
+ clientSpotRebateRatio: string;
+ clientFuturesRebateRatio: string;
}
⋮----
-export interface EarnSharkfinAssetV2 {
- productId: string;
- interestStartTime: string;
- interestEndTime: string;
- productCoin: string;
- subscribeCoin: string;
- trend: string;
- settleTime: string;
- interestAmount: string;
- productStatus: string;
+/**
+ *
+ * * Broker | Agent (affiliate) customer APIs
+ *
+ */
+⋮----
+export interface AgentCustomerCommissionItemV2 {
+ uid: string;
+ date: string;
+ coin: string;
+ symbol: string;
+ productType:
+ | 'SPOT'
+ | 'MARGIN'
+ | 'USDT-FUTURES'
+ | 'COIN-FUTURES'
+ | 'USDC-FUTURES'
+ | string;
+ dealAmount: string;
+ fee: string;
+ feeDeduction: string;
+ activityBonusDeduct: string;
+ spotCouponDeduct: string;
+ futuresCouponDeduct: string;
+ spotFeeDiscountDeduct: string;
+ negativeMakerFeeDeduct: string;
+ feePaid: string;
+ rebateAmount: string;
+ userTotalRebateAmount: string;
+ dayTotalRebateAmount: string;
+ totalRebateAmount: string;
}
⋮----
-export interface EarnSharkfinAssetsV2 {
- resultList: EarnSharkfinAssetV2[];
+export interface AgentCustomerCommissionsV2 {
endId: string;
+ commissionList: AgentCustomerCommissionItemV2[];
}
⋮----
-export interface EarnSharkfinRecordV2 {
- orderId: string;
- product: string;
- period: string;
- amount: string;
- ts: string;
- type: string;
+export interface AgentSubCustomerItemV2 {
+ uid: string;
+ registerTime: string;
}
-export interface EarnSharkfinRecordsV2 {
- resultList: EarnSharkfinRecordV2[];
- endId: string;
+⋮----
+export interface AgentSubCustomerListV2 {
+ list: AgentSubCustomerItemV2[];
+ minId: string;
}
⋮----
-export interface EarnSharkfinSubscriptionDetailV2 {
- productCoin: string;
- subscribeCoin: string;
- interestTime: string;
- expirationTime: string;
- minPrice: string;
- currentPrice: string;
- maxPrice: string;
- minRate: string;
- defaultRate: string;
- maxRate: string;
- period: string;
- productMinAmount: string;
- availableBalance: string;
- userAmount: string;
- remainingAmount: string;
- profitPrecision: string;
- subscribePrecision: string;
+export interface AgentCustomerTradeVolumeItemV2 {
+ uid: string;
+ /** API field name (Bitget spelling). */
+ volumn: string;
+ spotVolume: string;
+ futuresVolume: string;
+ time: string;
}
⋮----
-/**
- *
- *
- * Earn | Loan
- *
- *
- */
+/** API field name (Bitget spelling). */
⋮----
-export interface EarnLoanCurrencyLoanInfoV2 {
- coin: string;
- hourRate7D: string;
- rate7D: string;
- hourRate30D: string;
- rate30D: string;
- minUsdt: string;
- maxUsdt: string;
- min: string;
- max: string;
+export interface AgentCustomerListItemV2 {
+ uid: string;
+ registerTime: string;
}
-export interface EarnLoanCurrencyPledgeInfoV2 {
- coin: string;
- initRate: string;
- supRate: string;
- forceRate: string;
- minUsdt: string;
- maxUsdt: string;
+⋮----
+export interface AgentCustomerKycItemV2 {
+ uid: string;
+ kycResult: 'passed' | 'not_passed' | string;
}
⋮----
-export interface EarnLoanCurrenciesV2 {
- loanInfos: EarnLoanCurrencyLoanInfoV2[];
- pledgeInfos: EarnLoanCurrencyPledgeInfoV2[];
+export interface AgentCustomerKycResultV2 {
+ userList: AgentCustomerKycItemV2[];
+ endId: string;
}
⋮----
-export interface EarnLoanOrdersV2 {
+export interface AgentCustomerDepositItemV2 {
orderId: string;
- loanCoin: string;
- loanAmount: string;
- interestAmount: string;
- hourInterestRate: string;
- pledgeCoin: string;
- pledgeAmount: string;
- pledgeRate: string;
- supRate: string;
- forceRate: string;
- borrowTime: string;
- expireTime: string;
-}
-⋮----
-export interface EarnLoanRepayResponseV2 {
- loanCoin: string;
- pledgeCoin: string;
- repayAmount: string;
- payInterest: string;
- repayLoanAmount: string;
- repayUnlockAmount: string;
-}
-⋮----
-export interface EarnLoanRepayHistoryV2 {
- orderId: string;
- loanCoin: string;
- pledgeCoin: string;
- repayAmount: string;
- payInterest: string;
- repayLoanAmount: string;
- repayUnlockAmount: string;
- repayTime: string;
-}
-⋮----
-export interface EarnLoanPledgeRateHistoryV2 {
- loanCoin: string;
- pledgeCoin: string;
- orderId: string;
- reviseTime: string;
- reviseSide: string;
- reviseAmount: string;
- afterPledgeRate: string;
- beforePledgeRate: string;
-}
-⋮----
-export interface EarnLoanHistoryV2 {
- orderId: string;
- loanCoin: string;
- pledgeCoin: string;
- initPledgeAmount: string;
- initLoanAmount: string;
- hourRate: string;
- daily: string;
- borrowTime: string;
- status: string;
+ uid: string;
+ depositTime: string;
+ depositCoin: string;
+ depositAmount: string;
}
⋮----
-export interface EarnLoanDebtPledgeInfoV2 {
- coin: string;
- amount: string;
- amountUsdt: string;
+export interface AgentCustomerAssetItemV2 {
+ balance: string;
+ uid: string;
+ uTime: string;
+ remark: string;
}
⋮----
-export interface EarnLoanDebtLoanInfoV2 {
+export interface AgentCommissionDetailItemV2 {
+ uid: string;
+ bizType: 'spot' | 'futures' | string;
+ subBizType: string;
+ symbol: string;
coin: string;
- amount: string;
- amountUsdt: string;
+ fee: string;
+ volume: string;
+ activityBonusDeduct: string;
+ spotCouponDeduct: string;
+ futuresCouponDeduct: string;
+ spotFeeDiscountDeduct: string;
+ negativeMakerFeeDeduct: string;
+ feePaid: string;
+ directCommission: string;
+ subCommission: string;
+ partnerCommission: string;
+ partnerActualCommission: string;
+ traderType: string;
+ apiType: string;
+ status: 'settled' | 'unsettled' | 'notIssued' | string;
+ startCalculationTime: string;
+ endCalculationTime: string;
}
⋮----
-export interface EarnLoanDebtsV2 {
- pledgeInfos: EarnLoanDebtPledgeInfoV2[];
- loanInfos: EarnLoanDebtLoanInfoV2[];
+export interface AgentCommissionDetailV2 {
+ endId: string;
+ commissionList: AgentCommissionDetailItemV2[];
}
+
+================
+File: src/types/response/v2/common.ts
+================
+/**
+ *
+ * * Common | Notice
+ *
+ */
⋮----
-export interface EarnLoanLiquidationRecordsV2 {
- orderId: string;
- loanCoin: string;
- pledgeCoin: string;
- reduceTime: string;
- pledgeRate: string;
- pledgePrice: string;
- status: string;
- pledgeAmount: string;
- reduceFee: string;
- residueAmount: string;
- runlockAmount: string;
- repayLoanAmount: string;
+export interface AnnouncementV2 {
+ annId: string;
+ annTitle: string;
+ annDesc: string;
+ cTime: string;
+ language: string;
+ annUrl: string;
}
⋮----
/**
*
+ * * Common | Public
*
- * Earn | On-Chain Elite
+ */
+⋮----
+/**
*
+ * * Common | Tax
*
*/
⋮----
-export interface EarnEliteSubscriptionCoinV2 {
- subscriptionCoin: string;
- precision: string;
- feeRate: string;
- exchangeRate: string;
- remainQuota?: string;
- minAmount?: string;
-}
-⋮----
-export interface EarnEliteProductV2 {
- productId: string;
+export interface SpotTransactionRecordV2 {
+ id: string;
coin: string;
- minApr: string;
- maxApr: string;
- subscriptionCoinList: EarnEliteSubscriptionCoinV2[];
- sellOut: 'YES' | 'NO' | string;
-}
-⋮----
-export interface EarnEliteAssetProjectV2 {
- projectName: string;
-}
-⋮----
-export interface EarnEliteAssetV2 {
- productId: string;
- productCoin: string;
- holdingAmount: string;
- usdtHoldingAmount: string;
- exchangeRate: string;
- apr: string;
- minApy?: string;
- maxApy?: string;
- subscriptionCoin: string;
- exchangeAmount: string;
- projectList?: EarnEliteAssetProjectV2[];
- unsettledBGPoints: string;
- interestCoin: string;
- totalProfit: string;
+ spotTaxType: string;
+ amount: string;
+ fee: string;
+ balance: string;
+ ts: string;
}
⋮----
-export interface EarnEliteAssetsV2 {
- resultList: EarnEliteAssetV2[];
+export interface FuturesTransactionRecordV2 {
+ id: string;
+ symbol: string;
+ marginCoin: string;
+ futureTaxType: string;
+ amount: string;
+ fee: string;
+ ts: string;
}
⋮----
-export interface EarnEliteRecordV2 {
- recordId: string;
- productId: string;
+export interface MarginTransactionRecordV2 {
+ id: string;
coin: string;
- status: string;
- exchangeRate: string;
- receivedCoin: string;
- receivedAmount: string;
- investAmount: string;
- feeRate: string;
- redeemType?: string | string[];
- receivingAccount: string;
- actualReceivingAccount: string;
- paymentAccount?: string[];
- settlePoints: string;
+ marginTaxType: string;
+ amount: string;
fee: string;
+ total: string;
+ symbol: string;
+ ts: string;
}
⋮----
-export interface EarnEliteRecordsV2 {
- recordList: EarnEliteRecordV2[];
- endId: string;
-}
-⋮----
-export interface EarnEliteSubscribeInfoV2 {
- productSubId: string;
- minAmount: string;
- remainQuota: string;
- exchangeRate: string;
- productCoin: string;
- interestTime: string;
- settleTime: string;
- precision: string;
- feeRate: string;
- /** Present for BGUSD per API docs. */
- subscriptionCoinList?: EarnEliteSubscriptionCoinV2[];
+export interface P2PMerchantOrdersV2 {
+ id: string;
+ coin: string;
+ p2pTaxType: string;
+ total: string;
+ ts: string;
}
⋮----
-/** Present for BGUSD per API docs. */
-⋮----
-export interface EarnEliteSubscribeResultV2 {
- orderId: string;
-}
+/**
+ *
+ * * Common | P2P
+ *
+ */
⋮----
-export interface EarnEliteSubscribeStatusV2 {
- result: 'settled' | 'pending' | 'rejected' | string;
+export interface P2PMerchantV2 {
+ registerTime: string;
+ nickName: string;
+ isOnline: string;
+ avgPaymentTime: string;
+ avgReleaseTime: string;
+ totalTrades: string;
+ totalBuy: string;
+ totalSell: string;
+ totalCompletionRate: string;
+ trades30d: string;
+ sell30d: string;
+ buy30d: string;
+ completionRate30d: string;
}
⋮----
-export interface EarnEliteRedeemInfoBgusdReceiveCoinV2 {
- bgusdReceiveCoin: string;
- bgusdExchangeRate: string;
+export interface P2PMerchantInfoV2 {
+ registerTime: string;
+ nickName: string;
+ merchantId: string;
+ avgPaymentTime: string;
+ avgReleaseTime: string;
+ totalTrades: string;
+ totalBuy: string;
+ totalSell: string;
+ totalCompletionRate: string;
+ trades30d: string;
+ sell30d: string;
+ buy30d: string;
+ completionRate30d: string;
+ kycStatus: boolean;
+ emailBindStatus: boolean;
+ mobileBindStatus: boolean;
+ email: string;
+ mobile: string;
}
⋮----
-export interface EarnEliteRedeemModeV2 {
- redeemFeeRate: string;
- remainQuota: string;
- redeemType: 'fast' | 'standard' | string;
- redeemScale: string;
- redeemDelayDate: string;
- minRedeemAmount: string;
- redeemTime: string;
+export interface P2PMerchantOrderV2 {
+ orderId: string;
+ orderNo: string;
+ advNo: string;
+ side: string;
+ count: string;
+ coin: string;
+ price: string;
+ fiat: string;
+ withdrawTime: string;
+ representTime: string;
+ releaseTime: string;
+ paymentTime: string;
+ amount: string;
+ status: string;
+ buyerRealName: string;
+ sellerRealName: string;
+ ctime: string;
+ utime: string;
+ paymentInfo: {
+ paymethodName: string;
+ paymethodId: string;
+ paymethodInfo: {
+ name: string;
+ required: string;
+ type: string;
+ value: string;
+ }[];
+ };
}
⋮----
-export interface EarnEliteRedeemInfoV2 {
- productId: string;
- productSubId: string;
- productCoin: string;
- subscriptionCoin: string;
- profitCoin: string;
- exchangeRate: string;
- totalUnPayInterestAmount: string;
- preSettleApr: string;
- receivedCoin: string;
- unsettledPoints: string;
- bgusdReceiveCoinList: EarnEliteRedeemInfoBgusdReceiveCoinV2[];
- redeemModeList: EarnEliteRedeemModeV2[];
+export interface P2PMerchantAdvertismentV2 {
+ advId: string;
+ advNo: string;
+ side: string;
+ advSize: string;
+ size: string;
+ coin: string;
+ price: string;
+ coinPrecision: string;
+ fiat: string;
+ fiatPrecision: string;
+ fiatSymbol: string;
+ status: string;
+ hide: string;
+ maxTradeAmount: string;
+ minTradeAmount: string;
+ payDuration: string;
+ turnoverNum: string;
+ turnoverRate: string;
+ label: string | null;
+ userLimitList: {
+ minCompleteNum: string;
+ maxCompleteNum: string;
+ placeOrderNum: string;
+ allowMerchantPlace: string;
+ completeRate30d: string;
+ country: string;
+ };
+ paymentMethodList: {
+ paymentMethod: string;
+ paymentId: string;
+ paymentInfo: {
+ name: string;
+ required: boolean;
+ type: string;
+ }[];
+ }[];
+ merchantCertifiedList: {
+ imageUrl: string;
+ desc: string;
+ }[];
+ utime: string;
+ ctime: string;
}
⋮----
-export interface RedeemEarnEliteResultV2 {
- orderId: string;
-}
-
-================
-File: src/types/response/v2/spot.ts
-================
/**
*
- * * Spot | Market
+ * * Common | Trading insights
*
*/
⋮----
-export interface SpotCoinChainV2 {
- chain: string;
- needTag: boolean;
- withdrawable: boolean;
- rechargeable: boolean;
- withdrawFee: string;
- extraWithdrawFee: string;
- depositConfirm: string;
- withdrawConfirm: string;
- minDepositAmount: string;
- minWithdrawAmount: string;
- browserUrl: string;
- contractAddress: string;
- withdrawStep: string;
- withdrawMinScale: string;
- congestion: string;
+export interface SpotWhaleNetFlowV2 {
+ volume: string;
+ date: string;
}
⋮----
-export interface SpotCoinInfoV2 {
- coinId: string;
- coin: string;
- transfer: boolean;
- chains: SpotCoinChainV2[];
+export interface FuturesActiveBuySellVolumeV2 {
+ buyVolume: string;
+ sellVolume: string;
+ ts: string;
}
⋮----
-export interface SpotSymbolInfoV2 {
- symbol: string;
- baseCoin: string;
- quoteCoin: string;
- minTradeAmount: string;
- maxTradeAmount: string;
- takerFeeRate: string;
- makerFeeRate: string;
- pricePrecision: string;
- quantityPrecision: string;
- quotePrecision: string;
- minTradeUSDT: string;
- status: string;
- buyLimitPriceRatio: string;
- sellLimitPriceRatio: string;
- orderQuantity: string;
- areaSymbol: string;
- maxLimitOrderValue?: string;
- maxMarketOrderValue?: string;
+export interface FuturesActiveLongShortPositionV2 {
+ longPositionRatio: string;
+ shortPositionRatio: string;
+ longShortPositionRatio: string;
+ ts: string;
}
⋮----
-export interface SpotVipFeeRateV2 {
- level: number;
- dealAmount: string;
- assetAmount: string;
- takerFeeRate: string;
- makerFeeRate: string;
- btcWithdrawAmount: string;
- usdtWithdrawAmount: string;
+export interface LeveragedLongShortRatioV2 {
+ ts: string;
+ longShortRatio: string;
}
⋮----
-export interface SpotTickerV2 {
- symbol: string;
- high24h: string;
- open: string;
- low24h: string;
- lastPr: string;
- quoteVolume: string;
- baseVolume: string;
- usdtVolume: string;
- bidPr: string;
- askPr: string;
- bidSz: string;
- askSz: string;
- openUtc: string;
+export interface MarginLoanGrowthRateV2 {
ts: string;
- changeUtc24h: string;
- change24h: string;
+ growthRate: string;
}
⋮----
-export interface SpotMergeDepthV2 {
- asks: [string, string][];
- bids: [string, string][];
+export interface IsolatedMarginBorrowingRatioV2 {
ts: string;
- scale: string;
- precision: string;
- isMaxPrecision: string;
+ borrowRate: string;
}
⋮----
-export interface SpotOrderBookDepthV2 {
- asks: [string, string][];
- bids: [string, string][];
+export interface FuturesLongShortRatioV2 {
+ longRatio: string;
+ shortRatio: string;
+ longShortRatio: string;
ts: string;
}
⋮----
-export type SpotCandlestickV2 = [
- string, // timestamp
- string, // open
- string, // high
- string, // low
- string, // close
- string, // baseVolume
- string, // usdtVolume
- string, // quoteVolume
-];
+export interface SpotFundFlowV2 {
+ whaleBuyVolume: string;
+ dolphinBuyVolume: string;
+ fishBuyVolume: string;
+ whaleSellVolume: string;
+ dolphinSellVolume: string;
+ fishSellVolume: string;
+ whaleBuyRatio: string;
+ dolphinBuyRatio: string;
+ fishBuyRatio: string;
+ whaleSellRatio: string;
+ dolphinSellRatio: string;
+ fishSellRatio: string;
+}
⋮----
-string, // timestamp
-string, // open
-string, // high
-string, // low
-string, // close
-string, // baseVolume
-string, // usdtVolume
-string, // quoteVolume
-⋮----
-export interface SpotTradeV2 {
- symbol: string;
- tradeId: string;
- side: string;
- price: string;
- size: string;
- ts: string;
-}
+export interface FuturesActiveLongShortAccountV2 {
+ longAccountRatio: string;
+ shortAccountRatio: string;
+ longShortAccountRatio: string;
+ ts: string;
+}
⋮----
/**
*
- * * Spot | Trade
+ * * Common | Virtual Subaccount
*
*/
⋮----
-export interface CancelAndSubmitSpotOrderResponseV2 {
- orderId: string;
- clientOid: string | null;
- success: string;
- msg: string | null;
-}
-⋮----
-export interface SubmitSpotBatchOrdersResponseV2 {
- successList: {
- orderId: string;
- clientOid: string;
- }[];
+export interface CreateVirtualSubAccountV2 {
failureList: {
- orderId: string;
- clientOid: string;
- errorMsg: string;
- errorCode?: string;
+ subaAccountName: string;
+ }[];
+ successList: {
+ subaAccountUid: string;
+ subaAccountName: string;
+ status: string;
+ label: string;
+ permList: string[];
+ cTime: string;
+ uTime: string;
}[];
}
⋮----
-export interface SpotOrderInfoV2 {
- userId: string;
- symbol: string;
- orderId: string;
- clientOid: string;
- price: string;
- size: string;
- orderType: string;
- side: string;
- status: string;
- priceAvg: string;
- baseVolume: string;
- quoteVolume: string;
- enterPointSource: string;
- feeDetail: {
- BGB?: {
- deduction: boolean;
- feeCoinCode: string;
- totalDeductionFee: string;
- totalFee: string;
- };
- newFees?: {
- c: number;
- d: number;
- deduction: boolean;
- r: string;
- t: string;
- totalDeductionFee: number;
- };
- };
- orderSource: string;
- cancelReason: string;
- cTime: string;
- uTime: string;
+export interface CreateVirtualSubAccountAndApiKeyV2 {
+ subAccountUid: string;
+ subAccountName: string;
+ label: string;
+ subAccountApiKey: string;
+ secretKey: string;
+ permList: string[];
+ ipList: string[];
}
⋮----
-export interface SpotOpenOrderV2 {
- userId: string;
- symbol: string;
- orderId: string;
- clientOid: string;
- priceAvg: string;
- size: string;
- orderType: string;
- side: string;
+export interface VirtualSubAccountV2 {
+ subAccountUid: string;
+ subAccountName: string;
status: string;
- basePrice: string;
- baseVolume: string;
- quoteVolume: string;
- enterPointSource: string;
- orderSource?: string;
- presetTakeProfitPrice: string;
- executeTakeProfitPrice: string;
- presetStopLossPrice: string;
- executeStopLossPrice: string;
- cTime: string;
- uTime?: string;
- tpslType: string;
- triggerPrice: string | null;
-}
-⋮----
-export interface SpotFillV2 {
- userId: string;
- symbol: string;
- orderId: string;
- tradeId: string;
- orderType: string;
- side: string;
- priceAvg: string;
- size: string;
- amount: string;
- feeDetail: {
- deduction: string;
- feeCoin: string;
- totalDeductionFee: string;
- totalFee: string;
- };
- tradeScope: string;
+ permList: string[];
+ label: string;
+ accountType: string;
+ bindingTime: string;
cTime: string;
uTime: string;
}
⋮----
-/**
- *
- * * Spot | Trigger Orders
- *
- */
-⋮----
-export interface SpotCurrentPlanOrderV2 {
- orderId: string;
- clientOid: string;
- symbol: string;
- size: string;
- executePrice: string;
- triggerPrice: string;
- status: string;
- orderType: string;
- side: string;
- planType: string;
- triggerType: string;
- enterPointSource: string;
- uTime: string;
- cTime: string;
+export interface CreateVirtualSubAccountApiKeyV2 {
+ subAccountUid: string;
+ label: string;
+ subAccountApiKey: string;
+ secretKey: string;
+ permList: string[];
+ ipList: string[];
}
⋮----
-export interface SpotHistoryPlanOrderV2 {
- orderId: string;
- clientOid: string;
- symbol: string;
- size: string;
- executePrice: string;
- triggerPrice: string;
- status: string;
- orderType: string;
- side: string;
- planType: string;
- triggerType: string;
- enterPointSource: string;
- uTime: string;
- cTime: string;
+export interface ModifyVirtualSubAccountApiKeyV2 {
+ subAccountUid: string;
+ label: string;
+ subAccountApiKey: string;
+ secretKey: string;
+ permList: string[];
+ ipList: string[];
}
⋮----
-export interface SpotPlanSubOrderV2 {
- orderId: string;
- price: string;
- type: string;
- status: string;
+export interface CreateAgentSubaccountV2 {
+ username: string;
+ subUid: string;
+ apiKey: string;
+ secret: string;
+ note: string;
+ createdTime: string;
}
⋮----
-export interface SpotCancelPlanOrdersV2 {
- successList: {
- orderId: string;
- clientOid: string;
- }[];
- failureList: {
- orderId: string;
- clientOid: string;
- errorMsg: string;
- }[];
+export interface SubAccountApiKeyItemV2 {
+ subAccountUid: string;
+ label: string;
+ subAccountApiKey: string;
+ permList: string[];
+ ipList: string[];
}
⋮----
/**
*
- * * Spot | Account
+ * * Common | Assets
*
*/
⋮----
-export interface SpotAccountInfoV2 {
- userId: string;
- inviterId: string;
- ips: string;
- authorities: string[];
- parentId: number;
- traderType: string;
- channelCode: string;
- channel: string;
- regisTime: string;
-}
-⋮----
-export interface SpotAccountAssetV2 {
+export interface FundingAssetV2 {
coin: string;
available: string;
frozen: string;
- locked: string;
- limitAvailable: string;
- uTime: string;
+ usdtValue: string;
}
⋮----
-export interface SpotSubAccountAssetV2 {
+export interface BotAssetV2 {
coin: string;
available: string;
- limitAvailable: string;
+ equity: string;
+ bonus: string;
frozen: string;
- locked: string;
- uTime: string;
-}
-export interface SpotSubAccountAssetsV2 {
- userId: number;
- assetsList: SpotSubAccountAssetV2[];
+ usdtValue: string;
}
⋮----
-export interface SpotAccountBillV2 {
- cTime: string;
+/**
+ *
+ * * Common | Convert
+ *
+ */
+⋮----
+export interface ConvertCurrencyV2 {
coin: string;
- groupType: string;
- businessType: string;
- size: string;
- balance: string;
- fees: string;
- billId: string;
+ available: string;
+ maxAmount: string;
+ minAmount: string;
}
⋮----
-export interface SpotMainSubTransferRecordV2 {
- coin: string;
- status: string;
- toType: string;
- fromType: string;
- size: string;
- ts: string;
- clientOid: string;
- transferId: string;
- fromUserId: string;
- toUserId: string;
+export interface ConvertQuotedPriceV2 {
+ fee: string;
+ fromCoinSize: string;
+ fromCoin: string;
+ cnvtPrice: string;
+ toCoinSize: string;
+ toCoin: string;
+ traceId: string;
}
⋮----
-export interface SpotTransferRecordV2 {
- coin: string;
- status: string;
- toType: string;
- toSymbol: string;
- fromType: string;
- fromSymbol: string;
- size: string;
+export interface ConvertTradeResponseV2 {
ts: string;
- clientOid: string;
- transferId: string;
+ cnvtPrice: string;
+ toCoinSize: string;
+ toCoin: string;
}
⋮----
-export interface SpotDepositAddressV2 {
- address: string;
- chain: string;
- coin: string;
- tag: string;
- url: string;
+export interface ConvertRecordV2 {
+ id: string;
+ ts: string;
+ cnvtPrice: string;
+ fee: string;
+ fromCoinSize: string;
+ fromCoin: string;
+ toCoinSize: string;
+ toCoin: string;
}
⋮----
-export interface SpotSubAccountDepositRecordV2 {
- orderId: string;
- tradeId: string;
+/**
+ *
+ * * Common | BGB Convert
+ *
+ */
+⋮----
+export interface BGBConvertCoinV2 {
coin: string;
- size: string;
- status: string;
- toAddress: string;
- dest: string;
- chain: string;
- fromAddress: string;
- clientOid?: string;
- confirm?: string;
- tag?: string;
+ available: string;
+ bgbEstAmount: string;
+ precision: string;
+ feeDetail: {
+ feeRate: string;
+ fee: string;
+ }[];
cTime: string;
- uTime: string;
}
⋮----
-export interface SpotWithdrawalRecordV2 {
- orderId: string;
- tradeId: string;
- coin: string;
- dest: string;
- clientOid: string;
- type: string;
- tag: string;
- size: string;
- fee: string;
- status: string;
- toAddress: string;
- fromAddress: string;
- confirm: string;
- chain: string;
- cTime: string;
- uTime: string;
+export interface ConvertBGBResponseV2 {
+ orderList: {
+ coin: string;
+ orderId: string;
+ }[];
}
⋮----
-export interface SpotDepositRecordV2 {
+export interface BGBConvertHistoryV2 {
orderId: string;
- tradeId: string;
- coin: string;
- type: string;
- size: string;
+ fromCoin: string;
+ fromAmount: string;
+ fromCoinPrice: string;
+ toCoin: string;
+ toAmount: string;
+ toCoinPrice: string;
+ feeDetail: {
+ feeCoin: string;
+ fee: string;
+ }[];
status: string;
- toAddress: string;
- dest: string;
- chain: string;
- fromAddress: string;
- cTime: string;
- uTime: string;
+ ctime: string;
}
================
-File: src/types/response/v3/earn.ts
+File: src/types/response/v2/earn.ts
================
/**
*
*
- * Earn | On-Chain Elite (UTA)
+ * Earn | Savings
*
*
*/
⋮----
-export interface EarnEliteSubscriptionCoinV3 {
- subscriptionCoin: string;
- precision: string;
- feeRate: string;
- exchangeRate: string;
- remainQuota?: string;
- minAmount?: string;
-}
-⋮----
-export interface EarnEliteProductV3 {
+export interface EarnSavingsProductsV2 {
productId: string;
coin: string;
- minApr: string;
- maxApr: string;
- subscriptionCoinList: EarnEliteSubscriptionCoinV3[];
- sellOut: 'YES' | 'NO' | string;
+ periodType: string;
+ period: string;
+ apyType: string;
+ advanceRedeem: string;
+ settleMethod: string;
+ apyList: {
+ rateLevel: string;
+ minStepVal: string;
+ maxStepVal: string;
+ currentApy: string;
+ }[];
+ status: string;
+ productLevel: string;
}
⋮----
-export interface EarnEliteAssetProjectV3 {
- projectName: string;
+export interface EarnSavingsAccountV2 {
+ btcAmount: string;
+ usdtAmount: string;
+ btc24hEarning: string;
+ usdt24hEarning: string;
+ btcTotalEarning: string;
+ usdtTotalEarning: string;
}
⋮----
-export interface EarnEliteAssetV3 {
+export interface EarnSavingsAssetV2 {
productId: string;
+ orderId: string;
productCoin: string;
- holdingAmount: string;
- usdtHoldingAmount: string;
- exchangeRate: string;
- apr: string;
- minApy?: string;
- maxApy?: string;
- subscriptionCoin: string;
- exchangeAmount: string;
- projectList?: EarnEliteAssetProjectV3[];
- unsettledBGPoints: string;
interestCoin: string;
+ periodType: string;
+ period: string;
+ holdAmount: string;
+ lastProfit: string;
totalProfit: string;
+ holdDays: string;
+ status: string;
+ allowRedemption: string;
+ productLevel: string;
+ apy: {
+ rateLevel: string;
+ minApy: string;
+ maxApy: string;
+ currentApy: string;
+ }[];
}
⋮----
-export interface EarnEliteAssetsV3 {
- resultList: EarnEliteAssetV3[];
+export interface EarnSavingsAssetsV2 {
+ resultList: EarnSavingsAssetV2[];
+ endId: string;
}
⋮----
-export interface EarnEliteRecordV3 {
- recordId: string;
- productId: string;
- coin: string;
- status: string;
- exchangeRate: string;
- receivedCoin: string;
- receivedAmount: string;
- investAmount: string;
- feeRate: string;
- redeemType?: string | string[];
- receivingAccount: string;
- actualReceivingAccount: string;
- paymentAccount?: string[];
- settlePoints: string;
- fee: string;
+export interface EarnSavingsRecordV2 {
+ orderId: string;
+ coinName: string;
+ settleCoinName: string;
+ productType: string;
+ period: string;
+ productLevel: string;
+ amount: string;
+ ts: string;
+ orderType: string;
}
⋮----
-export interface EarnEliteRecordsV3 {
- recordList: EarnEliteRecordV3[];
+export interface EarnSavingsRecordsV2 {
+ resultList: EarnSavingsRecordV2[];
endId: string;
}
⋮----
-export interface EarnEliteSubscribeInfoV3 {
- productSubId: string;
- minAmount: string;
- remainQuota: string;
- exchangeRate: string;
- productCoin: string;
+export interface EarnSavingsSubscriptionDetailV2 {
+ singleMinAmount: string;
+ singleMaxAmount: string;
+ remainingAmount: string;
+ subscribePrecision: string;
+ profitPrecision: string;
+ subscribeTime: string;
interestTime: string;
settleTime: string;
- precision: string;
- feeRate: string;
- subscriptionCoinList?: EarnEliteSubscriptionCoinV3[];
-}
-⋮----
-export interface EarnEliteSubscribeResultV3 {
- orderId: string;
-}
-⋮----
-export interface EarnEliteSubscribeStatusV3 {
- result: 'settled' | 'pending' | 'rejected' | string;
+ expireTime: string;
+ redeemTime: string;
+ settleMethod: string;
+ apyList: {
+ rateLevel: string;
+ minStepVal: string;
+ maxStepVal: string;
+ currentApy: string;
+ }[];
+ redeemDelay: string;
}
⋮----
-export interface EarnEliteRedeemInfoBgusdReceiveCoinV3 {
- bgusdReceiveCoin: string;
- bgusdExchangeRate: string;
-}
+/**
+ *
+ *
+ * Earn | Earn Account
+ *
+ *
+ */
⋮----
-export interface EarnEliteRedeemModeV3 {
- redeemFeeRate: string;
- remainQuota: string;
- redeemType: 'fast' | 'standard' | string;
- redeemScale: string;
- redeemDelayDate: string;
- minRedeemAmount: string;
- redeemTime: string;
-}
+/**
+ *
+ *
+ * Earn | Shark Fin
+ *
+ *
+ */
⋮----
-export interface EarnEliteRedeemInfoV3 {
+export interface EarnSharkfinProductV2 {
productId: string;
- productSubId: string;
+ productName: string;
productCoin: string;
- subscriptionCoin: string;
- profitCoin: string;
- exchangeRate: string;
- totalUnPayInterestAmount: string;
- preSettleApr: string;
- receivedCoin: string;
- unsettledPoints: string;
- bgusdReceiveCoinList: EarnEliteRedeemInfoBgusdReceiveCoinV3[];
- redeemModeList: EarnEliteRedeemModeV3[];
-}
-⋮----
-export interface RedeemEarnEliteResultV3 {
- orderId: string;
+ subscribeCoin: string;
+ farmingStartTime: string;
+ farmingEndTime: string;
+ lowerRate: string;
+ defaultRate: string;
+ upperRate: string;
+ period: string;
+ interestStartTime: string;
+ status: string;
+ minAmount: string;
+ limitAmount: string;
+ soldAmount: string;
+ endTime: string;
+ startTime: string;
}
-
-================
-File: src/types/response/v3/p2p.ts
-================
-import type {
- P2pAdStatusV3,
- P2pMarketTypeV3,
- P2pOrderStatusV3,
- P2pPriceTypeV3,
- P2pSideV3,
-} from '../../request/v3/p2p.js';
⋮----
-export interface P2pPayMethodInfoFieldV3 {
- name: string;
- type: 'file' | 'number' | 'txt';
- value: string;
+export interface EarnSharkfinProductsV2 {
+ resultList: EarnSharkfinProductV2[];
+ endId: string;
}
⋮----
-export interface P2pPayMethodV3 {
- payMethodId: string;
- payMethodName: string;
- payMethodUserName: string;
- userPayMethodId: string;
- payMethodInfo: P2pPayMethodInfoFieldV3[];
+export interface EarnSharkfinAccountV2 {
+ btcSubscribeAmount: string;
+ usdtSubscribeAmount: string;
+ btcHistoricalAmount: string;
+ usdtHistoricalAmount: string;
+ btcTotalEarning: string;
+ usdtTotalEarning: string;
}
⋮----
-export interface P2pTokenDetailV3 {
- token: string;
- precision: string;
+export interface EarnSharkfinAssetV2 {
+ productId: string;
+ interestStartTime: string;
+ interestEndTime: string;
+ productCoin: string;
+ subscribeCoin: string;
+ trend: string;
+ settleTime: string;
+ interestAmount: string;
+ productStatus: string;
}
⋮----
-export interface P2pFiatPayMethodV3 {
- payMethodName: string;
- iconUrl: string;
- payMethodId: string;
+export interface EarnSharkfinAssetsV2 {
+ resultList: EarnSharkfinAssetV2[];
+ endId: string;
}
⋮----
-export interface P2pWithdrawalLimitV3 {
- withdrawLimitKey: string;
- withdrawLimitValue: string;
+export interface EarnSharkfinRecordV2 {
+ orderId: string;
+ product: string;
+ period: string;
+ amount: string;
+ ts: string;
+ type: string;
}
-⋮----
-export interface P2pFiatDetailV3 {
- fiat: string;
- precision: string;
- floatRateMin: string;
- floatRateMax: string;
- fixedRateMin: string;
- fixedRateMax: string;
- adMinLimit: string;
- adMaxLimit: string;
- payMethods: P2pFiatPayMethodV3;
- withdrawalLimit: P2pWithdrawalLimitV3;
- payTimeLimit: number[];
+export interface EarnSharkfinRecordsV2 {
+ resultList: EarnSharkfinRecordV2[];
+ endId: string;
}
⋮----
-export interface P2pCurrenciesV3 {
- tokenDetailList: P2pTokenDetailV3[];
- fiatDetailList: P2pFiatDetailV3[];
+export interface EarnSharkfinSubscriptionDetailV2 {
+ productCoin: string;
+ subscribeCoin: string;
+ interestTime: string;
+ expirationTime: string;
+ minPrice: string;
+ currentPrice: string;
+ maxPrice: string;
+ minRate: string;
+ defaultRate: string;
+ maxRate: string;
+ period: string;
+ productMinAmount: string;
+ availableBalance: string;
+ userAmount: string;
+ remainingAmount: string;
+ profitPrecision: string;
+ subscribePrecision: string;
}
⋮----
-export interface P2pUserEquityDetailV3 {
- maxAdvSellNum: string;
- maxAdvSellLimit: string;
- maxAdvBuyNum: string;
- maxAdvBuyLimit: string;
- totalMaxPendingOrder: string;
- advMaxPendingOrder: string;
-}
+/**
+ *
+ *
+ * Earn | Loan
+ *
+ *
+ */
⋮----
-export interface P2pUserInfoV3 {
- uid: string;
- nickName: string;
- accountLevel: 'starter' | 'advanced' | 'master';
- completedOrderNum: string;
- positiveRate: string;
- completedOrderNum30D: string;
- completedRate30D: string;
- avgPayTime30D: string;
- avgReleaseTime30D: string;
- equityDetail: P2pUserEquityDetailV3;
- registerTime: string;
+export interface EarnLoanCurrencyLoanInfoV2 {
+ coin: string;
+ hourRate7D: string;
+ rate7D: string;
+ hourRate30D: string;
+ rate30D: string;
+ minUsdt: string;
+ maxUsdt: string;
+ min: string;
+ max: string;
}
-⋮----
-export interface P2pBalanceV3 {
- token: string;
- totalBalance: string;
- frozenBalance: string;
- availableBalance: string;
+export interface EarnLoanCurrencyPledgeInfoV2 {
+ coin: string;
+ initRate: string;
+ supRate: string;
+ forceRate: string;
+ minUsdt: string;
+ maxUsdt: string;
}
⋮----
-export interface P2pExchangeRateV3 {
- rate: string;
+export interface EarnLoanCurrenciesV2 {
+ loanInfos: EarnLoanCurrencyLoanInfoV2[];
+ pledgeInfos: EarnLoanCurrencyPledgeInfoV2[];
}
⋮----
-export interface P2pFeeSimulateV3 {
- feeToken: string;
- feeAmount: string;
- taxToken: string;
- taxAmount: string;
+export interface EarnLoanOrdersV2 {
+ orderId: string;
+ loanCoin: string;
+ loanAmount: string;
+ interestAmount: string;
+ hourInterestRate: string;
+ pledgeCoin: string;
+ pledgeAmount: string;
+ pledgeRate: string;
+ supRate: string;
+ forceRate: string;
+ borrowTime: string;
+ expireTime: string;
}
⋮----
-export interface P2pAdLimitV3 {
- buyMinTokenAmount: string;
- buyMaxTokenAmount: string;
- sellMinTokenAmount: string;
- sellMaxTokenAmount: string;
+export interface EarnLoanRepayResponseV2 {
+ loanCoin: string;
+ pledgeCoin: string;
+ repayAmount: string;
+ payInterest: string;
+ repayLoanAmount: string;
+ repayUnlockAmount: string;
}
⋮----
-export interface P2pCreateAdResponseV3 {
- advId: string;
+export interface EarnLoanRepayHistoryV2 {
+ orderId: string;
+ loanCoin: string;
+ pledgeCoin: string;
+ repayAmount: string;
+ payInterest: string;
+ repayLoanAmount: string;
+ repayUnlockAmount: string;
+ repayTime: string;
}
⋮----
-export interface P2pAdPayMethodRefV3 {
- payMethodId: string;
- userPayMethodId?: string;
-}
+export interface EarnLoanPledgeRateHistoryV2 {
+ loanCoin: string;
+ pledgeCoin: string;
+ orderId: string;
+ reviseTime: string;
+ reviseSide: string;
+ reviseAmount: string;
+ afterPledgeRate: string;
+ beforePledgeRate: string;
+}
⋮----
-export interface P2pAdInfoV3 {
- advId: string;
- side: P2pSideV3;
- priceType: P2pPriceTypeV3;
- token: string;
- fiat: string;
- price: string;
- amount: string;
- minAmount: string;
- maxAmount: string;
- payDuration: string;
- soldAmount: string;
- lastAmount: string;
- premium: string;
- turnover: string;
- remark: string;
- tradeTerm: string;
- payMethodIds: P2pAdPayMethodRefV3[];
- tokenPrecision: string;
- fiatPrecision: string;
- market: P2pMarketTypeV3;
- avgTime: string;
- createdTime: string;
- updatedTime: string;
+export interface EarnLoanHistoryV2 {
+ orderId: string;
+ loanCoin: string;
+ pledgeCoin: string;
+ initPledgeAmount: string;
+ initLoanAmount: string;
+ hourRate: string;
+ daily: string;
+ borrowTime: string;
+ status: string;
}
⋮----
-export interface P2pPublicAdListItemV3 {
- advId: string;
- merchantId: string;
- merchantName: string;
- token: string;
- fiat: string;
- side: P2pSideV3;
- price: string;
- minAmount: string;
- maxAmount: string;
- quantity: string;
- payMethods: {
- payMethodId: string;
- payMethodName: string;
- }[];
- completedOrderNum: string;
- completedRate: string;
- avgReleaseTime: string;
- createdTime: string;
+export interface EarnLoanDebtPledgeInfoV2 {
+ coin: string;
+ amount: string;
+ amountUsdt: string;
}
⋮----
-export interface P2pMyAdListItemV3 {
- advId: string;
- side: P2pSideV3;
- priceType: P2pPriceTypeV3;
- token: string;
- fiat: string;
- price: string;
- soldAmount: string;
- lastAmount: string;
- payMethods: { payMethodId: string }[];
- status: P2pAdStatusV3;
- createdTime: string;
- updatedTime: string;
+export interface EarnLoanDebtLoanInfoV2 {
+ coin: string;
+ amount: string;
+ amountUsdt: string;
}
⋮----
-export interface P2pCursorListV3 {
- items: T[];
- nextId?: string;
+export interface EarnLoanDebtsV2 {
+ pledgeInfos: EarnLoanDebtPledgeInfoV2[];
+ loanInfos: EarnLoanDebtLoanInfoV2[];
}
⋮----
-export interface P2pOrderListItemV3 {
+export interface EarnLoanLiquidationRecordsV2 {
orderId: string;
- side: P2pSideV3;
- token: string;
- fiat: string;
- price: string;
- amount: string;
- quantity: string;
- fee: string;
- counterparty: string;
- status: P2pOrderStatusV3;
- createdTime: string;
- updatedTime: string;
+ loanCoin: string;
+ pledgeCoin: string;
+ reduceTime: string;
+ pledgeRate: string;
+ pledgePrice: string;
+ status: string;
+ pledgeAmount: string;
+ reduceFee: string;
+ residueAmount: string;
+ runlockAmount: string;
+ repayLoanAmount: string;
}
⋮----
-export interface P2pOrderPayMethodDetailV3 {
- payMethodId: string;
- payMethodName: string;
- payMethodUserName: string;
- postscript: string;
- payMethodInfo: P2pPayMethodInfoFieldV3[];
+/**
+ *
+ *
+ * Earn | On-Chain Elite
+ *
+ *
+ */
+⋮----
+export interface EarnEliteSubscriptionCoinV2 {
+ subscriptionCoin: string;
+ precision: string;
+ feeRate: string;
+ exchangeRate: string;
+ remainQuota?: string;
+ minAmount?: string;
}
⋮----
-export interface P2pOrderUserInfoV3 {
- nickName: string;
- realName: string;
+export interface EarnEliteProductV2 {
+ productId: string;
+ coin: string;
+ minApr: string;
+ maxApr: string;
+ subscriptionCoinList: EarnEliteSubscriptionCoinV2[];
+ sellOut: 'YES' | 'NO' | string;
}
⋮----
-export interface P2pOrderInfoV3 {
- orderId: string;
- side: P2pSideV3;
- token: string;
- fiat: string;
- price: string;
- quantity: string;
- amount: string;
- status: P2pOrderStatusV3;
- advId: string;
- remark: string;
- orderCancelCountdown: string;
- fee: string;
- verifyCapital: 'yes' | 'no';
- payMethodDetail?: P2pOrderPayMethodDetailV3;
- sellUserInfo: P2pOrderUserInfoV3;
- buyUserInfo: P2pOrderUserInfoV3;
- createdTime: string;
- updatedTime: string;
+export interface EarnEliteAssetProjectV2 {
+ projectName: string;
}
-
-================
-File: src/types/response/v3/strategy.ts
-================
-import type {
- StrategyOrderStatusV3,
- StrategyTriggerByV3,
- StrategyTriggerOrderTypeV3,
-} from '../../request/v3/strategy.js';
⋮----
-export interface PlaceStrategyOrderResponseV3 {
- orderId: string;
- clientOid: string;
+export interface EarnEliteAssetV2 {
+ productId: string;
+ productCoin: string;
+ holdingAmount: string;
+ usdtHoldingAmount: string;
+ exchangeRate: string;
+ apr: string;
+ minApy?: string;
+ maxApy?: string;
+ subscriptionCoin: string;
+ exchangeAmount: string;
+ projectList?: EarnEliteAssetProjectV2[];
+ unsettledBGPoints: string;
+ interestCoin: string;
+ totalProfit: string;
}
⋮----
-export interface ModifyStrategyOrderResponseV3 {
- orderId: string;
- clientOid: string;
+export interface EarnEliteAssetsV2 {
+ resultList: EarnEliteAssetV2[];
}
⋮----
-export interface StrategyOrderV3 {
- orderId: string;
- clientOid: string;
- category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
- symbol: string;
- qty: string;
- posSide: 'long' | 'short';
- status: StrategyOrderStatusV3;
- triggerType?: 'takeProfit' | 'stopLoss';
- tpTriggerBy?: StrategyTriggerByV3;
- slTriggerBy?: StrategyTriggerByV3;
- takeProfit?: string;
- stopLoss?: string;
- tpOrderType?: StrategyTriggerOrderTypeV3;
- slOrderType?: StrategyTriggerOrderTypeV3;
- tpLimitPrice?: string;
- slLimitPrice?: string;
- triggerBy?: StrategyTriggerByV3;
- triggerPrice?: string;
- triggerOrderType?: StrategyTriggerOrderTypeV3;
- triggerOrderPrice?: string;
- createdTime: string;
- updatedTime: string;
+export interface EarnEliteRecordV2 {
+ recordId: string;
+ productId: string;
+ coin: string;
+ status: string;
+ exchangeRate: string;
+ receivedCoin: string;
+ receivedAmount: string;
+ investAmount: string;
+ feeRate: string;
+ redeemType?: string | string[];
+ receivingAccount: string;
+ actualReceivingAccount: string;
+ paymentAccount?: string[];
+ settlePoints: string;
+ fee: string;
}
-
-================
-File: src/types/websockets/ws-api-request.ts
-================
-import type { FuturesMarginModeV3 } from '../request/v3/trade.js';
⋮----
-export interface WSAPIPlaceOrderRequestV3 {
- symbol: string;
- orderType: 'limit' | 'market';
- qty: string;
- price?: string;
- side: 'buy' | 'sell';
- posSide?: 'long' | 'short';
- timeInForce?: 'gtc' | 'ioc' | 'fok' | 'post_only';
- reduceOnly?: 'YES' | 'NO'; // Note: reduceOnly is not supported for batch place WS API. Might be supported starting late Q4 2025, but not supported yet.
- /** Futures only. Defaults to crossed */
- marginMode?: FuturesMarginModeV3;
- clientOid?: string;
- stpMode?: 'none' | 'cancel_taker' | 'cancel_maker' | 'cancel_both';
- tpTriggerBy?: 'market' | 'mark';
- slTriggerBy?: 'market' | 'mark';
- takeProfit?: string;
- stopLoss?: string;
- tpOrderType?: 'limit' | 'market';
- slOrderType?: 'limit' | 'market';
- tpLimitPrice?: string;
- slLimitPrice?: string;
+export interface EarnEliteRecordsV2 {
+ recordList: EarnEliteRecordV2[];
+ endId: string;
}
⋮----
-reduceOnly?: 'YES' | 'NO'; // Note: reduceOnly is not supported for batch place WS API. Might be supported starting late Q4 2025, but not supported yet.
-/** Futures only. Defaults to crossed */
-
-================
-File: src/types/websockets/ws-api.ts
-================
-import { WS_KEY_MAP } from '../../util/websocket-util.js';
-import { CancelOrderRequestV3 } from '../request/v3/trade.js';
-import { CancelOrderResponseV3 } from '../response/v3/trade.js';
-import { WSAPIPlaceOrderRequestV3 } from './ws-api-request.js';
-import { WSAPIPlaceOrderResponseV3 } from './ws-api-response.js';
-import { BitgetInstTypeV3, WsKey } from './ws-general.js';
-⋮----
-export type WSOperation = 'subscribe' | 'unsubscribe' | 'login';
+export interface EarnEliteSubscribeInfoV2 {
+ productSubId: string;
+ minAmount: string;
+ remainQuota: string;
+ exchangeRate: string;
+ productCoin: string;
+ interestTime: string;
+ settleTime: string;
+ precision: string;
+ feeRate: string;
+ /** Present for BGUSD per API docs. */
+ subscriptionCoinList?: EarnEliteSubscriptionCoinV2[];
+}
⋮----
-// When new WS API operations are added, make sure to also update WS_API_Operations[] below
-export type WSAPIOperation =
- | 'place-order'
- | 'batch-place'
- | 'cancel-order'
- | 'batch-cancel';
+/** Present for BGUSD per API docs. */
⋮----
-export interface WSOperationLoginParams {
- apiKey: string;
- passphrase: string;
- timestamp: number;
- sign: string;
+export interface EarnEliteSubscribeResultV2 {
+ orderId: string;
}
⋮----
-export interface WSAPIRequestBitgetV3 {
- op: 'trade';
- id: string;
- category: BitgetInstTypeV3;
- topic: WSAPIOperation;
- args: TWSParams | TWSParams[];
+export interface EarnEliteSubscribeStatusV2 {
+ result: 'settled' | 'pending' | 'rejected' | string;
}
⋮----
-export interface WSAPIRequestFlags {
- /** If true, will skip auth requirement for WS API connection */
- authIsOptional?: boolean | undefined;
+export interface EarnEliteRedeemInfoBgusdReceiveCoinV2 {
+ bgusdReceiveCoin: string;
+ bgusdExchangeRate: string;
}
⋮----
-/** If true, will skip auth requirement for WS API connection */
-⋮----
-export type Exact = {
- // This part says: if there's any key that's not in T, it's an error
- [K: string]: never;
-} & {
- [K in keyof T]: T[K];
-};
-⋮----
-// This part says: if there's any key that's not in T, it's an error
+export interface EarnEliteRedeemModeV2 {
+ redeemFeeRate: string;
+ remainQuota: string;
+ redeemType: 'fast' | 'standard' | string;
+ redeemScale: string;
+ redeemDelayDate: string;
+ minRedeemAmount: string;
+ redeemTime: string;
+}
⋮----
-/**
-
-/**
- * V2 request looks like this:
-{
- "op":"subscribe",
- "args":[
- {
- "instType":"SPOT",
- "channel":"ticker",
- "instId":"BTCUSDT"
- },
- {
- "instType":"SPOT",
- "channel":"candle5m",
- "instId":"BTCUSDT"
- }
- ]
+export interface EarnEliteRedeemInfoV2 {
+ productId: string;
+ productSubId: string;
+ productCoin: string;
+ subscriptionCoin: string;
+ profitCoin: string;
+ exchangeRate: string;
+ totalUnPayInterestAmount: string;
+ preSettleApr: string;
+ receivedCoin: string;
+ unsettledPoints: string;
+ bgusdReceiveCoinList: EarnEliteRedeemInfoBgusdReceiveCoinV2[];
+ redeemModeList: EarnEliteRedeemModeV2[];
}
- */
-export interface WsRequestOperationBitget {
- op: WSOperation;
- args?: (TWSRequestArg | string | number)[];
+⋮----
+export interface RedeemEarnEliteResultV2 {
+ orderId: string;
}
-export interface WSAPIResponse<
- TResponseData extends object = object,
- TOperation extends WSAPIOperation = WSAPIOperation,
-> {
- wsKey: WsKey;
- /** Auto-generated */
- id: string;
- event: 'trade';
- category: BitgetInstTypeV3;
- topic: TOperation;
- args: TResponseData;
- code: '0' | string;
- msg: 'success' | string;
- ts: string;
- /** Connection ID (trade operation responses, May 2026+) */
- connId?: string;
+
+================
+File: src/types/response/v2/instloan.ts
+================
+export interface InstLoanProductInfoV2 {
+ productId: string;
+ leverage: string;
+ transferLine: string;
+ spotBuyLine: string;
+ liquidationLine: string;
+ stopLiquidationLine: string;
}
⋮----
-/** Auto-generated */
-⋮----
-/** Connection ID (trade operation responses, May 2026+) */
-⋮----
-/**
- * List of operations supported for this WsKey (connection)
- */
-export interface WsAPIWsKeyTopicMap {
- [WS_KEY_MAP.v3Private]: WSAPIOperation;
+export interface InstLoanSymbolsV2 {
+ productId: string;
+ spotSymbols: string[];
}
⋮----
-/**
- * Request parameters expected per operation
- */
-export interface WsAPITopicRequestParamMap {
- // https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters
- 'place-order': WSAPIPlaceOrderRequestV3;
- // https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel
- 'batch-place': WSAPIPlaceOrderRequestV3[];
- // https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel
- 'cancel-order': CancelOrderRequestV3;
- // https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel
- 'batch-cancel': CancelOrderRequestV3[];
+export interface InstLoanRepaidHistoryItemV2 {
+ repayOrderId: string;
+ businessType: string;
+ repayType: string;
+ repaidTime: string;
+ coin: string;
+ repaidAmount: string;
+ repaidInterest: string;
}
⋮----
-// https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters
-⋮----
-// https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel
-⋮----
-// https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel
-⋮----
-// https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel
-⋮----
-/**
- * Response structure expected for each operation
- */
-export interface WsAPIOperationResponseMap {
- // https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters
- 'place-order': WSAPIResponse<[WSAPIPlaceOrderResponseV3], 'place-order'>;
- // https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel
- 'batch-place': WSAPIResponse;
- // https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel
- 'cancel-order': WSAPIResponse<[CancelOrderResponseV3], 'cancel-order'>;
- // https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel
- 'batch-cancel': WSAPIResponse;
+export interface InstLoanOrderV2 {
+ orderId: string;
+ orderProductId: string;
+ uid: string;
+ loanTime: string;
+ loanCoin: string;
+ loanAmount: string;
+ unpaidAmount: string;
+ unpaidInterest: string;
+ repaidAmount: string;
+ repaidInterest: string;
+ status: string;
}
⋮----
-// https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters
-⋮----
-// https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel
-⋮----
-// https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel
+export interface InstLoanCoinInfoV2 {
+ coin: string;
+ convertRatio: string;
+ maxConvertValue: string;
+}
⋮----
-// https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel
+export interface InstLoanLTVConvertV2 {
+ ltv: string;
+ subAccountUids: string[];
+ unpaidUsdtAmount: string;
+ usdtBalance: string;
+ unpaidInfo: {
+ coin: string;
+ unpaidQty: string;
+ unpaidInterest: string;
+ }[];
+ balanceInfo: {
+ coin: string;
+ price: string;
+ amount: string;
+ convertedUsdtAmount: string;
+ }[];
+}
================
-File: src/types/shared.ts
+File: src/types/response/v3/earn.ts
================
-import { REST_CLIENT_TYPE_ENUM } from '../util/requestUtils.js';
+/**
+ *
+ *
+ * Earn | On-Chain Elite (UTA)
+ *
+ *
+ */
⋮----
-export type numberInString = string;
+export interface EarnEliteSubscriptionCoinV3 {
+ subscriptionCoin: string;
+ precision: string;
+ feeRate: string;
+ exchangeRate: string;
+ remainQuota?: string;
+ minAmount?: string;
+}
⋮----
-export type OrderSide = 'Buy' | 'Sell';
+export interface EarnEliteProductV3 {
+ productId: string;
+ coin: string;
+ minApr: string;
+ maxApr: string;
+ subscriptionCoinList: EarnEliteSubscriptionCoinV3[];
+ sellOut: 'YES' | 'NO' | string;
+}
⋮----
-/**
- * @deprecated use SpotKlineInterval or FuturesKlineInterval, depending on which API group you're using
- */
-export type KlineInterval =
- | '1min'
- | '5min'
- | '15min'
- | '30min'
- | '1h'
- | '4h'
- | '6h'
- | '12h'
- | '1M'
- | '1W'
- | '1week'
- | '6Hutc'
- | '12Hutc'
- | '1Dutc'
- | '3Dutc'
- | '1Wutc'
- | '1Mutc';
-⋮----
-export type RestClientType =
- (typeof REST_CLIENT_TYPE_ENUM)[keyof typeof REST_CLIENT_TYPE_ENUM];
-⋮----
-export interface APIResponse {
- code: string;
- requestTime: number;
- msg: 'success' | string;
- data: T;
+export interface EarnEliteAssetProjectV3 {
+ projectName: string;
}
-
-================
-File: webpack/webpack.config.cjs
-================
-function generateConfig(name)
-⋮----
-// Add '.ts' and '.tsx' as resolvable extensions.
-⋮----
-// Node.js core modules not available in browsers
-// The REST client's https.Agent (for keepAlive) is Node.js-only and won't work in browsers
-⋮----
-// Code is already transpiled from TypeScript, no additional loaders needed
-
-================
-File: .gitignore
-================
-!.gitkeep
-.DS_STORE
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-lerna-debug.log*
-report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
-pids
-*.pid
-*.seed
-*.pid.lock
-node_modules/
-.npm
-.eslintcache
-.node_repl_history
-*.tgz
-.yarn-integrity
-.env
-.env.test
-.cache
-lib
-bundleReport.html
-.history/
-tiagoSpot.ts
-restClientRegex.ts
-localtest.sh
-privaterepotracker
-testfile.ts
-dist
-repomix.sh
-coverage
-
-================
-File: examples/auth/fasterHmacSign.ts
-================
-import { createHmac } from 'crypto';
-⋮----
-import {
- DefaultLogger,
- RestClientV3,
- WebsocketClientV3,
-} from '../../src/index.js';
-⋮----
-// or
-// import { createHmac } from 'crypto';
-// import { DefaultLogger, RestClientV3, WebsocketClientV3 } from 'bitget-api';
⋮----
-/**
- * Injecting a custom signMessage function.
- *
- * As of version 3.0.0 of the bitget-api Node.js/TypeScript/JavaScript
- * SDK for Bitget, the SDK uses the Web Crypto API for signing requests.
- * While it is compatible with Node and Browser environments, it is
- * slightly slower than using Node's native crypto module (only
- * available in backend Node environments).
- *
- * For latency sensitive users, you can inject the previous node crypto sign
- * method (or your own even faster implementation), if this change affects you.
- *
- * This example demonstrates how to inject a custom sign function, to achieve
- * the same peformance as seen before the Web Crypto API was introduced.
- *
- * For context on standard usage, the "signMessage" function is used:
- * - During every single API call
- * - After opening a new private WebSocket connection
- */
+export interface EarnEliteAssetV3 {
+ productId: string;
+ productCoin: string;
+ holdingAmount: string;
+ usdtHoldingAmount: string;
+ exchangeRate: string;
+ apr: string;
+ minApy?: string;
+ maxApy?: string;
+ subscriptionCoin: string;
+ exchangeAmount: string;
+ projectList?: EarnEliteAssetProjectV3[];
+ unsettledBGPoints: string;
+ interestCoin: string;
+ totalProfit: string;
+}
⋮----
-/**
- * Set this to true to enable demo trading:
- */
+export interface EarnEliteAssetsV3 {
+ resultList: EarnEliteAssetV3[];
+}
⋮----
-/**
- * Overkill in almost every case, but if you need any optimisation available,
- * you can inject a faster sign mechanism such as node's native createHmac:
- */
+export interface EarnEliteRecordV3 {
+ recordId: string;
+ productId: string;
+ coin: string;
+ status: string;
+ exchangeRate: string;
+ receivedCoin: string;
+ receivedAmount: string;
+ investAmount: string;
+ feeRate: string;
+ redeemType?: string | string[];
+ receivingAccount: string;
+ actualReceivingAccount: string;
+ paymentAccount?: string[];
+ settlePoints: string;
+ fee: string;
+}
⋮----
-// Optional, uncomment the "trace" override to log a lot more info about what the WS client is doing
+export interface EarnEliteRecordsV3 {
+ recordList: EarnEliteRecordV3[];
+ endId: string;
+}
⋮----
-// trace: (...params) => console.log('trace', ...params),
+export interface EarnEliteSubscribeInfoV3 {
+ productSubId: string;
+ minAmount: string;
+ remainQuota: string;
+ exchangeRate: string;
+ productCoin: string;
+ interestTime: string;
+ settleTime: string;
+ precision: string;
+ feeRate: string;
+ subscriptionCoinList?: EarnEliteSubscriptionCoinV3[];
+}
⋮----
-/**
- * Set this to true to enable demo trading for the private account data WS
- * Topics: order,execution,position,wallet,greeks
- */
+export interface EarnEliteSubscribeResultV3 {
+ orderId: string;
+}
⋮----
-/**
- * Overkill in almost every case, but if you need any optimisation available,
- * you can inject a faster sign mechanism such as node's native createHmac:
- */
+export interface EarnEliteSubscribeStatusV3 {
+ result: 'settled' | 'pending' | 'rejected' | string;
+}
⋮----
-function setWsClientEventListeners(
- websocketClient: WebsocketClientV3,
- accountRef: string,
-): Promise
+export interface EarnEliteRedeemInfoBgusdReceiveCoinV3 {
+ bgusdReceiveCoin: string;
+ bgusdExchangeRate: string;
+}
⋮----
-// console.log('raw message received ', JSON.stringify(data, null, 2));
+export interface EarnEliteRedeemModeV3 {
+ redeemFeeRate: string;
+ remainQuota: string;
+ redeemType: 'fast' | 'standard' | string;
+ redeemScale: string;
+ redeemDelayDate: string;
+ minRedeemAmount: string;
+ redeemTime: string;
+}
⋮----
-// Simple promise to ensure we're subscribed before trying anything else
+export interface EarnEliteRedeemInfoV3 {
+ productId: string;
+ productSubId: string;
+ productCoin: string;
+ subscriptionCoin: string;
+ profitCoin: string;
+ exchangeRate: string;
+ totalUnPayInterestAmount: string;
+ preSettleApr: string;
+ receivedCoin: string;
+ unsettledPoints: string;
+ bgusdReceiveCoinList: EarnEliteRedeemInfoBgusdReceiveCoinV3[];
+ redeemModeList: EarnEliteRedeemModeV3[];
+}
⋮----
-// Start trading
+export interface RedeemEarnEliteResultV3 {
+ orderId: string;
+}
================
-File: examples/V2 - Classic/Rest/rest-trade-futures.ts
+File: src/types/response/v3/p2p.ts
================
-import {
- FuturesPlaceOrderRequestV2,
- RestClientV2,
- WebsocketClientV2,
-} from '../../../src/index.js';
+import type {
+ P2pAdStatusV3,
+ P2pMarketTypeV3,
+ P2pOrderStatusV3,
+ P2pPriceTypeV3,
+ P2pSideV3,
+} from '../../request/v3/p2p.js';
⋮----
-// or
-// import { FuturesPlaceOrderRequestV2, RestClientV2, WebsocketClientV2 } from '../src';
+export interface P2pPayMethodInfoFieldV3 {
+ name: string;
+ type: 'file' | 'number' | 'txt';
+ value: string;
+}
⋮----
-// read from environmental variables
+export interface P2pPayMethodV3 {
+ payMethodId: string;
+ payMethodName: string;
+ payMethodUserName: string;
+ userPayMethodId: string;
+ payMethodInfo: P2pPayMethodInfoFieldV3[];
+}
⋮----
-// If running from CLI in unix, you can pass env vars as such:
-// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/rest-trade-futures.ts
-⋮----
-// note the single quotes, preventing special characters such as $ from being incorrectly passed
-⋮----
-// apiKey: 'apiKeyHere',
-// apiSecret: 'apiSecretHere',
-// apiPass: 'apiPassHere',
-⋮----
-function logWSEvent(type: string, data: any)
-⋮----
-// simple sleep function
-function promiseSleep(milliseconds: number)
-⋮----
-/**
- * This is a simple script wrapped in a immediately invoked function expression (to execute the below workflow immediately).
- *
- * It is designed to:
- * - open a private websocket channel to log account events
- * - check for any available USDT balance in the futures account
- * - immediately open a minimum sized long position on BTCUSDT
- * - check active positions
- * - immediately send closing orders for any active futures positions
- * - check positions again
- *
- */
+export interface P2pTokenDetailV3 {
+ token: string;
+ precision: string;
+}
⋮----
-// Add event listeners to log websocket events on account
+export interface P2pFiatPayMethodV3 {
+ payMethodName: string;
+ iconUrl: string;
+ payMethodId: string;
+}
⋮----
-// futures private
-// : account updates
+export interface P2pWithdrawalLimitV3 {
+ withdrawLimitKey: string;
+ withdrawLimitValue: string;
+}
⋮----
-// : position updates
+export interface P2pFiatDetailV3 {
+ fiat: string;
+ precision: string;
+ floatRateMin: string;
+ floatRateMax: string;
+ fixedRateMin: string;
+ fixedRateMax: string;
+ adMinLimit: string;
+ adMaxLimit: string;
+ payMethods: P2pFiatPayMethodV3;
+ withdrawalLimit: P2pWithdrawalLimitV3;
+ payTimeLimit: number[];
+}
⋮----
-// : order updates
+export interface P2pCurrenciesV3 {
+ tokenDetailList: P2pTokenDetailV3[];
+ fiatDetailList: P2pFiatDetailV3[];
+}
⋮----
-// wait briefly for ws to be ready (could also use the response or authenticated events, to make sure topics are subscribed to before starting)
+export interface P2pUserEquityDetailV3 {
+ maxAdvSellNum: string;
+ maxAdvSellLimit: string;
+ maxAdvBuyNum: string;
+ maxAdvBuyLimit: string;
+ totalMaxPendingOrder: string;
+ advMaxPendingOrder: string;
+}
⋮----
-// const balances = allBalances.filter((bal) => Number(bal.available) != 0);
+export interface P2pUserInfoV3 {
+ uid: string;
+ nickName: string;
+ accountLevel: 'starter' | 'advanced' | 'master';
+ completedOrderNum: string;
+ positiveRate: string;
+ completedOrderNum30D: string;
+ completedRate30D: string;
+ avgPayTime30D: string;
+ avgReleaseTime30D: string;
+ equityDetail: P2pUserEquityDetailV3;
+ registerTime: string;
+}
⋮----
-// Loop through any active positions and send a closing market order on each position
-
-================
-File: examples/V2 - Classic/Rest/rest-trade-spot.ts
-================
-import {
- RestClientV2,
- SpotOrderRequestV2,
- WebsocketClientV2,
-} from '../../../src/index.js';
+export interface P2pBalanceV3 {
+ token: string;
+ totalBalance: string;
+ frozenBalance: string;
+ availableBalance: string;
+}
⋮----
-// import { RestClientV2, WebsocketClient } from '../src/index';
+export interface P2pExchangeRateV3 {
+ rate: string;
+}
⋮----
-// read from environmental variables
+export interface P2pFeeSimulateV3 {
+ feeToken: string;
+ feeAmount: string;
+ taxToken: string;
+ taxAmount: string;
+}
⋮----
-// If running from CLI in unix, you can pass env vars as such:
-// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/rest-trade-spot.ts
+export interface P2pAdLimitV3 {
+ buyMinTokenAmount: string;
+ buyMaxTokenAmount: string;
+ sellMinTokenAmount: string;
+ sellMaxTokenAmount: string;
+}
⋮----
-// note the single quotes, preventing special characters such as $ from being incorrectly passed
+export interface P2pCreateAdResponseV3 {
+ advId: string;
+}
⋮----
-// apiKey: 'apiKeyHere',
-// apiSecret: 'apiSecretHere',
-// apiPass: 'apiPassHere',
+export interface P2pAdPayMethodRefV3 {
+ payMethodId: string;
+ userPayMethodId?: string;
+}
⋮----
-function logWSEvent(type: string, data: any)
+export interface P2pAdInfoV3 {
+ advId: string;
+ side: P2pSideV3;
+ priceType: P2pPriceTypeV3;
+ token: string;
+ fiat: string;
+ price: string;
+ amount: string;
+ minAmount: string;
+ maxAmount: string;
+ payDuration: string;
+ soldAmount: string;
+ lastAmount: string;
+ premium: string;
+ turnover: string;
+ remark: string;
+ tradeTerm: string;
+ payMethodIds: P2pAdPayMethodRefV3[];
+ tokenPrecision: string;
+ fiatPrecision: string;
+ market: P2pMarketTypeV3;
+ avgTime: string;
+ createdTime: string;
+ updatedTime: string;
+}
⋮----
-// simple sleep function
-function promiseSleep(milliseconds: number)
+export interface P2pPublicAdListItemV3 {
+ advId: string;
+ merchantId: string;
+ merchantName: string;
+ token: string;
+ fiat: string;
+ side: P2pSideV3;
+ price: string;
+ minAmount: string;
+ maxAmount: string;
+ quantity: string;
+ payMethods: {
+ payMethodId: string;
+ payMethodName: string;
+ }[];
+ completedOrderNum: string;
+ completedRate: string;
+ avgReleaseTime: string;
+ createdTime: string;
+}
⋮----
-/** This is a simple script wrapped in a immediately invoked function expression, designed to check for any available BTC balance and immediately sell the full amount for USDT */
+export interface P2pMyAdListItemV3 {
+ advId: string;
+ side: P2pSideV3;
+ priceType: P2pPriceTypeV3;
+ token: string;
+ fiat: string;
+ price: string;
+ soldAmount: string;
+ lastAmount: string;
+ payMethods: { payMethodId: string }[];
+ status: P2pAdStatusV3;
+ createdTime: string;
+ updatedTime: string;
+}
⋮----
-// Add event listeners to log websocket events on account
+export interface P2pCursorListV3 {
+ items: T[];
+ nextId?: string;
+}
⋮----
-// Subscribe to private account topics
-// spot private
-// : account updates
+export interface P2pOrderListItemV3 {
+ orderId: string;
+ side: P2pSideV3;
+ token: string;
+ fiat: string;
+ price: string;
+ amount: string;
+ quantity: string;
+ fee: string;
+ counterparty: string;
+ status: P2pOrderStatusV3;
+ createdTime: string;
+ updatedTime: string;
+}
⋮----
-// : order updates (note: symbol is required)
+export interface P2pOrderPayMethodDetailV3 {
+ payMethodId: string;
+ payMethodName: string;
+ payMethodUserName: string;
+ postscript: string;
+ payMethodInfo: P2pPayMethodInfoFieldV3[];
+}
⋮----
-// wait briefly for ws to be ready (could also use the response or authenticated events, to make sure topics are subscribed to before starting)
+export interface P2pOrderUserInfoV3 {
+ nickName: string;
+ realName: string;
+}
⋮----
-// console.log('balance: ', JSON.stringify(balances, null, 2));
+export interface P2pOrderInfoV3 {
+ orderId: string;
+ side: P2pSideV3;
+ token: string;
+ fiat: string;
+ price: string;
+ quantity: string;
+ amount: string;
+ status: P2pOrderStatusV3;
+ advId: string;
+ remark: string;
+ orderCancelCountdown: string;
+ fee: string;
+ verifyCapital: 'yes' | 'no';
+ payMethodDetail?: P2pOrderPayMethodDetailV3;
+ sellUserInfo: P2pOrderUserInfoV3;
+ buyUserInfo: P2pOrderUserInfoV3;
+ createdTime: string;
+ updatedTime: string;
+}
================
-File: examples/V2 - Classic/Websocket/ws-demo-trading.ts
+File: src/types/response/v3/stockplus.ts
================
-import { DefaultLogger, WebsocketClientV2 } from '../../../src/index.js';
+/**
+ *
+ *
+ * Stock+ (UTA)
+ *
+ *
+ */
⋮----
-// or
-// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api';
-⋮----
-// If running from CLI in unix, you can pass env vars as such:
-// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/ws-private.ts
-⋮----
-// restOptions: {
-// optionally provide rest options, e.g. to pass through a proxy
-// },
-⋮----
-// Set demoTrading to true, to route all connections to the demo trading wss URLs:
-⋮----
-// If using private topics, make sure to include API keys
-⋮----
-// console.log('WS raw message received ', JSON.stringify(data, null, 2));
-⋮----
-/**
- * Public events
- */
-
-================
-File: examples/V2 - Classic/Websocket/ws-private.ts
-================
-import { DefaultLogger, WebsocketClientV2 } from '../../../src/index.js';
-⋮----
-// or
-// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api';
-⋮----
-// If running from CLI in unix, you can pass env vars as such:
-// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/ws-private.ts
-⋮----
-// note the single quotes, preventing special characters such as $ from being incorrectly passed
+export interface StockPlusOptionQuoteItemV3 {
+ symbol: string;
+ lastDone: string;
+ prevClose: string;
+ open: string;
+ high: string;
+ low: string;
+ timestamp: string;
+ volume: string;
+ turnover: string;
+ tradeStatus: string;
+ impliedVolatility: string;
+ openInterest: string;
+ expiryDate: string;
+ strikePrice: string;
+ contractMultipier: string;
+ contractType: string;
+ contractSize: string;
+ direction: string;
+ historicalVolatility: string;
+ underlyingSymbol: string;
+}
⋮----
-// restOptions: {
-// optionally provide rest options, e.g. to pass through a proxy
-// },
+export interface StockPlusOptionQuoteV3 {
+ secuQuote: StockPlusOptionQuoteItemV3[];
+}
⋮----
-// console.log('WS raw message received ', JSON.stringify(data, null, 2));
+export interface StockPlusOptionStrikePriceInfoV3 {
+ price: string;
+ callSymbol: string;
+ putSymbol: string;
+ standard: boolean;
+}
⋮----
-// auth happens async after the ws connection opens
+export interface StockPlusOptionChainInfoV3 {
+ strikePriceInfo: StockPlusOptionStrikePriceInfoV3[];
+}
⋮----
-// wsClient.subscribePublicSpotTickers(['BTCUSDT', 'LTCUSDT']);
+export interface StockPlusOptionExpiryDateV3 {
+ expiryDate: string[];
+}
⋮----
-/**
- * Private account updates
- */
+export interface StockPlusOptionVolumeV3 {
+ c: string;
+ p: string;
+}
⋮----
-// spot private
-// : account updates
+export interface StockPlusStaticInfoItemV3 {
+ symbol: string;
+ nameCn: string;
+ nameEn: string;
+ exchange: string;
+ currency: string;
+ lotSize: number | string;
+ totalShares: string | number;
+ circulatingShares: string | number;
+ eps: string | number;
+ epsTtm: string | number;
+ bps: string | number;
+ dividendYield: string | number;
+ stockDerivatives: string[];
+ board: string;
+}
⋮----
-// : order updates (note: symbol is required)
-// wsClient.subscribeTopic('SPOT', 'orders', 'BTCUSDT');
+export interface StockPlusStaticInfoV3 {
+ list: StockPlusStaticInfoItemV3[];
+}
⋮----
-// futures private
-// : account updates
+export interface StockPlusSessionQuoteV3 {
+ lastDone: string | number;
+ timestamp: string;
+ volume: string | number;
+ turnover: string | number;
+ high: string | number;
+ low: string | number;
+ prevClose: string | number;
+}
⋮----
-// : position updates
-// wsClient.subscribeTopic('USDT-FUTURES', 'positions');
+export interface StockPlusQuoteItemV3 {
+ symbol: string;
+ lastDone: string | number;
+ prevClose: string | number;
+ open: string | number;
+ high: string | number;
+ low: string | number;
+ timestamp: string;
+ volume: string | number;
+ turnover: string | number;
+ tradeStatus: string;
+ preMarketQuote?: StockPlusSessionQuoteV3 | null;
+ postMarketQuote?: StockPlusSessionQuoteV3 | null;
+ overnightQuote?: StockPlusSessionQuoteV3 | null;
+}
⋮----
-// : order updates
-// wsClient.subscribeTopic('USDT-FUTURES', 'orders');
+export interface StockPlusQuoteV3 {
+ list: StockPlusQuoteItemV3[];
+}
⋮----
-// : plan order updates
-// wsClient.subscribeTopic('USDT-FUTURES', 'orders-algo');
+export interface StockPlusTradeDetailItemV3 {
+ price: string | number;
+ volume: string | number;
+ timestamp: string;
+ tradeType: string;
+ direction: string;
+ tradeSession: string;
+}
⋮----
-// wsClient
-// .getWsStore()
-// .getKeys()
-// .forEach((wsKey) => {
-// const state = wsClient.getWsStore().get(wsKey);
-// console.log(`${wsKey} state: `, state.subscribedTopics.values());
-// });
+export type StockPlusTradeDetailV3 = StockPlusTradeDetailItemV3[];
⋮----
-// setTimeout(() => {
-// wsClient.unsubscribeTopic('USDT-FUTURES', 'account');
-// }, 1000 * 2);
+export interface StockPlusIntradayItemV3 {
+ price: string | number;
+ timestamp: string;
+ volume: string | number;
+ turnover: string | number;
+ avgPrice: string | number;
+}
⋮----
-// setTimeout(() => {
-// wsClient
-// .getWsStore()
-// .getKeys()
-// .forEach((wsKey) => {
-// const state = wsClient.getWsStore().get(wsKey);
-// console.log(`${wsKey} state: `, state.subscribedTopics.values());
-// });
-// }, 1000 * 5);
-
-================
-File: examples/V2 - Classic/Websocket/ws-public.ts
-================
-import {
- DefaultLogger,
- WebsocketClientV2,
- WS_KEY_MAP,
-} from '../../../src/index.js';
+export interface StockPlusIntradayV3 {
+ list: StockPlusIntradayItemV3[];
+}
⋮----
-// or
-// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api';
+export interface StockPlusCandlestickItemV3 {
+ close: string;
+ open: string;
+ low: string;
+ high: string;
+ volume: string;
+ turnover: string;
+ timestamp: string;
+ tradeSession: string;
+}
⋮----
-// restOptions: {
-// optionally provide rest options, e.g. to pass through a proxy
-// },
+export interface StockPlusCandlestickV3 {
+ list: StockPlusCandlestickItemV3[];
+}
⋮----
-// console.log('WS raw message received ', JSON.stringify(data, null, 2));
+export type StockPlusHistoryCandlestickV3 = StockPlusCandlestickV3;
⋮----
-/**
- * Public events
- */
+export interface StockPlusDepthLevelV3 {
+ position: number;
+ price: string;
+ volume: string;
+ orderNum: number;
+}
⋮----
-// Spot public
+export interface StockPlusDepthV3 {
+ asks: StockPlusDepthLevelV3[];
+ bids: StockPlusDepthLevelV3[];
+}
⋮----
-// tickers
+export interface StockPlusPlaceOrderResponseV3 {
+ orderId: string;
+ clientOid: string;
+ symbol: string;
+}
⋮----
-// candles
-// wsClient.subscribeTopic('SPOT', 'candle1m', symbol);
+export type StockPlusCancelOrderResponseV3 = StockPlusPlaceOrderResponseV3;
+export type StockPlusModifyOrderResponseV3 = StockPlusPlaceOrderResponseV3;
⋮----
-// orderbook updates
-// wsClient.subscribeTopic('SPOT', 'books', symbol);
+export interface StockPlusOrderV3 {
+ orderId: string;
+ status: string;
+ stockName: string;
+ quantity: string | number;
+ executedQuantity: string | number;
+ price: string | number | null;
+ executedPrice: string | number | null;
+ submittedAt: string;
+ side: string;
+ symbol: string;
+ orderType: string;
+ lastDone: string | number | null;
+ triggerPrice: string | number | null;
+ msg: string;
+ tag: string;
+ timeInForce: string;
+ expireDate: string | null;
+ updatedAt: string | null;
+ triggerAt: string | null;
+ trailingAmount: string | number | null;
+ trailingPercent: string | number | null;
+ limitOffset: string | number | null;
+ triggerStatus: string | null;
+ currency: string;
+ outsideRth: string;
+ remark?: string;
+ limitDepthLevel: number | null;
+ triggerCount: number | null;
+ monitorPrice: string | null;
+}
⋮----
-// trades
-// wsClient.subscribeTopic('SPOT', 'trade', symbol);
+export interface StockPlusOrdersV3 {
+ orders: StockPlusOrderV3[];
+}
⋮----
-// Futures public
+export interface StockPlusHistoryOrdersV3 {
+ hasMore: boolean;
+ orders: StockPlusOrderV3[];
+}
⋮----
-// tickers
-// wsClient.subscribeTopic('USDT-FUTURES', 'ticker', symbol);
+export interface StockPlusOrderHistoryItemV3 {
+ price: string | number;
+ quantity: string | number;
+ status: string;
+ msg: string;
+ time: string;
+}
⋮----
-// candles
-// wsClient.subscribeTopic('USDT-FUTURES', 'candle1m', symbol);
+export interface StockPlusChargeFeeItemV3 {
+ code: string;
+ name: string;
+ amount: number | string;
+ currency: string;
+}
⋮----
-// orderbook updates
-// wsClient.subscribeTopic('USDT-FUTURES', 'books', symbol);
+export interface StockPlusChargeCategoryV3 {
+ code: string;
+ name: string;
+ fees: StockPlusChargeFeeItemV3[];
+}
⋮----
-// trades
-// wsClient.subscribeTopic('USDT-FUTURES', 'trade', symbol);
+export interface StockPlusChargeDetailV3 {
+ totalAmount: number | string;
+ currency: string;
+ items: StockPlusChargeCategoryV3[];
+}
⋮----
-// Topics are tracked per websocket type
-// Get a list of subscribed topics (e.g. all public topics) (after a 5 second delay)
-
-================
-File: examples/V3 - UTA/Rest/rest-trade-UTA-futures.ts
-================
-/* eslint-disable @typescript-eslint/no-unused-vars */
-import {
- PlaceOrderRequestV3,
- RestClientV3,
- WebsocketClientV3,
-} from '../../../src/index.js';
+export interface StockPlusOrderDetailV3 extends StockPlusOrderV3 {
+ freeStatus?: string;
+ freeAmount?: string | null;
+ freeCurrency?: string | null;
+ deductionsStatus?: string;
+ deductionsAmount?: string | null;
+ deductionsCurrency?: string | null;
+ platformDeductedStatus?: string;
+ platformDeductedAmount?: string | null;
+ platformDeductedCurrency?: string | null;
+ history?: StockPlusOrderHistoryItemV3[];
+ chargeDetail?: StockPlusChargeDetailV3;
+}
⋮----
-// or
-// import { PlaceOrderRequestV3, RestClientV3, WebsocketClientV3 } from '../src';
+export interface StockPlusExecutionV3 {
+ orderId: string;
+ tradeId: string;
+ symbol: string;
+ tradeDoneAt: string;
+ quantity: number | string;
+ price: number | string;
+}
⋮----
-// read from environmental variables
+export interface StockPlusTodayExecutionsV3 {
+ trades: StockPlusExecutionV3[];
+}
⋮----
-// If running from CLI in unix, you can pass env vars as such:
-// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/V3/rest-trade-futures.ts
+export interface StockPlusHistoryExecutionsV3 {
+ hasMore: boolean;
+ trades: StockPlusExecutionV3[];
+}
⋮----
-// note the single quotes, preventing special characters such as $ from being incorrectly passed
+export interface StockPlusCashInfoV3 {
+ withdrawCash: number | string;
+ availableCash: number | string;
+ frozenCash: number | string;
+ settlingCash: number | string;
+ currency: string;
+}
⋮----
-// apiKey: 'apiKeyHere',
-// apiSecret: 'apiSecretHere',
-// apiPass: 'apiPassHere',
+export interface StockPlusFrozenTransactionFeeV3 {
+ currency?: string;
+ amount?: number | string;
+ [key: string]: unknown;
+}
⋮----
-function logWSEvent(type: string, data: any)
+export interface StockPlusAccountItemV3 {
+ totalCash: number | string;
+ maxFinanceAmount: number | string;
+ remainingFinanceAmount: number | string;
+ riskLevel: number | string;
+ marginCall: number | string;
+ netAssets: number | string;
+ initMargin: number | string;
+ maintenanceMargin: number | string;
+ currency: string;
+ buyPower: number | string;
+ cashInfos: StockPlusCashInfoV3[];
+ frozenTransactionFees: StockPlusFrozenTransactionFeeV3[];
+}
⋮----
-// simple sleep function
-function promiseSleep(milliseconds: number)
+export interface StockPlusAccountV3 {
+ list: StockPlusAccountItemV3[];
+}
⋮----
-/**
- * This is a simple script wrapped in a immediately invoked function expression (to execute the below workflow immediately).
- *
- * It is designed to:
- * - open a private websocket channel to log account events
- * - check for any available USDT balance in the account
- * - immediately open a minimum sized long position on BTCUSDT
- * - check active positions
- * - immediately send closing orders for any active futures positions
- * - check positions again
- *
- */
+export interface StockPlusCashFlowItemV3 {
+ transactionFlowName: string;
+ direction: string;
+ businessType: string;
+ balance: number | string;
+ currency: string;
+ businessTime: string;
+ symbol: string | null;
+ description: string;
+}
⋮----
-// Add event listeners to log websocket events on account
+export interface StockPlusCashFlowV3 {
+ list: StockPlusCashFlowItemV3[];
+}
⋮----
-// Subscribe to private topics for UTA account
+export interface StockPlusPositionItemV3 {
+ symbol: string;
+ symbolName: string;
+ quantity: number | string;
+ availableQuantity: number | string;
+ currency: string;
+ costPrice: number | string;
+ market: string;
+ initQuantity: number | string;
+}
⋮----
-// Subscribe to position updates
+export interface StockPlusPositionChannelV3 {
+ accountChannel: string;
+ positions: StockPlusPositionItemV3[];
+}
⋮----
-// Subscribe to order updates
+export interface StockPlusStockPositionV3 {
+ channels: StockPlusPositionChannelV3[];
+}
⋮----
-// wait briefly for ws to be ready (could also use the response or authenticated events, to make sure topics are subscribed to before starting)
+export interface StockPlusTransferResponseV3 {
+ transferId: string;
+}
⋮----
-// Loop through any active positions and send a closing market order on each position
+export interface StockPlusTransferRecordsV3 {
+ transferId: string;
+ coin: string;
+ amount: string;
+ direction: string;
+ cursor: string;
+}
================
-File: examples/V3 - UTA/Rest/rest-trade-UTA-spot.ts
+File: src/types/response/v3/strategy.ts
================
-/* eslint-disable @typescript-eslint/no-unused-vars */
-import {
- PlaceOrderRequestV3,
- RestClientV3,
- WebsocketClientV3,
-} from '../../../src/index.js';
+import type {
+ StrategyOrderStatusV3,
+ StrategyTriggerByV3,
+ StrategyTriggerOrderTypeV3,
+} from '../../request/v3/strategy.js';
⋮----
-// import { RestClientV3, WebsocketClientV3 } from '../src/index';
+export interface PlaceStrategyOrderResponseV3 {
+ orderId: string;
+ clientOid: string;
+}
⋮----
-// read from environmental variables
+export interface ModifyStrategyOrderResponseV3 {
+ orderId: string;
+ clientOid: string;
+}
⋮----
-// If running from CLI in unix, you can pass env vars as such:
-// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/V3/rest-trade-spot.ts
+export interface StrategyOrderV3 {
+ orderId: string;
+ clientOid: string;
+ category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
+ symbol: string;
+ qty: string;
+ posSide: 'long' | 'short';
+ status: StrategyOrderStatusV3;
+ triggerType?: 'takeProfit' | 'stopLoss';
+ tpTriggerBy?: StrategyTriggerByV3;
+ slTriggerBy?: StrategyTriggerByV3;
+ takeProfit?: string;
+ stopLoss?: string;
+ tpOrderType?: StrategyTriggerOrderTypeV3;
+ slOrderType?: StrategyTriggerOrderTypeV3;
+ tpLimitPrice?: string;
+ slLimitPrice?: string;
+ triggerBy?: StrategyTriggerByV3;
+ triggerPrice?: string;
+ triggerOrderType?: StrategyTriggerOrderTypeV3;
+ triggerOrderPrice?: string;
+ createdTime: string;
+ updatedTime: string;
+}
+
+================
+File: src/types/shared.ts
+================
+import { REST_CLIENT_TYPE_ENUM } from '../util/requestUtils.js';
+⋮----
+export type numberInString = string;
+⋮----
+export type OrderSide = 'Buy' | 'Sell';
+⋮----
+/**
+ * @deprecated use SpotKlineInterval or FuturesKlineInterval, depending on which API group you're using
+ */
+export type KlineInterval =
+ | '1min'
+ | '5min'
+ | '15min'
+ | '30min'
+ | '1h'
+ | '4h'
+ | '6h'
+ | '12h'
+ | '1M'
+ | '1W'
+ | '1week'
+ | '6Hutc'
+ | '12Hutc'
+ | '1Dutc'
+ | '3Dutc'
+ | '1Wutc'
+ | '1Mutc';
+⋮----
+export type RestClientType =
+ (typeof REST_CLIENT_TYPE_ENUM)[keyof typeof REST_CLIENT_TYPE_ENUM];
+⋮----
+export interface APIResponse {
+ code: string;
+ requestTime: number;
+ msg: 'success' | string;
+ data: T;
+}
+
+================
+File: .nvmrc
+================
+v24.18.0
+
+================
+File: examples/auth/fasterHmacSign.ts
+================
+import { createHmac } from 'crypto';
+⋮----
+import {
+ DefaultLogger,
+ RestClientV3,
+ WebsocketClientV3,
+} from '../../src/index.js';
+⋮----
+// or
+// import { createHmac } from 'crypto';
+// import { DefaultLogger, RestClientV3, WebsocketClientV3 } from 'bitget-api';
+⋮----
+/**
+ * Injecting a custom signMessage function.
+ *
+ * As of version 3.0.0 of the bitget-api Node.js/TypeScript/JavaScript
+ * SDK for Bitget, the SDK uses the Web Crypto API for signing requests.
+ * While it is compatible with Node and Browser environments, it is
+ * slightly slower than using Node's native crypto module (only
+ * available in backend Node environments).
+ *
+ * For latency sensitive users, you can inject the previous node crypto sign
+ * method (or your own even faster implementation), if this change affects you.
+ *
+ * This example demonstrates how to inject a custom sign function, to achieve
+ * the same peformance as seen before the Web Crypto API was introduced.
+ *
+ * For context on standard usage, the "signMessage" function is used:
+ * - During every single API call
+ * - After opening a new private WebSocket connection
+ */
+⋮----
+/**
+ * Set this to true to enable demo trading:
+ */
+⋮----
+/**
+ * Overkill in almost every case, but if you need any optimisation available,
+ * you can inject a faster sign mechanism such as node's native createHmac:
+ */
+⋮----
+// Optional, uncomment the "trace" override to log a lot more info about what the WS client is doing
+⋮----
+// trace: (...params) => console.log('trace', ...params),
+⋮----
+/**
+ * Set this to true to enable demo trading for the private account data WS
+ * Topics: order,execution,position,wallet,greeks
+ */
+⋮----
+/**
+ * Overkill in almost every case, but if you need any optimisation available,
+ * you can inject a faster sign mechanism such as node's native createHmac:
+ */
+⋮----
+function setWsClientEventListeners(
+ websocketClient: WebsocketClientV3,
+ accountRef: string,
+): Promise
+⋮----
+// console.log('raw message received ', JSON.stringify(data, null, 2));
+⋮----
+// Simple promise to ensure we're subscribed before trying anything else
+⋮----
+// Start trading
+
+================
+File: examples/V2 - Classic/Rest/rest-trade-futures.ts
+================
+import {
+ FuturesPlaceOrderRequestV2,
+ RestClientV2,
+ WebsocketClientV2,
+} from '../../../src/index.js';
+⋮----
+// or
+// import { FuturesPlaceOrderRequestV2, RestClientV2, WebsocketClientV2 } from '../src';
+⋮----
+// read from environmental variables
+⋮----
+// If running from CLI in unix, you can pass env vars as such:
+// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/rest-trade-futures.ts
⋮----
// note the single quotes, preventing special characters such as $ from being incorrectly passed
⋮----
@@ -6084,74 +5717,369 @@ function logWSEvent(type: string, data: any)
// simple sleep function
function promiseSleep(milliseconds: number)
⋮----
-/** This is a simple script wrapped in a immediately invoked function expression, designed to check for any available BTC balance and immediately sell the full amount for USDT */
+/**
+ * This is a simple script wrapped in a immediately invoked function expression (to execute the below workflow immediately).
+ *
+ * It is designed to:
+ * - open a private websocket channel to log account events
+ * - check for any available USDT balance in the futures account
+ * - immediately open a minimum sized long position on BTCUSDT
+ * - check active positions
+ * - immediately send closing orders for any active futures positions
+ * - check positions again
+ *
+ */
⋮----
// Add event listeners to log websocket events on account
⋮----
-// Subscribe to private account topics
-// Account updates for UTA (unified trading account)
+// futures private
+// : account updates
⋮----
-// Order updates for spot
+// : position updates
+⋮----
+// : order updates
⋮----
// wait briefly for ws to be ready (could also use the response or authenticated events, to make sure topics are subscribed to before starting)
+⋮----
+// const balances = allBalances.filter((bal) => Number(bal.available) != 0);
+⋮----
+// Loop through any active positions and send a closing market order on each position
================
-File: examples/V3 - UTA/Websocket/ws-private.ts
+File: examples/V2 - Classic/Rest/rest-trade-spot.ts
================
import {
- DefaultLogger,
- WebsocketClientV3,
- WS_KEY_MAP,
+ RestClientV2,
+ SpotOrderRequestV2,
+ WebsocketClientV2,
} from '../../../src/index.js';
⋮----
-// or
-// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api';
+// import { RestClientV2, WebsocketClient } from '../src/index';
+⋮----
+// read from environmental variables
⋮----
// If running from CLI in unix, you can pass env vars as such:
-// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/ws-private.ts
+// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/rest-trade-spot.ts
⋮----
-// console.log('WS raw message received ', JSON.stringify(data, null, 2));
+// note the single quotes, preventing special characters such as $ from being incorrectly passed
⋮----
-// You can subscribe to one topic at a time
+// apiKey: 'apiKeyHere',
+// apiSecret: 'apiSecretHere',
+// apiPass: 'apiPassHere',
⋮----
-instType: 'UTA', // Note: all account events go on the UTA instType
+function logWSEvent(type: string, data: any)
⋮----
-WS_KEY_MAP.v3Private, // This parameter points to private or public
+// simple sleep function
+function promiseSleep(milliseconds: number)
⋮----
-// Note: all account events go on the UTA instType
+/** This is a simple script wrapped in a immediately invoked function expression, designed to check for any available BTC balance and immediately sell the full amount for USDT */
⋮----
-// Or multiple at once:
+// Add event listeners to log websocket events on account
⋮----
-// Topics are tracked per websocket type
-// The below example will pull a list of subscribed topics on that connection (e.g. all private topics), after a 5 second delay:
+// Subscribe to private account topics
+// spot private
+// : account updates
+⋮----
+// : order updates (note: symbol is required)
+⋮----
+// wait briefly for ws to be ready (could also use the response or authenticated events, to make sure topics are subscribed to before starting)
+⋮----
+// console.log('balance: ', JSON.stringify(balances, null, 2));
================
-File: examples/V3 - UTA/Websocket/ws-public.ts
+File: examples/V2 - Classic/Websocket/ws-demo-trading.ts
================
-import {
- DefaultLogger,
- WebsocketClientV3,
- WS_KEY_MAP,
-} from '../../../src/index.js';
+import { DefaultLogger, WebsocketClientV2 } from '../../../src/index.js';
⋮----
// or
// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api';
⋮----
+// If running from CLI in unix, you can pass env vars as such:
+// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/ws-private.ts
+⋮----
+// restOptions: {
+// optionally provide rest options, e.g. to pass through a proxy
+// },
+⋮----
+// Set demoTrading to true, to route all connections to the demo trading wss URLs:
+⋮----
+// If using private topics, make sure to include API keys
+⋮----
// console.log('WS raw message received ', JSON.stringify(data, null, 2));
⋮----
/**
* Public events
*/
+
+================
+File: examples/V2 - Classic/Websocket/ws-private.ts
+================
+import { DefaultLogger, WebsocketClientV2 } from '../../../src/index.js';
⋮----
-// You can subscribe to one topic at a time
+// or
+// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api';
⋮----
-WS_KEY_MAP.v3Public, // This parameter points to private or public
+// If running from CLI in unix, you can pass env vars as such:
+// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/ws-private.ts
⋮----
-// Or multiple at once:
+// note the single quotes, preventing special characters such as $ from being incorrectly passed
⋮----
-// Topics are tracked per websocket type
-// The below example will pull a list of subscribed topics on that connection (e.g. all public topics), after a 5 second delay:
-
+// restOptions: {
+// optionally provide rest options, e.g. to pass through a proxy
+// },
+⋮----
+// console.log('WS raw message received ', JSON.stringify(data, null, 2));
+⋮----
+// auth happens async after the ws connection opens
+⋮----
+// wsClient.subscribePublicSpotTickers(['BTCUSDT', 'LTCUSDT']);
+⋮----
+/**
+ * Private account updates
+ */
+⋮----
+// spot private
+// : account updates
+⋮----
+// : order updates (note: symbol is required)
+// wsClient.subscribeTopic('SPOT', 'orders', 'BTCUSDT');
+⋮----
+// futures private
+// : account updates
+⋮----
+// : position updates
+// wsClient.subscribeTopic('USDT-FUTURES', 'positions');
+⋮----
+// : order updates
+// wsClient.subscribeTopic('USDT-FUTURES', 'orders');
+⋮----
+// : plan order updates
+// wsClient.subscribeTopic('USDT-FUTURES', 'orders-algo');
+⋮----
+// wsClient
+// .getWsStore()
+// .getKeys()
+// .forEach((wsKey) => {
+// const state = wsClient.getWsStore().get(wsKey);
+// console.log(`${wsKey} state: `, state.subscribedTopics.values());
+// });
+⋮----
+// setTimeout(() => {
+// wsClient.unsubscribeTopic('USDT-FUTURES', 'account');
+// }, 1000 * 2);
+⋮----
+// setTimeout(() => {
+// wsClient
+// .getWsStore()
+// .getKeys()
+// .forEach((wsKey) => {
+// const state = wsClient.getWsStore().get(wsKey);
+// console.log(`${wsKey} state: `, state.subscribedTopics.values());
+// });
+// }, 1000 * 5);
+
+================
+File: examples/V2 - Classic/Websocket/ws-public.ts
+================
+import {
+ DefaultLogger,
+ WebsocketClientV2,
+ WS_KEY_MAP,
+} from '../../../src/index.js';
+⋮----
+// or
+// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api';
+⋮----
+// restOptions: {
+// optionally provide rest options, e.g. to pass through a proxy
+// },
+⋮----
+// console.log('WS raw message received ', JSON.stringify(data, null, 2));
+⋮----
+/**
+ * Public events
+ */
+⋮----
+// Spot public
+⋮----
+// tickers
+⋮----
+// candles
+// wsClient.subscribeTopic('SPOT', 'candle1m', symbol);
+⋮----
+// orderbook updates
+// wsClient.subscribeTopic('SPOT', 'books', symbol);
+⋮----
+// trades
+// wsClient.subscribeTopic('SPOT', 'trade', symbol);
+⋮----
+// Futures public
+⋮----
+// tickers
+// wsClient.subscribeTopic('USDT-FUTURES', 'ticker', symbol);
+⋮----
+// candles
+// wsClient.subscribeTopic('USDT-FUTURES', 'candle1m', symbol);
+⋮----
+// orderbook updates
+// wsClient.subscribeTopic('USDT-FUTURES', 'books', symbol);
+⋮----
+// trades
+// wsClient.subscribeTopic('USDT-FUTURES', 'trade', symbol);
+⋮----
+// Topics are tracked per websocket type
+// Get a list of subscribed topics (e.g. all public topics) (after a 5 second delay)
+
+================
+File: examples/V3 - UTA/Rest/rest-trade-UTA-futures.ts
+================
+/* eslint-disable @typescript-eslint/no-unused-vars */
+import {
+ PlaceOrderRequestV3,
+ RestClientV3,
+ WebsocketClientV3,
+} from '../../../src/index.js';
+⋮----
+// or
+// import { PlaceOrderRequestV3, RestClientV3, WebsocketClientV3 } from '../src';
+⋮----
+// read from environmental variables
+⋮----
+// If running from CLI in unix, you can pass env vars as such:
+// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/V3/rest-trade-futures.ts
+⋮----
+// note the single quotes, preventing special characters such as $ from being incorrectly passed
+⋮----
+// apiKey: 'apiKeyHere',
+// apiSecret: 'apiSecretHere',
+// apiPass: 'apiPassHere',
+⋮----
+function logWSEvent(type: string, data: any)
+⋮----
+// simple sleep function
+function promiseSleep(milliseconds: number)
+⋮----
+/**
+ * This is a simple script wrapped in a immediately invoked function expression (to execute the below workflow immediately).
+ *
+ * It is designed to:
+ * - open a private websocket channel to log account events
+ * - check for any available USDT balance in the account
+ * - immediately open a minimum sized long position on BTCUSDT
+ * - check active positions
+ * - immediately send closing orders for any active futures positions
+ * - check positions again
+ *
+ */
+⋮----
+// Add event listeners to log websocket events on account
+⋮----
+// Subscribe to private topics for UTA account
+⋮----
+// Subscribe to position updates
+⋮----
+// Subscribe to order updates
+⋮----
+// wait briefly for ws to be ready (could also use the response or authenticated events, to make sure topics are subscribed to before starting)
+⋮----
+// Loop through any active positions and send a closing market order on each position
+
+================
+File: examples/V3 - UTA/Rest/rest-trade-UTA-spot.ts
+================
+/* eslint-disable @typescript-eslint/no-unused-vars */
+import {
+ PlaceOrderRequestV3,
+ RestClientV3,
+ WebsocketClientV3,
+} from '../../../src/index.js';
+⋮----
+// import { RestClientV3, WebsocketClientV3 } from '../src/index';
+⋮----
+// read from environmental variables
+⋮----
+// If running from CLI in unix, you can pass env vars as such:
+// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/V3/rest-trade-spot.ts
+⋮----
+// note the single quotes, preventing special characters such as $ from being incorrectly passed
+⋮----
+// apiKey: 'apiKeyHere',
+// apiSecret: 'apiSecretHere',
+// apiPass: 'apiPassHere',
+⋮----
+function logWSEvent(type: string, data: any)
+⋮----
+// simple sleep function
+function promiseSleep(milliseconds: number)
+⋮----
+/** This is a simple script wrapped in a immediately invoked function expression, designed to check for any available BTC balance and immediately sell the full amount for USDT */
+⋮----
+// Add event listeners to log websocket events on account
+⋮----
+// Subscribe to private account topics
+// Account updates for UTA (unified trading account)
+⋮----
+// Order updates for spot
+⋮----
+// wait briefly for ws to be ready (could also use the response or authenticated events, to make sure topics are subscribed to before starting)
+
+================
+File: examples/V3 - UTA/Websocket/ws-private.ts
+================
+import {
+ DefaultLogger,
+ WebsocketClientV3,
+ WS_KEY_MAP,
+} from '../../../src/index.js';
+⋮----
+// or
+// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api';
+⋮----
+// If running from CLI in unix, you can pass env vars as such:
+// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/ws-private.ts
+⋮----
+// console.log('WS raw message received ', JSON.stringify(data, null, 2));
+⋮----
+// You can subscribe to one topic at a time
+⋮----
+instType: 'UTA', // Note: all account events go on the UTA instType
+⋮----
+WS_KEY_MAP.v3Private, // This parameter points to private or public
+⋮----
+// Note: all account events go on the UTA instType
+⋮----
+// Or multiple at once:
+⋮----
+// Topics are tracked per websocket type
+// The below example will pull a list of subscribed topics on that connection (e.g. all private topics), after a 5 second delay:
+
+================
+File: examples/V3 - UTA/Websocket/ws-public.ts
+================
+import {
+ DefaultLogger,
+ WebsocketClientV3,
+ WS_KEY_MAP,
+} from '../../../src/index.js';
+⋮----
+// or
+// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api';
+⋮----
+// console.log('WS raw message received ', JSON.stringify(data, null, 2));
+⋮----
+/**
+ * Public events
+ */
+⋮----
+// You can subscribe to one topic at a time
+⋮----
+WS_KEY_MAP.v3Public, // This parameter points to private or public
+⋮----
+// Or multiple at once:
+⋮----
+// Topics are tracked per websocket type
+// The below example will pull a list of subscribed topics on that connection (e.g. all public topics), after a 5 second delay:
+
================
File: examples/V3 - UTA/WS-API/ws-api-trade-raw.ts
================
@@ -6293,4045 +6221,5044 @@ import {
*/
================
-File: src/constants/enum.ts
-================
-/** Parameter verification exception margin mode == FIXED */
-
-================
-File: src/types/request/v3/broker.ts
+File: src/types/request/v2/broker.ts
================
-export interface CreateBrokerSubAccountRequestV3 {
- subaccountName: string;
- label: string;
-}
+/**
+ *
+ * * Broker | Subaccount
+ *
+ */
⋮----
-export interface GetBrokerSubAccountListRequestV3 {
+export interface GetSubAccountsRequestV2 {
limit?: string;
- cursor?: string;
- status?: 'normal' | 'freeze';
+ idLessThan?: string;
+ status?: 'normal' | 'freeze' | 'del';
+ startTime?: string;
+ endTime?: string;
}
⋮----
-export interface ModifyBrokerSubAccountRequestV3 {
+export type SubAccountPermissionV2 =
+ | 'withdraw'
+ | 'transfer'
+ | 'spot_trade'
+ | 'contract_trade'
+ | 'read'
+ | 'deposit'
+ | 'margin_trade';
+⋮----
+export type SubAccountLanguageV2 =
+ | 'en_US'
+ | 'zh_CN'
+ | 'ja_JP'
+ | 'vi_VN'
+ | 'zh_TW'
+ | 'ru_RU'
+ | 'es_ES'
+ | 'tr_TR'
+ | 'fr_FR'
+ | 'de_DE'
+ | 'pt_PT'
+ | 'th_TH';
+⋮----
+export type SubAccountStatusV2 = 'normal' | 'freeze';
+⋮----
+export interface ModifySubRequestV2 {
subUid: string;
- status?: 'normal' | 'freeze';
- permList?: string[];
+ permList: SubAccountPermissionV2[];
+ status: SubAccountStatusV2;
+ language?: SubAccountLanguageV2;
}
⋮----
-export interface BrokerSubWithdrawalRequestV3 {
+export interface SubWithdrawalRequestV2 {
subUid: string;
coin: string;
dest: 'on_chain' | 'internal_transfer';
+ chain?: string;
address: string;
amount: string;
- chain?: string;
tag?: string;
clientOid?: string;
}
⋮----
-export interface GetBrokerSubDepositAddressRequestV3 {
- subUid: string;
- coin: string;
- chain?: string;
-}
-⋮----
-export interface GetBrokerAllSubDepositWithdrawalRequestV3 {
+export interface SubDepositRecordsRequestV2 {
+ orderId?: string;
+ userId?: string;
startTime?: string;
endTime?: string;
limit?: string;
- cursor?: string;
- status?: 'pending' | 'fail' | 'success';
+ idLessThan?: string;
}
⋮----
-export interface GetBrokerCommissionRequestV3 {
+export interface SubWithdrawalRecordsRequestV2 {
+ orderId?: string;
+ userId?: string;
startTime?: string;
endTime?: string;
- pageSize?: string;
- pageNo?: string;
- bizType?: 'spot' | 'futures';
- subBizType?:
- | 'spot_trade'
- | 'spot_margin'
- | 'usdt_futures'
- | 'usdc_futures'
- | 'coin_futures';
+ limit?: string;
+ idLessThan?: string;
}
⋮----
-export interface CreateBrokerSubApiKeyRequestV3 {
+/**
+ *
+ * * Broker | Subaccount
+ *
+ */
+⋮----
+export interface CreateSubAccountApiKeyRequestV2 {
subUid: string;
passphrase: string;
- label: string;
- ipList?: string[];
- permType: 'read_write' | 'read_only';
+ label?: string;
+ ipList: string[];
+ permType: string;
permList: string[];
}
⋮----
-export interface ModifyBrokerSubApiKeyRequestV3 {
+export interface ModifySubAccountApiKeyRequestV2 {
subUid: string;
- passphrase: string;
apiKey: string;
label?: string;
+ passphrase: string;
ipList?: string[];
- permType?: 'read_write' | 'read_only';
- permList?: string[];
+ permType?: string;
+ permList: string[];
}
⋮----
-export interface DeleteBrokerSubApiKeyRequestV3 {
+export interface DeleteSubAccountApiKeyRequestV2 {
subUid: string;
apiKey: string;
}
⋮----
-export interface GetBrokerSubApiKeyRequestV3 {
- subUid: string;
-}
-
-================
-File: src/types/response/v3/broker.ts
-================
-export interface CreateBrokerSubAccountResponseV3 {
- subUid: string;
- subaccountName: string;
- subaccountEmail: string;
- status: 'normal' | 'freeze';
- permList: string[];
- label: string;
- cTime: string;
+/**
+ *
+ * * Broker | All Sub-accounts Deposit and Withdrawal Records
+ *
+ */
+⋮----
+export interface GetAllSubDepositWithdrawalRequestV2 {
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
+ idLessThan?: string;
+ type?: 'all' | 'deposit' | 'withdrawal';
}
⋮----
-export interface BrokerSubAccountV3 {
- subUid: string;
- subaccountName: string;
- subaccountEmail: string | null;
- status: 'normal' | 'freeze';
- permList: string[];
- label: string;
- language: string;
- cTime: string;
- uTime: string;
+/**
+ *
+ * * Broker | Subaccounts
+ *
+ */
+⋮----
+export interface GetBrokerSubaccountsRequestV2 {
+ startTime?: string;
+ endTime?: string;
+ pageSize?: string;
+ pageNo?: string;
}
⋮----
-export interface GetBrokerSubAccountListResponseV3 {
- subList: BrokerSubAccountV3[];
+/**
+ *
+ * * Broker | Commissions
+ *
+ */
+⋮----
+export interface GetBrokerCommissionsRequestV2 {
+ startTime?: string;
+ endTime?: string;
+ pageSize?: string;
+ pageNo?: string;
+ bizType?: 'spot' | 'futures';
+ subBizType?:
+ | 'spot_trade'
+ | 'spot_margin'
+ | 'usdt_futures'
+ | 'usdc_futures'
+ | 'coin_futures';
}
⋮----
-export interface ModifyBrokerSubAccountResponseV3 {
- subUid: string;
- subaccountName: string;
- status: 'normal' | 'freeze';
- permList: string[];
- label: string;
- cTime: string;
- uTime: string;
+/**
+ *
+ * * Broker | Trade Volume
+ *
+ */
+⋮----
+export interface GetBrokerTradeVolumeRequestV2 {
+ startTime?: string;
+ endTime?: string;
+ pageSize?: string;
+ pageNo?: string;
}
⋮----
-export interface BrokerSubWithdrawalResponseV3 {
- orderId: string;
- clientOid: string;
+/**
+ *
+ * * Broker | Total Commission
+ *
+ */
+⋮----
+export interface GetBrokerTotalCommissionRequestV2 {
+ startTime?: string;
+ endTime?: string;
}
⋮----
-export interface BrokerSubDepositAddressV3 {
- subUid: string;
- coin: string;
- address: string;
- chain: string;
- tag: string | null;
- url: string;
- cTime: string;
+/**
+ *
+ * * Broker | Order Commission
+ *
+ */
+⋮----
+export interface GetBrokerOrderCommissionRequestV2 {
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
+ uid?: string;
+ orderId?: string;
+ idLessThan?: string;
}
⋮----
-export interface BrokerSubDepositWithdrawalRecordV3 {
+/**
+ *
+ * * Broker | Rebate Info
+ *
+ */
+⋮----
+export interface GetBrokerRebateInfoRequestV2 {
uid: string;
- txId: string;
- type: 'deposit' | 'withdrawal';
- subType: 'onchain' | 'internal' | 'fast';
- coin: string;
- amount: string;
- status: 'pending' | 'fail' | 'success';
- ts: string;
}
⋮----
-export interface GetBrokerAllSubDepositWithdrawalResponseV3 {
- list: BrokerSubDepositWithdrawalRecordV3[];
- endId: string;
-}
+/**
+ *
+ * * Broker | Agent (affiliate) customer APIs
+ *
+ */
⋮----
-export interface BrokerCommissionRecordV3 {
- uid: string;
- coin: string;
- symbol: string;
- dealtAmount: string;
- totalFee: string;
- deductedFee: string;
- paidFee: string;
- markUpFee: string;
- totalCommission: string;
+export interface GetAgentCustomerCommissionsRequestV2 {
+ startTime?: string;
+ endTime?: string;
+ idLessThan?: string;
+ limit?: string;
+ uid?: string;
+ coin?: string;
+ symbol?: string;
+ showSub?: 'yes' | 'no';
}
⋮----
-export interface CreateBrokerSubApiKeyResponseV3 {
- subUid: string;
- label: string;
- apiKey: string;
- secretKey: string;
- permType: 'read_write' | 'read_only';
- permList: string[];
- ipList: string[] | null;
+export interface GetAgentSubCustomerListRequestV2 {
+ startTime?: string;
+ endTime?: string;
+ idLessThan?: string;
+ limit?: string;
+ uid?: string;
+ showSub?: 'yes' | 'no';
}
⋮----
-export interface ModifyBrokerSubApiKeyResponseV3 {
- subUid: string;
- label: string;
- apiKey: string;
- permType: 'read_write' | 'read_only';
- permList: string[];
- ipList: string[];
+export interface AgentCustomerTradeVolumeRequestV2 {
+ startTime?: string;
+ endTime?: string;
+ pageNo?: string;
+ pageSize?: string;
+ uid?: string;
+ showSub?: 'yes' | 'no';
}
⋮----
-export interface GetBrokerSubApiKeyResponseV3 {
- subUid: string;
- label: string;
- apiKey: string;
- secretKey: string;
- permType: 'read_write' | 'read_only';
- permList: string[];
- ipList: string[] | null;
+export interface AgentCustomerListRequestV2 {
+ startTime?: string;
+ endTime?: string;
+ pageNo?: string;
+ pageSize?: string;
+ uid?: string;
+ referralCode?: string;
+ showSub?: 'yes' | 'no';
+}
+⋮----
+export interface GetAgentCustomerKycResultRequestV2 {
+ startTime?: string;
+ endTime?: string;
+ idLessThan?: string;
+ limit?: string;
+ uid?: string;
+ showSub?: 'yes' | 'no';
+}
+⋮----
+export interface AgentCustomerDepositRequestV2 {
+ startTime?: string;
+ endTime?: string;
+ pageNo?: string;
+ pageSize?: string;
+ uid?: string;
+ showSub?: 'yes' | 'no';
+}
+⋮----
+export interface AgentCustomerAssetRequestV2 {
+ pageNo?: string;
+ pageSize?: string;
+ uid?: string;
+ showSub?: 'yes' | 'no';
+}
+⋮----
+export interface GetAgentCommissionDetailRequestV2 {
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
+ idLessThan?: string;
}
================
-File: src/types/response/v3/copytrading.ts
+File: src/types/request/v2/common.ts
================
+import { FuturesProductTypeV2, MarginType } from '../shared.js';
+⋮----
/**
*
- *
- * Copy Trading | Futures (UTA)
- *
+ * * Common | Notice
*
*/
⋮----
-export interface CopyFuturesMarginDetailV3 {
- marginCoin: string;
- maxLongCount: string;
- remainingLongCount: string;
- maxShortCount: string;
- remainingShortCount: string;
+export interface GetAnnouncementsRequestV2 {
+ annType?: string;
+ startTime?: string;
+ endTime?: string;
+ language: string;
}
⋮----
-export interface CopyFuturesTradingPairV3 {
- symbol: string;
- leverage: string;
- marginDetails: CopyFuturesMarginDetailV3[];
-}
+/**
+ *
+ * * Common | Public
+ *
+ */
⋮----
-export interface CopyFuturesPositionSummaryV3 {
- unrealizedPnl: string;
- realizedPnl: string;
- holdSize: string;
- avgPrice: string;
+export interface GetTradeRateRequestV2 {
symbol: string;
- leverage: string;
- marginMode: string;
- liqPrice: string;
- margin: string;
- holdSide: string;
- roi: string;
- markPrice: string;
- positionValue: string;
+ businessType: string;
}
⋮----
-export interface CopyFuturesMaxTransferableV3 {
- maxTransferable: string;
- available: string;
+export interface GetAllTradeRatesRequestV2 {
+ businessType: string;
}
⋮----
-export interface CopyFuturesTransferResponseV3 {
- transferId: string;
-}
+/**
+ *
+ * * Common | Tax
+ *
+ */
⋮----
-export type CopyFuturesTransferAccountTypeV3 = 'spot' | 'uta' | 'lead';
+export interface GetSpotTransactionsRequestV2 {
+ coin?: string;
+ startTime: string;
+ endTime: string;
+ limit?: string;
+ idLessThan?: string;
+}
⋮----
-export interface CopyFuturesTransferRecordV3 {
- transferId: string;
- fromType: CopyFuturesTransferAccountTypeV3;
- toType: CopyFuturesTransferAccountTypeV3;
- amount: string;
- coin: string;
- status: 'Successful' | 'Failed' | 'Processing';
- createdTime: string;
+export interface GetFuturesTransactionsRequestV2 {
+ productType?: FuturesProductTypeV2;
+ marginCoin?: string;
+ startTime: string;
+ endTime: string;
+ limit?: string;
+ idLessThan?: string;
}
⋮----
-export interface CopyFuturesTransferRecordListV3 {
- list: CopyFuturesTransferRecordV3[];
+export interface GetMarginTransactionsRequestV2 {
+ marginType?: MarginType;
+ coin?: string;
+ startTime: string;
+ endTime: string;
+ limit?: string;
+ idLessThan?: string;
}
-
-================
-File: src/types/response/v3/loan.ts
-================
-export interface LoanTransfersV3 {
- coin: string;
- transfered: string;
- userId: string;
+⋮----
+export interface GetP2PTransactionsRequestV2 {
+ coin?: string;
+ startTime: string;
+ endTime: string;
+ limit?: string;
+ idLessThan?: string;
}
⋮----
-export interface LoanSymbolSettingV3 {
- symbol: string;
- leverage: string;
+/**
+ *
+ * * Common | P2P
+ *
+ */
+⋮----
+export interface GetP2PMerchantsRequestV2 {
+ online?: 'yes' | 'no';
+ idLessThan?: string;
+ limit?: string;
}
⋮----
-export interface LoanSymbolsV3 {
- productId: string;
- spotSymbols: string[];
- marginLeverage: string;
- usdtContractLeverage: string;
- coinContractLeverage: string;
- usdcContractLeverage: string;
- usdtContractSymbols: LoanSymbolSettingV3[];
- coinContractSymbols: LoanSymbolSettingV3[];
- usdcContractSymbols: LoanSymbolSettingV3[];
+export interface GetMerchantP2POrdersRequestV2 {
+ startTime: string;
+ endTime?: string;
+ idLessThan?: string;
+ limit?: string;
+ status?: string;
+ advNo: string;
+ side?: string;
+ coin?: string;
+ language: string;
+ fiat?: string;
+ orderNo?: string;
}
⋮----
-export interface RepaidHistoryItemV3 {
- repayOrderId: string;
- businessType: 'normal' | 'liquidation';
- repayType: 'all' | 'part';
- repaidTime: string;
+export interface GetMerchantAdvertisementsRequestV2 {
+ startTime: string;
+ endTime?: string;
+ idLessThan?: string;
+ limit?: string;
+ status: string;
+ advNo?: string;
+ side: string;
coin: string;
- repayAmount: string;
- repayInterest: string;
+ language?: string;
+ fiat: string;
+ orderBy?: string;
+ payMethodId?: string;
+ sourceType?: string;
}
⋮----
-export interface LoanProductInfoV3 {
- productId: string;
- leverage: string;
- supportUsdtContract: 'YES' | 'NO';
- supportCoinContract: 'YES' | 'NO';
- supportUsdcContract: 'YES' | 'NO';
- transferLine: string;
- spotBuyLine: string;
- usdtContractOpenLine: string;
- coinContractOpenLine: string;
- usdcContractOpenLine: string;
- liquidationLine: string;
- stopLiquidationLine: string;
-}
+/**
+ *
+ * * Common | Virtual Subaccount
+ *
+ */
⋮----
-export interface LoanOrderV3 {
- orderId: string;
- orderProductId: string;
- uid: string;
- loanTime: string;
- loanCoin: string;
- loanAmount: string;
- unpaidAmount: string;
- unpaidInterest: string;
- repaidAmount: string;
- repaidInterest: string;
- reserve: string;
- status: 'not_paid_off' | 'paid_off';
+export interface ModifyVirtualSubRequestV2 {
+ subAccountUid: string;
+ permList: string[];
+ status: string;
}
⋮----
-/** Tiered conversion rate item (when Tiered Discount Rate Model is enabled) */
-export interface ConvertRatioListItemV3 {
- ladder: string;
- convertRatio: string;
+export interface CreateVirtualSubRequestV2 {
+ subAccountName: string;
+ passphrase: string;
+ label: string;
+ ipList?: string[];
+ permList?: string[];
}
⋮----
-export interface CoinInfoV3 {
- coin: string;
- convertRatio: string;
- maxConvertValue: string;
- /** Tiered conversion rate (when margin mode is Tiered Discount Rate Model) */
- convertRatioList?: ConvertRatioListItemV3[];
+export interface CreateVirtualSubApiKeyRequestV2 {
+ subAccountUid: string;
+ passphrase: string;
+ label: string;
+ ipList?: string[];
+ permList?: string[];
}
⋮----
-/** Tiered conversion rate (when margin mode is Tiered Discount Rate Model) */
-⋮----
-export interface BindUidResponseV3 {
- riskUnitId: string;
- uid: string;
- operate: 'bind' | 'unbind';
+export interface ModifyVirtualSubApiKeyRequestV2 {
+ subAccountUid: string;
+ subAccountApiKey: string;
+ passphrase: string;
+ label: string;
+ ipList?: string[];
+ permList?: string[];
}
⋮----
-export interface UnpaidInfoV3 {
- coin: string;
- unpaidQty: string;
- unpaidInterest: string;
+export interface CreateAgentSubaccountRequestV2 {
+ /** Lowercase letters only; max 20 characters */
+ username: string;
+ /** 8–32 characters, letters and numbers */
+ passphrase: string;
+ note?: string;
}
⋮----
-export interface BalanceInfoV3 {
- coin: string;
- price: string;
- amount: string;
- convertedUsdtAmount: string;
-}
+/** Lowercase letters only; max 20 characters */
⋮----
-export interface LTVConvertResponseV3 {
- ltv: string;
- subAccountUids: string[];
- unpaidUsdtAmount: string;
- usdtBalance: string;
- unpaidInfo: UnpaidInfoV3[];
- balanceInfo: BalanceInfoV3[];
-}
+/** 8–32 characters, letters and numbers */
⋮----
-/* Unified Account Staking & Lending (Crypto Loans) - /api/v3/loan/* */
+/**
+ *
+ * * Common | Convert
+ *
+ */
⋮----
-export interface LoanCoinInfoV3 {
- coin: string;
- hourRateFlexible: string;
- rateFlexible: string;
- hourRate7D: string;
- rate7D: string;
- hourRate30D: string;
- rate30D: string;
- minBorrowAmount: string;
- maxBorrowAmount: string;
- minBorrowLimit: string;
- maxBorrowLimit: string;
+export interface ConvertQuoteRequestV2 {
+ fromCoin: string;
+ fromCoinSize?: string;
+ toCoin: string;
+ toCoinSize?: string;
}
⋮----
-export interface LoanPledgeInfoV3 {
- coin: string;
- initRate: string;
- supRate: string;
- forceRate: string;
- minPledgeAmount: string;
- maxPledgeAmount: string;
+export interface ConvertRequestV2 {
+ fromCoin: string;
+ fromCoinSize: string;
+ cnvtPrice: string;
+ toCoin: string;
+ toCoinSize: string;
+ traceId: string;
}
⋮----
-export interface GetLoanCoinsResponseV3 {
- loanInfos: LoanCoinInfoV3[];
- pledgeInfos: LoanPledgeInfoV3[];
+export interface GetConvertHistoryRequestV2 {
+ startTime: string;
+ endTime: string;
+ limit?: string;
+ idLessThan?: string;
}
⋮----
-export interface GetLoanInterestResponseV3 {
- hourInterest: string;
- loanAmount: string;
-}
+/**
+ *
+ * * Common | BGB Convert
+ *
+ */
⋮----
-export interface LoanBorrowResponseV3 {
- orderId: string;
+export interface GetConvertBGBHistoryRequestV2 {
+ orderId?: string;
+ startTime: string;
+ endTime: string;
+ limit?: string;
+ idLessThan?: string;
}
+
+================
+File: src/types/request/v2/futures.ts
+================
+import { FuturesPlanTypeV2, FuturesProductTypeV2 } from '../shared.js';
⋮----
-export interface LoanBorrowOngoingItemV3 {
- orderId: string;
- loanCoin: string;
- loanAmount: string;
- interestAmount: string;
- hourInterestRate: string;
- pledgeCoin: string;
- pledgeAmount: string;
- pledgeRate: string;
- supRate: string;
- forceRate: string;
- borrowTime: string;
- expireTime: string;
+export type FuturesKlineInterval =
+ | '1m'
+ | '3m'
+ | '5m'
+ | '15m'
+ | '30m'
+ | '1H'
+ | '2H'
+ | '4H'
+ | '6H'
+ | '12H'
+ | '1D'
+ | '3D'
+ | '1W'
+ | '1M'
+ | '6Hutc'
+ | '12Hutc'
+ | '1Dutc'
+ | '3Dutc'
+ | '1Wutc'
+ | '1Mutc';
+⋮----
+export type FuturesKlineTypeV2 = 'MARKET' | 'MARK' | 'INDEX';
+⋮----
+export interface FuturesAccountBillRequestV2 {
+ productType: FuturesProductTypeV2;
+ symbol?: string;
+ coin?: string;
+ businessType?: string;
+ idLessThan?: string;
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
}
⋮----
-export interface LoanBorrowHistoryItemV3 {
- orderId: string;
- loanCoin: string;
- pledgeCoin: string;
- initPledgeAmount: string;
- initLoanAmount: string;
- hourRate: string;
- daily: string;
- borrowTime: string;
- status: string;
+/**
+ *
+ * * Futures | Market
+ *
+ */
+⋮----
+export interface FuturesMergeDepthRequestV2 {
+ symbol: string;
+ productType: FuturesProductTypeV2;
+ precision?: 'scale0' | 'scale1' | 'scale2' | 'scale3';
+ limit?: '1' | '5' | '15' | '50' | 'max';
}
⋮----
-export interface LoanRepayResponseV3 {
- loanCoin: string;
- pledgeCoin: string;
- repayAmount: string;
- payInterest: string;
- repayLoanAmount: string;
- repayUnlockAmount: string;
+export interface FuturesOiLimitRequestV2 {
+ productType: FuturesProductTypeV2;
+ symbol?: string;
}
⋮----
-export interface LoanRepayHistoryItemV3 {
- orderId: string;
- loanCoin: string;
- pledgeCoin: string;
- repayAmount: string;
- payInterest: string;
- repayLoanAmount: string;
- repayUnlockAmount: string;
- repayTime: string;
+export interface FuturesPositionAdlRankRequestV2 {
+ productType: FuturesProductTypeV2;
}
⋮----
-export interface LoanRevisePledgeResponseV3 {
- loanCoin: string;
- pledgeCoin: string;
- afterPledgeRate: string;
+export interface FuturesRecentTradesRequestV2 {
+ symbol: string;
+ productType: FuturesProductTypeV2;
+ limit?: string;
}
⋮----
-export interface LoanPledgeRateHistoryItemV3 {
- loanCoin: string;
- pledgeCoin: string;
- orderId: string;
- reviseTime: string;
- reviseSide: string;
- reviseAmount: string;
- afterPledgeRate: string;
- beforePledgeRate: string;
+export interface FuturesHistoricTradesRequestV2 {
+ symbol: string;
+ productType: FuturesProductTypeV2;
+ limit?: string;
+ idLessThan?: string;
+ startTime?: string;
+ endTime?: string;
}
⋮----
-export interface LoanDebtInfoV3 {
- coin: string;
- amount: string;
- amountUsdt: string;
+export interface FuturesCandlesRequestV2 {
+ symbol: string;
+ productType: FuturesProductTypeV2;
+ granularity: FuturesKlineInterval;
+ startTime?: string;
+ endTime?: string;
+ kLineType?: FuturesKlineTypeV2;
+ limit?: string;
}
⋮----
-export interface GetLoanDebtsResponseV3 {
- pledgeInfos: LoanDebtInfoV3[];
- loanInfos: LoanDebtInfoV3[];
+/**
+ *
+ * * Futures | Account
+ *
+ */
+⋮----
+export interface FuturesSingleAccountRequestV2 {
+ symbol: string;
+ productType: FuturesProductTypeV2;
+ marginCoin: string;
}
⋮----
-export interface LoanReduceItemV3 {
- orderId: string;
- loanCoin: string;
- pledgeCoin: string;
- reduceTime: string;
- pledgeRate: string;
- pledgePrice: string;
- status: string;
- pledgeAmount: string;
- reduceFee: string;
- residueAmount: string;
- runlockAmount: string;
- repayLoanAmount: string;
+export interface FuturesInterestHistoryRequestV2 {
+ productType: 'USDT-FUTURES' | 'SUSDT-FUTURES';
+ coin?: string;
+ idLessThan?: string;
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
}
-
-================
-File: src/types/response/v3/trade.ts
-================
-export interface BatchModifyOrderResponseV3 {
- orderId: string;
- clientOid: string;
+⋮----
+export interface FuturesOpenCountRequestV2 {
+ symbol: string;
+ productType: FuturesProductTypeV2;
+ marginCoin: string;
+ openAmount: string;
+ openPrice: string;
+ leverage?: string;
}
⋮----
-export interface CancelAllOrdersResponseV3 {
- list: {
- orderId: string;
- clientOid: string;
- code: string;
- msg: string;
- }[];
+export interface FuturesSetAutoMarginRequestV2 {
+ symbol: string;
+ autoMargin: 'on' | 'off';
+ marginCoin: string;
+ amount: string;
+ holdSide?: 'long' | 'short';
}
⋮----
-export interface CancelBatchOrdersResponseV3 {
- orderId: string;
- clientOid: string;
- code?: string;
- msg?: string;
+export interface FuturesSetLeverageRequestV2 {
+ symbol: string;
+ productType: FuturesProductTypeV2;
+ marginCoin: string;
+ leverage: string;
+ holdSide?: 'long' | 'short';
}
⋮----
-export interface CloseAllPositionsResponseV3 {
- list: {
- orderId: string;
- clientOid: string;
- code: string;
- msg: string;
- }[];
+export interface FuturesSetPositionMarginRequestV2 {
+ symbol: string;
+ productType: FuturesProductTypeV2;
+ marginCoin: string;
+ holdSide: 'long' | 'short';
+ amount: string;
}
⋮----
-export interface CancelOrderResponseV3 {
- orderId: string;
- clientOid: string;
+export interface FuturesSetMarginModeRequestV2 {
+ symbol: string;
+ productType: FuturesProductTypeV2;
+ marginCoin: string;
+ marginMode: 'isolated' | 'crossed';
}
⋮----
-export interface GetMaxOpenAvailableResponseV3 {
- available: string;
- maxOpen: string;
- buyOpenCost: string;
- sellOpenCost: string;
- maxBuyOpen: string;
- maxSellOpen: string;
+/**
+ *
+ * * Futures | Position
+ *
+ */
+⋮----
+export interface FuturesHistoricalPositionsRequestV2 {
+ symbol?: string;
+ productType?: FuturesProductTypeV2;
+ idLessThan?: string;
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
}
⋮----
-export interface FeeDetailV3 {
- feeCoin: string;
- fee: string;
+/**
+ *
+ * * Futures | Trade
+ *
+ */
+⋮----
+export interface FuturesPlaceOrderRequestV2 {
+ symbol: string;
+ productType: FuturesProductTypeV2;
+ marginMode: 'isolated' | 'crossed';
+ marginCoin: string;
+ size: string;
+ price?: string;
+ side: 'buy' | 'sell';
+ tradeSide?: 'open' | 'close';
+ orderType: 'limit' | 'market';
+ force?: 'ioc' | 'fok' | 'gtc' | 'post_only';
+ clientOid?: string;
+ reduceOnly?: 'YES' | 'NO';
+ presetStopSurplusPrice?: string;
+ presetStopLossPrice?: string;
+ stpMode?: 'none' | 'cancel_taker' | 'cancel_maker' | 'cancel_both';
}
⋮----
-export interface OrderInfoV3 {
- orderId: string;
- clientOid: string;
- category: string;
+export interface FuturesReversalOrderRequestV2 {
symbol: string;
- orderType: string;
- side: string;
- price: string;
- qty: string;
- amount: string;
- cumExecQty: string;
- cumExecValue: string;
- avgPrice: string;
- timeInForce: string;
- orderStatus: string;
- posSide: string;
- holdMode: string;
- delegateType?: string;
- reduceOnly: string;
- feeDetail: FeeDetailV3[];
- cancelReason: string;
- execType: string;
- stpMode?: string;
- createdTime: string;
- updatedTime: string;
+ productType: FuturesProductTypeV2;
+ marginCoin: string;
+ size: string;
+ side?: 'buy' | 'sell';
+ tradeSide?: 'open' | 'close';
+ clientOid?: string;
}
⋮----
-export type FillCategoryV3 =
- | 'spot'
- | 'margin'
- | 'usdt-futures'
- | 'coin-futures'
- | 'usdc-futures'
- | 'SPOT'
- | 'MARGIN'
- | 'USDT-FUTURES'
- | 'COIN-FUTURES'
- | 'USDC-FUTURES';
+interface FuturesBatchOrderItem {
+ size: string;
+ price?: string;
+ side: 'buy' | 'sell';
+ tradeSide?: 'open' | 'close';
+ orderType: 'limit' | 'market';
+ force?: 'ioc' | 'fok' | 'gtc' | 'post_only';
+ clientOid?: string;
+ reduceOnly?: 'YES' | 'NO';
+ presetStopSurplusPrice?: string;
+ presetStopLossPrice?: string;
+ stpMode?: 'none' | 'cancel_taker' | 'cancel_maker' | 'cancel_both';
+}
⋮----
-export interface FillV3 {
- execId: string;
- orderId: string;
- category: FillCategoryV3;
+export interface FuturesBatchOrderRequestV2 {
symbol: string;
- orderType: string;
- side: string;
- execPrice: string;
- execQty: string;
- execValue: string;
- tradeScope: string;
- feeDetail: FeeDetailV3[];
- execPnl?: string;
- tradeSide?: string;
- createdTime: string;
- updatedTime: string;
+ productType: FuturesProductTypeV2;
+ marginCoin: string;
+ marginMode: 'isolated' | 'crossed';
+ orderList: FuturesBatchOrderItem[];
}
⋮----
-export interface UnfilledOrderV3 {
- orderId: string;
- clientOid: string;
- category: string;
+export interface FuturesModifyOrderRequestV2 {
+ orderId?: string;
+ clientOid?: string;
symbol: string;
- orderType: string;
- side: string;
- price: string;
- qty: string;
- amount: string;
- cumExecQty: string;
- cumExecValue: string;
- avgPrice: string;
- timeInForce: string;
- orderStatus: string;
- posSide: string;
- holdMode: string;
- delegateType?: string;
- reduceOnly: string;
- feeDetail: FeeDetailV3[];
- stpMode?: string;
- createdTime: string;
- updatedTime: string;
+ productType: FuturesProductTypeV2;
+ newClientOid: string;
+ newSize?: string;
+ newPrice?: string;
+ newPresetStopSurplusPrice?: string;
+ newPresetStopLossPrice?: string;
}
⋮----
-export interface HistoryOrderV3 {
- orderId: string;
- clientOid: string;
- category: string;
+export interface FuturesCancelOrderRequestV2 {
symbol: string;
- orderType: string;
- side: string;
- price: string;
- qty: string;
- amount: string;
- cumExecQty: string;
- cumExecValue: string;
- avgPrice: string;
- timeInForce: string;
- orderStatus: string;
- posSide: string;
- holdMode: string;
- delegateType?: string;
- reduceOnly: string;
- feeDetail: FeeDetailV3[];
- cancelReason: string;
- execType: string;
- stpMode?: string;
- createdTime: string;
- updatedTime: string;
+ productType: FuturesProductTypeV2;
+ marginCoin?: string;
+ orderId?: string;
+ clientOid?: string;
}
⋮----
-export interface PositionHistoryV3 {
- positionId: string;
- category: string;
- symbol: string;
- marginCoin: string;
- holdMode: string;
- posSide: string;
- marginMode: string;
- openPriceAvg: string;
- closePriceAvg: string;
- openTotalPos: string;
- closeTotalPos: string;
- cumRealisedPnl: string;
- netProfit: string;
- totalFunding: string;
- openFeeTotal: string;
- closeFeeTotal: string;
- createdTime: string;
- updatedTime: string;
+interface FuturesBatchCancelOrderItem {
+ orderId?: string;
+ clientOid?: string;
}
⋮----
-export interface CurrentPositionV3 {
- category: string;
- symbol: string;
- marginCoin: string;
- holdMode: string;
- posSide: string;
- marginMode: string;
- positionBalance: string;
- available: string;
- frozen: string;
- total: string;
- leverage: string;
- curRealisedPnl: string;
- avgPrice: string;
- positionStatus: string;
- unrealisedPnl: string;
- liquidationPrice: string;
- mmr: string;
- profitRate: string;
- markPrice: string;
- breakEvenPrice: string;
- totalFunding: string;
- openFeeTotal: string;
- closeFeeTotal: string;
- createdTime: string;
- updatedTime: string;
+export interface FuturesBatchCancelOrderRequestV2 {
+ orderIdList?: FuturesBatchCancelOrderItem[];
+ symbol?: string;
+ productType: FuturesProductTypeV2;
+ marginCoin?: string;
}
⋮----
-export interface LoanDataDebtCoinV3 {
- coin: string;
- debt: string;
- interestFreeAmount: string;
- interestRateNextHour: string;
+export interface FuturesFlashClosePositionsRequestV2 {
+ symbol?: string;
+ productType: FuturesProductTypeV2;
+ holdSide?: 'long' | 'short';
}
⋮----
-export interface LoanDataV3 {
- currentLoans: string;
- interestPaymentTime: string;
- debtCoinList: LoanDataDebtCoinV3[];
+export interface FuturesGetOrderRequestV2 {
+ symbol: string;
+ productType: FuturesProductTypeV2;
+ orderId?: string;
+ clientOid?: string;
}
⋮----
-export interface ModifyOrderResponseV3 {
- orderId: string;
- clientOid: string;
+export interface FuturesGetOrderFillsRequestV2 {
+ orderId?: string;
+ symbol?: string;
+ productType: FuturesProductTypeV2;
+ idLessThan?: string;
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
}
⋮----
-export interface PlaceBatchOrdersResponseV3 {
- orderId: string;
- clientOid: string;
- code?: string;
- msg?: string;
+export interface FuturesGetHistoricalFillsRequestV2 {
+ orderId?: string;
+ symbol?: string;
+ productType: FuturesProductTypeV2;
+ startTime?: string;
+ endTime?: string;
+ idLessThan?: string;
+ limit?: string;
}
⋮----
-export interface PlaceOrderResponseV3 {
- orderId: string;
- clientOid: string;
+export interface FuturesGetOpenOrdersRequestV2 {
+ orderId?: string;
+ clientOid?: string;
+ symbol?: string;
+ productType: FuturesProductTypeV2;
+ status?: 'live' | 'partially_filled';
+ idLessThan?: string;
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
}
⋮----
-export interface PositionAdlRankV3 {
- symbol: string;
- marginCoin: string;
- adlRank: string;
- holdSide: 'long' | 'short';
-}
-
-================
-File: src/websocket-api-client.ts
-================
-import { CancelOrderRequestV3 } from './types/request/v3/trade.js';
-import { CancelOrderResponseV3 } from './types/response/v3/trade.js';
-import { WSAPIResponse } from './types/websockets/ws-api.js';
-import { WSAPIPlaceOrderRequestV3 } from './types/websockets/ws-api-request.js';
-import { WSAPIPlaceOrderResponseV3 } from './types/websockets/ws-api-response.js';
-import {
- BitgetInstTypeV3,
- WSClientConfigurableOptions,
-} from './types/websockets/ws-general.js';
-import { DefaultLogger } from './util/logger.js';
-import { WS_KEY_MAP } from './util/websocket-util.js';
-import { WebsocketClientV3 } from './websocket-client-v3.js';
+export type FuturesOrderSourceV2 =
+ | 'normal'
+ | 'market'
+ | 'profit_market'
+ | 'loss_market'
+ | 'Trader_delegate'
+ | 'trader_profit'
+ | 'trader_loss'
+ | 'reverse'
+ | 'trader_reverse'
+ | 'profit_limit'
+ | 'loss_limit'
+ | 'liquidation'
+ | 'delivery_close_long'
+ | 'delivery_close_short'
+ | 'pos_profit_limit'
+ | 'pos_profit_market'
+ | 'pos_loss_limit'
+ | 'pos_loss_market';
⋮----
-/**
- * Configurable options specific to only the REST-like WebsocketAPIClient
- */
-export interface WSAPIClientConfigurableOptions {
- /**
- * Default: true
- *
- * Attach default event listeners, which will console log any high level
- * events (opened/reconnecting/reconnected/etc).
- *
- * If you disable this, you should set your own event listeners
- * on the embedded WS Client `wsApiClient.getWSClient().on(....)`.
- */
- attachEventListeners: boolean;
+export interface FuturesGetHistoryOrdersRequestV2 {
+ orderId?: string;
+ clientOid?: string;
+ symbol?: string;
+ productType: FuturesProductTypeV2;
+ idLessThan?: string;
+ orderSource?: FuturesOrderSourceV2;
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
}
⋮----
-/**
- * Default: true
- *
- * Attach default event listeners, which will console log any high level
- * events (opened/reconnecting/reconnected/etc).
- *
- * If you disable this, you should set your own event listeners
- * on the embedded WS Client `wsApiClient.getWSClient().on(....)`.
- */
+export interface FuturesCancelAllOrdersRequestV2 {
+ symbol?: string;
+ productType: FuturesProductTypeV2;
+ marginCoin?: string;
+ requestTime?: string;
+ receiveWindow?: string;
+}
⋮----
/**
- * This is a minimal Websocket API wrapper around the WebsocketClient.
*
- * Note: You can also directly use the sendWSAPIRequest() method to make WS API calls, but some
- * may find the below methods slightly more intuitive.
+ * * Futures | Trigger Orders
*
- * Refer to the WS API promises example for a more detailed example on using sendWSAPIRequest() directly:
- * https://github.com/tiagosiebler/bitget-api/blob/master/examples/V3/ws-api-trade-raw.ts
*/
-export class WebsocketAPIClient
-⋮----
-constructor(
- options?: WSClientConfigurableOptions &
- Partial,
- logger?: DefaultLogger,
-)
⋮----
-public getWSClient(): WebsocketClientV3
+export type FuturesTriggerTypeV2 = 'fill_price' | 'mark_price';
⋮----
-public setTimeOffsetMs(newOffset: number): void
+export type FuturesStpModeV2 =
+ | 'none'
+ | 'cancel_taker'
+ | 'cancel_maker'
+ | 'cancel_both';
⋮----
-/*
- * Bitget WebSocket API Methods
- * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel
- */
+export interface FuturesTPSLOrderRequestV2 {
+ marginCoin: string;
+ productType: FuturesProductTypeV2;
+ symbol: string;
+ planType: FuturesPlanTypeV2;
+ triggerPrice: string;
+ triggerType?: FuturesTriggerTypeV2;
+ executePrice?: string;
+ holdSide: 'long' | 'short' | 'buy' | 'sell';
+ size: string;
+ rangeRate?: string;
+ clientOid?: string;
+ stpMode?: FuturesStpModeV2;
+}
⋮----
-/**
- * Submit a new order
- *
- * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel
- *
- * @returns
- */
-submitNewOrder(
- category: BitgetInstTypeV3,
- params: WSAPIPlaceOrderRequestV3,
-): Promise>
+export interface FuturesPositionTPSLOrderRequestV2 {
+ marginCoin: string;
+ productType: FuturesProductTypeV2;
+ symbol: string;
+ stopSurplusTriggerPrice?: string;
+ stopSurplusSize?: string;
+ stopSurplusTriggerType?: FuturesTriggerTypeV2;
+ stopSurplusExecutePrice?: string;
+ stopLossTriggerPrice?: string;
+ stopLossSize?: string;
+ stopLossTriggerType?: FuturesTriggerTypeV2;
+ stopLossExecutePrice?: string;
+ holdSide: 'long' | 'short' | 'buy' | 'sell';
+ stpMode?: FuturesStpModeV2;
+ stopSurplusClientOid?: string;
+ stopLossClientOid?: string;
+}
⋮----
-/**
- * Submit a new order
- *
- * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel
- *
- * @returns
- */
-placeBatchOrders(
- category: BitgetInstTypeV3,
- params: WSAPIPlaceOrderRequestV3[],
-): Promise>
+export type FuturesTriggerPriceTypeV2 =
+ | 'fill_price'
+ | 'mark_price'
+ | 'index_price';
⋮----
-/*
- * Bitget WebSocket API Methods
- * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel
- */
+export interface FuturesPlanOrderRequestV2 {
+ planType: 'normal_plan' | 'track_plan';
+ symbol: string;
+ productType: FuturesProductTypeV2;
+ marginMode: 'isolated' | 'crossed';
+ marginCoin: string;
+ size: string;
+ price?: string;
+ callbackRatio?: string;
+ triggerPrice: string;
+ triggerType: 'mark_price' | 'fill_price';
+ side: 'buy' | 'sell';
+ tradeSide?: 'open' | 'close';
+ orderType: 'limit' | 'market';
+ clientOid?: string;
+ reduceOnly?: 'YES' | 'NO';
+ stopSurplusTriggerPrice?: string;
+ stopSurplusExecutePrice?: string;
+ stopSurplusTriggerType?: FuturesTriggerPriceTypeV2;
+ stopLossTriggerPrice?: string;
+ stopLossExecutePrice?: string;
+ stopLossTriggerType?: FuturesTriggerPriceTypeV2;
+ stpMode?: FuturesStpModeV2;
+}
⋮----
-/**
- * Cancel Order
- *
- * https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel
- *
- * @returns
- */
-cancelOrder(
- category: BitgetInstTypeV3,
- params: CancelOrderRequestV3,
-): Promise>
+export interface FuturesModifyTPSLOrderRequestV2 {
+ orderId?: string;
+ clientOid?: string;
+ marginCoin: string;
+ productType: FuturesProductTypeV2;
+ symbol: string;
+ triggerPrice: string;
+ triggerType?: 'fill_price' | 'mark_price';
+ executePrice?: string;
+ size: string;
+ rangeRate?: string;
+}
⋮----
-/**
- * Batch Cancel Order
- *
- * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel
- *
- * @returns
- */
-cancelBatchOrders(
- category: BitgetInstTypeV3,
- params: CancelOrderRequestV3[],
-): Promise>
+export interface FuturesModifyPlanOrderRequestV2 {
+ planType: 'normal_plan' | 'track_plan';
+ orderId?: string;
+ clientOid?: string;
+ symbol: string;
+ productType: FuturesProductTypeV2;
+ newSize?: string;
+ newPrice?: string;
+ newCallbackRatio?: string;
+ newTriggerPrice?: string;
+ newTriggerType?: 'fill_price' | 'mark_price';
+ newStopSurplusTriggerPrice?: string;
+ newStopSurplusExecutePrice?: string;
+ newStopSurplusTriggerType?: FuturesTriggerPriceTypeV2;
+ newStopLossTriggerPrice?: string;
+ newStopLossExecutePrice?: string;
+ newStopLossTriggerType?: FuturesTriggerPriceTypeV2;
+}
⋮----
-/**
- *
- *
- *
- *
- *
- *
- *
- * Private methods for handling some of the convenience/automation provided by the WS API Client
- *
- *
- *
- *
- *
- *
- *
- */
+export interface FuturesGetPlanOrdersRequestV2 {
+ orderId?: string;
+ clientOid?: string;
+ symbol?: string;
+ planType: 'normal_plan' | 'track_plan' | 'profit_loss';
+ productType: FuturesProductTypeV2;
+ idLessThan?: string;
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
+}
⋮----
-private setupDefaultEventListeners()
+interface FuturesCancelPlanOrderItemV2 {
+ orderId?: string;
+ clientOid?: string;
+}
⋮----
-/**
- * General event handlers for monitoring the WebsocketClient
- */
+export type FuturesPlanOrderTypeV2 =
+ | 'normal_plan'
+ | 'profit_plan'
+ | 'loss_plan'
+ | 'pos_profit'
+ | 'pos_loss'
+ | 'moving_plan';
⋮----
-// Blind JSON.stringify can fail on circular references
+export interface FuturesCancelPlanOrderRequestV2 {
+ orderIdList?: FuturesCancelPlanOrderItemV2[];
+ symbol?: string;
+ productType: FuturesProductTypeV2;
+ marginCoin?: string;
+ planType?: FuturesPlanOrderTypeV2;
+}
⋮----
-// JSON.stringify({ ...data, target: 'WebSocket' }),
-
-================
-File: src/websocket-client-v3.ts
-================
-import {
- WsAPIOperationResponseMap,
- WSAPIRequestBitgetV3,
- WSAPIRequestFlags,
- WsAPITopicRequestParamMap,
- WsAPIWsKeyTopicMap,
- WSOperation,
- WSOperationLoginParams,
- WsRequestOperationBitget,
-} from './types/websockets/ws-api.js';
-import { MessageEventLike } from './types/websockets/ws-events.js';
-import {
- BitgetInstTypeV3,
- WsKey,
- WsTopicV3,
-} from './types/websockets/ws-general.js';
-import {
- BaseWebsocketClient,
- EmittableEvent,
- MidflightWsRequestEvent,
-} from './util/BaseWSClient.js';
-import { isWsPong } from './util/requestUtils.js';
-import { isWSAPIResponse } from './util/type-guards.js';
-import { SignAlgorithm, signMessage } from './util/webCryptoAPI.js';
-import {
- getMaxTopicsPerSubscribeEvent,
- getNormalisedTopicRequests,
- getPromiseRefForWSAPIRequest,
- getWsUrl,
- WS_AUTH_ON_CONNECT_KEYS,
- WS_KEY_MAP,
- WS_LOGGER_CATEGORY,
- WsTopicRequest,
-} from './util/websocket-util.js';
-import { WSConnectedResult } from './util/WsStore.types.js';
+export type FuturesPlanStatusV2 = 'executed' | 'fail_trigger' | 'cancelled';
+⋮----
+export interface FuturesGetHistoryPlanOrdersRequestV2 {
+ orderId?: string;
+ clientOid?: string;
+ planType: 'normal_plan' | 'track_plan' | 'profit_loss';
+ planStatus?: FuturesPlanStatusV2;
+ symbol?: string;
+ productType: FuturesProductTypeV2;
+ idLessThan?: string;
+ startTime?: string;
+ endTime?: string;
+ limit?: string;
+}
⋮----
/**
- * WebSocket client dedicated to the unified account (V3) WebSockets.
*
- * Your Bitget account needs to be upgraded to unified account mode, to use the account-level WebSocket topics.
+ * * Futures | Union Margin
+ *
*/
-export class WebsocketClientV3 extends BaseWebsocketClient<
⋮----
-WsRequestOperationBitget