From 619a55bdb0db6c985dd82e3c8f0efe3d78e02300 Mon Sep 17 00:00:00 2001 From: Jerko J <83344666+JJ-Cro@users.noreply.github.com> Date: Tue, 6 Oct 2026 14:33:55 +0200 Subject: [PATCH] feat(v3.2.5): add UTA borrow, copy-follower, sub-affiliate, and books50 APIs Cover the September 17-24 and October changelog gaps so unified-account borrow, follower copy trading, and Classic sub-affiliate queries match the current Bitget docs. Co-authored-by: Cursor --- docs/endpointFunctionList.md | 1152 +- .../Affiliate/get-sub-affiliate-info.js | 21 + .../apidoc/RestClientV3/Account/borrow.js | 21 + .../Account/get-max-borrowable.js | 20 + .../Account/set-collateral-type.js | 1 + .../RestClientV3/Account/set-repay-mode.js | 20 + .../RestClientV3/Copy-Trading/cancel-tpsl.js | 21 + .../RestClientV3/Copy-Trading/close-all.js | 20 + .../Copy-Trading/close-positions.js | 23 + .../Copy-Trading/copy-transfer.js | 23 + .../RestClientV3/Copy-Trading/create-copy.js | 22 + .../Copy-Trading/get-copy-profit-details.js | 21 + .../Copy-Trading/get-copy-settings.js | 20 + .../Copy-Trading/get-copy-transfer-record.js | 21 + .../Copy-Trading/get-current-copy.js | 20 + .../Copy-Trading/get-current-positions.js | 20 + .../Copy-Trading/get-current-tpsl-orders.js | 20 + .../Copy-Trading/get-portfolio-overview.js | 20 + .../Copy-Trading/get-tpsl-order-history.js | 21 + .../Copy-Trading/modify-follower-settings.js | 22 + .../RestClientV3/Copy-Trading/modify-tpsl.js | 25 + .../RestClientV3/Copy-Trading/place-tpsl.js | 25 + .../RestClientV3/Copy-Trading/unfollow.js | 21 + .../Sub-Account/delete-sub-account.js | 20 + .../RestClientV3/Trade/batch-modify-orders.js | 2 + .../apidoc/RestClientV3/Trade/batch-order.js | 1 + .../apidoc/RestClientV3/Trade/modify-order.js | 1 + .../apidoc/RestClientV3/Trade/place-order.js | 1 + llms.txt | 13147 ++++++++-------- package-lock.json | 4 +- package.json | 2 +- src/rest-client-v2.ts | 8 + src/rest-client-v3.ts | 159 + src/types/request/v2/broker.ts | 9 + src/types/request/v3/account.ts | 21 + src/types/request/v3/copytrading.ts | 125 + src/types/request/v3/trade.ts | 24 +- src/types/response/v2/broker.ts | 24 + src/types/response/v3/account.ts | 14 + src/types/response/v3/cfd.ts | 7 +- src/types/response/v3/copytrading.ts | 104 + src/types/response/v3/earn.ts | 2 + src/types/websockets/ws-api-request.ts | 2 + src/types/websockets/ws-events.ts | 42 + src/types/websockets/ws-general.ts | 7 +- test/v3/private.write.test.ts | 6 +- 46 files changed, 8440 insertions(+), 6892 deletions(-) create mode 100644 examples/apidoc/RestClientV2/Affiliate/get-sub-affiliate-info.js create mode 100644 examples/apidoc/RestClientV3/Account/borrow.js create mode 100644 examples/apidoc/RestClientV3/Account/get-max-borrowable.js create mode 100644 examples/apidoc/RestClientV3/Account/set-repay-mode.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/cancel-tpsl.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/close-all.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/close-positions.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/copy-transfer.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/create-copy.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/get-copy-profit-details.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/get-copy-settings.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/get-copy-transfer-record.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/get-current-copy.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/get-current-positions.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/get-current-tpsl-orders.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/get-portfolio-overview.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/get-tpsl-order-history.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/modify-follower-settings.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/modify-tpsl.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/place-tpsl.js create mode 100644 examples/apidoc/RestClientV3/Copy-Trading/unfollow.js create mode 100644 examples/apidoc/RestClientV3/Sub-Account/delete-sub-account.js diff --git a/docs/endpointFunctionList.md b/docs/endpointFunctionList.md index 6b3d84d..c29f8f4 100644 --- a/docs/endpointFunctionList.md +++ b/docs/endpointFunctionList.md @@ -50,310 +50,311 @@ This table includes all endpoints from the official Exchange API docs and corres | Function | AUTH | HTTP Method | Endpoint | | -------- | :------: | :------: | -------- | -| [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` | +| [getAnnouncements()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L508) | | GET | `/api/v2/public/annoucements` | +| [getServerTime()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L520) | | GET | `/api/v2/public/time` | +| [getTradeRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L528) | :closed_lock_with_key: | GET | `/api/v2/common/trade-rate` | +| [getAllTradeRates()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L537) | :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#L555) | :closed_lock_with_key: | GET | `/api/v2/tax/spot-record` | +| [getFuturesTransactionRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L561) | :closed_lock_with_key: | GET | `/api/v2/tax/future-record` | +| [getMarginTransactionRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L567) | :closed_lock_with_key: | GET | `/api/v2/tax/margin-record` | +| [getP2PTransactionRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L573) | :closed_lock_with_key: | GET | `/api/v2/tax/p2p-record` | +| [getP2PMerchantList()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L585) | :closed_lock_with_key: | GET | `/api/v2/p2p/merchantList` | +| [getP2PMerchantInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L594) | :closed_lock_with_key: | GET | `/api/v2/p2p/merchantInfo` | +| [getP2PMerchantOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L598) | :closed_lock_with_key: | GET | `/api/v2/p2p/orderList` | +| [getP2PMerchantAdvertisementList()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L607) | :closed_lock_with_key: | GET | `/api/v2/p2p/advList` | +| [getSpotWhaleNetFlowData()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L624) | :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#L630) | | GET | `/api/v2/mix/market/taker-buy-sell` | +| [getFuturesActiveLongShortPositionData()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L637) | | GET | `/api/v2/mix/market/position-long-short` | +| [getFuturesLongShortRatio()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L644) | | GET | `/api/v2/mix/market/long-short-ratio` | +| [getMarginLoanGrowthRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L652) | | GET | `/api/v2/mix/market/loan-growth` | +| [getIsolatedMarginBorrowingRatio()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L660) | | GET | `/api/v2/mix/market/isolated-borrow-rate` | +| [getFuturesActiveBuySellVolumeData()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L667) | | GET | `/api/v2/mix/market/long-short` | +| [getSpotFundFlow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L674) | | GET | `/api/v2/spot/market/fund-flow` | +| [getTradeDataSupportSymbols()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L681) | | GET | `/api/v2/spot/market/support-symbols` | +| [getSpotFundNetFlowData()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L690) | | GET | `/api/v2/spot/market/fund-net-flow` | +| [getFuturesActiveLongShortAccountData()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L701) | | GET | `/api/v2/mix/market/account-long-short` | +| [createVirtualSubaccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L714) | :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#L720) | :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#L728) | :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#L737) | :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#L750) | :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#L759) | :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#L768) | :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#L781) | :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#L792) | :closed_lock_with_key: | GET | `/api/v2/account/funding-assets` | +| [getBotAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L798) | :closed_lock_with_key: | GET | `/api/v2/account/bot-assets` | +| [getBalances()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L805) | :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#L822) | :closed_lock_with_key: | GET | `/api/v2/convert/currencies` | +| [getConvertQuotedPrice()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L826) | :closed_lock_with_key: | GET | `/api/v2/convert/quoted-price` | +| [convert()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L832) | :closed_lock_with_key: | POST | `/api/v2/convert/trade` | +| [getConvertHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L838) | :closed_lock_with_key: | GET | `/api/v2/convert/convert-record` | +| [getConvertBGBCoins()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L853) | :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#L861) | :closed_lock_with_key: | POST | `/api/v2/convert/bgb-convert` | +| [getConvertBGBHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L867) | :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#L887) | :closed_lock_with_key: | GET | `/api/v2/spot/public/coins` | +| [getSpotSymbolInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L893) | :closed_lock_with_key: | GET | `/api/v2/spot/public/symbols` | +| [getSpotVIPFeeRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L899) | :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#L903) | :closed_lock_with_key: | GET | `/api/v2/spot/market/tickers` | +| [getSpotMergeDepth()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L909) | :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#L917) | :closed_lock_with_key: | GET | `/api/v2/spot/market/orderbook` | +| [getSpotCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L925) | :closed_lock_with_key: | GET | `/api/v2/spot/market/candles` | +| [getSpotHistoricCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L931) | :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#L937) | :closed_lock_with_key: | GET | `/api/v2/spot/market/fills` | +| [getSpotHistoricTrades()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L944) | :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#L950) | | GET | `/api/v2/spot/market/auction` | +| [spotSubmitOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L962) | :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#L971) | :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#L977) | :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#L986) | :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#L995) | :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#L1001) | :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#L1007) | :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#L1015) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/orderInfo` | +| [getSpotOpenOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1021) | :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#L1027) | :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#L1033) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/fills` | +| [spotSubmitPlanOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1045) | :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#L1054) | :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#L1063) | :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#L1074) | :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#L1084) | :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#L1090) | :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#L1100) | :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#L1115) | :closed_lock_with_key: | GET | `/api/v2/spot/account/info` | +| [getSpotAccountAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1119) | :closed_lock_with_key: | GET | `/api/v2/spot/account/assets` | +| [getSpotSubAccountAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1126) | :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#L1130) | :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#L1140) | :closed_lock_with_key: | GET | `/api/v2/spot/account/bills` | +| [spotTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1146) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/transfer` | +| [getSpotTransferableCoins()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1155) | :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#L1162) | :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#L1171) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/withdrawal` | +| [getSpotMainSubTransferRecord()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1180) | :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#L1189) | :closed_lock_with_key: | GET | `/api/v2/spot/account/transferRecords` | +| [spotSwitchBGBDeduct()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1195) | :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#L1201) | :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#L1209) | :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#L1221) | :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#L1229) | :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#L1235) | :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#L1244) | :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#L1250) | :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#L1265) | :closed_lock_with_key: | POST | `/api/v2/spot/account/upgrade` | +| [getUnifiedAccountSwitchStatus()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1275) | :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#L1297) | | GET | `/api/v2/mix/market/vip-fee-rate` | +| [getFuturesInterestRateHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1301) | | GET | `/api/v2/mix/market/union-interest-rate-history` | +| [getFuturesInterestExchangeRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1310) | | GET | `/api/v2/mix/market/exchange-rate` | +| [getFuturesDiscountRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1321) | | GET | `/api/v2/mix/market/discount-rate` | +| [getFuturesMergeDepth()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1325) | | GET | `/api/v2/mix/market/merge-depth` | +| [getFuturesTicker()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1331) | | GET | `/api/v2/mix/market/ticker` | +| [getFuturesAllTickers()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1338) | | GET | `/api/v2/mix/market/tickers` | +| [getFuturesRecentTrades()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1344) | | GET | `/api/v2/mix/market/fills` | +| [getFuturesHistoricTrades()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1350) | | GET | `/api/v2/mix/market/fills-history` | +| [getFuturesCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1356) | | GET | `/api/v2/mix/market/candles` | +| [getFuturesHistoricCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1362) | | GET | `/api/v2/mix/market/history-candles` | +| [getFuturesHistoricIndexPriceCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1368) | | GET | `/api/v2/mix/market/history-index-candles` | +| [getFuturesHistoricMarkPriceCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1374) | | GET | `/api/v2/mix/market/history-mark-candles` | +| [getFuturesOpenInterest()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1380) | | GET | `/api/v2/mix/market/open-interest` | +| [getFuturesNextFundingTime()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1392) | | GET | `/api/v2/mix/market/funding-time` | +| [getFuturesSymbolPrice()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1399) | | GET | `/api/v2/mix/market/symbol-price` | +| [getFuturesHistoricFundingRates()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1406) | | GET | `/api/v2/mix/market/history-fund-rate` | +| [getFuturesCurrentFundingRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1415) | | GET | `/api/v2/mix/market/current-fund-rate` | +| [getFuturesContractConfig()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1433) | | GET | `/api/v2/mix/market/contracts` | +| [getFuturesOiLimit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1440) | | GET | `/api/v2/mix/market/oi-limit` | +| [getFuturesAccountAsset()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1458) | :closed_lock_with_key: | GET | `/api/v2/mix/account/account` | +| [getFuturesAccountAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1464) | :closed_lock_with_key: | GET | `/api/v2/mix/account/accounts` | +| [getFuturesSubAccountAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1470) | :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#L1483) | :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#L1489) | :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#L1497) | :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#L1503) | :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#L1509) | :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#L1515) | :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#L1522) | :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#L1528) | :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#L1539) | :closed_lock_with_key: | GET | `/api/v2/mix/account/bill` | +| [getUnionTransferLimits()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1554) | :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#L1566) | :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#L1576) | :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#L1586) | :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#L1598) | :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#L1610) | :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#L1622) | :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#L1634) | | GET | `/api/v2/mix/market/query-position-lever` | +| [getFuturesPosition()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1641) | :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#L1649) | :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#L1656) | :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#L1667) | :closed_lock_with_key: | GET | `/api/v2/mix/position/adlRank` | +| [futuresSubmitOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1679) | :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#L1688) | :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#L1697) | :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#L1703) | :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#L1712) | :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#L1721) | :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#L1727) | :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#L1733) | :closed_lock_with_key: | GET | `/api/v2/mix/order/detail` | +| [getFuturesFills()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1739) | :closed_lock_with_key: | GET | `/api/v2/mix/order/fills` | +| [getFuturesHistoricOrderFills()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1748) | :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#L1759) | :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#L1768) | :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#L1777) | :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#L1789) | :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#L1797) | :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#L1806) | :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#L1818) | :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#L1827) | :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#L1836) | :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#L1845) | :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#L1854) | :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#L1860) | :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#L1885) | :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#L1895) | :closed_lock_with_key: | GET | `/api/v2/broker/account/info` | +| [createSubaccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L1905) | :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#L1912) | :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#L1922) | :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#L1928) | :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#L1934) | :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#L1949) | :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#L1963) | :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#L1974) | :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#L1986) | :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#L2002) | :closed_lock_with_key: | GET | `/api/v2/broker/subaccount-deposit` | +| [subaccountWithdrawalRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2013) | :closed_lock_with_key: | GET | `/api/v2/broker/subaccount-withdrawal` | +| [createSubaccountApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2028) | :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#L2037) | :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#L2046) | :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#L2055) | :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#L2071) | :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#L2088) | :closed_lock_with_key: | GET | `/api/v2/broker/subaccounts` | +| [getBrokerCommissions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2100) | :closed_lock_with_key: | GET | `/api/v2/broker/commissions` | +| [getBrokerTradeVolume()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2112) | :closed_lock_with_key: | GET | `/api/v2/broker/trade-volume` | +| [getBrokerTotalCommission()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2132) | :closed_lock_with_key: | GET | `/api/v2/broker/total-commission` | +| [getBrokerOrderCommission()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2154) | :closed_lock_with_key: | GET | `/api/v2/broker/order-commission` | +| [getBrokerRebateInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2167) | :closed_lock_with_key: | GET | `/api/v2/broker/rebate-info` | +| [getAgentCustomerCommissions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2179) | :closed_lock_with_key: | GET | `/api/v2/broker/customer-commissions` | +| [getAgentSubCustomerList()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2188) | :closed_lock_with_key: | GET | `/api/v2/broker/sub-customer-list` | +| [getSubAffiliateInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2194) | :closed_lock_with_key: | GET | `/api/v2/broker/sub-affiliate-info` | +| [getAgentCustomerTradeVolume()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2200) | :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#L2209) | :closed_lock_with_key: | POST | `/api/v2/broker/customer-list` | +| [getAgentCustomerKycResult()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2215) | :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#L2221) | :closed_lock_with_key: | POST | `/api/v2/broker/customer-deposit` | +| [getAgentCustomerAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2227) | :closed_lock_with_key: | POST | `/api/v2/broker/customer-asset` | +| [getAgentCommissionDetail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2233) | :closed_lock_with_key: | GET | `/api/v2/broker/agent-commission` | +| [getMarginCurrencies()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2253) | | GET | `/api/v2/margin/currencies` | +| [getMarginBorrowHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2263) | :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#L2280) | :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#L2297) | :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#L2314) | :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#L2331) | :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#L2354) | :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#L2365) | :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#L2388) | :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#L2413) | :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#L2425) | :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#L2438) | :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#L2453) | :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#L2469) | :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#L2481) | :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#L2499) | :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#L2523) | :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#L2536) | :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#L2547) | :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#L2567) | :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#L2581) | :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#L2595) | :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#L2612) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/fills` | +| [getMarginLiquidationOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L2626) | :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#L2658) | :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#L2667) | :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#L2676) | :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#L2685) | :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#L2691) | :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#L2697) | :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#L2706) | :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#L2725) | :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#L2741) | :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#L2759) | :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#L2768) | :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#L2777) | :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#L2788) | :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#L2797) | :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#L2814) | :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#L2823) | :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#L2832) | :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#L2838) | :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#L2844) | :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#L2850) | :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#L2863) | :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#L2869) | :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#L2887) | :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#L2901) | :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#L2905) | :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#L2912) | :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#L2927) | :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#L2931) | :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#L2940) | :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#L2948) | :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#L2952) | :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#L2963) | :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#L2972) | :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#L2981) | :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#L2991) | :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#L3001) | :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#L3010) | :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#L3014) | :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#L3031) | :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#L3037) | :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#L3046) | :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#L3054) | :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#L3063) | :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#L3074) | :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#L3080) | :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#L3089) | :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#L3098) | :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#L3108) | :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#L3122) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/product` | +| [getEarnSavingsAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3129) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/account` | +| [getEarnSavingsAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3133) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/assets` | +| [getEarnSavingsRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3139) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/records` | +| [getEarnSavingsSubscription()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3145) | :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#L3152) | :closed_lock_with_key: | POST | `/api/v2/earn/savings/subscribe` | +| [getEarnSavingsSubscriptionResult()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3165) | :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#L3177) | :closed_lock_with_key: | POST | `/api/v2/earn/savings/redeem` | +| [getEarnSavingsRedemptionResult()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3186) | :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#L3206) | :closed_lock_with_key: | GET | `/api/v2/earn/account/assets` | +| [getEarnEliteProducts()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3225) | :closed_lock_with_key: | GET | `/api/v2/earn/elite/product` | +| [getEarnEliteAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3229) | :closed_lock_with_key: | GET | `/api/v2/earn/elite/assets` | +| [getEarnEliteRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3233) | :closed_lock_with_key: | GET | `/api/v2/earn/elite/records` | +| [getEarnEliteSubscribeInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3239) | :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#L3245) | :closed_lock_with_key: | POST | `/api/v2/earn/elite/subscribe` | +| [getEarnEliteSubscribeResult()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3251) | :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#L3257) | :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#L3263) | :closed_lock_with_key: | POST | `/api/v2/earn/elite/redeem` | +| [getSharkfinProducts()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3277) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/product` | +| [getSharkfinAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3285) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/account` | +| [getSharkfinAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3289) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/assets` | +| [getSharkfinRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3295) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/records` | +| [getSharkfinSubscription()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3301) | :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#L3307) | :closed_lock_with_key: | POST | `/api/v2/earn/sharkfin/subscribe` | +| [getSharkfinSubscriptionResult()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3316) | :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#L3333) | | GET | `/api/v2/earn/loan/public/coinInfos` | +| [getLoanEstInterestAndBorrowable()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3339) | | GET | `/api/v2/earn/loan/public/hour-interest` | +| [borrowLoan()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3350) | :closed_lock_with_key: | POST | `/api/v2/earn/loan/borrow` | +| [getOngoingLoanOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3358) | :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#L3366) | :closed_lock_with_key: | POST | `/api/v2/earn/loan/repay` | +| [getRepayHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3372) | :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#L3378) | :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#L3388) | :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#L3394) | :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#L3400) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/debts` | +| [getLoanLiquidationRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3404) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/reduces` | +| [getLoanProductInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v2.ts#L3416) | :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#L3422) | :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#L3428) | :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#L3446) | :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#L3454) | :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#L3466) | :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#L3472) | :closed_lock_with_key: | GET | `/api/v2/spot/ins-loan/loan-order` | # rest-client-v3.ts @@ -361,265 +362,286 @@ This table includes all endpoints from the official Exchange API docs and corres | Function | AUTH | HTTP Method | Endpoint | | -------- | :------: | :------: | -------- | -| [getServerTime()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L575) | | GET | `/api/v3/public/time` | -| [getInstruments()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L592) | | GET | `/api/v3/market/instruments` | -| [getMarketFeeGroup()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L601) | | GET | `/api/v3/market/fee-group` | -| [getLiquidations()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L610) | | GET | `/api/v3/market/liquidations` | -| [getRpiSymbols()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L619) | | GET | `/api/v3/market/rpi-symbols` | -| [getRpiOrderBook()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L626) | | GET | `/api/v3/market/rpi-orderbook` | -| [getCashDividendRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L635) | | GET | `/api/v3/market/cash-dividend-records` | -| [getSplitRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L641) | | GET | `/api/v3/market/split-records` | -| [getSpotWhaleFlow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L650) | | GET | `/api/v3/market/spot-whale-flow` | -| [getSpotFundFlow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L659) | | GET | `/api/v3/market/spot-fund-flow` | -| [getSpotNetFlow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L668) | | GET | `/api/v3/market/spot-net-flow` | -| [getMarginLongShort()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L677) | | GET | `/api/v3/market/margin-long-short` | -| [getMarginLoanGrowth()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L686) | | GET | `/api/v3/market/margin-loan-growth` | -| [getMarginIsolatedBorrow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L695) | | GET | `/api/v3/market/margin-isolated-borrow` | -| [getFuturesActiveBuySell()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L704) | | GET | `/api/v3/market/futures-active-buy-sell` | -| [getFuturesLongShort()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L713) | | GET | `/api/v3/market/futures-long-short` | -| [getFuturesPositionLongShort()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L722) | | GET | `/api/v3/market/futures-position-long-short` | -| [getFuturesAccountLongShort()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L731) | | GET | `/api/v3/market/futures-account-long-short` | -| [getMarketScoreWeights()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L740) | | GET | `/api/v3/market/score-weights` | -| [getTickers()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L749) | | GET | `/api/v3/market/tickers` | -| [getOrderBook()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L756) | | GET | `/api/v3/market/orderbook` | -| [getFills()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L765) | | GET | `/api/v3/market/fills` | -| [getProofOfReserves()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L774) | | GET | `/api/v3/market/proof-of-reserves` | -| [getOpenInterest()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L781) | | GET | `/api/v3/market/open-interest` | -| [getCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L791) | | GET | `/api/v3/market/candles` | -| [getHistoryCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L800) | | GET | `/api/v3/market/history-candles` | -| [getCurrentFundingRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L809) | | GET | `/api/v3/market/current-fund-rate` | -| [getHistoryFundingRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L818) | | GET | `/api/v3/market/history-fund-rate` | -| [getRiskReserve()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L827) | | GET | `/api/v3/market/risk-reserve` | -| [getRiskReserveHour()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L836) | | GET | `/api/v3/market/risk-reserve-hour` | -| [getRiskReserveAll()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L845) | | GET | `/api/v3/market/risk-reserve-all` | -| [getDiscountRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L854) | | GET | `/api/v3/market/discount-rate` | -| [getMarginLoans()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L861) | | GET | `/api/v3/market/margin-loans` | -| [getPositionTier()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L870) | | GET | `/api/v3/market/position-tier` | -| [getContractsOi()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L879) | | GET | `/api/v3/market/oi-limit` | -| [getIndexComponents()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L888) | | GET | `/api/v3/market/index-components` | -| [getRealityOrderBook()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L897) | :closed_lock_with_key: | GET | `/api/v3/account/reality-orderbook` | -| [getRealityFills()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L906) | :closed_lock_with_key: | GET | `/api/v3/account/reality-fills` | -| [getRealityCompanyOverview()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L912) | | GET | `/api/v3/reality/market/company-overview` | -| [getRealityValuationIndicators()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L918) | | GET | `/api/v3/reality/market/valuation-indicators` | -| [getRealityEarningsForecast()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L924) | | GET | `/api/v3/reality/market/earnings-forecast` | -| [getRealitySuspensionResumptionInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L930) | | GET | `/api/v3/reality/market/suspension-resumption-info` | -| [getRealityDividends()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L939) | | GET | `/api/v3/reality/market/dividends` | -| [getRealityShareCapitalChange()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L945) | | GET | `/api/v3/reality/market/share-capital-change` | -| [getRealityInnerTrades()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L951) | | GET | `/api/v3/reality/market/inner-trades` | -| [getRealityExecutiveShareholdings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L957) | | GET | `/api/v3/reality/market/executive-shareholdings` | -| [getRealityShareholdDetail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L965) | | GET | `/api/v3/reality/market/sharehold-detail` | -| [getRealityStockInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L971) | | GET | `/api/v3/reality/market/stock-info` | -| [getRealityMarketStates()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L977) | | GET | `/api/v3/reality/market/states` | -| [getRealityMarketCalendar()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L981) | | GET | `/api/v3/reality/market/calendar` | -| [getCopyFuturesTradingPairs()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L996) | :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#L1007) | :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#L1017) | :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#L1027) | :closed_lock_with_key: | POST | `/api/v3/copy/futures/transfer` | -| [getCopyFuturesTransferRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1037) | :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#L1043) | :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#L1049) | :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#L1055) | :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#L1061) | :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#L1073) | :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#L1079) | :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#L1088) | :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#L1097) | :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#L1103) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/static` | -| [getStockPlusQuote()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1109) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/quote` | -| [getStockPlusTradeDetail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1115) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/trade` | -| [getStockPlusIntraday()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1121) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/intraday` | -| [getStockPlusHistoryCandlestick()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1127) | :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#L1136) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/candlestick` | -| [getStockPlusDepth()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1142) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/depth` | -| [placeStockPlusOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1148) | :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#L1154) | :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#L1160) | :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#L1166) | :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#L1172) | :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#L1178) | :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#L1184) | :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#L1190) | :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#L1199) | :closed_lock_with_key: | GET | `/api/v3/stockplus/asset/account` | -| [getStockPlusCashFlow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1205) | :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#L1211) | :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#L1217) | :closed_lock_with_key: | POST | `/api/v3/stockplus/asset/transfer` | -| [getStockPlusTransferRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1223) | :closed_lock_with_key: | GET | `/api/v3/stockplus/asset/transfer-records` | -| [getCfdTickers()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1235) | :closed_lock_with_key: | GET | `/api/v3/cfd/market/tickers` | -| [getCfdHistoryCandlestick()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1241) | :closed_lock_with_key: | GET | `/api/v3/cfd/market/history-candlestick` | -| [placeCfdOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1247) | :closed_lock_with_key: | POST | `/api/v3/cfd/trade/place-order` | -| [modifyCfdOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1253) | :closed_lock_with_key: | POST | `/api/v3/cfd/trade/modify-order` | -| [cancelCfdOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1259) | :closed_lock_with_key: | POST | `/api/v3/cfd/trade/cancel-order` | -| [cancelAllCfdOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1263) | :closed_lock_with_key: | POST | `/api/v3/cfd/trade/cancel-all` | -| [closeCfdPositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1269) | :closed_lock_with_key: | POST | `/api/v3/cfd/trade/close-positions` | -| [closeAllCfdPositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1275) | :closed_lock_with_key: | POST | `/api/v3/cfd/trade/close-all-positions` | -| [getCfdUnfilledOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1281) | :closed_lock_with_key: | GET | `/api/v3/cfd/trade/unfilled-order` | -| [getCfdOrderHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1287) | :closed_lock_with_key: | GET | `/api/v3/cfd/trade/history-order` | -| [getCfdCurrentPositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1293) | :closed_lock_with_key: | GET | `/api/v3/cfd/trade/current-positions` | -| [getCfdFundDetail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1299) | :closed_lock_with_key: | GET | `/api/v3/cfd/account/fund-detail` | -| [cfdTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1303) | :closed_lock_with_key: | POST | `/api/v3/cfd/account/transfer` | -| [getCfdTransferRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1309) | :closed_lock_with_key: | GET | `/api/v3/cfd/account/transfer-records` | -| [getCfdFinancialRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1315) | :closed_lock_with_key: | GET | `/api/v3/cfd/account/financial-records` | -| [getCfdInstruments()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1321) | :closed_lock_with_key: | GET | `/api/v3/cfd/account/instruments` | -| [getBalances()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1336) | :closed_lock_with_key: | GET | `/api/v3/account/assets` | -| [getFundingAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1343) | :closed_lock_with_key: | GET | `/api/v3/account/funding-assets` | -| [getAccountInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1353) | :closed_lock_with_key: | GET | `/api/v3/account/info` | -| [getAccountSettings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1361) | :closed_lock_with_key: | GET | `/api/v3/account/settings` | -| [adjustAccountMode()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1368) | :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#L1378) | :closed_lock_with_key: | GET | `/api/v3/account/delta-info` | -| [setLeverage()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1385) | :closed_lock_with_key: | POST | `/api/v3/account/set-leverage` | -| [setHoldMode()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1392) | :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#L1401) | :closed_lock_with_key: | GET | `/api/v3/account/collateral-type` | -| [setCollateralType()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1408) | :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#L1417) | | GET | `/api/v3/account/custom-collateral-coins` | -| [preSetLeverage()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1424) | :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#L1433) | :closed_lock_with_key: | POST | `/api/v3/account/set-margin` | -| [getMaxWithdrawal()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1440) | :closed_lock_with_key: | GET | `/api/v3/account/max-withdrawal` | -| [getFinancialRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1449) | :closed_lock_with_key: | GET | `/api/v3/account/financial-records` | -| [getFundingFinancialRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1458) | :closed_lock_with_key: | GET | `/api/v3/account/funding-financial-records` | -| [getRepayableCoins()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1472) | :closed_lock_with_key: | GET | `/api/v3/account/repayable-coins` | -| [getPaymentCoins()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1484) | :closed_lock_with_key: | GET | `/api/v3/account/payment-coins` | -| [submitRepay()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1496) | :closed_lock_with_key: | POST | `/api/v3/account/repay` | -| [getConvertRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1503) | :closed_lock_with_key: | GET | `/api/v3/account/convert-records` | -| [getSmallAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1512) | :closed_lock_with_key: | GET | `/api/v3/convert/small-assets` | -| [tradeSmallAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1518) | :closed_lock_with_key: | POST | `/api/v3/convert/small-assets-trade` | -| [getSmallAssetsHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1524) | :closed_lock_with_key: | GET | `/api/v3/convert/small-assets-history` | -| [setDepositAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1539) | :closed_lock_with_key: | POST | `/api/v3/account/deposit-account` | -| [switchDeduct()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1548) | :closed_lock_with_key: | POST | `/api/v3/account/switch-deduct` | -| [getDeductInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1555) | :closed_lock_with_key: | GET | `/api/v3/account/deduct-info` | -| [getFeeRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1566) | :closed_lock_with_key: | GET | `/api/v3/account/fee-rate` | -| [getAllFeeRates()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1578) | :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#L1591) | :closed_lock_with_key: | GET | `/api/v3/account/max-transferable` | -| [getOpenInterestLimit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1603) | :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#L1609) | :closed_lock_with_key: | GET | `/api/v3/account/eligible-symbols` | -| [getEligibleMarginTier()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1615) | :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#L1621) | :closed_lock_with_key: | GET | `/api/v3/account/eligible-loan-info` | -| [getEligibleDiscountRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1627) | :closed_lock_with_key: | GET | `/api/v3/account/eligible-discount-rate` | -| [downgradeAccountToClassic()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1642) | :closed_lock_with_key: | POST | `/api/v3/account/switch` | -| [getUnifiedAccountSwitchStatus()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1650) | :closed_lock_with_key: | GET | `/api/v3/account/switch-status` | -| [getTaxRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1666) | :closed_lock_with_key: | GET | `/api/v3/tax/records` | -| [createSubAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1681) | :closed_lock_with_key: | POST | `/api/v3/user/create-sub` | -| [createAgentSubAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1690) | :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#L1699) | :closed_lock_with_key: | POST | `/api/v3/user/freeze-sub` | -| [getSubUnifiedAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1708) | :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#L1717) | :closed_lock_with_key: | GET | `/api/v3/user/sub-list` | -| [createSubAccountApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1730) | :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#L1739) | :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#L1748) | :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#L1757) | :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#L1767) | :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#L1773) | :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#L1788) | :closed_lock_with_key: | GET | `/api/v3/account/transferable-coins` | -| [submitTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1797) | :closed_lock_with_key: | POST | `/api/v3/account/transfer` | -| [subAccountTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1806) | :closed_lock_with_key: | POST | `/api/v3/account/sub-transfer` | -| [getSubTransferRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1818) | :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#L1830) | :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#L1848) | :closed_lock_with_key: | GET | `/api/v3/account/deposit-address` | -| [getSubDepositAddress()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1857) | :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#L1866) | :closed_lock_with_key: | GET | `/api/v3/account/deposit-records` | -| [getSubDepositRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1875) | :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#L1890) | :closed_lock_with_key: | POST | `/api/v3/account/withdraw` | -| [getWithdrawRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1899) | :closed_lock_with_key: | GET | `/api/v3/account/withdrawal-records` | -| [getWithdrawAddressBook()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1908) | :closed_lock_with_key: | GET | `/api/v3/account/withdraw-address` | -| [cancelWithdrawal()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1917) | :closed_lock_with_key: | POST | `/api/v3/account/cancel-withdrawal` | -| [submitNewOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1932) | :closed_lock_with_key: | POST | `/api/v3/trade/place-order` | -| [modifyOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1941) | :closed_lock_with_key: | POST | `/api/v3/trade/modify-order` | -| [placeRealityOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1950) | :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#L1959) | :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#L1968) | :closed_lock_with_key: | GET | `/api/v3/trade/loan-data` | -| [cancelOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1975) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-order` | -| [placeBatchOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1984) | :closed_lock_with_key: | POST | `/api/v3/trade/place-batch` | -| [batchModifyOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1993) | :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#L2002) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-batch` | -| [cancelAllOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2011) | :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#L2020) | :closed_lock_with_key: | POST | `/api/v3/trade/close-positions` | -| [getOrderInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2029) | :closed_lock_with_key: | GET | `/api/v3/trade/order-info` | -| [getUnfilledOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2038) | :closed_lock_with_key: | GET | `/api/v3/trade/unfilled-orders` | -| [getHistoryOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2050) | :closed_lock_with_key: | GET | `/api/v3/trade/history-orders` | -| [movePositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2062) | :closed_lock_with_key: | POST | `/api/v3/account/move-positions` | -| [getMovePositionHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2071) | :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#L2083) | :closed_lock_with_key: | GET | `/api/v3/trade/fills` | -| [getCurrentPosition()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2095) | :closed_lock_with_key: | GET | `/api/v3/position/current-position` | -| [getPositionHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2106) | :closed_lock_with_key: | GET | `/api/v3/position/history-position` | -| [getMaxOpenAvailable()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2118) | :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#L2127) | :closed_lock_with_key: | GET | `/api/v3/position/adlRank` | -| [countdownCancelAll()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2134) | :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#L2149) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/transfered` | -| [getLoanSymbols()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2158) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/symbols` | -| [getLoanRiskUnit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2167) | :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#L2178) | :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#L2187) | :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#L2196) | :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#L2205) | :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#L2214) | :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#L2226) | :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#L2241) | :closed_lock_with_key: | GET | `/api/v3/loan/coins` | -| [getLoanInterest()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2250) | :closed_lock_with_key: | GET | `/api/v3/loan/interest` | -| [loanBorrow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2259) | :closed_lock_with_key: | POST | `/api/v3/loan/borrow` | -| [getLoanBorrowOngoing()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2268) | :closed_lock_with_key: | GET | `/api/v3/loan/borrow-ongoing` | -| [getLoanBorrowHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2277) | :closed_lock_with_key: | GET | `/api/v3/loan/borrow-history` | -| [loanRepay()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2286) | :closed_lock_with_key: | POST | `/api/v3/loan/repay` | -| [getLoanRepayHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2295) | :closed_lock_with_key: | GET | `/api/v3/loan/repay-history` | -| [loanRevisePledge()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2304) | :closed_lock_with_key: | POST | `/api/v3/loan/revise-pledge` | -| [getLoanPledgeRateHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2313) | :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#L2322) | :closed_lock_with_key: | GET | `/api/v3/loan/debts` | -| [getLoanReduces()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2329) | :closed_lock_with_key: | GET | `/api/v3/loan/reduces` | -| [submitStrategyOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2344) | :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#L2353) | :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#L2362) | :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#L2371) | :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#L2380) | :closed_lock_with_key: | GET | `/api/v3/trade/history-strategy-orders` | -| [getStrategySubOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2389) | :closed_lock_with_key: | GET | `/api/v3/trade/strategy-sub-orders` | -| [validateGridBot()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2404) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/validate` | -| [createGridBot()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2410) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/create-bot` | -| [modifyGridBot()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2416) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/modify-bot` | -| [modifyGridInterval()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2422) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/modify-grid-interval` | -| [addGridInvestment()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2428) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/add-investment` | -| [closeGridBot()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2434) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/close-bot` | -| [getGridBotDetail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2440) | :closed_lock_with_key: | GET | `/api/v3/trade/grid/bot-detail` | -| [getGridBotOrderDetails()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2446) | :closed_lock_with_key: | GET | `/api/v3/trade/grid/list-details` | -| [validateNeutralGridBot()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2452) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/validate-neutral` | -| [createNeutralGridBot()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2458) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/create-neutral-bot` | -| [modifyNeutralGridBot()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2464) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/modify-neutral-bot` | -| [modifyNeutralGridInterval()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2470) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/modify-neutral-grid-interval` | -| [getNeutralGridBotDetail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2479) | :closed_lock_with_key: | GET | `/api/v3/trade/grid/neutral-bot-detail` | -| [getNeutralGridBotOrderDetails()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2485) | :closed_lock_with_key: | GET | `/api/v3/trade/grid/neutral-list-details` | -| [createBrokerSubAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2503) | :closed_lock_with_key: | POST | `/api/v3/broker/create-sub` | -| [getBrokerSubAccountList()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2515) | :closed_lock_with_key: | GET | `/api/v3/broker/sub-list` | -| [modifyBrokerSubAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2527) | :closed_lock_with_key: | POST | `/api/v3/broker/modify-sub` | -| [brokerSubWithdrawal()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2542) | :closed_lock_with_key: | POST | `/api/v3/broker/sub-withdrawal` | -| [getBrokerSubDepositAddress()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2554) | :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#L2566) | :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#L2578) | :closed_lock_with_key: | GET | `/api/v3/broker/commission` | -| [createBrokerSubApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2590) | :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#L2602) | :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#L2618) | :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#L2630) | :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#L2642) | :closed_lock_with_key: | GET | `/api/v3/p2p/ad-list` | -| [getP2pExchangeRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2648) | :closed_lock_with_key: | GET | `/api/v3/p2p/exchange-rate` | -| [simulateP2pFee()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2654) | :closed_lock_with_key: | POST | `/api/v3/p2p/fee-simulate` | -| [getP2pAdLimit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2660) | :closed_lock_with_key: | GET | `/api/v3/p2p/ad-limit` | -| [createP2pAd()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2666) | :closed_lock_with_key: | POST | `/api/v3/p2p/ad-create` | -| [updateP2pAd()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2672) | :closed_lock_with_key: | POST | `/api/v3/p2p/ad-update` | -| [operateP2pAd()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2676) | :closed_lock_with_key: | POST | `/api/v3/p2p/ad-operate` | -| [getP2pAdInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2680) | :closed_lock_with_key: | GET | `/api/v3/p2p/ad-info` | -| [getP2pMyAds()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2686) | :closed_lock_with_key: | GET | `/api/v3/p2p/my-ads` | -| [getP2pPendingOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2692) | :closed_lock_with_key: | GET | `/api/v3/p2p/pending-orders` | -| [getP2pAllOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2698) | :closed_lock_with_key: | GET | `/api/v3/p2p/all-orders` | -| [getP2pOrderInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2704) | :closed_lock_with_key: | GET | `/api/v3/p2p/order-info` | -| [confirmP2pOrderPayment()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2710) | :closed_lock_with_key: | POST | `/api/v3/p2p/order-pay` | -| [releaseP2pOrderAsset()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2716) | :closed_lock_with_key: | POST | `/api/v3/p2p/order-release` | -| [getP2pUserInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2722) | :closed_lock_with_key: | GET | `/api/v3/p2p/user-info` | -| [getP2pCurrencies()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2726) | :closed_lock_with_key: | GET | `/api/v3/p2p/currencies` | -| [getP2pPayMethods()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2730) | :closed_lock_with_key: | GET | `/api/v3/p2p/pay-method` | -| [getP2pBalance()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2734) | :closed_lock_with_key: | GET | `/api/v3/p2p/balance` | -| [getEarnEliteProducts()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2746) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-product` | -| [getEarnEliteAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2750) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-assets` | -| [getEarnEliteRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2754) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-records` | -| [getEarnEliteSubscribeInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2760) | :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#L2766) | :closed_lock_with_key: | POST | `/api/v3/earn/elite-subscribe` | -| [getEarnEliteSubscribeResult()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2772) | :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#L2778) | :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#L2784) | :closed_lock_with_key: | POST | `/api/v3/earn/elite-redeem` | +| [getServerTime()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L607) | | GET | `/api/v3/public/time` | +| [getInstruments()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L624) | | GET | `/api/v3/market/instruments` | +| [getMarketFeeGroup()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L633) | | GET | `/api/v3/market/fee-group` | +| [getLiquidations()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L642) | | GET | `/api/v3/market/liquidations` | +| [getRpiSymbols()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L651) | | GET | `/api/v3/market/rpi-symbols` | +| [getRpiOrderBook()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L658) | | GET | `/api/v3/market/rpi-orderbook` | +| [getCashDividendRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L667) | | GET | `/api/v3/market/cash-dividend-records` | +| [getSplitRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L673) | | GET | `/api/v3/market/split-records` | +| [getSpotWhaleFlow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L682) | | GET | `/api/v3/market/spot-whale-flow` | +| [getSpotFundFlow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L691) | | GET | `/api/v3/market/spot-fund-flow` | +| [getSpotNetFlow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L700) | | GET | `/api/v3/market/spot-net-flow` | +| [getMarginLongShort()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L709) | | GET | `/api/v3/market/margin-long-short` | +| [getMarginLoanGrowth()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L718) | | GET | `/api/v3/market/margin-loan-growth` | +| [getMarginIsolatedBorrow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L727) | | GET | `/api/v3/market/margin-isolated-borrow` | +| [getFuturesActiveBuySell()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L736) | | GET | `/api/v3/market/futures-active-buy-sell` | +| [getFuturesLongShort()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L745) | | GET | `/api/v3/market/futures-long-short` | +| [getFuturesPositionLongShort()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L754) | | GET | `/api/v3/market/futures-position-long-short` | +| [getFuturesAccountLongShort()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L763) | | GET | `/api/v3/market/futures-account-long-short` | +| [getMarketScoreWeights()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L772) | | GET | `/api/v3/market/score-weights` | +| [getTickers()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L781) | | GET | `/api/v3/market/tickers` | +| [getOrderBook()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L788) | | GET | `/api/v3/market/orderbook` | +| [getFills()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L797) | | GET | `/api/v3/market/fills` | +| [getProofOfReserves()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L806) | | GET | `/api/v3/market/proof-of-reserves` | +| [getOpenInterest()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L813) | | GET | `/api/v3/market/open-interest` | +| [getCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L823) | | GET | `/api/v3/market/candles` | +| [getHistoryCandles()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L832) | | GET | `/api/v3/market/history-candles` | +| [getCurrentFundingRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L841) | | GET | `/api/v3/market/current-fund-rate` | +| [getHistoryFundingRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L850) | | GET | `/api/v3/market/history-fund-rate` | +| [getRiskReserve()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L859) | | GET | `/api/v3/market/risk-reserve` | +| [getRiskReserveHour()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L868) | | GET | `/api/v3/market/risk-reserve-hour` | +| [getRiskReserveAll()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L877) | | GET | `/api/v3/market/risk-reserve-all` | +| [getDiscountRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L886) | | GET | `/api/v3/market/discount-rate` | +| [getMarginLoans()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L893) | | GET | `/api/v3/market/margin-loans` | +| [getPositionTier()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L902) | | GET | `/api/v3/market/position-tier` | +| [getContractsOi()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L911) | | GET | `/api/v3/market/oi-limit` | +| [getIndexComponents()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L920) | | GET | `/api/v3/market/index-components` | +| [getRealityOrderBook()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L929) | :closed_lock_with_key: | GET | `/api/v3/account/reality-orderbook` | +| [getRealityFills()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L938) | :closed_lock_with_key: | GET | `/api/v3/account/reality-fills` | +| [getRealityCompanyOverview()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L944) | | GET | `/api/v3/reality/market/company-overview` | +| [getRealityValuationIndicators()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L950) | | GET | `/api/v3/reality/market/valuation-indicators` | +| [getRealityEarningsForecast()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L956) | | GET | `/api/v3/reality/market/earnings-forecast` | +| [getRealitySuspensionResumptionInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L962) | | GET | `/api/v3/reality/market/suspension-resumption-info` | +| [getRealityDividends()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L971) | | GET | `/api/v3/reality/market/dividends` | +| [getRealityShareCapitalChange()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L977) | | GET | `/api/v3/reality/market/share-capital-change` | +| [getRealityInnerTrades()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L983) | | GET | `/api/v3/reality/market/inner-trades` | +| [getRealityExecutiveShareholdings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L989) | | GET | `/api/v3/reality/market/executive-shareholdings` | +| [getRealityShareholdDetail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L997) | | GET | `/api/v3/reality/market/sharehold-detail` | +| [getRealityStockInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1003) | | GET | `/api/v3/reality/market/stock-info` | +| [getRealityMarketStates()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1009) | | GET | `/api/v3/reality/market/states` | +| [getRealityMarketCalendar()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1013) | | GET | `/api/v3/reality/market/calendar` | +| [getCopyFuturesTradingPairs()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1028) | :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#L1039) | :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#L1049) | :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#L1059) | :closed_lock_with_key: | POST | `/api/v3/copy/futures/transfer` | +| [getCopyFuturesTransferRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1069) | :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#L1075) | :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#L1081) | :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#L1087) | :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#L1093) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/profit-details` | +| [getCopyFuturesPortfolioOverview()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1099) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/portfolio-overview` | +| [createCopyFutures()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1105) | :closed_lock_with_key: | POST | `/api/v3/copy/futures/follower-settings` | +| [modifyCopyFuturesFollowerSettings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1111) | :closed_lock_with_key: | POST | `/api/v3/copy/futures/modify-follower-settings` | +| [unfollowCopyFutures()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1120) | :closed_lock_with_key: | POST | `/api/v3/copy/futures/unfollow` | +| [getCopyFuturesCopySettings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1126) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/copy-settings` | +| [copyFuturesFollowerTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1132) | :closed_lock_with_key: | POST | `/api/v3/copy/futures/copy-transfer` | +| [getCopyFuturesFollowerTransferRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1138) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/copy-transfer-record` | +| [getCopyFuturesCurrentCopy()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1144) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/current-copy` | +| [getCopyFuturesCopyProfitDetails()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1150) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/copy-profit-details` | +| [closeCopyFuturesPositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1156) | :closed_lock_with_key: | POST | `/api/v3/copy/futures/close-positions` | +| [closeAllCopyFuturesPositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1162) | :closed_lock_with_key: | POST | `/api/v3/copy/futures/close-all` | +| [getCopyFuturesCurrentPositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1168) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/current-positions` | +| [placeCopyFuturesTpSl()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1174) | :closed_lock_with_key: | POST | `/api/v3/copy/futures/place-tpsl` | +| [modifyCopyFuturesTpSl()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1180) | :closed_lock_with_key: | POST | `/api/v3/copy/futures/modify-tpsl` | +| [cancelCopyFuturesTpSl()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1186) | :closed_lock_with_key: | POST | `/api/v3/copy/futures/cancel-tpsl` | +| [getCopyFuturesCurrentTpSlOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1192) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/current-tpsl-orders` | +| [getCopyFuturesTpSlOrderHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1198) | :closed_lock_with_key: | GET | `/api/v3/copy/futures/tpsl-order-history` | +| [getStockPlusOptionQuote()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1210) | :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#L1216) | :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#L1225) | :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#L1234) | :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#L1240) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/static` | +| [getStockPlusQuote()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1246) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/quote` | +| [getStockPlusTradeDetail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1252) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/trade` | +| [getStockPlusIntraday()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1258) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/intraday` | +| [getStockPlusHistoryCandlestick()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1264) | :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#L1273) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/candlestick` | +| [getStockPlusDepth()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1279) | :closed_lock_with_key: | GET | `/api/v3/stockplus/market/depth` | +| [placeStockPlusOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1285) | :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#L1291) | :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#L1297) | :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#L1303) | :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#L1309) | :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#L1315) | :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#L1321) | :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#L1327) | :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#L1336) | :closed_lock_with_key: | GET | `/api/v3/stockplus/asset/account` | +| [getStockPlusCashFlow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1342) | :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#L1348) | :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#L1354) | :closed_lock_with_key: | POST | `/api/v3/stockplus/asset/transfer` | +| [getStockPlusTransferRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1360) | :closed_lock_with_key: | GET | `/api/v3/stockplus/asset/transfer-records` | +| [getCfdTickers()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1372) | :closed_lock_with_key: | GET | `/api/v3/cfd/market/tickers` | +| [getCfdHistoryCandlestick()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1378) | :closed_lock_with_key: | GET | `/api/v3/cfd/market/history-candlestick` | +| [placeCfdOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1384) | :closed_lock_with_key: | POST | `/api/v3/cfd/trade/place-order` | +| [modifyCfdOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1390) | :closed_lock_with_key: | POST | `/api/v3/cfd/trade/modify-order` | +| [cancelCfdOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1396) | :closed_lock_with_key: | POST | `/api/v3/cfd/trade/cancel-order` | +| [cancelAllCfdOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1400) | :closed_lock_with_key: | POST | `/api/v3/cfd/trade/cancel-all` | +| [closeCfdPositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1406) | :closed_lock_with_key: | POST | `/api/v3/cfd/trade/close-positions` | +| [closeAllCfdPositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1412) | :closed_lock_with_key: | POST | `/api/v3/cfd/trade/close-all-positions` | +| [getCfdUnfilledOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1418) | :closed_lock_with_key: | GET | `/api/v3/cfd/trade/unfilled-order` | +| [getCfdOrderHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1424) | :closed_lock_with_key: | GET | `/api/v3/cfd/trade/history-order` | +| [getCfdCurrentPositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1430) | :closed_lock_with_key: | GET | `/api/v3/cfd/trade/current-positions` | +| [getCfdFundDetail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1436) | :closed_lock_with_key: | GET | `/api/v3/cfd/account/fund-detail` | +| [cfdTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1440) | :closed_lock_with_key: | POST | `/api/v3/cfd/account/transfer` | +| [getCfdTransferRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1446) | :closed_lock_with_key: | GET | `/api/v3/cfd/account/transfer-records` | +| [getCfdFinancialRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1452) | :closed_lock_with_key: | GET | `/api/v3/cfd/account/financial-records` | +| [getCfdInstruments()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1458) | :closed_lock_with_key: | GET | `/api/v3/cfd/account/instruments` | +| [getBalances()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1473) | :closed_lock_with_key: | GET | `/api/v3/account/assets` | +| [getFundingAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1480) | :closed_lock_with_key: | GET | `/api/v3/account/funding-assets` | +| [getAccountInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1490) | :closed_lock_with_key: | GET | `/api/v3/account/info` | +| [getAccountSettings()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1498) | :closed_lock_with_key: | GET | `/api/v3/account/settings` | +| [adjustAccountMode()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1505) | :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#L1515) | :closed_lock_with_key: | GET | `/api/v3/account/delta-info` | +| [setLeverage()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1522) | :closed_lock_with_key: | POST | `/api/v3/account/set-leverage` | +| [setHoldMode()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1529) | :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#L1538) | :closed_lock_with_key: | GET | `/api/v3/account/collateral-type` | +| [setCollateralType()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1545) | :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#L1554) | | GET | `/api/v3/account/custom-collateral-coins` | +| [preSetLeverage()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1561) | :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#L1570) | :closed_lock_with_key: | POST | `/api/v3/account/set-margin` | +| [getMaxWithdrawal()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1577) | :closed_lock_with_key: | GET | `/api/v3/account/max-withdrawal` | +| [getFinancialRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1586) | :closed_lock_with_key: | GET | `/api/v3/account/financial-records` | +| [getFundingFinancialRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1595) | :closed_lock_with_key: | GET | `/api/v3/account/funding-financial-records` | +| [getRepayableCoins()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1609) | :closed_lock_with_key: | GET | `/api/v3/account/repayable-coins` | +| [getPaymentCoins()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1621) | :closed_lock_with_key: | GET | `/api/v3/account/payment-coins` | +| [submitRepay()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1633) | :closed_lock_with_key: | POST | `/api/v3/account/repay` | +| [borrow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1637) | :closed_lock_with_key: | POST | `/api/v3/account/borrow` | +| [getMaxBorrowable()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1641) | :closed_lock_with_key: | GET | `/api/v3/account/max-borrowable` | +| [setRepayMode()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1647) | :closed_lock_with_key: | POST | `/api/v3/account/set-repay-mode` | +| [getConvertRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1656) | :closed_lock_with_key: | GET | `/api/v3/account/convert-records` | +| [getSmallAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1665) | :closed_lock_with_key: | GET | `/api/v3/convert/small-assets` | +| [tradeSmallAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1671) | :closed_lock_with_key: | POST | `/api/v3/convert/small-assets-trade` | +| [getSmallAssetsHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1677) | :closed_lock_with_key: | GET | `/api/v3/convert/small-assets-history` | +| [setDepositAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1692) | :closed_lock_with_key: | POST | `/api/v3/account/deposit-account` | +| [switchDeduct()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1701) | :closed_lock_with_key: | POST | `/api/v3/account/switch-deduct` | +| [getDeductInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1708) | :closed_lock_with_key: | GET | `/api/v3/account/deduct-info` | +| [getFeeRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1719) | :closed_lock_with_key: | GET | `/api/v3/account/fee-rate` | +| [getAllFeeRates()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1731) | :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#L1744) | :closed_lock_with_key: | GET | `/api/v3/account/max-transferable` | +| [getOpenInterestLimit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1756) | :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#L1762) | :closed_lock_with_key: | GET | `/api/v3/account/eligible-symbols` | +| [getEligibleMarginTier()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1768) | :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#L1774) | :closed_lock_with_key: | GET | `/api/v3/account/eligible-loan-info` | +| [getEligibleDiscountRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1780) | :closed_lock_with_key: | GET | `/api/v3/account/eligible-discount-rate` | +| [downgradeAccountToClassic()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1795) | :closed_lock_with_key: | POST | `/api/v3/account/switch` | +| [getUnifiedAccountSwitchStatus()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1803) | :closed_lock_with_key: | GET | `/api/v3/account/switch-status` | +| [getTaxRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1819) | :closed_lock_with_key: | GET | `/api/v3/tax/records` | +| [createSubAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1834) | :closed_lock_with_key: | POST | `/api/v3/user/create-sub` | +| [createAgentSubAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1843) | :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#L1852) | :closed_lock_with_key: | POST | `/api/v3/user/freeze-sub` | +| [deleteSubAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1858) | :closed_lock_with_key: | POST | `/api/v3/user/delete-sub` | +| [getSubUnifiedAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1867) | :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#L1876) | :closed_lock_with_key: | GET | `/api/v3/user/sub-list` | +| [createSubAccountApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1889) | :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#L1898) | :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#L1907) | :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#L1916) | :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#L1926) | :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#L1932) | :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#L1947) | :closed_lock_with_key: | GET | `/api/v3/account/transferable-coins` | +| [submitTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1956) | :closed_lock_with_key: | POST | `/api/v3/account/transfer` | +| [subAccountTransfer()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1965) | :closed_lock_with_key: | POST | `/api/v3/account/sub-transfer` | +| [getSubTransferRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L1977) | :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#L1989) | :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#L2007) | :closed_lock_with_key: | GET | `/api/v3/account/deposit-address` | +| [getSubDepositAddress()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2016) | :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#L2025) | :closed_lock_with_key: | GET | `/api/v3/account/deposit-records` | +| [getSubDepositRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2034) | :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#L2049) | :closed_lock_with_key: | POST | `/api/v3/account/withdraw` | +| [getWithdrawRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2058) | :closed_lock_with_key: | GET | `/api/v3/account/withdrawal-records` | +| [getWithdrawAddressBook()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2067) | :closed_lock_with_key: | GET | `/api/v3/account/withdraw-address` | +| [cancelWithdrawal()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2076) | :closed_lock_with_key: | POST | `/api/v3/account/cancel-withdrawal` | +| [submitNewOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2091) | :closed_lock_with_key: | POST | `/api/v3/trade/place-order` | +| [modifyOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2100) | :closed_lock_with_key: | POST | `/api/v3/trade/modify-order` | +| [placeRealityOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2109) | :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#L2118) | :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#L2127) | :closed_lock_with_key: | GET | `/api/v3/trade/loan-data` | +| [cancelOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2134) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-order` | +| [placeBatchOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2143) | :closed_lock_with_key: | POST | `/api/v3/trade/place-batch` | +| [batchModifyOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2152) | :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#L2161) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-batch` | +| [cancelAllOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2170) | :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#L2179) | :closed_lock_with_key: | POST | `/api/v3/trade/close-positions` | +| [getOrderInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2188) | :closed_lock_with_key: | GET | `/api/v3/trade/order-info` | +| [getUnfilledOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2197) | :closed_lock_with_key: | GET | `/api/v3/trade/unfilled-orders` | +| [getHistoryOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2209) | :closed_lock_with_key: | GET | `/api/v3/trade/history-orders` | +| [movePositions()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2221) | :closed_lock_with_key: | POST | `/api/v3/account/move-positions` | +| [getMovePositionHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2230) | :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#L2242) | :closed_lock_with_key: | GET | `/api/v3/trade/fills` | +| [getCurrentPosition()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2254) | :closed_lock_with_key: | GET | `/api/v3/position/current-position` | +| [getPositionHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2265) | :closed_lock_with_key: | GET | `/api/v3/position/history-position` | +| [getMaxOpenAvailable()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2277) | :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#L2286) | :closed_lock_with_key: | GET | `/api/v3/position/adlRank` | +| [countdownCancelAll()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2293) | :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#L2308) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/transfered` | +| [getLoanSymbols()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2317) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/symbols` | +| [getLoanRiskUnit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2326) | :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#L2337) | :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#L2346) | :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#L2355) | :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#L2364) | :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#L2373) | :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#L2385) | :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#L2400) | :closed_lock_with_key: | GET | `/api/v3/loan/coins` | +| [getLoanInterest()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2409) | :closed_lock_with_key: | GET | `/api/v3/loan/interest` | +| [loanBorrow()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2418) | :closed_lock_with_key: | POST | `/api/v3/loan/borrow` | +| [getLoanBorrowOngoing()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2427) | :closed_lock_with_key: | GET | `/api/v3/loan/borrow-ongoing` | +| [getLoanBorrowHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2436) | :closed_lock_with_key: | GET | `/api/v3/loan/borrow-history` | +| [loanRepay()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2445) | :closed_lock_with_key: | POST | `/api/v3/loan/repay` | +| [getLoanRepayHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2454) | :closed_lock_with_key: | GET | `/api/v3/loan/repay-history` | +| [loanRevisePledge()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2463) | :closed_lock_with_key: | POST | `/api/v3/loan/revise-pledge` | +| [getLoanPledgeRateHistory()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2472) | :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#L2481) | :closed_lock_with_key: | GET | `/api/v3/loan/debts` | +| [getLoanReduces()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2488) | :closed_lock_with_key: | GET | `/api/v3/loan/reduces` | +| [submitStrategyOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2503) | :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#L2512) | :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#L2521) | :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#L2530) | :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#L2539) | :closed_lock_with_key: | GET | `/api/v3/trade/history-strategy-orders` | +| [getStrategySubOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2548) | :closed_lock_with_key: | GET | `/api/v3/trade/strategy-sub-orders` | +| [validateGridBot()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2563) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/validate` | +| [createGridBot()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2569) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/create-bot` | +| [modifyGridBot()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2575) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/modify-bot` | +| [modifyGridInterval()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2581) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/modify-grid-interval` | +| [addGridInvestment()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2587) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/add-investment` | +| [closeGridBot()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2593) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/close-bot` | +| [getGridBotDetail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2599) | :closed_lock_with_key: | GET | `/api/v3/trade/grid/bot-detail` | +| [getGridBotOrderDetails()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2605) | :closed_lock_with_key: | GET | `/api/v3/trade/grid/list-details` | +| [validateNeutralGridBot()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2611) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/validate-neutral` | +| [createNeutralGridBot()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2617) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/create-neutral-bot` | +| [modifyNeutralGridBot()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2623) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/modify-neutral-bot` | +| [modifyNeutralGridInterval()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2629) | :closed_lock_with_key: | POST | `/api/v3/trade/grid/modify-neutral-grid-interval` | +| [getNeutralGridBotDetail()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2638) | :closed_lock_with_key: | GET | `/api/v3/trade/grid/neutral-bot-detail` | +| [getNeutralGridBotOrderDetails()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2644) | :closed_lock_with_key: | GET | `/api/v3/trade/grid/neutral-list-details` | +| [createBrokerSubAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2662) | :closed_lock_with_key: | POST | `/api/v3/broker/create-sub` | +| [getBrokerSubAccountList()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2674) | :closed_lock_with_key: | GET | `/api/v3/broker/sub-list` | +| [modifyBrokerSubAccount()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2686) | :closed_lock_with_key: | POST | `/api/v3/broker/modify-sub` | +| [brokerSubWithdrawal()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2701) | :closed_lock_with_key: | POST | `/api/v3/broker/sub-withdrawal` | +| [getBrokerSubDepositAddress()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2713) | :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#L2725) | :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#L2737) | :closed_lock_with_key: | GET | `/api/v3/broker/commission` | +| [createBrokerSubApiKey()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2749) | :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#L2761) | :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#L2777) | :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#L2789) | :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#L2801) | :closed_lock_with_key: | GET | `/api/v3/p2p/ad-list` | +| [getP2pExchangeRate()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2807) | :closed_lock_with_key: | GET | `/api/v3/p2p/exchange-rate` | +| [simulateP2pFee()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2813) | :closed_lock_with_key: | POST | `/api/v3/p2p/fee-simulate` | +| [getP2pAdLimit()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2819) | :closed_lock_with_key: | GET | `/api/v3/p2p/ad-limit` | +| [createP2pAd()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2825) | :closed_lock_with_key: | POST | `/api/v3/p2p/ad-create` | +| [updateP2pAd()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2831) | :closed_lock_with_key: | POST | `/api/v3/p2p/ad-update` | +| [operateP2pAd()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2835) | :closed_lock_with_key: | POST | `/api/v3/p2p/ad-operate` | +| [getP2pAdInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2839) | :closed_lock_with_key: | GET | `/api/v3/p2p/ad-info` | +| [getP2pMyAds()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2845) | :closed_lock_with_key: | GET | `/api/v3/p2p/my-ads` | +| [getP2pPendingOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2851) | :closed_lock_with_key: | GET | `/api/v3/p2p/pending-orders` | +| [getP2pAllOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2857) | :closed_lock_with_key: | GET | `/api/v3/p2p/all-orders` | +| [getP2pOrderInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2863) | :closed_lock_with_key: | GET | `/api/v3/p2p/order-info` | +| [confirmP2pOrderPayment()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2869) | :closed_lock_with_key: | POST | `/api/v3/p2p/order-pay` | +| [releaseP2pOrderAsset()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2875) | :closed_lock_with_key: | POST | `/api/v3/p2p/order-release` | +| [getP2pUserInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2881) | :closed_lock_with_key: | GET | `/api/v3/p2p/user-info` | +| [getP2pCurrencies()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2885) | :closed_lock_with_key: | GET | `/api/v3/p2p/currencies` | +| [getP2pPayMethods()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2889) | :closed_lock_with_key: | GET | `/api/v3/p2p/pay-method` | +| [getP2pBalance()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2893) | :closed_lock_with_key: | GET | `/api/v3/p2p/balance` | +| [getEarnEliteProducts()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2905) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-product` | +| [getEarnEliteAssets()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2909) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-assets` | +| [getEarnEliteRecords()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2913) | :closed_lock_with_key: | GET | `/api/v3/earn/elite-records` | +| [getEarnEliteSubscribeInfo()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2919) | :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#L2925) | :closed_lock_with_key: | POST | `/api/v3/earn/elite-subscribe` | +| [getEarnEliteSubscribeResult()](https://github.com/sieblyio/bitget-api/blob/master/src/rest-client-v3.ts#L2931) | :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#L2937) | :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#L2943) | :closed_lock_with_key: | POST | `/api/v3/earn/elite-redeem` | # websocket-api-client.ts @@ -633,5 +655,5 @@ This client provides WebSocket API endpoints which allow for faster interactions | [placeBatchOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/websocket-api-client.ts#L104) | | WS | `batch-place` | | [cancelOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/websocket-api-client.ts#L128) | | WS | `cancel-order` | | [cancelBatchOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/websocket-api-client.ts#L147) | | WS | `batch-cancel` | -| [modifyOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/websocket-api-client.ts#L159) | | WS | `modify-order` | -| [batchModifyOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/websocket-api-client.ts#L171) | | WS | `batch-modify` | \ No newline at end of file +| [updateOrder()](https://github.com/sieblyio/bitget-api/blob/master/src/websocket-api-client.ts#L159) | | WS | `modify-order` | +| [batchUpdateOrders()](https://github.com/sieblyio/bitget-api/blob/master/src/websocket-api-client.ts#L171) | | WS | `batch-modify` | \ No newline at end of file diff --git a/examples/apidoc/RestClientV2/Affiliate/get-sub-affiliate-info.js b/examples/apidoc/RestClientV2/Affiliate/get-sub-affiliate-info.js new file mode 100644 index 0000000..20b9284 --- /dev/null +++ b/examples/apidoc/RestClientV2/Affiliate/get-sub-affiliate-info.js @@ -0,0 +1,21 @@ +import { RestClientV2 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV2 } = require('bitget-api'); + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getSubAffiliateInfo({ + uid: '123456789', + limit: '100', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/borrow.js b/examples/apidoc/RestClientV3/Account/borrow.js new file mode 100644 index 0000000..0f7a7fd --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/borrow.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 + .borrow({ + coin: 'USDT', + amount: '100', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-max-borrowable.js b/examples/apidoc/RestClientV3/Account/get-max-borrowable.js new file mode 100644 index 0000000..1077848 --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-max-borrowable.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 + .getMaxBorrowable({ + coin: 'USDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/set-collateral-type.js b/examples/apidoc/RestClientV3/Account/set-collateral-type.js index 00aa193..590a152 100644 --- a/examples/apidoc/RestClientV3/Account/set-collateral-type.js +++ b/examples/apidoc/RestClientV3/Account/set-collateral-type.js @@ -11,6 +11,7 @@ const client = new RestClientV3({ client .setCollateralType({ collateralType: 'mainstream', + allowCashPlus: 'no', }) .then((response) => { console.log(response); diff --git a/examples/apidoc/RestClientV3/Account/set-repay-mode.js b/examples/apidoc/RestClientV3/Account/set-repay-mode.js new file mode 100644 index 0000000..9e182e3 --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/set-repay-mode.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 + .setRepayMode({ + repayMode: 'manual', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/cancel-tpsl.js b/examples/apidoc/RestClientV3/Copy-Trading/cancel-tpsl.js new file mode 100644 index 0000000..8e342e3 --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/cancel-tpsl.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 + .cancelCopyFuturesTpSl({ + projectId: '1234567890', + strategyId: '1234567890', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/close-all.js b/examples/apidoc/RestClientV3/Copy-Trading/close-all.js new file mode 100644 index 0000000..a5f7e3d --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/close-all.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 + .closeAllCopyFuturesPositions({ + projectId: '1234567890', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/close-positions.js b/examples/apidoc/RestClientV3/Copy-Trading/close-positions.js new file mode 100644 index 0000000..6b8212f --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/close-positions.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 + .closeCopyFuturesPositions({ + projectId: '1234567890', + symbol: 'BTCUSDT', + qty: '0.01', + holdSide: 'long', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/copy-transfer.js b/examples/apidoc/RestClientV3/Copy-Trading/copy-transfer.js new file mode 100644 index 0000000..aa5ac42 --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/copy-transfer.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 + .copyFuturesFollowerTransfer({ + projectId: '1234567890', + type: 'in', + coin: 'USDT', + amount: '500', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/create-copy.js b/examples/apidoc/RestClientV3/Copy-Trading/create-copy.js new file mode 100644 index 0000000..dc24a0d --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/create-copy.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 + .createCopyFutures({ + projectId: '1234567890', + type: 'fixed_ratio', + amount: '1000', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-copy-profit-details.js b/examples/apidoc/RestClientV3/Copy-Trading/get-copy-profit-details.js new file mode 100644 index 0000000..dd387ed --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/get-copy-profit-details.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 + .getCopyFuturesCopyProfitDetails({ + projectId: '1234567890', + limit: '20', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-copy-settings.js b/examples/apidoc/RestClientV3/Copy-Trading/get-copy-settings.js new file mode 100644 index 0000000..0fa8e02 --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/get-copy-settings.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 + .getCopyFuturesCopySettings({ + projectId: '1234567890', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-copy-transfer-record.js b/examples/apidoc/RestClientV3/Copy-Trading/get-copy-transfer-record.js new file mode 100644 index 0000000..429b553 --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/get-copy-transfer-record.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 + .getCopyFuturesFollowerTransferRecords({ + projectId: '1234567890', + limit: '20', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-current-copy.js b/examples/apidoc/RestClientV3/Copy-Trading/get-current-copy.js new file mode 100644 index 0000000..a419a3b --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/get-current-copy.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 + .getCopyFuturesCurrentCopy({ + projectId: '1234567890', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-current-positions.js b/examples/apidoc/RestClientV3/Copy-Trading/get-current-positions.js new file mode 100644 index 0000000..c54b572 --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/get-current-positions.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 + .getCopyFuturesCurrentPositions({ + projectId: '1234567890', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-current-tpsl-orders.js b/examples/apidoc/RestClientV3/Copy-Trading/get-current-tpsl-orders.js new file mode 100644 index 0000000..f60fc79 --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/get-current-tpsl-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 + .getCopyFuturesCurrentTpSlOrders({ + projectId: '1234567890', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-portfolio-overview.js b/examples/apidoc/RestClientV3/Copy-Trading/get-portfolio-overview.js new file mode 100644 index 0000000..17bdf1c --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/get-portfolio-overview.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 + .getCopyFuturesPortfolioOverview({ + period: '7D', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-tpsl-order-history.js b/examples/apidoc/RestClientV3/Copy-Trading/get-tpsl-order-history.js new file mode 100644 index 0000000..2e9e821 --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/get-tpsl-order-history.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 + .getCopyFuturesTpSlOrderHistory({ + projectId: '1234567890', + limit: '100', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/modify-follower-settings.js b/examples/apidoc/RestClientV3/Copy-Trading/modify-follower-settings.js new file mode 100644 index 0000000..98c1356 --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/modify-follower-settings.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 + .modifyCopyFuturesFollowerSettings({ + projectId: '1234567890', + tradingPairList: 'BTCUSDT,ETHUSDT', + autoCopy: 'on', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/modify-tpsl.js b/examples/apidoc/RestClientV3/Copy-Trading/modify-tpsl.js new file mode 100644 index 0000000..f619a39 --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/modify-tpsl.js @@ -0,0 +1,25 @@ +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 + .modifyCopyFuturesTpSl({ + projectId: '1234567890', + strategyId: '1234567890', + tpTriggerBy: 'market', + slTriggerBy: 'market', + takeProfit: '60000', + stopLoss: '45000', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/place-tpsl.js b/examples/apidoc/RestClientV3/Copy-Trading/place-tpsl.js new file mode 100644 index 0000000..4a53a10 --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/place-tpsl.js @@ -0,0 +1,25 @@ +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 + .placeCopyFuturesTpSl({ + projectId: '1234567890', + positionId: '9876543210', + tpTriggerBy: 'market', + slTriggerBy: 'market', + takeProfit: '60000', + stopLoss: '45000', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/unfollow.js b/examples/apidoc/RestClientV3/Copy-Trading/unfollow.js new file mode 100644 index 0000000..a944063 --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/unfollow.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 + .unfollowCopyFutures({ + projectId: '1234567890', + closeType: 'follow_close', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Sub-Account/delete-sub-account.js b/examples/apidoc/RestClientV3/Sub-Account/delete-sub-account.js new file mode 100644 index 0000000..0d69dcb --- /dev/null +++ b/examples/apidoc/RestClientV3/Sub-Account/delete-sub-account.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 + .deleteSubAccount({ + subUid: '123456789', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/batch-modify-orders.js b/examples/apidoc/RestClientV3/Trade/batch-modify-orders.js index 60e0369..f76b15c 100644 --- a/examples/apidoc/RestClientV3/Trade/batch-modify-orders.js +++ b/examples/apidoc/RestClientV3/Trade/batch-modify-orders.js @@ -18,6 +18,7 @@ client symbol: 'BTCUSDT', category: 'SPOT', requestId: 123456, + pxAmendType: 'no', }, { orderId: '2', @@ -27,6 +28,7 @@ client symbol: 'BTCUSDT', category: 'SPOT', requestId: 123457, + pxAmendType: 'no', }, ]) .then((response) => { diff --git a/examples/apidoc/RestClientV3/Trade/batch-order.js b/examples/apidoc/RestClientV3/Trade/batch-order.js index 6e26967..b589b51 100644 --- a/examples/apidoc/RestClientV3/Trade/batch-order.js +++ b/examples/apidoc/RestClientV3/Trade/batch-order.js @@ -19,6 +19,7 @@ client side: 'buy', timeInForce: 'gtc', clientOid: 'my-oid-1', + pxAmendType: 'no', }, ]) .then((response) => { diff --git a/examples/apidoc/RestClientV3/Trade/modify-order.js b/examples/apidoc/RestClientV3/Trade/modify-order.js index 324e531..6386de8 100644 --- a/examples/apidoc/RestClientV3/Trade/modify-order.js +++ b/examples/apidoc/RestClientV3/Trade/modify-order.js @@ -17,6 +17,7 @@ client symbol: 'BTCUSDT', category: 'SPOT', requestId: 123456, + pxAmendType: 'no', }) .then((response) => { console.log(response); diff --git a/examples/apidoc/RestClientV3/Trade/place-order.js b/examples/apidoc/RestClientV3/Trade/place-order.js index a33220f..37f771d 100644 --- a/examples/apidoc/RestClientV3/Trade/place-order.js +++ b/examples/apidoc/RestClientV3/Trade/place-order.js @@ -20,6 +20,7 @@ client timeInForce: 'gtc', reduceOnly: 'no', autoBorrow: 'no', + pxAmendType: 'no', }) .then((response) => { console.log(response); diff --git a/llms.txt b/llms.txt index d551b57..adcac75 100644 --- a/llms.txt +++ b/llms.txt @@ -758,3924 +758,3345 @@ export interface GetMarginLiquidationOrdersRequestV2 { } ================ -File: src/types/request/v3/cfd.ts +File: src/types/request/shared.ts ================ -export type CfdYesNoV3 = 'yes' | 'no'; -⋮---- -export type CfdOrderTypeV3 = 'limit' | 'market'; -⋮---- -export type CfdSideV3 = 'buy' | 'sell'; +/** Pagination */ +export interface Pagination { + /** Time after */ + after?: string; + /** Time before */ + before?: string; + /** Elements per page */ + limit?: string; +} ⋮---- -export type CfdKlineIntervalV3 = '1m' | '15m' | '1h' | '4h' | '1d'; +/** Time after */ ⋮---- -export type CfdTransferAccountTypeV3 = 'funding' | 'uta'; +/** Time before */ ⋮---- -export type CfdTransferDirectionV3 = 'in' | 'out'; +/** Elements per page */ ⋮---- -export interface GetCfdTickersRequestV3 { - symbol?: string; -} +export type OrderTimeInForce = 'normal' | 'post_only' | 'fok' | 'ioc'; ⋮---- -export interface GetCfdHistoryCandlestickRequestV3 { +export interface GetHistoricTradesParams { symbol: string; - interval: CfdKlineIntervalV3; - side?: CfdSideV3; + limit?: string; + tradeId?: string; startTime?: string; endTime?: string; - limit?: string; -} -⋮---- -export interface PlaceCfdOrderRequestV3 { - symbol: string; - orderType: CfdOrderTypeV3; - side: CfdSideV3; - qty: string; - price?: string; - takeProfit?: string; - stopLoss?: string; } ⋮---- -export interface ModifyCfdOrderRequestV3 { - orderId: string; - price?: string; - takeProfit?: string; - stopLoss?: string; -} +/** + * The margin type, used directly in building the endpoint URL + */ +export type MarginType = 'crossed' | 'isolated'; ⋮---- -export interface CancelCfdOrderRequestV3 { - orderId: string; -} +export type FuturesProductTypeV2 = + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES' + | 'SUSDT-FUTURES' + | 'SCOIN-FUTURES' + | 'SUSDC-FUTURES'; ⋮---- -export interface CancelAllCfdOrdersRequestV3 { - symbol?: string; -} +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 CloseCfdPositionsRequestV3 { - positionId: string; - qty: string; +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 interface CloseAllCfdPositionsRequestV3 { - symbol?: string; +export interface CTFuturesTraderCurrentOrdersV2 { + trackingList: CTFuturesTraderCurrentOrderV2[]; + endId: string; } ⋮---- -export interface GetCfdUnfilledOrdersRequestV3 { - symbol?: string; - subUid?: string; +export interface CTFuturesTraderHistoryOrderV2 { + trackingNo: 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 GetCfdOrderHistoryRequestV3 { - symbol: string; - subUid?: string; - startTime?: string; - endTime?: string; - limit?: string; +export interface CTFuturesTraderHistoryOrderV2 { + trackingList: CTFuturesTraderHistoryOrderV2[]; + endId: string; } ⋮---- -export interface GetCfdCurrentPositionsRequestV3 { - symbol?: string; - subUid?: string; +export interface CTRateCTimeV2 { + rate: string; + ctime: string; } ⋮---- -export interface CfdTransferRequestV3 { - coin: string; +export interface CTAmountCTimeV2 { amount: string; - accountType: CfdTransferAccountTypeV3; - direction: CfdTransferDirectionV3; + ctime: string; } ⋮---- -export interface GetCfdTransferRecordsRequestV3 { - transferId?: string; - subUid?: string; - startTime?: string; - endTime?: string; - direction?: CfdTransferDirectionV3; - limit?: 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 GetCfdFinancialRecordsRequestV3 { - type?: string; - startTime?: string; - endTime?: string; - limit?: string; +export interface CTFuturesTraderProfitHistoryItemV2 { + coin: string; + profitCount: string; + lastProfitTime: string; } ⋮---- -export interface GetCfdInstrumentsRequestV3 { - symbol?: string; +export interface CTFuturesTraderHistoryProfitSummaryV2 { + profitSummary: { + yesterdayProfit: string; + sumProfit: string; + waitProfit: string; + yesterdayTime: string; + }; + profitHistoryList: CTFuturesTraderProfitHistoryItemV2[]; } - -================ -File: src/types/request/v3/grid.ts -================ -export type GridCategoryV3 = 'SPOT' | 'USDT-FUTURES' | 'USDC-FUTURES'; -⋮---- -export type NeutralGridCategoryV3 = 'USDT-FUTURES' | 'USDC-FUTURES'; -⋮---- -export type GridFundsSourceV3 = 'funding' | 'uta' | 'otc'; -⋮---- -export type GridYesNoV3 = 'yes' | 'no'; -⋮---- -export type GridOrderModeV3 = 'arithmetic' | 'geometric'; -⋮---- -export type GridTypeV3 = 'long' | 'short' | 'neutral' | 'netural'; -⋮---- -export type GridTriggerConditionV3 = 'instant' | 'price' | 'rsi' | 'boll'; -⋮---- -export type GridTerminationConditionV3 = 'rsi' | 'boll'; -⋮---- -export type GridAdjustTypeV3 = 'increase' | 'decrease'; ⋮---- -export interface GridInvestmentAmountV3 { +export interface CTFuturesTraderProfitShare { + profitId: string; coin: string; - amount: string; + profit: string; + nickName: string; + profitTime: string; } ⋮---- -export interface GridIndicatorParamsV3 { - indicatorLength?: string; - threshold?: string; - multiplier?: string; - interval?: string; +export interface CTFuturesTraderProfitShareHistoryV2 { + profitList: CTFuturesTraderProfitShare[]; + endId: string; } ⋮---- -export interface GridBotIdRequestV3 { - botId: string; +export interface CTFuturesTraderSymbolSettingsV2 { + symbol: string; + openTrader: string; + minOpenCount: string; + maxLeverage: string; + stopSurplusRatio: string; + stopLossRatio: string; } ⋮---- -export interface GetGridBotDetailRequestV3 { - botId: string; +export interface CTFuturesTraderMyFollowersV2 { + accountEquity: string; + isRemove: string; + followerHeadPic: string; + followerName: string; + followerUid: string; + followerTime: string; } ⋮---- -export interface GetGridBotOrderDetailsRequestV3 { - category: GridCategoryV3; - botId: string; -} +/** + * + * + * Copy Trading | Future copy trading | Follower Api + * + * + */ ⋮---- -export interface CloseGridBotRequestV3 { - botId: string; -} -⋮---- -export interface AddGridInvestmentRequestV3 { - category: GridCategoryV3; - botId: string; - coin?: string; - size?: string; - fundsSource: GridFundsSourceV3[]; - adjustType?: GridAdjustTypeV3; - reinvestProfit?: GridYesNoV3; +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 CreateGridBotRequestV3 { - category: GridCategoryV3; +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; - maxPrice: string; - minPrice: string; - gridNum: string; - gridOrderMode: GridOrderModeV3; - investmentAmount: GridInvestmentAmountV3[]; - fundsSource?: GridFundsSourceV3[]; - slippage?: string; - autoTransferProfits?: GridYesNoV3; - gridType?: GridTypeV3; - leverage?: string; - autoReserveMargin?: GridYesNoV3; - reservedMargin?: string; - triggerCondition?: GridTriggerConditionV3; - triggerParams?: GridIndicatorParamsV3[]; - triggerPrice?: string; - terminationCondition?: GridTerminationConditionV3; - terminationParams?: GridIndicatorParamsV3[]; - terminationSell?: GridYesNoV3; - stopLoss?: string; - takeProfit?: string; - trailingGrid?: GridYesNoV3; - movingAverageGains?: string; - stopUpwardPrice?: string; - hodlMode?: GridYesNoV3; - marketOpen?: GridYesNoV3; - lossReserve?: GridYesNoV3; + profitRate: string; + netProfit: string; + openOrderId: string; + closeOrderId: string; + openTime: string; + closeTime: string; + traderId: string; + productType: string; } ⋮---- -export type ValidateGridBotRequestV3 = CreateGridBotRequestV3; +export interface CTFuturesFollowerHistoryOrdersV2 { + trackingList: CTFuturesFollowerHistoryOrderV2[]; + endId: string; +} ⋮---- -export interface ModifyGridBotRequestV3 { - botId: string; - category: GridCategoryV3; - takeProfit?: string; - stopLoss?: string; - terminationCondition?: GridTerminationConditionV3; - terminationParams?: GridIndicatorParamsV3[]; - hodlMode?: GridYesNoV3; - autoTransferProfits?: GridYesNoV3; +export interface CTFuturesFollowerSettingV2 { + symbol: string; + productType: string; + marginType: string; + marginCoin: string; + leverType: string; + longLeverage: string; + shortLeverage: string; + traceType: string; } ⋮---- -export interface ModifyGridIntervalRequestV3 { - category: GridCategoryV3; - botId: string; - maxPrice: string; - minPrice: string; - gridNum: string; +export interface CTFuturesFollowerSettingsV2 { + followerEnable: string; + detailList: CTFuturesFollowerSettingV2[]; } ⋮---- -export interface CreateNeutralGridBotRequestV3 { - category: NeutralGridCategoryV3; - symbol: string; - maxPrice: string; - minPrice: string; - gridNum: string; - gridOrderMode: GridOrderModeV3; - fundsSource?: GridFundsSourceV3[]; - leverage?: string; - investmentAmount: GridInvestmentAmountV3[]; - triggerPrice?: string; - stopLoss?: string; - takeProfit?: string; - autoTransferProfits?: GridYesNoV3; +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; } ⋮---- -export type ValidateNeutralGridBotRequestV3 = CreateNeutralGridBotRequestV3; +/** + * + * + * Copy Trading | Spot copy trading | Trader api + * + * + */ ⋮---- -export interface ModifyNeutralGridBotRequestV3 { - botId: string; - category: NeutralGridCategoryV3; - takeProfit?: string; - stopLoss?: string; - autoTransferProfits?: GridYesNoV3; +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 ModifyNeutralGridIntervalRequestV3 { - category: NeutralGridCategoryV3; - botId: string; - maxPrice: string; - minPrice: string; - gridNum: string; +export interface CTSpotTraderHistoryProfitShareItemV2 { + profitId: string; + coin: string; + distributeRatio: string; + profit: string; + followerName: string; + profitTime: string; } ⋮---- -export interface GetNeutralGridBotDetailRequestV3 { - botId: string; +export interface CTSpotTraderHistoryProfitSharingV2 { + endId: string; + profitList: CTSpotTraderHistoryProfitShareItemV2[]; } ⋮---- -export interface GetNeutralGridBotOrderDetailsRequestV3 { - category: NeutralGridCategoryV3 | GridCategoryV3; - botId: string; -} - -================ -File: src/types/request/v3/reality.ts -================ -export interface GetRealityCompanyOverviewRequestV3 { - code: string; +export interface CTSpotTraderUnrealizedProfitV2 { + distributeRatio: string; + coin: string; + profit: string; + followerName: string; } ⋮---- -export interface GetRealityValuationIndicatorsRequestV3 { - code: 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 GetRealityEarningsForecastRequestV3 { - code: string; +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 GetRealitySuspensionResumptionInfoRequestV3 { - code: string; +export interface CTSpotTraderHistoryOrdersV2 { + endId: string; + trackingList: CTSpotTraderHistoryOrderV2[]; } ⋮---- -export interface GetRealityDividendsRequestV3 { - code: string; - limit?: string; - cursor?: string; +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 GetRealityShareCapitalChangeRequestV3 { - code: string; +export interface CTSpotTraderCurrentTrackingOrdersV2 { + endId: string; + trackingList: CTSpotTraderCurrentTrackingOrderV2[]; } ⋮---- -export interface GetRealityInnerTradesRequestV3 { - code: string; - limit?: string; - cursor?: string; +export interface CTSpotTraderFollowerListV2 { + accountEquity: string; + isRemove: string; + followerHeadPic: string | null; + followerName: string; + followerUid: string; + followerTime: string; } ⋮---- -export interface GetRealityExecutiveShareholdingsRequestV3 { - code: string; - limit?: string; - cursor?: string; -} +/** + * + * + * Copy Trading | Spot copy trading | Follower api + * + * + */ ⋮---- -export interface GetRealityShareholdDetailRequestV3 { - code: string; - limit?: string; - cursor?: string; +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 GetRealityStockInfoRequestV3 { - symbol?: string; -} - -================ -File: src/types/request/shared.ts -================ -/** Pagination */ -export interface Pagination { - /** Time after */ - after?: string; - /** Time before */ - before?: string; - /** Elements per page */ - limit?: string; +export interface CTSpotFollowerMyTradersV2 { + resultList: CTSpotFollowerMyTraderV2[]; } ⋮---- -/** Time after */ -⋮---- -/** Time before */ +export interface CTSpotFollowerTradeSettingV2 { + maxTraceAmount: string; + stopLossRation: string; + stopSurplusRation: string; + symbol: string; + traceType: string; +} ⋮---- -/** Elements per page */ +export interface CTSpotFollowerTradeSymbolSettingV2 { + maxStopLossRation: string; + maxStopSurplusRation: string; + maxTraceAmount: string; + maxTraceAmountSystem: string; + maxTraceSize: string; + maxTraceRation: string; + minStopLossRation: string; + minStopSurplusRation: string; + minTraceAmount: string; + minTraceSize: string; + minTraceRation: string; + sliderMaxStopLossRatio: string; + sliderMaxStopSurplusRatio: string; + symbol: string; +} ⋮---- -export type OrderTimeInForce = 'normal' | 'post_only' | 'fok' | 'ioc'; +export interface CTSpotFollowerFollowConfigurationV2 { + enable: string; + profitRate: string; + settledInDays: string; + tradeSettingList: CTSpotFollowerTradeSettingV2[]; + tradeSymbolSettingList: CTSpotFollowerTradeSymbolSettingV2[]; + traderHeadPic: string; + traderName: string; +} ⋮---- -export interface GetHistoricTradesParams { +export interface CTSpotFollowerHistoryOrderV2 { + trackingNo: string; + traderId: string; + fillSize: string; + buyPrice: string; + sellPrice: string; + buyFee: string; + sellFee: string; + achievedPL: string; + achievedPLR: string; symbol: string; - limit?: string; - tradeId?: string; - startTime?: string; - endTime?: string; + buyTime: string; + sellTime: string; +} +export interface CTSpotFollowerHistoryOrdersV2 { + endId: string; + trackingList: CTSpotFollowerHistoryOrderV2[]; } ⋮---- -/** - * 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 interface CTSpotFollowerCurrentOrderV2 { + trackingNo: string; + traderId: string; + buyFillSize: string; + buyDelegateSize: string; + buyPrice: string; + unrealizedPL: string; + buyTime: string; + buyFee: string; + unrealizedPLR: string; + symbol: string; + stopSurplusPrice: string | null; + stopLossPrice: string | null; +} ⋮---- -export type FuturesPlanTypeV2 = - | 'profit_plan' - | 'loss_plan' - | 'moving_plan' - | 'pos_profit' - | 'pos_loss'; +export interface CTSpotFollowerCurrentOrdersV2 { + endId: string; + trackingList: CTSpotFollowerCurrentOrderV2[]; +} ================ -File: src/types/response/v2/copy-trading.ts +File: src/types/response/v2/margin.ts ================ /** * - * - * Copy Trading | Future copy trading | Trader Api - * + * * Margin | Common * */ ⋮---- -export interface CTFuturesTraderCurrentOrderV2 { - trackingNo: string; - openOrderId: string; +export interface MarginCurrencyV2 { symbol: string; - posSide: string; - openLeverage: string; - openPriceAvg: string; - openTime: string; - openSize: string; - presetStopSurplusPrice: string; - presetStopLossPrice: string; - openFee: string; - followCount: string; + baseCoin: string; + quoteCoin: string; + maxCrossedLeverage: string; + maxIsolatedLeverage: string; + warningRiskRatio: string; + liquidationRiskRatio: string; + minTradeAmount: string; + maxTradeAmount: string; + takerFeeRate: string; + makerFeeRate: string; + pricePrecision: string; + quantityPrecision: string; + minTradeUSDT: string; + isBorrowable: boolean; + userMinBorrow: string; + status: string; + isIsolatedBaseBorrowable: boolean; + isIsolatedQuoteBorrowable: boolean; + isCrossBorrowable: boolean; } ⋮---- -export interface CTFuturesTraderCurrentOrdersV2 { - trackingList: CTFuturesTraderCurrentOrderV2[]; - endId: string; +/** + * + * * Margin | Cross/Isolated | Order Record + * + */ +⋮---- +export interface MarginBorrowHistoryItemV2 { + loanId: string; + coin: string; + borrowAmount: string; + borrowType: string; + cTime: string; + uTime: string; } ⋮---- -export interface CTFuturesTraderHistoryOrderV2 { - trackingNo: string; +export interface MarginRepaymentHistoryItemV2 { + repayId: string; + coin: string; + repayAmount: string; + repayType: string; + repayInterest: string; + repayPrincipal: 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; + uTime: string; } ⋮---- -export interface CTFuturesTraderHistoryOrderV2 { - trackingList: CTFuturesTraderHistoryOrderV2[]; - endId: string; +export interface MarginInterestHistoryItemV2 { + interestId: string; + interestCoin: string; + dailyInterestRate: string; + loanCoin: string; + interestAmount: string; + interstType: string; + symbol: string; + cTime: string; + uTime: string; } ⋮---- -export interface CTRateCTimeV2 { - rate: string; - ctime: string; +export interface MarginLiquidationHistoryItemV2 { + liqId: string; + symbol: string; + liqStartTime: string; + liqEndTime: string; + liqRiskRatio: string; + totalAssets: string; + totalDebt: string; + liqFee: string; + cTime: string; + uTime: string; } ⋮---- -export interface CTAmountCTimeV2 { +export interface MarginFinancialHistoryItemV2 { + coin: string; + symbol: string; + marginId: string; amount: string; - ctime: string; + balance: string; + fee: string; + marginType: string; + cTime: string; + uTime: 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; -} +/** + * + * * Margin | Cross/Isolated | Account + * + */ ⋮---- -export interface CTFuturesTraderProfitHistoryItemV2 { +export interface MarginAccountAssetV2 { + symbol: string; coin: string; - profitCount: string; - lastProfitTime: string; -} -⋮---- -export interface CTFuturesTraderHistoryProfitSummaryV2 { - profitSummary: { - yesterdayProfit: string; - sumProfit: string; - waitProfit: string; - yesterdayTime: string; - }; - profitHistoryList: CTFuturesTraderProfitHistoryItemV2[]; + totalAmount: string; + available: string; + frozen: string; + borrow: string; + interest: string; + net: string; + coupon: string; + cTime: string; + uTime: string; } ⋮---- -export interface CTFuturesTraderProfitShare { - profitId: string; +export interface CrossMaxBorrowableResponseV2 { coin: string; - profit: string; - nickName: string; - profitTime: string; -} -⋮---- -export interface CTFuturesTraderProfitShareHistoryV2 { - profitList: CTFuturesTraderProfitShare[]; - endId: string; + maxBorrowableAmount: string; } ⋮---- -export interface CTFuturesTraderSymbolSettingsV2 { +export interface IsolatedMaxBorrowableResponseV2 { symbol: 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; + baseCoin: string; + baseCoinMaxBorrowAmount: string; + quoteCoin: string; + quoteCoinMaxBorrowAmount: string; } ⋮---- -/** - * - * - * Copy Trading | Future copy trading | Follower Api - * - * - */ -⋮---- -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 CrossMaxTransferableResponseV2 { + coin: string; + maxTransferOutAmount: string; } ⋮---- -export interface CTFuturesFollowerHistoryOrderV2 { - trackingNo: string; - posSide: string; - openLeverage: string; - openSize: string; - closeSize: string; - openPriceAvg: string; - closePriceAvg: string; - achievedPL: string; - openFee: string; - closeFee: string; +export interface IsolatedMaxTransferableResponseV2 { + baseCoin: string; symbol: string; - profitRate: string; - netProfit: string; - openOrderId: string; - closeOrderId: string; - openTime: string; - closeTime: string; - traderId: string; - productType: string; + baseCoinMaxTransferOutAmount: string; + quoteCoin: string; + quoteCoinMaxTransferOutAmount: string; } ⋮---- -export interface CTFuturesFollowerHistoryOrdersV2 { - trackingList: CTFuturesFollowerHistoryOrderV2[]; - endId: string; +export interface CrossInterestRateAndLimitResponseV2 { + transferable: boolean; + leverage: string; + coin: string; + borrowable: boolean; + dailyInterestRate: string; + annualInterestRate: string; + maxBorrowableAmount: string; + vipList: { + level: string; + limit: string; + dailyInterestRate: string; + annualInterestRate: string; + discountRate: string; + }[]; } ⋮---- -export interface CTFuturesFollowerSettingV2 { +export interface IsolatedInterestRateAndLimitResponseV2 { symbol: string; - productType: string; - marginType: string; - marginCoin: string; - leverType: string; - longLeverage: string; - shortLeverage: string; - traceType: string; + leverage: string; + baseCoin: string; + baseTransferable: boolean; + baseBorrowable: boolean; + baseDailyInterestRate: string; + baseAnnuallyInterestRate: string; + baseMaxBorrowableAmount: string; + baseVipList: { + level: string; + dailyInterestRate: string; + limit: string; + annuallyInterestRate: string; + discountRate: string; + }[]; + quoteCoin: string; + quoteTransferable: boolean; + quoteBorrowable: boolean; + quoteDailyInterestRate: string; + quoteAnnuallyInterestRate: string; + quoteMaxBorrowableAmount: string; + quoteList: { + level: string; + dailyInterestRate: string; + limit: string; + annuallyInterestRate: string; + discountRate: string; + }[]; } ⋮---- -export interface CTFuturesFollowerSettingsV2 { - followerEnable: string; - detailList: CTFuturesFollowerSettingV2[]; +export interface CrossTierConfigurationResponseV2 { + tier: string; + leverage: string; + coin: string; + maxBorrowableAmount: string; + maintainMarginRate: string; } ⋮---- -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; +export interface IsolatedTierConfigurationResponseV2 { + tier: string; + symbol: string; + leverage: string; + baseCoin: string; + quoteCoin: string; + baseMaxBorrowableAmount: string; + quoteMaxBorrowableAmount: string; + maintainMarginRate: string; + initRate: string; } ⋮---- /** * - * - * Copy Trading | Spot copy trading | Trader api - * + * * Margin | Cross/Isolated | Trade * */ ⋮---- -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 MarginBatchOrdersResponseV2 { + successList: { + orderId: string; + clientOid: string; + }[]; + failureList: { + clientOid: string; + errorMsg: 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 MarginCurrentOrderV2 { + orderId: string; + symbol: string; + orderType: string; + enterPointSource: string; + clientOid: string; + loanType: string; + price: string; + side: string; + status: string; + baseSize: string; + quoteSize: string; + priceAvg: string; + size: string; + amount: string; + force: string; + cTime: string; + uTime: string; } ⋮---- -export interface CTSpotTraderUnrealizedProfitV2 { - distributeRatio: string; - coin: string; - profit: string; - followerName: string; +export interface MarginHistoryOrderV2 { + orderId: string; + symbol: string; + orderType: string; + enterPointSource: string; + clientOid: string; + loanType: string; + price: string; + side: string; + status: string; + baseSize: string; + quoteSize: string; + priceAvg: string; + size: string; + amount: string; + force: string; + cTime: string; + uTime: 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 MarginOrderFillV2 { + orderId: string; + tradeId: string; + orderType: string; + side: string; + priceAvg: string; + size: string; + amount: string; + tradeScope: string; + feeDetail: { + deduction: string; + feeCoin: string; + totalDeductionFee: string; + totalFee: string; + }; + cTime: string; + uTime: string; } ⋮---- -export interface CTSpotTraderHistoryOrderV2 { - trackingNo: string; - fillSize: string; - buyPrice: string; - sellPrice: string; - achievedPL: string; - buyTime: string; - sellTime: string; - buyFee: string; - sellFee: string; - achievedPLR: string; +export interface MarginLiquidationOrderV2 { symbol: string; - netProfit: string; - followCount: string; -} -export interface CTSpotTraderHistoryOrdersV2 { - endId: string; - trackingList: CTSpotTraderHistoryOrderV2[]; -} -⋮---- -export interface CTSpotTraderCurrentTrackingOrderV2 { - trackingNo: string; + orderType: string; + side: string; + priceAvg: string; + price: string; + fillSize: string; + size: string; + amount: string; orderId: string; - buyFillSize: string; - buyDelegateSize: string; - buyPrice: string; - unrealizedPL: string; - buyTime: string; - buyFee: string; - unrealizedPLR: string; + fromCoin: string; + toCoin: string; + fromSize: string; + toSize: string; + cTime: string; + uTime: string; +} + +================ +File: src/types/websockets/ws-api-response.ts +================ +export interface WSAPIPlaceOrderResponseV3 { symbol: string; - stopLossPrice: string | null; - stopSurplusPrice: string | null; - followCount: string; + orderId: string; + clientOid: string; + cTime: string; } + +================ +File: src/websocket-client-v2.ts +================ +import { + WSOperation, + WSOperationLoginParams, + WsRequestOperationBitget, +} from './types/websockets/ws-api.js'; +import { MessageEventLike } from './types/websockets/ws-events.js'; +import { + BitgetInstTypeV2, + WsKey, + WsTopicV2, +} from './types/websockets/ws-general.js'; +import { + BaseWebsocketClient, + EmittableEvent, + MidflightWsRequestEvent, +} from './util/BaseWSClient.js'; +import { isWsPong } from './util/requestUtils.js'; +import { + SignAlgorithm, + SignEncodeMethod, + signMessage, +} from './util/webCryptoAPI.js'; +import { + getMaxTopicsPerSubscribeEvent, + getNormalisedTopicRequests, + getWsUrl, + isPrivateChannel, + WS_AUTH_ON_CONNECT_KEYS, + WS_KEY_MAP, + WsTopicRequest, +} from './util/websocket-util.js'; +import { WSConnectedResult } from './util/WsStore.types.js'; ⋮---- -export interface CTSpotTraderCurrentTrackingOrdersV2 { - endId: string; - trackingList: CTSpotTraderCurrentTrackingOrderV2[]; -} +export class WebsocketClientV2 extends BaseWebsocketClient< ⋮---- -export interface CTSpotTraderFollowerListV2 { - accountEquity: string; - isRemove: string; - followerHeadPic: string | null; - followerName: string; - followerUid: string; - followerTime: string; -} +WsRequestOperationBitget // subscribe requests have an "args" parameter with an object within ⋮---- /** - * - * - * Copy Trading | Spot copy trading | Follower api - * - * - */ + * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library + */ +public connectAll(): Promise[] ⋮---- -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; -} +/** Some private channels use `coin` instead of `instId`. This method handles building the sub/unsub request */ +private getSubRequest( + instType: BitgetInstTypeV2, + topic: WsTopicV2, + coin: string = 'default', +): WsTopicRequest ⋮---- -export interface CTSpotFollowerMyTradersV2 { - resultList: CTSpotFollowerMyTraderV2[]; -} +/** + * Subscribe to a topic + * @param instType instrument type (refer to API docs). + * @param topic topic name (e.g. "ticker"). + * @param instId instrument ID (e.g. "BTCUSDT"). Use "default" for private topics. + */ +public subscribeTopic( + instType: BitgetInstTypeV2, + topic: WsTopicV2, + coin: string = 'default', +) ⋮---- -export interface CTSpotFollowerTradeSettingV2 { - maxTraceAmount: string; - stopLossRation: string; - stopSurplusRation: string; - symbol: string; - traceType: string; -} +/** + * Unsubscribe from a topic + * @param instType instrument type (refer to API docs). + * @param topic topic name (e.g. "ticker"). + * @param instId instrument ID (e.g. "BTCUSDT"). Use "default" for private topics to get all symbols. + */ +public unsubscribeTopic( + instType: BitgetInstTypeV2, + topic: WsTopicV2, + coin: string = 'default', +) ⋮---- -export interface CTSpotFollowerTradeSymbolSettingV2 { - maxStopLossRation: string; - maxStopSurplusRation: string; - maxTraceAmount: string; - maxTraceAmountSystem: string; - maxTraceSize: string; - maxTraceRation: string; - minStopLossRation: string; - minStopSurplusRation: string; - minTraceAmount: string; - minTraceSize: string; - minTraceRation: string; - sliderMaxStopLossRatio: string; - sliderMaxStopSurplusRatio: string; - symbol: string; -} +/** + * Request subscription to one or more topics. Pass topics as either an array of strings, + * or array of objects (if the topic has parameters). + * + * Objects should be formatted as {topic: string, params: object, category: CategoryV5}. + * + * - Subscriptions are automatically routed to the correct websocket connection. + * - Authentication/connection is automatic. + * - Resubscribe after network issues is automatic. + * + * Call `unsubscribe(topics)` to remove topics + */ +public subscribe( + requests: + | (WsTopicRequest | WsTopicV2) + | (WsTopicRequest | WsTopicV2)[], + wsKey: WsKey, +): Promise ⋮---- -export interface CTSpotFollowerFollowConfigurationV2 { - enable: string; - profitRate: string; - settledInDays: string; - tradeSettingList: CTSpotFollowerTradeSettingV2[]; - tradeSymbolSettingList: CTSpotFollowerTradeSymbolSettingV2[]; - traderHeadPic: string; - traderName: string; -} +/** + * Unsubscribe from one or more topics. Similar to subscribe() but in reverse. + * + * - Requests are automatically routed to the correct websocket connection. + * - These topics will be removed from the topic cache, so they won't be subscribed to again. + */ +public unsubscribe( + requests: + | (WsTopicRequest | WsTopicV2) + | (WsTopicRequest | WsTopicV2)[], + wsKey: WsKey, +) ⋮---- -export interface CTSpotFollowerHistoryOrderV2 { - trackingNo: string; - traderId: string; - fillSize: string; - buyPrice: string; - sellPrice: string; - buyFee: string; - sellFee: string; - achievedPL: string; - achievedPLR: string; - symbol: string; - buyTime: string; - sellTime: string; -} -export interface CTSpotFollowerHistoryOrdersV2 { - endId: string; - trackingList: CTSpotFollowerHistoryOrderV2[]; -} +/** + * + * + * Internal methods required to integrate with the BaseWSClient + * + * + */ ⋮---- -export interface CTSpotFollowerCurrentOrderV2 { - trackingNo: string; - traderId: string; - buyFillSize: string; - buyDelegateSize: string; - buyPrice: string; - unrealizedPL: string; - buyTime: string; - buyFee: string; - unrealizedPLR: string; - symbol: string; - stopSurplusPrice: string | null; - stopLossPrice: string | null; -} +protected sendPingEvent(wsKey: WsKey): void ⋮---- -export interface CTSpotFollowerCurrentOrdersV2 { - endId: string; - trackingList: CTSpotFollowerCurrentOrderV2[]; -} - -================ -File: src/types/response/v2/margin.ts -================ -/** - * - * * Margin | Common - * - */ +protected sendPongEvent(wsKey: WsKey): void ⋮---- -export interface MarginCurrencyV2 { - symbol: string; - baseCoin: string; - quoteCoin: string; - maxCrossedLeverage: string; - maxIsolatedLeverage: string; - warningRiskRatio: string; - liquidationRiskRatio: string; - minTradeAmount: string; - maxTradeAmount: string; - takerFeeRate: string; - makerFeeRate: string; - pricePrecision: string; - quantityPrecision: string; - minTradeUSDT: string; - isBorrowable: boolean; - userMinBorrow: string; - status: string; - isIsolatedBaseBorrowable: boolean; - isIsolatedQuoteBorrowable: boolean; - isCrossBorrowable: boolean; -} +protected isWsPing(data: any): boolean ⋮---- -/** - * - * * Margin | Cross/Isolated | Order Record - * - */ +protected isWsPong(data: any): boolean ⋮---- -export interface MarginBorrowHistoryItemV2 { - loanId: string; - coin: string; - borrowAmount: string; - borrowType: string; - cTime: string; - uTime: string; -} +protected isPrivateTopicRequest( + _request: WsTopicRequest, + wsKey: WsKey, +): boolean ⋮---- -export interface MarginRepaymentHistoryItemV2 { - repayId: string; - coin: string; - repayAmount: string; - repayType: string; - repayInterest: string; - repayPrincipal: string; - symbol: string; - cTime: string; - uTime: string; -} +protected getPrivateWSKeys(): WsKey[] ⋮---- -export interface MarginInterestHistoryItemV2 { - interestId: string; - interestCoin: string; - dailyInterestRate: string; - loanCoin: string; - interestAmount: string; - interstType: string; - symbol: string; - cTime: string; - uTime: string; -} +protected isAuthOnConnectWsKey(wsKey: WsKey): boolean ⋮---- -export interface MarginLiquidationHistoryItemV2 { - liqId: string; - symbol: string; - liqStartTime: string; - liqEndTime: string; - liqRiskRatio: string; - totalAssets: string; - totalDebt: string; - liqFee: string; - cTime: string; - uTime: string; -} +protected async getWsUrl(wsKey: WsKey): Promise ⋮---- -export interface MarginFinancialHistoryItemV2 { - coin: string; - symbol: string; - marginId: string; - amount: string; - balance: string; - fee: string; - marginType: string; - cTime: string; - uTime: string; -} +protected getMaxTopicsPerSubscribeEvent(wsKey: WsKey): number | null ⋮---- /** - * - * * Margin | Cross/Isolated | Account - * - */ + * @returns one or more correctly structured request events for performing a operations over WS. This can vary per exchange spec. + */ +protected async getWsRequestEvents( + operation: WSOperation, + requests: WsTopicRequest[], +): Promise>[]> ⋮---- -export interface MarginAccountAssetV2 { - symbol: string; - coin: string; - totalAmount: string; - available: string; - frozen: string; - borrow: string; - interest: string; - net: string; - coupon: string; - cTime: string; - uTime: string; -} +// Previously used to track topics in a request. Keeping this for subscribe/unsubscribe requests, no need for incremental values ⋮---- -export interface CrossMaxBorrowableResponseV2 { - coin: string; - maxBorrowableAmount: string; -} +/** + { + "op":"subscribe", + "args":[ + { + "instType":"SPOT", + "channel":"ticker", + "instId":"BTCUSDT" + }, + { + "instType":"SPOT", + "channel":"candle5m", + "instId":"BTCUSDT" + } + ] + } + */ ⋮---- -export interface IsolatedMaxBorrowableResponseV2 { - symbol: string; - baseCoin: string; - baseCoinMaxBorrowAmount: string; - quoteCoin: string; - quoteCoinMaxBorrowAmount: string; -} +// const request = { +// topic: 'ticker', +// payload: { instType: 'SPOT', instId: 'BTCUSDT' }, +// }; +// becomes: +// const request = { +// channel: 'ticker', +// instType: 'SPOT', +// instId: 'BTCUSDT', +// }; ⋮---- -export interface CrossMaxTransferableResponseV2 { - coin: string; - maxTransferOutAmount: string; -} +private async getWsAuthSignature( + wsKey: WsKey, +): Promise< ⋮---- -export interface IsolatedMaxTransferableResponseV2 { - baseCoin: string; - symbol: string; - baseCoinMaxTransferOutAmount: string; - quoteCoin: string; - quoteCoinMaxTransferOutAmount: string; -} -⋮---- -export interface CrossInterestRateAndLimitResponseV2 { - transferable: boolean; - leverage: string; - coin: string; - borrowable: boolean; - dailyInterestRate: string; - annualInterestRate: string; - maxBorrowableAmount: string; - vipList: { - level: string; - limit: string; - dailyInterestRate: string; - annualInterestRate: string; - discountRate: string; - }[]; -} +private async signMessage( + paramsStr: string, + secret: string, + method: SignEncodeMethod, + algorithm: SignAlgorithm, +): Promise ⋮---- -export interface IsolatedInterestRateAndLimitResponseV2 { - symbol: string; - leverage: string; - baseCoin: string; - baseTransferable: boolean; - baseBorrowable: boolean; - baseDailyInterestRate: string; - baseAnnuallyInterestRate: string; - baseMaxBorrowableAmount: string; - baseVipList: { - level: string; - dailyInterestRate: string; - limit: string; - annuallyInterestRate: string; - discountRate: string; - }[]; - quoteCoin: string; - quoteTransferable: boolean; - quoteBorrowable: boolean; - quoteDailyInterestRate: string; - quoteAnnuallyInterestRate: string; - quoteMaxBorrowableAmount: string; - quoteList: { - level: string; - dailyInterestRate: string; - limit: string; - annuallyInterestRate: string; - discountRate: string; - }[]; -} +protected async getWsAuthRequestEvent( + wsKey: WsKey, +): Promise> ⋮---- -export interface CrossTierConfigurationResponseV2 { - tier: string; - leverage: string; - coin: string; - maxBorrowableAmount: string; - maintainMarginRate: string; -} +/** + * Abstraction called to sort ws events into emittable event types (response to a request, data update, etc) + */ +protected resolveEmittableEvents( + wsKey: WsKey, + event: MessageEventLike, +): EmittableEvent[] ⋮---- -export interface IsolatedTierConfigurationResponseV2 { - tier: string; - symbol: string; - leverage: string; - baseCoin: string; - quoteCoin: string; - baseMaxBorrowableAmount: string; - quoteMaxBorrowableAmount: string; - maintainMarginRate: string; - initRate: string; -} +// v2 event processing ⋮---- -/** - * - * * Margin | Cross/Isolated | Trade - * - */ +// v2 authentication event ⋮---- -export interface MarginBatchOrdersResponseV2 { - successList: { - orderId: string; - clientOid: string; - }[]; - failureList: { - clientOid: string; - errorMsg: string; - }[]; -} +// messageType: typeof msg, +// messageString: JSON.stringify(msg), ⋮---- -export interface MarginCurrentOrderV2 { - orderId: string; - symbol: string; - orderType: string; - enterPointSource: string; - clientOid: string; - loanType: string; - price: string; - side: string; - status: string; - baseSize: string; - quoteSize: string; - priceAvg: string; - size: string; - amount: string; - force: string; - cTime: string; - uTime: string; -} +// messageType: typeof msg, +// messageString: JSON.stringify(msg), ⋮---- -export interface MarginHistoryOrderV2 { - orderId: string; - symbol: string; - orderType: string; - enterPointSource: string; - clientOid: string; - loanType: string; - price: string; - side: string; - status: string; - baseSize: string; - quoteSize: string; - priceAvg: string; - size: string; - amount: string; - force: string; - cTime: string; - uTime: string; -} +// fallback emit anyway ⋮---- -export interface MarginOrderFillV2 { - orderId: string; - tradeId: string; - orderType: string; - side: string; - priceAvg: string; - size: string; - amount: string; - tradeScope: string; - feeDetail: { - deduction: string; - feeCoin: string; - totalDeductionFee: string; - totalFee: string; - }; - cTime: string; - uTime: string; +/** + * @deprecrated not supported by Bitget's V2 API offering + */ +async sendWSAPIRequest(): Promise + +================ +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 +================ +{ + "esversion": 8, + "asi": true, + "laxbreak": true, + "predef": [ "-Promise" ] } -⋮---- -export interface MarginLiquidationOrderV2 { - symbol: string; - orderType: string; - side: string; - priceAvg: string; - price: string; - fillSize: string; - size: string; - amount: string; - orderId: string; - fromCoin: string; - toCoin: string; - fromSize: string; - toSize: string; - cTime: string; - uTime: string; + +================ +File: .prettierrc +================ +{ + "tabWidth": 2, + "singleQuote": true, + "trailingComma": "all" } ================ -File: src/types/response/v3/cfd.ts +File: jest.config.ts ================ -import type { CfdOrderTypeV3, CfdSideV3 } from '../../request/v3/cfd.js'; +/** + * For a detailed explanation regarding each configuration property, visit: + * https://jestjs.io/docs/configuration + */ ⋮---- -export interface CfdTickerV3 { - symbol: string; - openPriceChange: string; - highPrice: string; - lowPrice: string; - quoteTime: string; -} +import type { Config } from 'jest'; ⋮---- -export interface CfdCandlestickV3 extends Array { - 0: string; - 1: string; - 2: string; - 3: string; - 4: string; -} +// All imported modules in your tests should be mocked automatically +// automock: false, ⋮---- -export interface PlaceCfdOrderResponseV3 { - trxId: string; -} +// Stop running tests after `n` failures +// bail: 0, +bail: false, // enable to stop test when an error occur, ⋮---- -export interface ModifyCfdOrderResponseV3 { - orderId: string; -} +// The directory where Jest should store its cached dependency information +// cacheDirectory: "/private/var/folders/kf/2k3sz4px6c9cbyzj1h_b192h0000gn/T/jest_dx", ⋮---- -export interface CfdUnfilledOrderV3 { - symbol: string; - orderType: CfdOrderTypeV3 | string; - side: CfdSideV3 | string; - price: string; - qty: string; - takeProfit?: string; - stopLoss?: string; - trxId: string; - orderId: string; -} +// Automatically clear mock calls, instances, contexts and results before every test ⋮---- -export interface CfdHistoryOrderV3 { - symbol: string; - orderType: CfdOrderTypeV3 | string; - side: CfdSideV3 | string; - price: string; - qty: string; - cumExecQty?: string; - takeProfit?: string; - stopLoss?: string; - status: string; - trxId: string; - orderId: string; -} +// Indicates whether the coverage information should be collected while executing the test ⋮---- -export interface CfdOrderHistoryV3 { - list: CfdHistoryOrderV3[]; -} +// An array of glob patterns indicating a set of files for which coverage information should be collected ⋮---- -export interface CfdCurrentPositionV3 { - positionId: string; - symbol: string; - orderType: CfdOrderTypeV3 | string; - side: CfdSideV3 | string; - qty: string; - openPrice: string; - takeProfit?: string; - stopLoss?: string; - interest: string; - unrealizedPnl: string; - totalProfit: string; -} +// The directory where Jest should output its coverage files ⋮---- -export interface CfdFundDetailV3 { - leverage: string; - balance: string; - credit: string; - marginStopOut: string; - marginUsed: string; - marginCall: string; - marginFree: string; - marginLevel: string; - equity: string; - pnl: string; - status: string; - swap: string; - frozen: string; - currency: string; -} +// An array of regexp pattern strings used to skip coverage collection +// coveragePathIgnorePatterns: [ +// "/node_modules/" +// ], ⋮---- -export interface CfdTransferResponseV3 { - transferId: string; -} +// Indicates which provider should be used to instrument code for coverage ⋮---- -export interface CfdTransferRecordV3 { - transferId: string; - coin: string; - amount: string; - direction: string; - status: string; - accountType: string; - createdTime: string; - updatedTime: string; -} +// A list of reporter names that Jest uses when writing coverage reports +// coverageReporters: [ +// "json", +// "text", +// "lcov", +// "clover" +// ], ⋮---- -export interface CfdTransferRecordsV3 { - list: CfdTransferRecordV3[]; - cursor?: string; -} +// An object that configures minimum threshold enforcement for coverage results +// coverageThreshold: undefined, ⋮---- -export interface CfdFinancialRecordV3 { - id: string | number; - symbol: string; - side: string | number; - qty: string | number; - swap: string | number; - fee: string | number; - cashFlow: string | number; - balanceBefore: string | number; - balanceChange: string | number; - balanceAfter: string | number; - creditBefore: string | number; - creditChange: string | number; - creditAfter: string | number; - openPrice: string | number; - closePrice: string | number; - orderId: string | number; - ts: string | number; -} +// A path to a custom dependency extractor +// dependencyExtractor: undefined, ⋮---- -export interface CfdInstrumentV3 { - symbol: string; - onlineTime: string; - currency: string; - digits: string; - spread: string; - contractSize: string; - marginCurrency: string; - profitCurrency: string; - stopLevel: string; - enable: string; - marginPercent: string; - initialMargin: string; - marginMode: string; - maintMargin: string; - maintMarginRateBuy: string; - maintMarginRateSell: string; - initialMarginRateBuy: string; - initialMarginRateSell: string; - maxVolume: string; - minVolume: string; - stepVolume: string; - priceCurrency: string; - tickSize: string; - tickValue: string; - leverage: string; - tradeTime: string; - commissionType: string; - commissionRate: string; - symbolCategory: string; - exchangeRate: string; - marginUsdRate: string; -} - -================ -File: src/types/response/v3/grid.ts -================ -import type { GridIndicatorParamsV3 } from '../../request/v3/grid.js'; +// Make calling deprecated APIs throw helpful error messages +// errorOnDeprecated: false, ⋮---- -export interface GridBotIdResponseV3 { - botId: string; -} +// The default configuration for fake timers +// fakeTimers: { +// "enableGlobally": false +// }, ⋮---- -export interface GridValidateResponseV3 { - valid: string; - reason?: string; - minInvestment?: string; -} +// Force coverage collection from ignored files using an array of glob patterns +// forceCoverageMatch: [], ⋮---- -export interface GridBotOrderItemV3 { - orderId: string; - delegateCount: string; - delegatePrice: string; - changeRequired: number | string; -} +// A path to a module which exports an async function that is triggered once before all test suites +// globalSetup: undefined, ⋮---- -export interface GridBotOrderDetailsV3 { - botId: string; - symbol: string; - buyOrderList: GridBotOrderItemV3[]; - sellOrderList: GridBotOrderItemV3[]; -} +// A path to a module which exports an async function that is triggered once after all test suites +// globalTeardown: undefined, ⋮---- -export interface GridBotDetailV3 { - botId: string; - symbol: string; - status: string; - totalProfit: string; - roi: string; - gridProfit: string; - gridProfitRate: string; - unpairedProfit: string; - unpairedProfitRate: string; - margin?: string; - arbitrageAPR: string; - totalAPR: string; - createdTime: string; - runningTime: string; - currentBaseBalance?: string; - currentQuoteBalance?: string; - initialBaseHoldings?: string; - initialQuoteHoldings?: string; - reservedBaseTradingFee?: string; - reservedQuoteTradingFee?: string; - gridStartPrice?: string; - gridType?: string; - maxPrice: string; - minPrice: string; - gridNum: string; - gridOrderMode: string; - baseInvestmentCoin?: string; - baseInvestmentAmount?: string; - quoteInvestmentCoin?: string; - quoteInvestmentAmount?: string; - slippage?: string; - triggerCondition?: string; - triggerParams?: GridIndicatorParamsV3[]; - triggerPrice?: string; - terminationCondition?: string; - terminationParams?: GridIndicatorParamsV3[]; - terminationSell?: string; - stopLoss?: string; - takeProfit?: string; - hodlMode?: string; - autoTransferProfits?: string; - arbitrageCount?: string; - terminationReason?: string; -} +// A set of global variables that need to be available in all test environments +// globals: {}, ⋮---- -export interface NeutralGridBotDetailV3 { - botId: string; - symbol: string; - status: string; - totalProfit: string; - roi: string; - gridProfit: string; - gridProfitRate: string; - unpairedProfit: string; - unpairedProfitRate: string; - margin?: string; - arbitrageAPR: string; - totalAPR: string; - createdTime: string; - runningTime: string; - gridStartPrice?: string; - maxPrice: string; - minPrice: string; - gridNum: string; - gridOrderMode: string; - triggerPrice?: string; - leverage?: string; - stopLoss?: string; - takeProfit?: string; - holdPosition?: string; - oneGridMinProfit?: string; - oneGridMaxProfit?: string; - autoTransferProfits?: string; -} - -================ -File: src/types/response/v3/reality.ts -================ -export interface RealityCompanyOverviewV3 { - peRatio: string; - pbRatio: string; - totalShares: string; - marketCap: string; - high52Week: string; - low52Week: string; - code: string; - name: string; - ListingDate: string; - employees: string; - companyAddress: string; -} -⋮---- -export interface RealityValuationIndicatorsV3 { - date: string; - pb: string; - pbEd: string; - pbPd: string; - pbMrq: string; - pe: string; - peLyr: string; - peTtmEd: string; - peTtmPd: string; - ps: string; - psLyr: string; - psTtmEd: string; - psTtmPd: string; - pcf: string; - pcfNet: string; - pcfNetTtmEd: string; - pcfNetTtmPd: string; - pcfTtmEd: string; - pcfTtmPd: string; - evEbitda: string; - equityValue: string; - grossEv: string; - netEv: string; - tmvUsd: string; - cirTmvUsd: string; - dividendYieldTtm: string; -} +// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers. +// maxWorkers: "50%", ⋮---- -export interface RealityEarningsForecastV3 { - fiscalYear: string; - publicationDeadline: string; - isActual: boolean; - revenue: string; - ebit: string; - netIncomeParent: string; - eps: string; - bps: string; - cfps: string; - roe: string; - roa: string; - currency: string; -} +// An array of directory names to be searched recursively up from the requiring module's location +// moduleDirectories: [ +// "node_modules" +// ], ⋮---- -export interface RealitySuspensionResumptionInfoV3 { - code: string; - name: string; - suspensionDate: string; - suspensionTime: string; - suspensionReason: string; - suspensionPrice: string; - resumptionDate: string; - resumptionQuoteTime: string; - resumptionTradingTime: string; -} +// An array of file extensions your modules use ⋮---- -export interface RealityDividendItemV3 { - type: string; - announcementDate: string; - recordDate: string; - exrightDate: string; - dividendDate: string; - dividendPerShare: string; - stockDividendPerShare: string; - splitValidDate: string; - splitNumerator: string; - splitDenominator: string; -} +// modulePaths: ['src'], ⋮---- -export interface RealityShareCapitalChangeV3 { - announcementDate: string; - changeDate: string; - totalShares: string; - commonShares: string; - preferredShares: string; - otherShares: string; - specialExplain: string; - changeReason: string; -} +// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module +// moduleNameMapper: {}, ⋮---- -export interface RealityInnerTradeItemV3 { - reporterName: string; - issueOrgName: string; - endDate: string; - announcementDate: string; - innerType: string; - position: string; - securityTitle: string; - tradeDate: string; - designatedExerciseDate: string; - innerTradeType: string; - actionType: string; - tradeVolume: string; - tradePrice: string; - holdingType: string; - indirectHoldingStatement: string; - postTradeQuantity: string; -} +// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader +// modulePathIgnorePatterns: [], ⋮---- -export interface RealityExecutiveShareholdingItemV3 { - name: string; - holdingNum: string; - holdingRatio: string; - voteRatio: string; - period: string; - announcementDate: string; -} +// Activates notifications for test results +// notify: false, ⋮---- -export interface RealityShareholdDetailItemV3 { - name: string; - holdingNum: string; - holdingRatio: string; -} +// An enum that specifies notification mode. Requires { notify: true } +// notifyMode: "failure-change", ⋮---- -export interface RealityCursorListV3 { - list: T[]; - cursor?: string; -} +// A preset that is used as a base for Jest's configuration +// preset: undefined, ⋮---- -export interface RealityStockInfoV3 { - symbol: string; - code: string; - name: string; - tradingPeriod: string[]; - weekendTradable: 'yes' | 'no' | string; -} +// Run tests from one or more projects +// projects: undefined, ⋮---- -export interface RealityMarketSessionStateV3 { - state: string; - timeZone: string; - startTime: string; - endTime: string; -} +// Use this configuration option to add custom reporters to Jest +// reporters: undefined, ⋮---- -export interface RealityMarketStateV3 { - market: string; - daylightType: string; - stateList: RealityMarketSessionStateV3[]; -} +// Automatically reset mock state before every test +// resetMocks: false, ⋮---- -export interface RealityMarketSpecificConfigV3 { - remark: string; - startTime: string; - endTime: string; -} +// Reset the module registry before running each individual test +// resetModules: false, ⋮---- -export interface RealityMarketCalendarV3 { - timeZone: string; - specificConfig: RealityMarketSpecificConfigV3[]; - regularConfig: string[]; -} - -================ -File: src/types/websockets/ws-api-response.ts -================ -export interface WSAPIPlaceOrderResponseV3 { - symbol: string; - orderId: string; - clientOid: string; - cTime: string; -} - -================ -File: src/websocket-api-client.ts -================ -import { - CancelOrderRequestV3, - ModifyOrderRequestV3, -} from './types/request/v3/trade.js'; -import { - CancelOrderResponseV3, - ModifyOrderResponseV3, -} 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'; +// A path to a custom resolver +// resolver: undefined, ⋮---- -/** - * 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; -} +// Automatically restore mock state and implementation before every test +// restoreMocks: false, ⋮---- -/** - * 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(....)`. - */ -⋮---- -/** - * 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 -⋮---- -constructor( - options?: WSClientConfigurableOptions & - Partial, - logger?: DefaultLogger, -) -⋮---- -public getWSClient(): WebsocketClientV3 +// The root directory that Jest should scan for tests and modules within +// rootDir: undefined, ⋮---- -public setTimeOffsetMs(newOffset: number): void +// A list of paths to directories that Jest should use to search for files in +// roots: [ +// "" +// ], ⋮---- -/* - * Bitget WebSocket API Methods - * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel - */ +// Allows you to use a custom runner instead of Jest's default test runner +// runner: "jest-runner", ⋮---- -/** - * Submit a new order - * - * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel - * - * @returns - */ -submitNewOrder( - category: BitgetInstTypeV3, - params: WSAPIPlaceOrderRequestV3, -): Promise> +// The paths to modules that run some code to configure or set up the testing environment before each test +// setupFiles: [], ⋮---- -/** - * Submit a new order - * - * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel - * - * @returns - */ -placeBatchOrders( - category: BitgetInstTypeV3, - params: WSAPIPlaceOrderRequestV3[], -): Promise> +// A list of paths to modules that run some code to configure or set up the testing framework before each test +// setupFilesAfterEnv: [], ⋮---- -/* - * Bitget WebSocket API Methods - * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel - */ +// The number of seconds after which a test is considered as slow and reported as such in the results. +// slowTestThreshold: 5, ⋮---- -/** - * Cancel Order - * - * https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel - * - * @returns - */ -cancelOrder( - category: BitgetInstTypeV3, - params: CancelOrderRequestV3, -): Promise> +// A list of paths to snapshot serializer modules Jest should use for snapshot testing +// snapshotSerializers: [], ⋮---- -/** - * Batch Cancel Order - * - * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel - * - * @returns - */ -cancelBatchOrders( - category: BitgetInstTypeV3, - params: CancelOrderRequestV3[], -): Promise> +// The test environment that will be used for testing +// testEnvironment: "jest-environment-node", ⋮---- -modifyOrder( - category: BitgetInstTypeV3, - params: ModifyOrderRequestV3, -): Promise> +// Options that will be passed to the testEnvironment +// testEnvironmentOptions: {}, ⋮---- -batchModifyOrders( - category: BitgetInstTypeV3, - params: ModifyOrderRequestV3[], -): Promise> +// Adds a location field to test results +// testLocationInResults: false, ⋮---- -/** - * - * - * - * - * - * - * - * Private methods for handling some of the convenience/automation provided by the WS API Client - * - * - * - * - * - * - * - */ +// The glob patterns Jest uses to detect test files ⋮---- -private setupDefaultEventListeners() +// "**/__tests__/**/*.[jt]s?(x)", ⋮---- -/** - * General event handlers for monitoring the WebsocketClient - */ +// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped +// testPathIgnorePatterns: [ +// "/node_modules/" +// ], ⋮---- -// Blind JSON.stringify can fail on circular references +// The regexp pattern or array of patterns that Jest uses to detect test files +// testRegex: [], ⋮---- -// JSON.stringify({ ...data, target: 'WebSocket' }), - -================ -File: src/websocket-client-v2.ts -================ -import { - WSOperation, - WSOperationLoginParams, - WsRequestOperationBitget, -} from './types/websockets/ws-api.js'; -import { MessageEventLike } from './types/websockets/ws-events.js'; -import { - BitgetInstTypeV2, - WsKey, - WsTopicV2, -} from './types/websockets/ws-general.js'; -import { - BaseWebsocketClient, - EmittableEvent, - MidflightWsRequestEvent, -} from './util/BaseWSClient.js'; -import { isWsPong } from './util/requestUtils.js'; -import { - SignAlgorithm, - SignEncodeMethod, - signMessage, -} from './util/webCryptoAPI.js'; -import { - getMaxTopicsPerSubscribeEvent, - getNormalisedTopicRequests, - getWsUrl, - isPrivateChannel, - WS_AUTH_ON_CONNECT_KEYS, - WS_KEY_MAP, - WsTopicRequest, -} from './util/websocket-util.js'; -import { WSConnectedResult } from './util/WsStore.types.js'; +// This option allows the use of a custom results processor +// testResultsProcessor: undefined, ⋮---- -export class WebsocketClientV2 extends BaseWebsocketClient< +// This option allows use of a custom test runner +// testRunner: "jest-circus/runner", ⋮---- -WsRequestOperationBitget // subscribe requests have an "args" parameter with an object within +// A map from regular expressions to paths to transformers +// transform: undefined, ⋮---- -/** - * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library - */ -public connectAll(): Promise[] +// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation +// transformIgnorePatterns: [ +// "/node_modules/", +// "\\.pnp\\.[^\\/]+$" +// ], ⋮---- -/** Some private channels use `coin` instead of `instId`. This method handles building the sub/unsub request */ -private getSubRequest( - instType: BitgetInstTypeV2, - topic: WsTopicV2, - coin: string = 'default', -): WsTopicRequest +// Prevents import esm module error from v1 axios release, issue #5026 ⋮---- -/** - * Subscribe to a topic - * @param instType instrument type (refer to API docs). - * @param topic topic name (e.g. "ticker"). - * @param instId instrument ID (e.g. "BTCUSDT"). Use "default" for private topics. - */ -public subscribeTopic( - instType: BitgetInstTypeV2, - topic: WsTopicV2, - coin: string = 'default', -) +// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them +// unmockedModulePathPatterns: undefined, ⋮---- -/** - * Unsubscribe from a topic - * @param instType instrument type (refer to API docs). - * @param topic topic name (e.g. "ticker"). - * @param instId instrument ID (e.g. "BTCUSDT"). Use "default" for private topics to get all symbols. - */ -public unsubscribeTopic( - instType: BitgetInstTypeV2, - topic: WsTopicV2, - coin: string = 'default', -) +// Indicates whether each individual test should be reported during the run +// verbose: undefined, +verbose: true, // report individual test ⋮---- -/** - * Request subscription to one or more topics. Pass topics as either an array of strings, - * or array of objects (if the topic has parameters). - * - * Objects should be formatted as {topic: string, params: object, category: CategoryV5}. - * - * - Subscriptions are automatically routed to the correct websocket connection. - * - Authentication/connection is automatic. - * - Resubscribe after network issues is automatic. - * - * Call `unsubscribe(topics)` to remove topics - */ -public subscribe( - requests: - | (WsTopicRequest | WsTopicV2) - | (WsTopicRequest | WsTopicV2)[], - wsKey: WsKey, -): Promise +// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode +// watchPathIgnorePatterns: [], ⋮---- -/** - * Unsubscribe from one or more topics. Similar to subscribe() but in reverse. - * - * - Requests are automatically routed to the correct websocket connection. - * - These topics will be removed from the topic cache, so they won't be subscribed to again. - */ -public unsubscribe( - requests: - | (WsTopicRequest | WsTopicV2) - | (WsTopicRequest | WsTopicV2)[], - wsKey: WsKey, -) +// Whether to use watchman for file crawling +// watchman: true, + +================ +File: LICENSE.md +================ +Copyright 2022 Tiago Siebler + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +================ +File: postBuild.sh +================ +#!/bin/bash +# +# Add package.json files to cjs/mjs subtrees +# + +cat >dist/cjs/package.json <dist/mjs/package.json <, - wsKey: WsKey, -): boolean +// or +// import { RestClientV2 } from 'bitget-api'; ⋮---- -protected getPrivateWSKeys(): WsKey[] +// read from environmental variables ⋮---- -protected isAuthOnConnectWsKey(wsKey: WsKey): boolean +// 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-private-futures.ts ⋮---- -protected async getWsUrl(wsKey: WsKey): Promise +// note the single quotes, preventing special characters such as $ from being incorrectly passed ⋮---- -protected getMaxTopicsPerSubscribeEvent(wsKey: WsKey): number | null +// apiKey: 'apiKeyHere', +// apiSecret: 'apiSecretHere', +// apiPass: 'apiPassHere', ⋮---- -/** - * @returns one or more correctly structured request events for performing a operations over WS. This can vary per exchange spec. - */ -protected async getWsRequestEvents( - operation: WSOperation, - requests: WsTopicRequest[], -): Promise>[]> +/** 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 */ ⋮---- -// Previously used to track topics in a request. Keeping this for subscribe/unsubscribe requests, no need for incremental values +startTime: fromTime.getTime() + '', // should be sent as a string +endTime: now.getTime() + '', // should be sent as a string + +================ +File: examples/V2 - Classic/Rest/rest-private-spot.ts +================ +import { RestClientV2 } from '../../../src/index.js'; ⋮---- -/** - { - "op":"subscribe", - "args":[ - { - "instType":"SPOT", - "channel":"ticker", - "instId":"BTCUSDT" - }, - { - "instType":"SPOT", - "channel":"candle5m", - "instId":"BTCUSDT" - } - ] - } - */ +// or +// import { RestClientV2 } from 'bitget-api'; ⋮---- -// const request = { -// topic: 'ticker', -// payload: { instType: 'SPOT', instId: 'BTCUSDT' }, -// }; -// becomes: -// const request = { -// channel: 'ticker', -// instType: 'SPOT', -// instId: 'BTCUSDT', -// }; +// read from environmental variables ⋮---- -private async getWsAuthSignature( - wsKey: WsKey, -): Promise< +// 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-private-spot.ts ⋮---- -private async signMessage( - paramsStr: string, - secret: string, - method: SignEncodeMethod, - algorithm: SignAlgorithm, -): Promise +// note the single quotes, preventing special characters such as $ from being incorrectly passed ⋮---- -protected async getWsAuthRequestEvent( - wsKey: WsKey, -): Promise> +// apiKey: 'apiKeyHere', +// apiSecret: 'apiSecretHere', +// apiPass: 'apiPassHere', ⋮---- -/** - * Abstraction called to sort ws events into emittable event types (response to a request, data update, etc) - */ -protected resolveEmittableEvents( - wsKey: WsKey, - event: MessageEventLike, -): EmittableEvent[] +/** 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 */ + +================ +File: examples/V2 - Classic/Rest/rest-public-futures.ts +================ +import { RestClientV2 } from '../../../src/index.js'; ⋮---- -// v2 event processing +// or +// import { RestClientV2 } from 'bitget-api'; ⋮---- -// v2 authentication event -⋮---- -// messageType: typeof msg, -// messageString: JSON.stringify(msg), -⋮---- -// messageType: typeof msg, -// messageString: JSON.stringify(msg), +// Fetch the last 1000 1min candles for a symbol ⋮---- -// fallback emit anyway +const msPerCandle = 60 * 1000; // 60 seconds x 1000 + +================ +File: examples/V2 - Classic/Rest/rest-public-spot.ts +================ +import { RestClientV2 } from '../../../src/index.js'; ⋮---- -/** - * @deprecrated not supported by Bitget's V2 API offering - */ -async sendWSAPIRequest(): Promise +// or +// import { RestClientV2 } from 'bitget-api'; ================ -File: .eslintrc.cjs +File: examples/V3 - UTA/Rest/rest-private.ts ================ -// 'no-unused-vars': ['warn'], +import { RestClientV3 } from '../../../src/index.js'; +⋮---- +// or +// import { RestClientV3 } from 'bitget-api'; +⋮---- +// 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-private-futures.ts +⋮---- +// note the single quotes, preventing special characters such as $ from being incorrectly passed +⋮---- +// apiKey: 'apiKeyHere', +// apiSecret: 'apiSecretHere', +// apiPass: 'apiPassHere', +⋮---- +/** This is a simple script wrapped in a immediately invoked function expression, designed to check account assets for futures trading */ ================ -File: .gitignore +File: examples/V3 - UTA/Rest/rest-public-UTA-futures.ts ================ -!.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 +import { RestClientV3 } from '../../../src/index.js'; +⋮---- +// or +// import { RestClientV3 } from 'bitget-api'; ================ -File: .jshintrc +File: examples/V3 - UTA/Rest/rest-public-UTA-spot.ts ================ -{ - "esversion": 8, - "asi": true, - "laxbreak": true, - "predef": [ "-Promise" ] -} +import { RestClientV3 } from '../../../src/index.js'; +⋮---- +// or +// import { RestClientV3 } from 'bitget-api'; ================ -File: .prettierrc +File: src/constants/enum.ts ================ -{ - "tabWidth": 2, - "singleQuote": true, - "trailingComma": "all" -} +/** Parameter verification exception margin mode == FIXED */ ================ -File: jest.config.ts +File: src/types/request/v2/earn.ts ================ /** - * For a detailed explanation regarding each configuration property, visit: - * https://jestjs.io/docs/configuration + * + * + * Earn | Savings + * + * */ ⋮---- -import type { Config } from 'jest'; +export interface GetEarnSavingsAssetsRequestV2 { + periodType: string; + startTime?: string; + endTime?: string; + limit?: string; + idLessThan?: string; +} ⋮---- -// All imported modules in your tests should be mocked automatically -// automock: false, +export interface GetEarnSavingsRecordsRequestV2 { + coin?: string; + periodType: string; + orderType?: string; + startTime?: string; + endTime?: string; + limit?: string; + idLessThan?: string; +} ⋮---- -// Stop running tests after `n` failures -// bail: 0, -bail: false, // enable to stop test when an error occur, +export interface RedeemSavingsRequestV2 { + productId: string; + orderId?: string; + periodType: string; + amount: string; +} ⋮---- -// The directory where Jest should store its cached dependency information -// cacheDirectory: "/private/var/folders/kf/2k3sz4px6c9cbyzj1h_b192h0000gn/T/jest_dx", +/** + * + * + * Earn | Shark Fin + * + * + */ ⋮---- -// Automatically clear mock calls, instances, contexts and results before every test +export interface GetSharkfinAssetsRequestV2 { + status: string; + startTime?: string; + endTime?: string; + limit?: string; + idLessThan?: string; +} ⋮---- -// Indicates whether the coverage information should be collected while executing the test +export interface GetSharkfinRecordsRequestV2 { + coin?: string; + type: string; + startTime?: string; + endTime?: string; + limit?: string; + idLessThan?: string; +} ⋮---- -// An array of glob patterns indicating a set of files for which coverage information should be collected +/** + * + * + * Earn | Loan + * + * + */ ⋮---- -// The directory where Jest should output its coverage files +export interface GetLoanEstInterestAndBorrowableRequestV2 { + loanCoin: string; + pledgeCoin: string; + daily: 'SEVEN' | 'THIRTY'; + pledgeAmount?: string; +} ⋮---- -// An array of regexp pattern strings used to skip coverage collection -// coveragePathIgnorePatterns: [ -// "/node_modules/" -// ], +export interface BorrowLoanRequestV2 { + loanCoin: string; + pledgeCoin: string; + daily: 'SEVEN' | 'THIRTY'; + pledgeAmount?: string; + loanAmount?: string; +} ⋮---- -// Indicates which provider should be used to instrument code for coverage +export interface RepayLoanRequestV2 { + orderId: string; + amount?: string; + repayUnlock?: string; + repayAll: string; +} ⋮---- -// A list of reporter names that Jest uses when writing coverage reports -// coverageReporters: [ -// "json", -// "text", -// "lcov", -// "clover" -// ], +export interface GetLoanRepayHistoryRequestV2 { + orderId?: string; + loanCoin?: string; + pledgeCoin?: string; + startTime: string; + endTime: string; + pageNo?: string; + pageSize?: string; +} ⋮---- -// An object that configures minimum threshold enforcement for coverage results -// coverageThreshold: undefined, +export interface ModifyLoanPledgeRateRequestV2 { + orderId: string; + amount: string; + pledgeCoin: string; + reviseType: string; +} ⋮---- -// A path to a custom dependency extractor -// dependencyExtractor: undefined, +export interface GetLoanPledgeRateHistoryRequestV2 { + orderId?: string; + reviseSide?: string; + pledgeCoin?: string; + startTime: string; + endTime: string; + pageNo?: string; + pageSize?: string; +} ⋮---- -// Make calling deprecated APIs throw helpful error messages -// errorOnDeprecated: false, +export interface GetLoanHistoryRequestV2 { + orderId?: string; + loanCoin?: string; + pledgeCoin?: string; + status?: string; + startTime: string; + endTime: string; + pageNo?: string; + pageSize?: string; +} ⋮---- -// The default configuration for fake timers -// fakeTimers: { -// "enableGlobally": false -// }, +export interface GetLiquidationRecordsRequestV2 { + orderId?: string; + loanCoin?: string; + pledgeCoin?: string; + status?: string; + startTime: string; + endTime: string; + pageNo?: string; + pageSize?: string; +} ⋮---- -// Force coverage collection from ignored files using an array of glob patterns -// forceCoverageMatch: [], +/** + * + * + * Earn | On-Chain Elite + * + * + */ ⋮---- -// A path to a module which exports an async function that is triggered once before all test suites -// globalSetup: undefined, +export interface GetEarnEliteRecordsRequestV2 { + type: 'subscribe' | 'redeem' | 'interest'; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} ⋮---- -// A path to a module which exports an async function that is triggered once after all test suites -// globalTeardown: undefined, +export interface GetEarnEliteSubscribeInfoRequestV2 { + productId: string; +} ⋮---- -// A set of global variables that need to be available in all test environments -// globals: {}, +export interface EarnEliteSubscribeRequestV2 { + productSubId: string; + amount: string; + coin?: string; + paymentAccount?: 'spot' | 'unified'; +} ⋮---- -// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers. -// maxWorkers: "50%", +export interface GetEarnEliteSubscribeResultRequestV2 { + orderId: string; +} ⋮---- -// An array of directory names to be searched recursively up from the requiring module's location -// moduleDirectories: [ -// "node_modules" -// ], +export interface GetEarnEliteRedeemInfoRequestV2 { + productId: string; +} ⋮---- -// An array of file extensions your modules use +export interface RedeemEarnEliteRequestV2 { + productId: string; + productSubId: string; + redeemType: 'fast' | 'standard'; + amount: string; + receiveAccount: 'spot' | 'unified'; + advancedSettle?: 'yes' | 'no'; + coin?: string; +} + +================ +File: src/types/request/v2/instloan.ts +================ +export interface GetInstLoanProductInfoRequestV2 { + productId: string; +} ⋮---- -// modulePaths: ['src'], +export interface GetInstLoanSymbolsRequestV2 { + productId: string; +} ⋮---- -// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module -// moduleNameMapper: {}, +export interface GetInstLoanRepaidHistoryRequestV2 { + startTime?: string; + endTime?: string; + limit?: string; +} ⋮---- -// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader -// modulePathIgnorePatterns: [], +export interface GetInstLoanOrderRequestV2 { + orderId?: string; + startTime?: string; + endTime?: string; +} ⋮---- -// Activates notifications for test results -// notify: false, +export interface GetInstLoanLTVConvertRequestV2 { + riskUnitId?: string; +} ⋮---- -// An enum that specifies notification mode. Requires { notify: true } -// notifyMode: "failure-change", +export interface GetInstLoanMarginCoinInfoRequestV2 { + productId: string; +} + +================ +File: src/types/request/v2/spot.ts +================ +type SpotKlineIntervalV2 = + | '1min' + | '5min' + | '15min' + | '30min' + | '1h' + | '4h' + | '6h' + | '12h' + | '1day' + | '3day' + | '1week' + | '1M' + | '6Hutc' + | '12Hutc' + | '1Dutc' + | '3Dutc' + | '1Wutc' + | '1Mutc'; ⋮---- -// A preset that is used as a base for Jest's configuration -// preset: undefined, +export interface SpotCandlesRequestV2 { + symbol: string; + granularity: SpotKlineIntervalV2; + startTime?: string; + endTime?: string; + limit?: string; +} ⋮---- -// Run tests from one or more projects -// projects: undefined, +export interface SpotHistoricCandlesRequestV2 { + symbol: string; + granularity: SpotKlineIntervalV2; + endTime?: string; + limit?: string; +} ⋮---- -// Use this configuration option to add custom reporters to Jest -// reporters: undefined, +export interface SpotHistoricTradesRequestV2 { + symbol: string; + limit?: string; + idLessThan?: string; + startTime?: string; + endTime?: string; +} ⋮---- -// Automatically reset mock state before every test -// resetMocks: false, +export interface SpotCallAuctionRequestV2 { + symbol: string; +} ⋮---- -// Reset the module registry before running each individual test -// resetModules: false, +/** + * + * * Spot | Trade + * + */ ⋮---- -// A path to a custom resolver -// resolver: undefined, +export type SpotOrderSideV2 = 'buy' | 'sell'; ⋮---- -// Automatically restore mock state and implementation before every test -// restoreMocks: false, +export type SpotOrderTypeV2 = 'limit' | 'market'; ⋮---- -// The root directory that Jest should scan for tests and modules within -// rootDir: undefined, +export type SpotOrderForceV2 = 'gtc' | 'post_only' | 'fok' | 'ioc'; ⋮---- -// A list of paths to directories that Jest should use to search for files in -// roots: [ -// "" -// ], +export type SpotTPSLTypeV2 = 'normal' | 'tpsl'; ⋮---- -// Allows you to use a custom runner instead of Jest's default test runner -// runner: "jest-runner", +export type SpotSTPModeV2 = + | 'none' + | 'cancel_taker' + | 'cancel_maker' + | 'cancel_both'; ⋮---- -// The paths to modules that run some code to configure or set up the testing environment before each test -// setupFiles: [], +export type SpotBatchModeV2 = 'single' | 'multiple'; ⋮---- -// A list of paths to modules that run some code to configure or set up the testing framework before each test -// setupFilesAfterEnv: [], +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; +} ⋮---- -// The number of seconds after which a test is considered as slow and reported as such in the results. -// slowTestThreshold: 5, +export interface SpotCancelandSubmitOrderRequestV2 { + symbol: string; + price: string; + size: string; + orderId?: string; + clientOid?: string; + newClientOid?: string; + presetTakeProfitPrice?: string; + executeTakeProfitPrice?: string; + presetStopLossPrice?: string; + executeStopLossPrice?: string; +} ⋮---- -// A list of paths to snapshot serializer modules Jest should use for snapshot testing -// snapshotSerializers: [], +export interface SpotCancelOrderRequestV2 { + symbol: string; + tpslType?: SpotTPSLTypeV2; + orderId?: string; + clientOid?: string; +} ⋮---- -// The test environment that will be used for testing -// testEnvironment: "jest-environment-node", +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; +} ⋮---- -// Options that will be passed to the testEnvironment -// testEnvironmentOptions: {}, +export interface SpotBatchOrderRequestV2 { + symbol?: string; + batchMode?: SpotBatchModeV2; + orderList: SpotBatchOrderRequestItemV2[]; +} ⋮---- -// Adds a location field to test results -// testLocationInResults: false, +export interface SpotBatchCancelOrderRequestV2 { + symbol?: string; + batchMode?: SpotBatchModeV2; + orderList: { + symbol?: string; + orderId?: string; + clientOid?: string; + }[]; +} ⋮---- -// The glob patterns Jest uses to detect test files +export interface GetSpotOrderInfoRequestV2 { + orderId?: string; + clientOid?: string; + requestTime?: string; + receiveWindow?: string; +} ⋮---- -// "**/__tests__/**/*.[jt]s?(x)", +export interface GetSpotOpenOrdersRequestV2 { + symbol?: string; + startTime?: string; + endTime?: string; + idLessThan?: string; + limit?: string; + orderId?: string; + tpslType?: SpotTPSLTypeV2; + requestTime?: string; + receiveWindow?: string; +} ⋮---- -// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped -// testPathIgnorePatterns: [ -// "/node_modules/" -// ], +export interface GetSpotHistoryOrdersRequestV2 { + symbol?: string; + startTime?: string; + endTime?: string; + idLessThan?: string; + limit?: string; + orderId?: string; + tpslType?: SpotTPSLTypeV2; + requestTime?: string; + receiveWindow?: string; +} ⋮---- -// The regexp pattern or array of patterns that Jest uses to detect test files -// testRegex: [], +export interface GetSpotFillsRequestV2 { + symbol: string; + orderId?: string; + startTime?: string; + endTime?: string; + limit?: string; + idLessThan?: string; +} ⋮---- -// This option allows the use of a custom results processor -// testResultsProcessor: undefined, +/** + * + * * Spot | Trigger Orders + * + */ ⋮---- -// This option allows use of a custom test runner -// testRunner: "jest-circus/runner", +export type SpotPlanTypeV2 = 'amount' | 'total'; ⋮---- -// A map from regular expressions to paths to transformers -// transform: undefined, +export type SpotTriggerTypeV2 = 'fill_price' | 'mark_price'; ⋮---- -// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation -// transformIgnorePatterns: [ -// "/node_modules/", -// "\\.pnp\\.[^\\/]+$" -// ], +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; +} ⋮---- -// Prevents import esm module error from v1 axios release, issue #5026 +export interface SpotModifyPlanOrderRequestV2 { + orderId?: string; + clientOid?: string; + triggerPrice: string; + orderType: SpotOrderTypeV2; + executePrice?: string; + size: string; +} ⋮---- -// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them -// unmockedModulePathPatterns: undefined, +export interface GetSpotCurrentPlanOrdersRequestV2 { + symbol: string; + limit?: string; + idLessThan?: string; + startTime?: string; + endTime?: string; +} ⋮---- -// Indicates whether each individual test should be reported during the run -// verbose: undefined, -verbose: true, // report individual test +export interface GetSpotHistoryPlanOrdersRequestV2 { + symbol: string; + startTime: string; + endTime: string; + limit?: string; +} ⋮---- -// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode -// watchPathIgnorePatterns: [], +/** + * + * * Spot | Account + * + */ ⋮---- -// Whether to use watchman for file crawling -// watchman: true, - -================ -File: LICENSE.md -================ -Copyright 2022 Tiago Siebler - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -================ -File: postBuild.sh -================ -#!/bin/bash -# -# Add package.json files to cjs/mjs subtrees -# - -cat >dist/cjs/package.json <dist/mjs/package.json < { + 0: string; + 1: string; + 2: string; + 3: string; + 4: string; +} +⋮---- +export interface PlaceCfdOrderResponseV3 { + trxId: string; +} +⋮---- +export interface ModifyCfdOrderResponseV3 { + orderId: string; +} +⋮---- +export interface CfdUnfilledOrderV3 { + symbol: string; + orderType: CfdOrderTypeV3 | string; + side: CfdSideV3 | string; + price: string; + qty: string; + takeProfit?: string; + stopLoss?: string; + trxId: string; + orderId: string; +} +⋮---- +export interface CfdHistoryOrderV3 { + symbol: string; + orderType: CfdOrderTypeV3 | string; + side: CfdSideV3 | string; + price: string; + qty: string; + cumExecQty?: string; + takeProfit?: string; + stopLoss?: string; + status: string; + trxId: string; + orderId: string; +} +⋮---- +export interface CfdOrderHistoryV3 { + list: CfdHistoryOrderV3[]; +} +⋮---- +export interface CfdCurrentPositionV3 { + positionId: string; + symbol: string; + orderType: CfdOrderTypeV3 | string; + side: CfdSideV3 | string; + qty: string; + openPrice: string; + takeProfit?: string; + stopLoss?: string; + interest: string; + unrealizedPnl: string; + totalProfit: string; +} +⋮---- +export interface CfdFundDetailV3 { + leverage: string; + balance: string; + credit: string; + marginStopOut: string; + marginUsed: string; + marginCall: string; + marginFree: string; + marginLevel: string; + equity: string; + pnl: string; + status: string; + swap: string; + frozen: string; + currency: string; +} +⋮---- +export interface CfdTransferResponseV3 { + transferId: string; +} +⋮---- +export interface CfdTransferRecordV3 { + transferId: string; + coin: string; + amount: string; + direction: string; + status: string; + accountType: string; + createdTime: string; + updatedTime: string; +} +⋮---- +export interface CfdTransferRecordsV3 { + list: CfdTransferRecordV3[]; + cursor?: string; +} +⋮---- +export interface CfdFinancialRecordV3 { + id: string | number; + symbol: string; + side: string | number; + qty: string | number; + swap: string | number; + fee: string | number; + cashFlow: string | number; + balanceBefore: string | number; + balanceChange: string | number; + balanceAfter: string | number; + creditBefore: string | number; + creditChange: string | number; + creditAfter: string | number; + openPrice: string | number; + closePrice: string | number; + orderId: string | number; + ts: string | number; +} +⋮---- +export interface CfdInstrumentV3 { + symbol: string; + onlineTime: string; + currency: string; + digits: string; + spread: string; + contractSize: string; + marginCurrency: string; + profitCurrency: string; + stopLevel: string; + enable: string; + marginPercent: string; + initialMargin: string; + marginMode: string; + maintMargin: string; + maintMarginRateBuy: string; + maintMarginRateSell: string; + initialMarginRateBuy: string; + initialMarginRateSell: string; + maxVolume: string; + minVolume: string; + stepVolume: string; + priceCurrency: string; + tickSize: string; + tickValue: string; + leverage: string; + tradeTime: string; + commissionType: string; + commissionRate: string; + symbolCategory: string; + exchangeRate: string; + marginUsdRate: string; +} + +================ +File: src/types/response/v3/earn.ts +================ +/** + * + * + * Earn | On-Chain Elite (UTA) + * + * + */ +⋮---- +export interface EarnEliteSubscriptionCoinV3 { + subscriptionCoin: string; + precision: string; + feeRate: string; + exchangeRate: string; + remainQuota?: string; + minAmount?: string; +} +⋮---- +export interface EarnEliteProductV3 { + productId: string; coin: string; minApr: string; maxApr: string; @@ -5659,8 +5251,12 @@ export interface EarnEliteRecordV3 { paymentAccount?: string[]; settlePoints: string; fee: string; + /** Business time, Unix ms */ + bizTime?: string; } ⋮---- +/** Business time, Unix ms */ +⋮---- export interface EarnEliteRecordsV3 { recordList: EarnEliteRecordV3[]; endId: string; @@ -5722,72 +5318,177 @@ export interface RedeemEarnEliteResultV3 { } ================ -File: src/types/response/v3/loan.ts +File: src/types/response/v3/grid.ts ================ -export interface LoanTransfersV3 { - coin: string; - transfered: string; - userId: string; -} -⋮---- -export interface LoanSymbolSettingV3 { - symbol: string; - leverage: string; -} +import type { GridIndicatorParamsV3 } from '../../request/v3/grid.js'; ⋮---- -export interface LoanSymbolsV3 { - productId: string; - spotSymbols: string[]; - marginLeverage: string; - usdtContractLeverage: string; - coinContractLeverage: string; - usdcContractLeverage: string; - usdtContractSymbols: LoanSymbolSettingV3[]; - coinContractSymbols: LoanSymbolSettingV3[]; - usdcContractSymbols: LoanSymbolSettingV3[]; +export interface GridBotIdResponseV3 { + botId: string; } ⋮---- -export interface RepaidHistoryItemV3 { - repayOrderId: string; - businessType: 'normal' | 'liquidation'; - repayType: 'all' | 'part'; - repaidTime: string; - coin: string; - repayAmount: string; - repayInterest: string; +export interface GridValidateResponseV3 { + valid: string; + reason?: string; + minInvestment?: 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; +export interface GridBotOrderItemV3 { + orderId: string; + delegateCount: string; + delegatePrice: string; + changeRequired: number | string; } ⋮---- -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 GridBotOrderDetailsV3 { + botId: string; + symbol: string; + buyOrderList: GridBotOrderItemV3[]; + sellOrderList: GridBotOrderItemV3[]; } ⋮---- -/** Tiered conversion rate item (when Tiered Discount Rate Model is enabled) */ +export interface GridBotDetailV3 { + botId: string; + symbol: string; + status: string; + totalProfit: string; + roi: string; + gridProfit: string; + gridProfitRate: string; + unpairedProfit: string; + unpairedProfitRate: string; + margin?: string; + arbitrageAPR: string; + totalAPR: string; + createdTime: string; + runningTime: string; + currentBaseBalance?: string; + currentQuoteBalance?: string; + initialBaseHoldings?: string; + initialQuoteHoldings?: string; + reservedBaseTradingFee?: string; + reservedQuoteTradingFee?: string; + gridStartPrice?: string; + gridType?: string; + maxPrice: string; + minPrice: string; + gridNum: string; + gridOrderMode: string; + baseInvestmentCoin?: string; + baseInvestmentAmount?: string; + quoteInvestmentCoin?: string; + quoteInvestmentAmount?: string; + slippage?: string; + triggerCondition?: string; + triggerParams?: GridIndicatorParamsV3[]; + triggerPrice?: string; + terminationCondition?: string; + terminationParams?: GridIndicatorParamsV3[]; + terminationSell?: string; + stopLoss?: string; + takeProfit?: string; + hodlMode?: string; + autoTransferProfits?: string; + arbitrageCount?: string; + terminationReason?: string; +} +⋮---- +export interface NeutralGridBotDetailV3 { + botId: string; + symbol: string; + status: string; + totalProfit: string; + roi: string; + gridProfit: string; + gridProfitRate: string; + unpairedProfit: string; + unpairedProfitRate: string; + margin?: string; + arbitrageAPR: string; + totalAPR: string; + createdTime: string; + runningTime: string; + gridStartPrice?: string; + maxPrice: string; + minPrice: string; + gridNum: string; + gridOrderMode: string; + triggerPrice?: string; + leverage?: string; + stopLoss?: string; + takeProfit?: string; + holdPosition?: string; + oneGridMinProfit?: string; + oneGridMaxProfit?: string; + autoTransferProfits?: string; +} + +================ +File: src/types/response/v3/loan.ts +================ +export interface LoanTransfersV3 { + coin: string; + transfered: string; + userId: string; +} +⋮---- +export interface LoanSymbolSettingV3 { + symbol: string; + leverage: string; +} +⋮---- +export interface LoanSymbolsV3 { + productId: string; + spotSymbols: string[]; + marginLeverage: string; + usdtContractLeverage: string; + coinContractLeverage: string; + usdcContractLeverage: string; + usdtContractSymbols: LoanSymbolSettingV3[]; + coinContractSymbols: LoanSymbolSettingV3[]; + usdcContractSymbols: LoanSymbolSettingV3[]; +} +⋮---- +export interface RepaidHistoryItemV3 { + repayOrderId: string; + businessType: 'normal' | 'liquidation'; + repayType: 'all' | 'part'; + repaidTime: string; + coin: string; + repayAmount: string; + repayInterest: 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; +} +⋮---- +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'; +} +⋮---- +/** Tiered conversion rate item (when Tiered Discount Rate Model is enabled) */ export interface ConvertRatioListItemV3 { ladder: string; convertRatio: string; @@ -6194,52 +5895,221 @@ export interface P2pOrderInfoV3 { } ================ -File: src/types/response/v3/stockplus.ts +File: src/types/response/v3/reality.ts ================ -/** - * - * - * Stock+ (UTA) - * - * - */ +export interface RealityCompanyOverviewV3 { + peRatio: string; + pbRatio: string; + totalShares: string; + marketCap: string; + high52Week: string; + low52Week: string; + code: string; + name: string; + ListingDate: string; + employees: string; + companyAddress: string; +} ⋮---- -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; +export interface RealityValuationIndicatorsV3 { + date: string; + pb: string; + pbEd: string; + pbPd: string; + pbMrq: string; + pe: string; + peLyr: string; + peTtmEd: string; + peTtmPd: string; + ps: string; + psLyr: string; + psTtmEd: string; + psTtmPd: string; + pcf: string; + pcfNet: string; + pcfNetTtmEd: string; + pcfNetTtmPd: string; + pcfTtmEd: string; + pcfTtmPd: string; + evEbitda: string; + equityValue: string; + grossEv: string; + netEv: string; + tmvUsd: string; + cirTmvUsd: string; + dividendYieldTtm: string; } ⋮---- -export interface StockPlusOptionQuoteV3 { - secuQuote: StockPlusOptionQuoteItemV3[]; +export interface RealityEarningsForecastV3 { + fiscalYear: string; + publicationDeadline: string; + isActual: boolean; + revenue: string; + ebit: string; + netIncomeParent: string; + eps: string; + bps: string; + cfps: string; + roe: string; + roa: string; + currency: string; } ⋮---- -export interface StockPlusOptionStrikePriceInfoV3 { - price: string; - callSymbol: string; - putSymbol: string; - standard: boolean; +export interface RealitySuspensionResumptionInfoV3 { + code: string; + name: string; + suspensionDate: string; + suspensionTime: string; + suspensionReason: string; + suspensionPrice: string; + resumptionDate: string; + resumptionQuoteTime: string; + resumptionTradingTime: string; } ⋮---- -export interface StockPlusOptionChainInfoV3 { - strikePriceInfo: StockPlusOptionStrikePriceInfoV3[]; +export interface RealityDividendItemV3 { + type: string; + announcementDate: string; + recordDate: string; + exrightDate: string; + dividendDate: string; + dividendPerShare: string; + stockDividendPerShare: string; + splitValidDate: string; + splitNumerator: string; + splitDenominator: string; +} +⋮---- +export interface RealityShareCapitalChangeV3 { + announcementDate: string; + changeDate: string; + totalShares: string; + commonShares: string; + preferredShares: string; + otherShares: string; + specialExplain: string; + changeReason: string; +} +⋮---- +export interface RealityInnerTradeItemV3 { + reporterName: string; + issueOrgName: string; + endDate: string; + announcementDate: string; + innerType: string; + position: string; + securityTitle: string; + tradeDate: string; + designatedExerciseDate: string; + innerTradeType: string; + actionType: string; + tradeVolume: string; + tradePrice: string; + holdingType: string; + indirectHoldingStatement: string; + postTradeQuantity: string; +} +⋮---- +export interface RealityExecutiveShareholdingItemV3 { + name: string; + holdingNum: string; + holdingRatio: string; + voteRatio: string; + period: string; + announcementDate: string; +} +⋮---- +export interface RealityShareholdDetailItemV3 { + name: string; + holdingNum: string; + holdingRatio: string; +} +⋮---- +export interface RealityCursorListV3 { + list: T[]; + cursor?: string; +} +⋮---- +export interface RealityStockInfoV3 { + symbol: string; + code: string; + name: string; + tradingPeriod: string[]; + weekendTradable: 'yes' | 'no' | string; +} +⋮---- +export interface RealityMarketSessionStateV3 { + state: string; + timeZone: string; + startTime: string; + endTime: string; +} +⋮---- +export interface RealityMarketStateV3 { + market: string; + daylightType: string; + stateList: RealityMarketSessionStateV3[]; +} +⋮---- +export interface RealityMarketSpecificConfigV3 { + remark: string; + startTime: string; + endTime: string; +} +⋮---- +export interface RealityMarketCalendarV3 { + timeZone: string; + specificConfig: RealityMarketSpecificConfigV3[]; + regularConfig: string[]; +} + +================ +File: src/types/response/v3/stockplus.ts +================ +/** + * + * + * Stock+ (UTA) + * + * + */ +⋮---- +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; +} +⋮---- +export interface StockPlusOptionQuoteV3 { + secuQuote: StockPlusOptionQuoteItemV3[]; +} +⋮---- +export interface StockPlusOptionStrikePriceInfoV3 { + price: string; + callSymbol: string; + putSymbol: string; + standard: boolean; +} +⋮---- +export interface StockPlusOptionChainInfoV3 { + strikePriceInfo: StockPlusOptionStrikePriceInfoV3[]; } ⋮---- export interface StockPlusOptionExpiryDateV3 { @@ -6543,79 +6413,6 @@ export interface StockPlusTransferRecordsV3 { cursor: string; } -================ -File: src/types/response/v3/strategy.ts -================ -import type { - StrategyIcebergParamsV3, - StrategyOcoParamsV3, - StrategyOrderStatusV3, - StrategyOrderTypeV3, - StrategyTrailingStopParamsV3, - StrategyTriggerByV3, - StrategyTriggerOrderTypeV3, - StrategyTwapParamsV3, -} from '../../request/v3/strategy.js'; -⋮---- -export interface PlaceStrategyOrderResponseV3 { - orderId: string; - clientOid: string; -} -⋮---- -export interface ModifyStrategyOrderResponseV3 { - orderId: string; - clientOid: string; -} -⋮---- -export interface StrategyOrderV3 { - orderId: string; - clientOid: string; - category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES' | string; - symbol: string; - qty: string; - posSide: 'long' | 'short'; - status: StrategyOrderStatusV3; - type?: StrategyOrderTypeV3 | string; - 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; - ocoParams?: StrategyOcoParamsV3; - trailingStopParams?: StrategyTrailingStopParamsV3; - icebergParams?: StrategyIcebergParamsV3; - twapParams?: StrategyTwapParamsV3; - createdTime: string; - updatedTime: string; -} -⋮---- -export interface StrategySubOrderV3 { - subOrderId: string; - subClientOid?: string; - orderId?: string; - clientOid?: string; - category?: string; - symbol?: string; - side?: string; - posSide?: string; - orderType?: string; - price?: string; - qty?: string; - cumExecQty?: string; - avgPrice?: string; - status?: string; - createdTime?: string; - updatedTime?: string; -} - ================ File: src/types/shared.ts ================ @@ -6658,43 +6455,208 @@ export interface APIResponse { } ================ -File: .npmrc -================ -min-release-age=30 -save-exact=true - -================ -File: .nvmrc -================ -v24.18.0 - -================ -File: examples/auth/fasterHmacSign.ts +File: src/websocket-api-client.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'; + CancelOrderRequestV3, + ModifyOrderRequestV3, +} from './types/request/v3/trade.js'; +import { + CancelOrderResponseV3, + ModifyOrderResponseV3, +} 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'; ⋮---- /** - * 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. - * + * 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; +} +⋮---- +/** + * 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(....)`. + */ +⋮---- +/** + * 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 +⋮---- +constructor( + options?: WSClientConfigurableOptions & + Partial, + logger?: DefaultLogger, +) +⋮---- +public getWSClient(): WebsocketClientV3 +⋮---- +public setTimeOffsetMs(newOffset: number): void +⋮---- +/* + * Bitget WebSocket API Methods + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel + */ +⋮---- +/** + * Submit a new order + * + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel + * + * @returns + */ +submitNewOrder( + category: BitgetInstTypeV3, + params: WSAPIPlaceOrderRequestV3, +): Promise> +⋮---- +/** + * 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> +⋮---- +updateOrder( + category: BitgetInstTypeV3, + params: ModifyOrderRequestV3, +): Promise> +⋮---- +batchUpdateOrders( + category: BitgetInstTypeV3, + params: ModifyOrderRequestV3[], +): 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: .npmrc +================ +min-release-age=30 +save-exact=true + +================ +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. * @@ -7548,6 +7510,15 @@ export interface GetAgentCommissionDetailRequestV2 { limit?: string; idLessThan?: string; } +⋮---- +export interface GetSubAffiliateInfoRequestV2 { + uid?: string; + startTime?: string; + endTime?: string; + idLessThan?: string; + limit?: string; + includeDownLine?: 'yes' | 'no'; +} ================ File: src/types/request/v2/common.ts @@ -8430,157 +8401,145 @@ export interface GetCopyFuturesProfitDetailsRequestV3 { limit?: string; cursor?: string; } - -================ -File: src/types/request/v3/strategy.ts -================ -export type StrategyOrderTypeV3 = - | 'tpsl' - | 'trigger' - | 'oco' - | 'trailing_stop' - | 'iceberg' - | 'twap'; ⋮---- -export type StrategyOrderStatusV3 = - | 'pending' - | 'success' - | 'failed' - | 'cancelled' - | 'submitting'; +export type CopyFuturesCopyTypeV3 = 'fixed_ratio' | 'fixed_margin'; ⋮---- -export type StrategyTriggerByV3 = 'market' | 'mark'; +export interface GetCopyFuturesPortfolioOverviewRequestV3 { + period: '7D' | '30D' | '90D' | '180D'; +} ⋮---- -export type StrategyTriggerOrderTypeV3 = 'limit' | 'market'; +export interface CreateCopyFuturesRequestV3 { + projectId: string; + type: CopyFuturesCopyTypeV3; + amount: string; + /** Comma-separated: funding, uta, otc */ + accountType?: string; + /** Comma-separated symbols. Omit to copy every pair */ + tradingPairList?: string; + /** Required when type is fixed_margin */ + marginPerOrder?: string; + autoCopy?: 'on' | 'off'; + leverage?: string; + maxEntrySlippage?: string; + maxMarginRatio?: string; + /** API field name (Bitget spelling). */ + maxPostionValue?: string; +} ⋮---- -export interface StrategyOcoParamsV3 { - ocoLimitPrice?: string; - ocoTriggerPrice?: string; - ocoOrderType?: StrategyTriggerOrderTypeV3; - ocoOrderPrice?: string; +/** Comma-separated: funding, uta, otc */ +⋮---- +/** Comma-separated symbols. Omit to copy every pair */ +⋮---- +/** Required when type is fixed_margin */ +⋮---- +/** API field name (Bitget spelling). */ +⋮---- +export interface ModifyCopyFuturesFollowerSettingsRequestV3 { + projectId: string; + /** Pass all to follow every pair */ + tradingPairList?: string; + marginPerOrder?: string; + autoCopy?: 'on' | 'off'; + leverage?: string; + maxEntrySlippage?: string; + maxMarginRatio?: string; + /** API field name (Bitget spelling). */ + maxPostionValue?: string; } ⋮---- -export interface StrategyTrailingStopParamsV3 { - activationPrice?: string; - activationType?: string; - trailType?: string; - trailVariance?: string; - preOrderType?: StrategyTriggerOrderTypeV3; - preOrderPrice?: string; +/** Pass all to follow every pair */ +⋮---- +/** API field name (Bitget spelling). */ +⋮---- +export interface UnfollowCopyFuturesRequestV3 { + projectId: string; + closeType?: 'follow_close' | 'instant_close'; } ⋮---- -export interface StrategyIcebergParamsV3 { - splitMode?: string; - qtyPerOrder?: string; - splitOrderNumbers?: string; - orderPreference?: string; - executionStrategy?: string; - fixedDistanceType?: string; - distance?: string; - fixedPrice?: string; - priceLimit?: string; +export interface GetCopyFuturesCopySettingsRequestV3 { + projectId: string; } ⋮---- -export interface StrategyTwapParamsV3 { - duration?: string; - interval?: string; - orderType?: StrategyTriggerOrderTypeV3; - limitOffsetType?: string; - limitOffsetPercentage?: string; - limitOffsetSpread?: string; - twapTriggerPrice?: string; - twapTerminationPrice?: string; +export interface CopyFuturesFollowerTransferRequestV3 { + projectId: string; + type: 'in' | 'out'; + coin: string; + amount: string; + /** Comma-separated: funding, uta, otc */ + inAccountType?: string; } ⋮---- -export interface PlaceStrategyOrderRequestV3 { - category: - | 'SPOT' - | 'MARGIN' - | 'USDT-FUTURES' - | 'COIN-FUTURES' - | 'USDC-FUTURES'; +/** Comma-separated: funding, uta, otc */ +⋮---- +export interface GetCopyFuturesFollowerTransferRecordRequestV3 { + projectId: string; + limit?: string; + cursor?: string; +} +⋮---- +export interface GetCopyFuturesCurrentCopyRequestV3 { + projectId: string; +} +⋮---- +export interface GetCopyFuturesCopyProfitDetailsRequestV3 { + projectId: string; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} +⋮---- +export interface CloseCopyFuturesPositionsRequestV3 { + projectId: string; symbol: string; - clientOid?: string; - type?: StrategyOrderTypeV3; - tpslMode?: 'full' | 'partial'; - /** Required when tpslMode=partial or for trigger orders */ - qty?: string; - side?: 'buy' | 'sell'; + qty: string; + holdSide: 'long' | 'short'; +} +⋮---- +export interface CloseAllCopyFuturesRequestV3 { + projectId: string; +} +⋮---- +export interface GetCopyFuturesCurrentPositionsRequestV3 { + projectId: string; + symbol?: string; 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; - ocoParams?: StrategyOcoParamsV3; - trailingStopParams?: StrategyTrailingStopParamsV3; - icebergParams?: StrategyIcebergParamsV3; - twapParams?: StrategyTwapParamsV3; } ⋮---- -/** Required when tpslMode=partial or for trigger orders */ +export interface PlaceCopyFuturesTpSlRequestV3 { + projectId: string; + positionId: string; + tpTriggerBy: 'market' | 'mark'; + slTriggerBy: 'market' | 'mark'; + takeProfit: string; + stopLoss: string; +} ⋮---- -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 ModifyCopyFuturesTpSlRequestV3 { + projectId: string; + strategyId: string; + tpTriggerBy: 'market' | 'mark'; + slTriggerBy: 'market' | 'mark'; + takeProfit: string; + stopLoss: string; } ⋮---- -export interface CancelStrategyOrderRequestV3 { - orderId?: string; - clientOid?: string; +export interface CancelCopyFuturesTpSlRequestV3 { + projectId: string; + strategyId: string; } ⋮---- -export interface GetUnfilledStrategyOrdersRequestV3 { - category: - | 'SPOT' - | 'MARGIN' - | 'USDT-FUTURES' - | 'COIN-FUTURES' - | 'USDC-FUTURES'; - type?: StrategyOrderTypeV3; +export interface GetCopyFuturesCurrentTpSlOrdersRequestV3 { + projectId: string; } ⋮---- -export interface GetHistoryStrategyOrdersRequestV3 { - category: - | 'SPOT' - | 'MARGIN' - | 'USDT-FUTURES' - | 'COIN-FUTURES' - | 'USDC-FUTURES'; - type?: StrategyOrderTypeV3; +export interface GetCopyFuturesTpSlOrderHistoryRequestV3 { + projectId: string; startTime?: string; endTime?: string; limit?: string; cursor?: string; } -⋮---- -export interface GetStrategySubOrdersRequestV3 { - orderId?: string; - clientOid?: string; - limit?: string; - cursor?: string; -} ================ File: src/types/response/v2/futures.ts @@ -9806,261 +9765,118 @@ export interface GetBrokerSubApiKeyResponseV3 { } ================ -File: src/types/websockets/ws-api-request.ts +File: src/types/response/v3/strategy.ts ================ -import type { FuturesMarginModeV3 } from '../request/v3/trade.js'; +import type { + StrategyIcebergParamsV3, + StrategyOcoParamsV3, + StrategyOrderStatusV3, + StrategyOrderTypeV3, + StrategyTrailingStopParamsV3, + StrategyTriggerByV3, + StrategyTriggerOrderTypeV3, + StrategyTwapParamsV3, +} from '../../request/v3/strategy.js'; ⋮---- -export interface WSAPIPlaceOrderRequestV3 { +export interface PlaceStrategyOrderResponseV3 { + orderId: string; + clientOid: string; +} +⋮---- +export interface ModifyStrategyOrderResponseV3 { + orderId: string; + clientOid: string; +} +⋮---- +export interface StrategyOrderV3 { + orderId: string; + clientOid: string; + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES' | string; symbol: string; - orderType: 'limit' | 'market'; qty: string; - price?: string; - side: 'buy' | 'sell'; - posSide?: 'long' | 'short'; - timeInForce?: 'gtc' | 'ioc' | 'fok' | 'post_only' | 'rpi'; - 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'; + posSide: 'long' | 'short'; + status: StrategyOrderStatusV3; + type?: StrategyOrderTypeV3 | string; + triggerType?: 'takeProfit' | 'stopLoss'; + tpTriggerBy?: StrategyTriggerByV3; + slTriggerBy?: StrategyTriggerByV3; takeProfit?: string; stopLoss?: string; - tpOrderType?: 'limit' | 'market'; - slOrderType?: 'limit' | 'market'; + tpOrderType?: StrategyTriggerOrderTypeV3; + slOrderType?: StrategyTriggerOrderTypeV3; tpLimitPrice?: string; slLimitPrice?: string; - /** Order TTL in ms [10, 60000]. Only effective when requestTime is also set on the envelope */ - receiveWindow?: string; - /** Spot only. Default: no */ - autoBorrow?: 'yes' | 'no'; + triggerBy?: StrategyTriggerByV3; + triggerPrice?: string; + triggerOrderType?: StrategyTriggerOrderTypeV3; + triggerOrderPrice?: string; + ocoParams?: StrategyOcoParamsV3; + trailingStopParams?: StrategyTrailingStopParamsV3; + icebergParams?: StrategyIcebergParamsV3; + twapParams?: StrategyTwapParamsV3; + createdTime: string; + updatedTime: 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 */ -⋮---- -/** Order TTL in ms [10, 60000]. Only effective when requestTime is also set on the envelope */ -⋮---- -/** Spot only. Default: no */ +export interface StrategySubOrderV3 { + subOrderId: string; + subClientOid?: string; + orderId?: string; + clientOid?: string; + category?: string; + symbol?: string; + side?: string; + posSide?: string; + orderType?: string; + price?: string; + qty?: string; + cumExecQty?: string; + avgPrice?: string; + status?: string; + createdTime?: string; + updatedTime?: string; +} ================ -File: src/types/websockets/ws-api.ts +File: src/types/websockets/ws-events.ts ================ -import { WS_KEY_MAP } from '../../util/websocket-util.js'; -import { - CancelOrderRequestV3, - ModifyOrderRequestV3, -} from '../request/v3/trade.js'; -import { - CancelOrderResponseV3, - ModifyOrderResponseV3, -} 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 MessageEventLike { + target: WebSocket; + type: 'message'; + data: string; +} ⋮---- -// 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' - | 'modify-order' - | 'batch-modify'; +export function isMessageEvent(msg: unknown): msg is MessageEventLike ⋮---- -export interface WSOperationLoginParams { - apiKey: string; - passphrase: string; - timestamp: number; - sign: string; +export interface WsBaseEvent { + action: TAction; + arg: unknown; + data: TData[]; } ⋮---- -export interface WSAPIRequestBitgetV3 { - op: 'trade'; - id: string; - category: BitgetInstTypeV3; - topic: WSAPIOperation; - args: TWSParams | TWSParams[]; - /** Client-side request timestamp; required for receiveWindow on place-order */ - requestTime?: string; +export interface WsSnapshotChannelEvent extends WsBaseEvent<'snapshot'> { + arg: { + instType: string; + channel: string; + instId: string; + }; } ⋮---- -/** Client-side request timestamp; required for receiveWindow on place-order */ -⋮---- -export interface WSAPIRequestFlags { - /** If true, will skip auth requirement for WS API connection */ - authIsOptional?: boolean | undefined; +export interface WsSnapshotAccountEvent extends WsBaseEvent<'snapshot'> { + arg: { + instType: string; + channel: 'account'; + instId: 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 -⋮---- -/** - -/** - * V2 request looks like this: -{ - "op":"subscribe", - "args":[ - { - "instType":"SPOT", - "channel":"ticker", - "instId":"BTCUSDT" - }, - { - "instType":"SPOT", - "channel":"candle5m", - "instId":"BTCUSDT" - } - ] -} - */ -export interface WsRequestOperationBitget { - op: WSOperation; - args?: (TWSRequestArg | string | number)[]; -} -export interface WSAPIRateLimitV3 { - limit: string; - remaining: 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; - /** Gateway receive time, Unix microseconds */ - receiveTime?: string; - /** Gateway push time, Unix microseconds */ - pushTime?: string; - rateLimit?: WSAPIRateLimitV3[]; -} -⋮---- -/** Auto-generated */ -⋮---- -/** Connection ID (trade operation responses, May 2026+) */ -⋮---- -/** Gateway receive time, Unix microseconds */ -⋮---- -/** Gateway push time, Unix microseconds */ -⋮---- -/** - * List of operations supported for this WsKey (connection) - */ -export interface WsAPIWsKeyTopicMap { - [WS_KEY_MAP.v3Private]: WSAPIOperation; -} -⋮---- -/** - * 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/docs/uta/websocket/private/Batch-Cancel-Order-Channel - 'batch-cancel': CancelOrderRequestV3[]; - 'modify-order': ModifyOrderRequestV3; - 'batch-modify': ModifyOrderRequestV3[]; -} -⋮---- -// 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/docs/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/docs/uta/websocket/private/Batch-Cancel-Order-Channel - 'batch-cancel': WSAPIResponse; - 'modify-order': WSAPIResponse<[ModifyOrderResponseV3], 'modify-order'>; - 'batch-modify': WSAPIResponse; -} -⋮---- -// 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/docs/uta/websocket/private/Batch-Cancel-Order-Channel - -================ -File: src/types/websockets/ws-events.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[]; -} -⋮---- -export interface WsSnapshotChannelEvent extends WsBaseEvent<'snapshot'> { - arg: { - instType: string; - channel: string; - instId: string; - }; -} -⋮---- -export interface WsSnapshotAccountEvent extends WsBaseEvent<'snapshot'> { - arg: { - instType: string; - channel: 'account'; - instId: string; - }; -} -⋮---- -export interface WsSnapshotPositionsEvent extends WsBaseEvent<'snapshot'> { - arg: { - instType: string; - channel: 'positions'; - instId: string; - }; -} +export interface WsSnapshotPositionsEvent extends WsBaseEvent<'snapshot'> { + arg: { + instType: string; + channel: 'positions'; + instId: string; + }; +} ⋮---- export interface WsAccountSnapshotDataUMCBL { marginCoin: string; @@ -10136,6 +9952,52 @@ export interface WsDepthBookDataV2 { } ⋮---- /** Futures books channel only - previous push serial number */ +⋮---- +/** UTA account channel coin row */ +export interface WsAccountCoinV3 { + coin: string; + balance: string; + /** Coin balance before borrowing-related amounts are deducted */ + balanceOriginal?: string; + available: string; + locked: string; + equity: string; + usdValue: string; + borrow: string; + debts: string; + bonus?: string; +} +⋮---- +/** Coin balance before borrowing-related amounts are deducted */ +⋮---- +/** UTA account channel push. action is snapshot or update */ +export interface WsAccountDataV3 { + totalEquity: string; + effEquity: string; + mmr: string; + imr: string; + mgnRatio: string; + positionMgnRatio: string; + unrealisedPnL: string; + coin: WsAccountCoinV3[]; +} +⋮---- +/** + * UTA books / books50 push. + * books and books50: first message is a snapshot, later messages are incremental updates. + * pseq is set on those two topics. + */ +export interface WsOrderBookDataV3 { + a: [string, string][]; + b: [string, string][]; + seq: string | number; + pseq?: string | number; + /** Present on the books topic */ + maxDepth?: string; + ts: string; +} +⋮---- +/** Present on the books topic */ ================ File: src/websocket-client-v3.ts @@ -10571,49 +10433,200 @@ logger, // Optional: inject a custom logger */ ================ -File: src/types/response/v3/copytrading.ts +File: src/types/request/v3/strategy.ts ================ -/** - * - * - * Copy Trading | Futures (UTA) - * - * - */ +export type StrategyOrderTypeV3 = + | 'tpsl' + | 'trigger' + | 'oco' + | 'trailing_stop' + | 'iceberg' + | 'twap'; ⋮---- -export interface CopyFuturesMarginDetailV3 { - marginCoin: string; - maxLongCount: string; - remainingLongCount: string; - maxShortCount: string; - remainingShortCount: string; -} +export type StrategyOrderStatusV3 = + | 'pending' + | 'success' + | 'failed' + | 'cancelled' + | 'submitting'; ⋮---- -export interface CopyFuturesTradingPairV3 { - symbol: string; - leverage: string; - marginDetails: CopyFuturesMarginDetailV3[]; -} +export type StrategyTriggerByV3 = 'market' | 'mark'; ⋮---- -export interface CopyFuturesPositionSummaryV3 { - unrealizedPnl: string; - realizedPnl: string; - holdSize: string; - avgPrice: string; - symbol: string; - leverage: string; - marginMode: string; - liqPrice: string; - margin: string; - holdSide: string; - roi: string; - markPrice: string; - positionValue: string; +export type StrategyTriggerOrderTypeV3 = 'limit' | 'market'; +⋮---- +export interface StrategyOcoParamsV3 { + ocoLimitPrice?: string; + ocoTriggerPrice?: string; + ocoOrderType?: StrategyTriggerOrderTypeV3; + ocoOrderPrice?: string; } ⋮---- -export interface CopyFuturesMaxTransferableV3 { - maxTransferable: string; - available: string; +export interface StrategyTrailingStopParamsV3 { + activationPrice?: string; + activationType?: string; + trailType?: string; + trailVariance?: string; + preOrderType?: StrategyTriggerOrderTypeV3; + preOrderPrice?: string; +} +⋮---- +export interface StrategyIcebergParamsV3 { + splitMode?: string; + qtyPerOrder?: string; + splitOrderNumbers?: string; + orderPreference?: string; + executionStrategy?: string; + fixedDistanceType?: string; + distance?: string; + fixedPrice?: string; + priceLimit?: string; +} +⋮---- +export interface StrategyTwapParamsV3 { + duration?: string; + interval?: string; + orderType?: StrategyTriggerOrderTypeV3; + limitOffsetType?: string; + limitOffsetPercentage?: string; + limitOffsetSpread?: string; + twapTriggerPrice?: string; + twapTerminationPrice?: string; +} +⋮---- +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; + ocoParams?: StrategyOcoParamsV3; + trailingStopParams?: StrategyTrailingStopParamsV3; + icebergParams?: StrategyIcebergParamsV3; + twapParams?: StrategyTwapParamsV3; +} +⋮---- +/** 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 CancelStrategyOrderRequestV3 { + orderId?: string; + clientOid?: string; +} +⋮---- +export interface GetUnfilledStrategyOrdersRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + type?: StrategyOrderTypeV3; +} +⋮---- +export interface GetHistoryStrategyOrdersRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + type?: StrategyOrderTypeV3; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} +⋮---- +export interface GetStrategySubOrdersRequestV3 { + orderId?: string; + clientOid?: string; + limit?: string; + cursor?: string; +} + +================ +File: src/types/response/v3/copytrading.ts +================ +/** + * + * + * Copy Trading | Futures (UTA) + * + * + */ +⋮---- +export interface CopyFuturesMarginDetailV3 { + marginCoin: string; + maxLongCount: string; + remainingLongCount: string; + maxShortCount: string; + remainingShortCount: string; +} +⋮---- +export interface CopyFuturesTradingPairV3 { + symbol: string; + leverage: string; + marginDetails: CopyFuturesMarginDetailV3[]; +} +⋮---- +export interface CopyFuturesPositionSummaryV3 { + unrealizedPnl: string; + realizedPnl: string; + holdSize: string; + avgPrice: string; + symbol: string; + leverage: string; + marginMode: string; + liqPrice: string; + margin: string; + holdSide: string; + roi: string; + markPrice: string; + positionValue: string; +} +⋮---- +export interface CopyFuturesMaxTransferableV3 { + maxTransferable: string; + available: string; } ⋮---- export interface CopyFuturesTransferResponseV3 { @@ -10692,43 +10705,369 @@ export interface CopyFuturesProfitDetailsV3 { list: CopyFuturesProfitDetailV3[]; nextCursor: string; } +⋮---- +export interface CopyFuturesPortfolioOverviewV3 { + projectId: string; + asset: string; + roi: string; + totalProfit: string; + followerProfit: string; + maxDrawdown: string; +} +⋮---- +export interface CopyFuturesCopySettingsV3 { + type: 'fixed_ratio' | 'fixed_margin' | string; + amount: string; + tradingPairList: string[]; + marginPerOrder: string; + autoCopy: 'on' | 'off' | string; + leverage: string; + maxEntrySlippage: string; + maxMarginRatio: string; + /** API field name (Bitget spelling). */ + maxPostionValue: string; +} +⋮---- +/** API field name (Bitget spelling). */ +⋮---- +export interface CopyFuturesFollowerTransferRecordV3 { + fromType: string; + toType: string; + amount: string; + coin: string; + status: string; + createdTime: string; +} +⋮---- +export interface CopyFuturesFollowerTransferRecordListV3 { + list: CopyFuturesFollowerTransferRecordV3[]; + nextCursor?: string; +} +⋮---- +export interface CopyFuturesCurrentCopyV3 { + eliteTrader: string; + estNetProfit: string; + profitShare: string; + estValue: string; + available: string; + currentInvestment: string; +} +⋮---- +export interface CopyFuturesCopyProfitDetailItemV3 { + settleTime: string; + profit: string; + allocatedPnl: string; + pendingPnl: string; + shareRatio: string; + shareProfit: string; +} +⋮---- +export interface CopyFuturesCopyProfitDetailsV3 { + list: CopyFuturesCopyProfitDetailItemV3[]; + nextCursor?: string; +} +⋮---- +export interface CopyFuturesFollowerPositionV3 { + symbol: string; + marginCoin: string; + posSide: 'long' | 'short' | string; + total: string; + leverage: string; + avgPrice: string; + marginMode: string; + holdMode: string; + createdTime: string; + positionId: string; +} +⋮---- +export interface CopyFuturesFollowerPositionsV3 { + list: CopyFuturesFollowerPositionV3[]; +} +⋮---- +export interface CopyFuturesTpSlOrderV3 { + strategyId: string; + category: string; + symbol: string; + qty: string; + posSide: string; + status: string; + tpTriggerBy: string; + slTriggerBy: string; + takeProfit: string; + stopLoss: string; + tpOrderType: string; + slOrderType: string; +} +⋮---- +export interface CopyFuturesTpSlResponseV3 { + strategyId: string; +} +⋮---- +export interface CopyFuturesCurrentTpSlOrdersV3 { + list: CopyFuturesTpSlOrderV3[]; +} +⋮---- +export interface CopyFuturesTpSlOrderHistoryV3 { + list: CopyFuturesTpSlOrderV3[]; + cursor?: string; +} ================ -File: docs/BITGET_SDK_QUICKSTART_GUIDE.md +File: src/types/websockets/ws-api-request.ts ================ -