bitget-api 2.3.6 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +272 -18
- package/{lib → dist/cjs}/broker-client.d.ts +3 -2
- package/{lib → dist/cjs}/broker-client.js +4 -4
- package/dist/cjs/broker-client.js.map +1 -0
- package/{lib → dist/cjs}/constants/enum.d.ts +3 -0
- package/{lib → dist/cjs}/constants/enum.js +3 -0
- package/dist/cjs/constants/enum.js.map +1 -0
- package/{lib → dist/cjs}/futures-client.d.ts +5 -2
- package/{lib → dist/cjs}/futures-client.js +18 -9
- package/dist/cjs/futures-client.js.map +1 -0
- package/dist/cjs/index.d.ts +50 -0
- package/dist/cjs/index.js +67 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/{lib → dist/cjs}/rest-client-v2.d.ts +17 -2
- package/{lib → dist/cjs}/rest-client-v2.js +62 -74
- package/dist/cjs/rest-client-v2.js.map +1 -0
- package/dist/cjs/rest-client-v3.d.ts +440 -0
- package/dist/cjs/rest-client-v3.js +573 -0
- package/dist/cjs/rest-client-v3.js.map +1 -0
- package/{lib → dist/cjs}/spot-client.d.ts +5 -2
- package/{lib → dist/cjs}/spot-client.js +21 -23
- package/dist/cjs/spot-client.js.map +1 -0
- package/{lib → dist/cjs}/types/request/shared.d.ts +4 -4
- package/dist/cjs/types/request/shared.js.map +1 -0
- package/{lib → dist/cjs}/types/request/v1/brokerV1.d.ts +1 -1
- package/dist/cjs/types/request/v1/brokerV1.js.map +1 -0
- package/{lib → dist/cjs}/types/request/v1/futuresV1.d.ts +10 -10
- package/dist/cjs/types/request/v1/futuresV1.js.map +1 -0
- package/{lib → dist/cjs}/types/request/v1/spotV1.d.ts +4 -4
- package/dist/cjs/types/request/v1/spotV1.js.map +1 -0
- package/{lib → dist/cjs}/types/request/v2/broker.d.ts +3 -3
- package/dist/cjs/types/request/v2/broker.js.map +1 -0
- package/{lib → dist/cjs}/types/request/v2/common.d.ts +1 -1
- package/dist/cjs/types/request/v2/common.js.map +1 -0
- package/{lib → dist/cjs}/types/request/v2/copytrading.d.ts +5 -5
- package/dist/cjs/types/request/v2/copytrading.js.map +1 -0
- package/dist/cjs/types/request/v2/earn.js.map +1 -0
- package/{lib → dist/cjs}/types/request/v2/futures.d.ts +9 -9
- package/dist/cjs/types/request/v2/futures.js.map +1 -0
- package/{lib → dist/cjs}/types/request/v2/margin.d.ts +5 -5
- package/dist/cjs/types/request/v2/margin.js.map +1 -0
- package/{lib → dist/cjs}/types/request/v2/spot.d.ts +12 -12
- package/dist/cjs/types/request/v2/spot.js.map +1 -0
- package/dist/cjs/types/request/v3/account.d.ts +162 -0
- package/dist/cjs/types/request/v3/account.js +4 -0
- package/dist/cjs/types/request/v3/account.js.map +1 -0
- package/dist/cjs/types/request/v3/loan.d.ts +31 -0
- package/dist/cjs/types/request/v3/loan.js +3 -0
- package/dist/cjs/types/request/v3/loan.js.map +1 -0
- package/dist/cjs/types/request/v3/public.d.ts +65 -0
- package/dist/cjs/types/request/v3/public.js +3 -0
- package/dist/cjs/types/request/v3/public.js.map +1 -0
- package/dist/cjs/types/request/v3/strategy.d.ts +46 -0
- package/dist/cjs/types/request/v3/strategy.js +3 -0
- package/dist/cjs/types/request/v3/strategy.js.map +1 -0
- package/dist/cjs/types/request/v3/trade.d.ts +112 -0
- package/dist/cjs/types/request/v3/trade.js +3 -0
- package/dist/cjs/types/request/v3/trade.js.map +1 -0
- package/{lib → dist/cjs}/types/response/v1/futures.d.ts +1 -1
- package/dist/cjs/types/response/v1/futures.js.map +1 -0
- package/dist/cjs/types/response/v1/shared.js.map +1 -0
- package/dist/cjs/types/response/v1/spot.js.map +1 -0
- package/dist/cjs/types/response/v2/broker.js.map +1 -0
- package/dist/cjs/types/response/v2/common.js.map +1 -0
- package/dist/cjs/types/response/v2/copy-trading.js.map +1 -0
- package/dist/cjs/types/response/v2/earn.js.map +1 -0
- package/{lib → dist/cjs}/types/response/v2/futures.d.ts +1 -1
- package/dist/cjs/types/response/v2/futures.js.map +1 -0
- package/dist/cjs/types/response/v2/margin.js.map +1 -0
- package/{lib → dist/cjs}/types/response/v2/spot.d.ts +1 -1
- package/dist/cjs/types/response/v2/spot.js.map +1 -0
- package/dist/cjs/types/response/v3/account.d.ts +197 -0
- package/dist/cjs/types/response/v3/account.js +3 -0
- package/dist/cjs/types/response/v3/account.js.map +1 -0
- package/dist/cjs/types/response/v3/loan.d.ts +85 -0
- package/dist/cjs/types/response/v3/loan.js +3 -0
- package/dist/cjs/types/response/v3/loan.js.map +1 -0
- package/dist/cjs/types/response/v3/public.d.ts +142 -0
- package/dist/cjs/types/response/v3/public.js +3 -0
- package/dist/cjs/types/response/v3/public.js.map +1 -0
- package/dist/cjs/types/response/v3/strategy.d.ts +26 -0
- package/dist/cjs/types/response/v3/strategy.js +3 -0
- package/dist/cjs/types/response/v3/strategy.js.map +1 -0
- package/dist/cjs/types/response/v3/trade.d.ts +193 -0
- package/dist/cjs/types/response/v3/trade.js +3 -0
- package/dist/cjs/types/response/v3/trade.js.map +1 -0
- package/dist/cjs/types/shared.d.ts +8 -0
- package/{lib → dist/cjs}/types/shared.js.map +1 -1
- package/dist/cjs/types/websockets/ws-api-request.d.ts +20 -0
- package/dist/cjs/types/websockets/ws-api-request.js +3 -0
- package/dist/cjs/types/websockets/ws-api-request.js.map +1 -0
- package/dist/cjs/types/websockets/ws-api-response.d.ts +6 -0
- package/dist/cjs/types/websockets/ws-api-response.js +3 -0
- package/dist/cjs/types/websockets/ws-api-response.js.map +1 -0
- package/dist/cjs/types/websockets/ws-api.d.ts +91 -0
- package/dist/cjs/types/websockets/ws-api.js +11 -0
- package/dist/cjs/types/websockets/ws-api.js.map +1 -0
- package/{lib/types/websockets/events.d.ts → dist/cjs/types/websockets/ws-events.d.ts} +6 -0
- package/dist/cjs/types/websockets/ws-events.js +11 -0
- package/dist/cjs/types/websockets/ws-events.js.map +1 -0
- package/dist/cjs/types/websockets/ws-general.d.ts +112 -0
- package/dist/cjs/types/websockets/ws-general.js +3 -0
- package/dist/cjs/types/websockets/ws-general.js.map +1 -0
- package/{lib → dist/cjs}/util/BaseRestClient.d.ts +3 -2
- package/dist/cjs/util/BaseRestClient.js +274 -0
- package/dist/cjs/util/BaseRestClient.js.map +1 -0
- package/dist/cjs/util/BaseWSClient.d.ts +197 -0
- package/dist/cjs/util/BaseWSClient.js +759 -0
- package/dist/cjs/util/BaseWSClient.js.map +1 -0
- package/dist/cjs/util/WsStore.d.ts +74 -0
- package/dist/cjs/util/WsStore.js +287 -0
- package/dist/cjs/util/WsStore.js.map +1 -0
- package/{lib → dist/cjs}/util/WsStore.types.d.ts +27 -1
- package/{lib → dist/cjs}/util/WsStore.types.js +3 -2
- package/dist/cjs/util/WsStore.types.js.map +1 -0
- package/dist/cjs/util/logger.d.ts +8 -0
- package/{lib → dist/cjs}/util/logger.js +2 -10
- package/dist/cjs/util/logger.js.map +1 -0
- package/{lib → dist/cjs}/util/requestUtils.d.ts +18 -1
- package/{lib → dist/cjs}/util/requestUtils.js +6 -5
- package/dist/cjs/util/requestUtils.js.map +1 -0
- package/{lib → dist/cjs}/util/type-guards.d.ts +4 -1
- package/{lib → dist/cjs}/util/type-guards.js +20 -10
- package/dist/cjs/util/type-guards.js.map +1 -0
- package/dist/cjs/util/webCryptoAPI.d.ts +14 -0
- package/dist/cjs/util/webCryptoAPI.js +80 -0
- package/dist/cjs/util/webCryptoAPI.js.map +1 -0
- package/dist/cjs/util/websocket-util.d.ts +88 -0
- package/dist/cjs/util/websocket-util.js +241 -0
- package/dist/cjs/util/websocket-util.js.map +1 -0
- package/dist/cjs/websocket-api-client.d.ts +89 -0
- package/dist/cjs/websocket-api-client.js +122 -0
- package/dist/cjs/websocket-api-client.js.map +1 -0
- package/{lib/websocket-client.d.ts → dist/cjs/websocket-client-legacy-v1.d.ts} +6 -6
- package/{lib/websocket-client.js → dist/cjs/websocket-client-legacy-v1.js} +211 -156
- package/dist/cjs/websocket-client-legacy-v1.js.map +1 -0
- package/dist/cjs/websocket-client-v2.d.ts +79 -0
- package/dist/cjs/websocket-client-v2.js +339 -0
- package/dist/cjs/websocket-client-v2.js.map +1 -0
- package/dist/cjs/websocket-client-v3.d.ts +84 -0
- package/dist/cjs/websocket-client-v3.js +408 -0
- package/dist/cjs/websocket-client-v3.js.map +1 -0
- package/dist/mjs/broker-client.d.ts +127 -0
- package/dist/mjs/broker-client.js +158 -0
- package/dist/mjs/broker-client.js.map +1 -0
- package/dist/mjs/constants/enum.d.ts +31 -0
- package/dist/mjs/constants/enum.js +32 -0
- package/dist/mjs/constants/enum.js.map +1 -0
- package/dist/mjs/futures-client.d.ts +184 -0
- package/dist/mjs/futures-client.js +473 -0
- package/dist/mjs/futures-client.js.map +1 -0
- package/dist/mjs/index.d.ts +50 -0
- package/dist/mjs/index.js +51 -0
- package/dist/mjs/index.js.map +1 -0
- package/dist/mjs/package.json +3 -0
- package/dist/mjs/rest-client-v2.d.ts +1098 -0
- package/dist/mjs/rest-client-v2.js +1092 -0
- package/dist/mjs/rest-client-v2.js.map +1 -0
- package/dist/mjs/rest-client-v3.d.ts +440 -0
- package/dist/mjs/rest-client-v3.js +566 -0
- package/dist/mjs/rest-client-v3.js.map +1 -0
- package/dist/mjs/spot-client.d.ts +154 -0
- package/dist/mjs/spot-client.js +273 -0
- package/dist/mjs/spot-client.js.map +1 -0
- package/dist/mjs/types/request/shared.d.ts +23 -0
- package/dist/mjs/types/request/shared.js +2 -0
- package/dist/mjs/types/request/shared.js.map +1 -0
- package/dist/mjs/types/request/v1/brokerV1.d.ts +23 -0
- package/dist/mjs/types/request/v1/brokerV1.js +2 -0
- package/dist/mjs/types/request/v1/brokerV1.js.map +1 -0
- package/dist/mjs/types/request/v1/futuresV1.d.ts +168 -0
- package/dist/mjs/types/request/v1/futuresV1.js +2 -0
- package/dist/mjs/types/request/v1/futuresV1.js.map +1 -0
- package/dist/mjs/types/request/v1/spotV1.d.ts +105 -0
- package/dist/mjs/types/request/v1/spotV1.js +2 -0
- package/dist/mjs/types/request/v1/spotV1.js.map +1 -0
- package/dist/mjs/types/request/v2/broker.d.ts +69 -0
- package/dist/mjs/types/request/v2/broker.js +7 -0
- package/dist/mjs/types/request/v2/broker.js.map +1 -0
- package/dist/mjs/types/request/v2/common.d.ts +163 -0
- package/dist/mjs/types/request/v2/common.js +2 -0
- package/dist/mjs/types/request/v2/common.js.map +1 -0
- package/dist/mjs/types/request/v2/copytrading.d.ts +196 -0
- package/dist/mjs/types/request/v2/copytrading.js +9 -0
- package/dist/mjs/types/request/v2/copytrading.js.map +1 -0
- package/dist/mjs/types/request/v2/earn.d.ts +121 -0
- package/dist/mjs/types/request/v2/earn.js +9 -0
- package/dist/mjs/types/request/v2/earn.js.map +1 -0
- package/dist/mjs/types/request/v2/futures.d.ts +363 -0
- package/dist/mjs/types/request/v2/futures.js +2 -0
- package/dist/mjs/types/request/v2/futures.js.map +1 -0
- package/dist/mjs/types/request/v2/margin.d.ts +121 -0
- package/dist/mjs/types/request/v2/margin.js +7 -0
- package/dist/mjs/types/request/v2/margin.js.map +1 -0
- package/dist/mjs/types/request/v2/spot.d.ts +265 -0
- package/dist/mjs/types/request/v2/spot.js +2 -0
- package/dist/mjs/types/request/v2/spot.js.map +1 -0
- package/dist/mjs/types/request/v3/account.d.ts +162 -0
- package/dist/mjs/types/request/v3/account.js +3 -0
- package/dist/mjs/types/request/v3/account.js.map +1 -0
- package/dist/mjs/types/request/v3/loan.d.ts +31 -0
- package/dist/mjs/types/request/v3/loan.js +2 -0
- package/dist/mjs/types/request/v3/loan.js.map +1 -0
- package/dist/mjs/types/request/v3/public.d.ts +65 -0
- package/dist/mjs/types/request/v3/public.js +2 -0
- package/dist/mjs/types/request/v3/public.js.map +1 -0
- package/dist/mjs/types/request/v3/strategy.d.ts +46 -0
- package/dist/mjs/types/request/v3/strategy.js +2 -0
- package/dist/mjs/types/request/v3/strategy.js.map +1 -0
- package/dist/mjs/types/request/v3/trade.d.ts +112 -0
- package/dist/mjs/types/request/v3/trade.js +2 -0
- package/dist/mjs/types/request/v3/trade.js.map +1 -0
- package/dist/mjs/types/response/v1/futures.d.ts +72 -0
- package/dist/mjs/types/response/v1/futures.js +2 -0
- package/dist/mjs/types/response/v1/futures.js.map +1 -0
- package/dist/mjs/types/response/v1/shared.d.ts +15 -0
- package/dist/mjs/types/response/v1/shared.js +2 -0
- package/dist/mjs/types/response/v1/shared.js.map +1 -0
- package/dist/mjs/types/response/v1/spot.d.ts +65 -0
- package/dist/mjs/types/response/v1/spot.js +2 -0
- package/dist/mjs/types/response/v1/spot.js.map +1 -0
- package/dist/mjs/types/response/v2/broker.d.ts +135 -0
- package/dist/mjs/types/response/v2/broker.js +7 -0
- package/dist/mjs/types/response/v2/broker.js.map +1 -0
- package/dist/mjs/types/response/v2/common.d.ts +384 -0
- package/dist/mjs/types/response/v2/common.js +7 -0
- package/dist/mjs/types/response/v2/common.js.map +1 -0
- package/dist/mjs/types/response/v2/copy-trading.d.ts +385 -0
- package/dist/mjs/types/response/v2/copy-trading.js +9 -0
- package/dist/mjs/types/response/v2/copy-trading.js.map +1 -0
- package/dist/mjs/types/response/v2/earn.d.ts +294 -0
- package/dist/mjs/types/response/v2/earn.js +9 -0
- package/dist/mjs/types/response/v2/earn.js.map +1 -0
- package/dist/mjs/types/response/v2/futures.d.ts +546 -0
- package/dist/mjs/types/response/v2/futures.js +7 -0
- package/dist/mjs/types/response/v2/futures.js.map +1 -0
- package/dist/mjs/types/response/v2/margin.d.ts +277 -0
- package/dist/mjs/types/response/v2/margin.js +7 -0
- package/dist/mjs/types/response/v2/margin.js.map +1 -0
- package/dist/mjs/types/response/v2/spot.d.ts +385 -0
- package/dist/mjs/types/response/v2/spot.js +7 -0
- package/dist/mjs/types/response/v2/spot.js.map +1 -0
- package/dist/mjs/types/response/v3/account.d.ts +197 -0
- package/dist/mjs/types/response/v3/account.js +2 -0
- package/dist/mjs/types/response/v3/account.js.map +1 -0
- package/dist/mjs/types/response/v3/loan.d.ts +85 -0
- package/dist/mjs/types/response/v3/loan.js +2 -0
- package/dist/mjs/types/response/v3/loan.js.map +1 -0
- package/dist/mjs/types/response/v3/public.d.ts +142 -0
- package/dist/mjs/types/response/v3/public.js +2 -0
- package/dist/mjs/types/response/v3/public.js.map +1 -0
- package/dist/mjs/types/response/v3/strategy.d.ts +26 -0
- package/dist/mjs/types/response/v3/strategy.js +2 -0
- package/dist/mjs/types/response/v3/strategy.js.map +1 -0
- package/dist/mjs/types/response/v3/trade.d.ts +193 -0
- package/dist/mjs/types/response/v3/trade.js +2 -0
- package/dist/mjs/types/response/v3/trade.js.map +1 -0
- package/dist/mjs/types/shared.d.ts +8 -0
- package/dist/mjs/types/shared.js +2 -0
- package/{lib/types/request → dist/mjs/types}/shared.js.map +1 -1
- package/dist/mjs/types/websockets/ws-api-request.d.ts +20 -0
- package/dist/mjs/types/websockets/ws-api-request.js +2 -0
- package/dist/mjs/types/websockets/ws-api-request.js.map +1 -0
- package/dist/mjs/types/websockets/ws-api-response.d.ts +6 -0
- package/dist/mjs/types/websockets/ws-api-response.js +2 -0
- package/dist/mjs/types/websockets/ws-api-response.js.map +1 -0
- package/dist/mjs/types/websockets/ws-api.d.ts +91 -0
- package/dist/mjs/types/websockets/ws-api.js +8 -0
- package/dist/mjs/types/websockets/ws-api.js.map +1 -0
- package/dist/mjs/types/websockets/ws-events.d.ts +81 -0
- package/dist/mjs/types/websockets/ws-events.js +8 -0
- package/dist/mjs/types/websockets/ws-events.js.map +1 -0
- package/dist/mjs/types/websockets/ws-general.d.ts +112 -0
- package/dist/mjs/types/websockets/ws-general.js +2 -0
- package/dist/mjs/types/websockets/ws-general.js.map +1 -0
- package/dist/mjs/util/BaseRestClient.d.ts +40 -0
- package/dist/mjs/util/BaseRestClient.js +268 -0
- package/dist/mjs/util/BaseRestClient.js.map +1 -0
- package/dist/mjs/util/BaseWSClient.d.ts +197 -0
- package/dist/mjs/util/BaseWSClient.js +752 -0
- package/dist/mjs/util/BaseWSClient.js.map +1 -0
- package/dist/mjs/util/WsStore.d.ts +74 -0
- package/dist/mjs/util/WsStore.js +282 -0
- package/dist/mjs/util/WsStore.js.map +1 -0
- package/dist/mjs/util/WsStore.types.d.ts +52 -0
- package/dist/mjs/util/WsStore.types.js +11 -0
- package/dist/mjs/util/WsStore.types.js.map +1 -0
- package/dist/mjs/util/logger.d.ts +8 -0
- package/dist/mjs/util/logger.js +14 -0
- package/dist/mjs/util/logger.js.map +1 -0
- package/dist/mjs/util/requestUtils.d.ts +61 -0
- package/dist/mjs/util/requestUtils.js +50 -0
- package/dist/mjs/util/requestUtils.js.map +1 -0
- package/dist/mjs/util/type-guards.d.ts +16 -0
- package/dist/mjs/util/type-guards.js +62 -0
- package/dist/mjs/util/type-guards.js.map +1 -0
- package/dist/mjs/util/webCryptoAPI.d.ts +14 -0
- package/dist/mjs/util/webCryptoAPI.js +76 -0
- package/dist/mjs/util/webCryptoAPI.js.map +1 -0
- package/dist/mjs/util/websocket-util.d.ts +88 -0
- package/dist/mjs/util/websocket-util.js +227 -0
- package/dist/mjs/util/websocket-util.js.map +1 -0
- package/dist/mjs/websocket-api-client.d.ts +89 -0
- package/dist/mjs/websocket-api-client.js +118 -0
- package/dist/mjs/websocket-api-client.js.map +1 -0
- package/{lib/util/BaseWSClient.d.ts → dist/mjs/websocket-client-legacy-v1.d.ts} +44 -27
- package/dist/mjs/websocket-client-legacy-v1.js +502 -0
- package/dist/mjs/websocket-client-legacy-v1.js.map +1 -0
- package/dist/mjs/websocket-client-v2.d.ts +79 -0
- package/dist/mjs/websocket-client-v2.js +335 -0
- package/dist/mjs/websocket-client-v2.js.map +1 -0
- package/dist/mjs/websocket-client-v3.d.ts +84 -0
- package/dist/mjs/websocket-client-v3.js +404 -0
- package/dist/mjs/websocket-client-v3.js.map +1 -0
- package/package.json +33 -15
- package/index.js +0 -1
- package/lib/broker-client.js.map +0 -1
- package/lib/constants/enum.js.map +0 -1
- package/lib/futures-client.js.map +0 -1
- package/lib/index.d.ts +0 -10
- package/lib/index.js +0 -27
- package/lib/index.js.map +0 -1
- package/lib/rest-client-v2.js.map +0 -1
- package/lib/spot-client.js.map +0 -1
- package/lib/types/index.d.ts +0 -4
- package/lib/types/index.js +0 -21
- package/lib/types/index.js.map +0 -1
- package/lib/types/request/index.d.ts +0 -11
- package/lib/types/request/index.js +0 -28
- package/lib/types/request/index.js.map +0 -1
- package/lib/types/request/v1/brokerV1.js.map +0 -1
- package/lib/types/request/v1/futuresV1.js.map +0 -1
- package/lib/types/request/v1/spotV1.js.map +0 -1
- package/lib/types/request/v2/broker.js.map +0 -1
- package/lib/types/request/v2/common.js.map +0 -1
- package/lib/types/request/v2/copytrading.js.map +0 -1
- package/lib/types/request/v2/earn.js.map +0 -1
- package/lib/types/request/v2/futures.js.map +0 -1
- package/lib/types/request/v2/margin.js.map +0 -1
- package/lib/types/request/v2/spot.js.map +0 -1
- package/lib/types/response/index.d.ts +0 -10
- package/lib/types/response/index.js +0 -27
- package/lib/types/response/index.js.map +0 -1
- package/lib/types/response/v1/futures.js.map +0 -1
- package/lib/types/response/v1/shared.js.map +0 -1
- package/lib/types/response/v1/spot.js.map +0 -1
- package/lib/types/response/v2/broker.js.map +0 -1
- package/lib/types/response/v2/common.js.map +0 -1
- package/lib/types/response/v2/copy-trading.js.map +0 -1
- package/lib/types/response/v2/earn.js.map +0 -1
- package/lib/types/response/v2/futures.js.map +0 -1
- package/lib/types/response/v2/margin.js.map +0 -1
- package/lib/types/response/v2/spot.js.map +0 -1
- package/lib/types/shared.d.ts +0 -8
- package/lib/types/websockets/client.d.ts +0 -76
- package/lib/types/websockets/client.js +0 -3
- package/lib/types/websockets/client.js.map +0 -1
- package/lib/types/websockets/events.js +0 -3
- package/lib/types/websockets/events.js.map +0 -1
- package/lib/types/websockets/index.d.ts +0 -2
- package/lib/types/websockets/index.js +0 -19
- package/lib/types/websockets/index.js.map +0 -1
- package/lib/util/BaseRestClient.js +0 -221
- package/lib/util/BaseRestClient.js.map +0 -1
- package/lib/util/BaseWSClient.js +0 -395
- package/lib/util/BaseWSClient.js.map +0 -1
- package/lib/util/WsStore.d.ts +0 -26
- package/lib/util/WsStore.js +0 -126
- package/lib/util/WsStore.js.map +0 -1
- package/lib/util/WsStore.types.js.map +0 -1
- package/lib/util/browser-support.d.ts +0 -1
- package/lib/util/browser-support.js +0 -45
- package/lib/util/browser-support.js.map +0 -1
- package/lib/util/index.d.ts +0 -6
- package/lib/util/index.js +0 -23
- package/lib/util/index.js.map +0 -1
- package/lib/util/logger.d.ts +0 -9
- package/lib/util/logger.js.map +0 -1
- package/lib/util/node-support.d.ts +0 -2
- package/lib/util/node-support.js +0 -34
- package/lib/util/node-support.js.map +0 -1
- package/lib/util/requestUtils.js.map +0 -1
- package/lib/util/type-guards.js.map +0 -1
- package/lib/util/websocket-util.d.ts +0 -47
- package/lib/util/websocket-util.js +0 -154
- package/lib/util/websocket-util.js.map +0 -1
- package/lib/websocket-client-v2.d.ts +0 -33
- package/lib/websocket-client-v2.js +0 -104
- package/lib/websocket-client-v2.js.map +0 -1
- package/lib/websocket-client.js.map +0 -1
- /package/{lib → dist/cjs}/types/request/shared.js +0 -0
- /package/{lib → dist/cjs}/types/request/v1/brokerV1.js +0 -0
- /package/{lib → dist/cjs}/types/request/v1/futuresV1.js +0 -0
- /package/{lib → dist/cjs}/types/request/v1/spotV1.js +0 -0
- /package/{lib → dist/cjs}/types/request/v2/broker.js +0 -0
- /package/{lib → dist/cjs}/types/request/v2/common.js +0 -0
- /package/{lib → dist/cjs}/types/request/v2/copytrading.js +0 -0
- /package/{lib → dist/cjs}/types/request/v2/earn.d.ts +0 -0
- /package/{lib → dist/cjs}/types/request/v2/earn.js +0 -0
- /package/{lib → dist/cjs}/types/request/v2/futures.js +0 -0
- /package/{lib → dist/cjs}/types/request/v2/margin.js +0 -0
- /package/{lib → dist/cjs}/types/request/v2/spot.js +0 -0
- /package/{lib → dist/cjs}/types/response/v1/futures.js +0 -0
- /package/{lib → dist/cjs}/types/response/v1/shared.d.ts +0 -0
- /package/{lib → dist/cjs}/types/response/v1/shared.js +0 -0
- /package/{lib → dist/cjs}/types/response/v1/spot.d.ts +0 -0
- /package/{lib → dist/cjs}/types/response/v1/spot.js +0 -0
- /package/{lib → dist/cjs}/types/response/v2/broker.d.ts +0 -0
- /package/{lib → dist/cjs}/types/response/v2/broker.js +0 -0
- /package/{lib → dist/cjs}/types/response/v2/common.d.ts +0 -0
- /package/{lib → dist/cjs}/types/response/v2/common.js +0 -0
- /package/{lib → dist/cjs}/types/response/v2/copy-trading.d.ts +0 -0
- /package/{lib → dist/cjs}/types/response/v2/copy-trading.js +0 -0
- /package/{lib → dist/cjs}/types/response/v2/earn.d.ts +0 -0
- /package/{lib → dist/cjs}/types/response/v2/earn.js +0 -0
- /package/{lib → dist/cjs}/types/response/v2/futures.js +0 -0
- /package/{lib → dist/cjs}/types/response/v2/margin.d.ts +0 -0
- /package/{lib → dist/cjs}/types/response/v2/margin.js +0 -0
- /package/{lib → dist/cjs}/types/response/v2/spot.js +0 -0
- /package/{lib → dist/cjs}/types/shared.js +0 -0
|
@@ -0,0 +1,1098 @@
|
|
|
1
|
+
import { FuturesProductTypeV2, MarginType } from './types/request/shared.js';
|
|
2
|
+
import { CreateSubAccountApiKeyRequestV2, GetSubAccountsRequestV2, ModifySubAccountApiKeyRequestV2, ModifySubRequestV2, SubDepositRecordsRequestV2, SubWithdrawalRecordsRequestV2, SubWithdrawalRequestV2 } from './types/request/v2/broker.js';
|
|
3
|
+
import { ConvertQuoteRequestV2, ConvertRequestV2, CreateVirtualSubApiKeyRequestV2, CreateVirtualSubRequestV2, GetAnnouncementsRequestV2, GetConvertBGBHistoryRequestV2, GetConvertHistoryRequestV2, GetFuturesTransactionsRequestV2, GetMarginTransactionsRequestV2, GetMerchantAdvertisementsRequestV2, GetMerchantP2POrdersRequestV2, GetP2PMerchantsRequestV2, GetP2PTransactionsRequestV2, GetSpotTransactionsRequestV2, GetTradeRateRequestV2, ModifyVirtualSubApiKeyRequestV2, ModifyVirtualSubRequestV2 } from './types/request/v2/common.js';
|
|
4
|
+
import { CloseFuturesFollowerPositionsRequestV2, CopyTradingProductTypeV2, FuturesTraderSymbolSettingRequestV2, GetFollowerFuturesCurrentTrackingOrdersRequestV2, GetFollowerFuturesHistoryTrackingOrdersRequestV2, GetFuturesFollowerTradersRequestV2, GetFuturesTraderCurrentOrdersRequestV2, GetFuturesTraderFollowersRequestV2, GetFuturesTraderHistoryOrdersRequestV2, GetFuturesTraderProfitShareDetailRequestV2, GetSpotFollowerHistoryOrdersRequestV2, GetSpotFollowerOpenOrdersRequestV2, GetSpotTraderCurrentOrdersRequestV2, GetSpotTraderFollowersRequestV2, GetSpotTraderHistoryOrdersRequestV2, GetSpotTraderHistoryProfitRequestV2, ModifyFuturesTraderOrderTPSLRequestV2, SpotFollowerCopyTradeSettingV2, UpdateFuturesFollowerSettingsRequestV2, UpdateFuturesFollowerTPSLRequestV2 } from './types/request/v2/copytrading.js';
|
|
5
|
+
import { BorrowLoanRequestV2, GetEarnSavingsAssetsRequestV2, GetEarnSavingsRecordsRequestV2, GetLiquidationRecordsRequestV2, GetLoanEstInterestAndBorrowableRequestV2, GetLoanHistoryRequestV2, GetLoanPledgeRateHistoryRequestV2, GetLoanRepayHistoryRequestV2, GetSharkfinAssetsRequestV2, GetSharkfinRecordsRequestV2, ModifyLoanPledgeRateRequestV2, RedeemSavingsRequestV2, RepayLoanRequestV2 } from './types/request/v2/earn.js';
|
|
6
|
+
import { FuturesAccountBillRequestV2, FuturesBatchCancelOrderRequestV2, FuturesBatchOrderRequestV2, FuturesCancelAllOrdersRequestV2, FuturesCancelOrderRequestV2, FuturesCancelPlanOrderRequestV2, FuturesCandlesRequestV2, FuturesFlashClosePositionsRequestV2, FuturesGetHistoricalFillsRequestV2, FuturesGetHistoryOrdersRequestV2, FuturesGetHistoryPlanOrdersRequestV2, FuturesGetOpenOrdersRequestV2, FuturesGetOrderFillsRequestV2, FuturesGetOrderRequestV2, FuturesGetPlanOrdersRequestV2, FuturesHistoricalPositionsRequestV2, FuturesHistoricTradesRequestV2, FuturesInterestHistoryRequestV2, FuturesMergeDepthRequestV2, FuturesModifyOrderRequestV2, FuturesModifyPlanOrderRequestV2, FuturesModifyTPSLOrderRequestV2, FuturesOpenCountRequestV2, FuturesPlaceOrderRequestV2, FuturesPlanOrderRequestV2, FuturesRecentTradesRequestV2, FuturesReversalOrderRequestV2, FuturesSetAutoMarginRequestV2, FuturesSetLeverageRequestV2, FuturesSetMarginModeRequestV2, FuturesSetPositionMarginRequestV2, FuturesSingleAccountRequestV2, FuturesTPSLOrderRequestV2 } from './types/request/v2/futures.js';
|
|
7
|
+
import { GetBorrowHistoryRequestV2, GetFinancialHistoryRequestV2, GetHistoryOrdersRequestV2, GetInterestHistoryRequestV2, GetLiquidationHistoryRequestV2, GetMarginCurrentOrdersRequestV2, GetMarginLiquidationOrdersRequestV2, GetMarginOrderFillsRequestV2, GetRepayHistoryRequestV2, MarginBatchOrdersRequestV2, MarginPlaceOrderRequestV2 } from './types/request/v2/margin.js';
|
|
8
|
+
import { GetSpotAccountBillsRequestV2, GetSpotCurrentPlanOrdersRequestV2, GetSpotDepositRecordRequestV2, GetSpotFillsRequestV2, GetSpotHistoryOrdersRequestV2, GetSpotHistoryPlanOrdersRequestV2, GetSpotOpenOrdersRequestV2, GetSpotOrderInfoRequestV2, GetSpotSubAccountDepositRecordRequestV2, GetSpotTransferRecordRequestV2, GetSpotWithdrawalRecordRequestV2, SpotAccountTypeV2, SpotBatchCancelOrderRequestV2, SpotBatchOrderRequestV2, SpotCancelandSubmitOrderRequestV2, SpotCancelOrderRequestV2, SpotCandlesRequestV2, SpotHistoricCandlesRequestV2, SpotHistoricTradesRequestV2, SpotMainSubTransferRecordRequestV2, SpotModifyPlanOrderRequestV2, SpotOrderRequestV2, SpotPlanOrderRequestV2, SpotSubAccountTransferRequestV2, SpotTransferRequestV2, SpotWithdrawalRequestV2 } from './types/request/v2/spot.js';
|
|
9
|
+
import { APIResponse } from './types/response/v1/shared.js';
|
|
10
|
+
import { BrokerSubaccountFutureAssetV2, BrokerSubaccountSpotAssetV2, BrokerSubaccountV2, BrokerSubaccountWithdrawalV2, CreateSubaccountApiKeyResponseV2, CreateSubaccountDepositAddressV2, CreateSubaccountResponseV2, ModifySubaccountApiKeyResponseV2, ModifySubaccountResponseV2, SubaccountApiKeyV2, SubaccountDepositV2, SubaccountEmailV2 } from './types/response/v2/broker.js';
|
|
11
|
+
import { AnnouncementV2, BGBConvertCoinV2, BGBConvertHistoryV2, BotAssetV2, ConvertBGBResponseV2, ConvertCurrencyV2, ConvertQuotedPriceV2, ConvertRecordV2, ConvertTradeResponseV2, CreateVirtualSubAccountAndApiKeyV2, CreateVirtualSubAccountApiKeyV2, CreateVirtualSubAccountV2, FundingAssetV2, FuturesActiveBuySellVolumeV2, FuturesActiveLongShortAccountV2, FuturesActiveLongShortPositionV2, FuturesLongShortRatioV2, FuturesTransactionRecordV2, IsolatedMarginBorrowingRatioV2, LeveragedLongShortRatioV2, MarginLoanGrowthRateV2, MarginTransactionRecordV2, ModifyVirtualSubAccountApiKeyV2, P2PMerchantAdvertismentV2, P2PMerchantInfoV2, P2PMerchantOrdersV2, P2PMerchantOrderV2, P2PMerchantV2, SpotFundFlowV2, SpotTransactionRecordV2, SpotWhaleNetFlowV2, SubAccountApiKeyItemV2, VirtualSubAccountV2 } from './types/response/v2/common.js';
|
|
12
|
+
import { CTFuturesFollowerCurrentOrdersV2, CTFuturesFollowerHistoryOrdersV2, CTFuturesFollowerMyTradersV2, CTFuturesFollowerSettingsV2, CTFuturesTraderCurrentOrdersV2, CTFuturesTraderHistoryOrderV2, CTFuturesTraderHistoryProfitSummaryV2, CTFuturesTraderMyFollowersV2, CTFuturesTraderProfitShareHistoryV2, CTFuturesTraderSymbolSettingsV2, CTFuturesTraderTotalOrderSummaryV2, CTSpotFollowerCurrentOrdersV2, CTSpotFollowerFollowConfigurationV2, CTSpotFollowerHistoryOrdersV2, CTSpotFollowerMyTradersV2, CTSpotTraderCurrentTrackingOrdersV2, CTSpotTraderFollowerListV2, CTSpotTraderHistoryOrdersV2, CTSpotTraderHistoryProfitSharingV2, CTSpotTraderProfitSummaryV2, CTSpotTraderTotalOrderDetailV2, CTSpotTraderUnrealizedProfitV2 } from './types/response/v2/copy-trading.js';
|
|
13
|
+
import { EarnLoanCurrenciesV2, EarnLoanDebtsV2, EarnLoanHistoryV2, EarnLoanLiquidationRecordsV2, EarnLoanOrdersV2, EarnLoanPledgeRateHistoryV2, EarnLoanRepayHistoryV2, EarnLoanRepayResponseV2, EarnSavingsAccountV2, EarnSavingsAssetsV2, EarnSavingsProductsV2, EarnSavingsRecordsV2, EarnSavingsSubscriptionDetailV2, EarnSharkfinAccountV2, EarnSharkfinAssetsV2, EarnSharkfinProductsV2, EarnSharkfinRecordsV2, EarnSharkfinSubscriptionDetailV2 } from './types/response/v2/earn.js';
|
|
14
|
+
import { FuturesAccountBillV2, FuturesAccountsV2, FuturesAccountV2, FuturesBatchOrderResponseV2, FuturesCancelAllOrdersV2, FuturesCancelPlanOrderV2, FuturesCandlestickV2, FuturesClosePositionResponseV2, FuturesContractConfigV2, FuturesDiscountRatesV2, FuturesFillV2, FuturesFundingTimeV2, FuturesHistoricalFundingRateV2, FuturesHistoryInterestRateV2, FuturesHistoryOrderV2, FuturesHistoryPlanOrderV2, FuturesHistoryPositionV2, FuturesInterestExchangeRateV2, FuturesInterestHistoryV2, FuturesMergeDepthV2, FuturesOpenInterestV2, FuturesOpenOrderV2, FuturesOrderDetailV2, FuturesOrderFillV2, FuturesPendingPlanOrderV2, FuturesPositionTierV2, FuturesPositionV2, FuturesSubAccountAssetV2, FuturesSymbolPriceV2, FuturesTickerV2, FuturesTriggerSubOrderV2, FuturesVipFeeRateV2, SetLeverageResponseV2, SetMarginModeResponseV2 } from './types/response/v2/futures.js';
|
|
15
|
+
import { CrossInterestRateAndLimitResponseV2, CrossMaxBorrowableResponseV2, CrossMaxTransferableResponseV2, CrossTierConfigurationResponseV2, IsolatedInterestRateAndLimitResponseV2, IsolatedMaxBorrowableResponseV2, IsolatedMaxTransferableResponseV2, IsolatedTierConfigurationResponseV2, MarginAccountAssetV2, MarginBatchOrdersResponseV2, MarginBorrowHistoryItemV2, MarginCurrencyV2, MarginCurrentOrderV2, MarginFinancialHistoryItemV2, MarginHistoryOrderV2, MarginInterestHistoryItemV2, MarginLiquidationHistoryItemV2, MarginLiquidationOrderV2, MarginOrderFillV2, MarginRepaymentHistoryItemV2 } from './types/response/v2/margin.js';
|
|
16
|
+
import { CancelAndSubmitSpotOrderResponseV2, SpotAccountAssetV2, SpotAccountBillV2, SpotAccountInfoV2, SpotCancelPlanOrdersV2, SpotCandlestickV2, SpotCoinInfoV2, SpotCurrentPlanOrderV2, SpotDepositAddressV2, SpotDepositRecordV2, SpotFillV2, SpotHistoryPlanOrderV2, SpotMainSubTransferRecordV2, SpotMergeDepthV2, SpotOpenOrderV2, SpotOrderBookDepthV2, SpotOrderInfoV2, SpotPlanSubOrderV2, SpotSubAccountAssetsV2, SpotSubAccountDepositRecordV2, SpotSymbolInfoV2, SpotTickerV2, SpotTradeV2, SpotTransferRecordV2, SpotVipFeeRateV2, SpotWithdrawalRecordV2, SubmitSpotBatchOrdersResponseV2 } from './types/response/v2/spot.js';
|
|
17
|
+
import BaseRestClient from './util/BaseRestClient.js';
|
|
18
|
+
/**
|
|
19
|
+
* REST API client for all V2 endpoints
|
|
20
|
+
*/
|
|
21
|
+
export declare class RestClientV2 extends BaseRestClient {
|
|
22
|
+
getClientType(): "v2";
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* Custom SDK functions
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* This method is used to get the latency and time sync between the client and the server.
|
|
30
|
+
* This is not official API endpoint and is only used for internal testing purposes.
|
|
31
|
+
* Use this method to check the latency and time sync between the client and the server.
|
|
32
|
+
* Final values might vary slightly, but it should be within few ms difference.
|
|
33
|
+
* If you have any suggestions or improvements to this measurement, please create an issue or pull request on GitHub.
|
|
34
|
+
*/
|
|
35
|
+
fetchLatencySummary(): Promise<any>;
|
|
36
|
+
fetchServerTime(): Promise<number>;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* Bitget misc functions
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
*
|
|
45
|
+
* Common
|
|
46
|
+
*
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* * Common | Notice
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
getAnnouncements(params?: GetAnnouncementsRequestV2): Promise<APIResponse<AnnouncementV2[]>>;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* * Common | Public
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
getServerTime(): Promise<APIResponse<{
|
|
61
|
+
serverTime: string;
|
|
62
|
+
}>>;
|
|
63
|
+
getTradeRate(params: GetTradeRateRequestV2): Promise<APIResponse<{
|
|
64
|
+
makerFeeRate: string;
|
|
65
|
+
takerFeeRate: string;
|
|
66
|
+
}>>;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* * Common | Tax
|
|
70
|
+
*
|
|
71
|
+
*/
|
|
72
|
+
getSpotTransactionRecords(params: GetSpotTransactionsRequestV2): Promise<APIResponse<SpotTransactionRecordV2[]>>;
|
|
73
|
+
getFuturesTransactionRecords(params: GetFuturesTransactionsRequestV2): Promise<APIResponse<FuturesTransactionRecordV2[]>>;
|
|
74
|
+
getMarginTransactionRecords(params: GetMarginTransactionsRequestV2): Promise<APIResponse<MarginTransactionRecordV2[]>>;
|
|
75
|
+
getP2PTransactionRecords(params: GetP2PTransactionsRequestV2): Promise<APIResponse<P2PMerchantOrdersV2[]>>;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* * Common | P2P
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
getP2PMerchantList(params?: GetP2PMerchantsRequestV2): Promise<APIResponse<{
|
|
82
|
+
merchantList: P2PMerchantV2[];
|
|
83
|
+
minMerchantId: string;
|
|
84
|
+
}>>;
|
|
85
|
+
getP2PMerchantInfo(): Promise<APIResponse<P2PMerchantInfoV2>>;
|
|
86
|
+
getP2PMerchantOrders(params: GetMerchantP2POrdersRequestV2): Promise<APIResponse<{
|
|
87
|
+
orderList: P2PMerchantOrderV2[];
|
|
88
|
+
minOrderId: string;
|
|
89
|
+
}>>;
|
|
90
|
+
getP2PMerchantAdvertisementList(params: GetMerchantAdvertisementsRequestV2): Promise<APIResponse<{
|
|
91
|
+
advList: P2PMerchantAdvertismentV2[];
|
|
92
|
+
minAdvId: string;
|
|
93
|
+
}>>;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* * Common | Trading insights
|
|
97
|
+
*
|
|
98
|
+
*/
|
|
99
|
+
getSpotWhaleNetFlowData(params: {
|
|
100
|
+
symbol: string;
|
|
101
|
+
}): Promise<APIResponse<SpotWhaleNetFlowV2[]>>;
|
|
102
|
+
getFuturesActiveTakerBuySellVolumeData(params: {
|
|
103
|
+
symbol: string;
|
|
104
|
+
period?: string;
|
|
105
|
+
}): Promise<APIResponse<FuturesActiveBuySellVolumeV2[]>>;
|
|
106
|
+
getFuturesActiveLongShortPositionData(params: {
|
|
107
|
+
symbol: string;
|
|
108
|
+
period?: string;
|
|
109
|
+
}): Promise<APIResponse<FuturesActiveLongShortPositionV2[]>>;
|
|
110
|
+
getFuturesLongShortRatio(params: {
|
|
111
|
+
symbol: string;
|
|
112
|
+
period?: string;
|
|
113
|
+
coin?: string;
|
|
114
|
+
}): Promise<APIResponse<LeveragedLongShortRatioV2[]>>;
|
|
115
|
+
getMarginLoanGrowthRate(params: {
|
|
116
|
+
symbol: string;
|
|
117
|
+
period?: string;
|
|
118
|
+
coin?: string;
|
|
119
|
+
}): Promise<APIResponse<MarginLoanGrowthRateV2[]>>;
|
|
120
|
+
getIsolatedMarginBorrowingRatio(params: {
|
|
121
|
+
symbol: string;
|
|
122
|
+
period?: string;
|
|
123
|
+
}): Promise<APIResponse<IsolatedMarginBorrowingRatioV2[]>>;
|
|
124
|
+
getFuturesActiveBuySellVolumeData(params: {
|
|
125
|
+
symbol: string;
|
|
126
|
+
period?: string;
|
|
127
|
+
}): Promise<APIResponse<FuturesLongShortRatioV2[]>>;
|
|
128
|
+
getSpotFundFlow(params: {
|
|
129
|
+
symbol: string;
|
|
130
|
+
period?: string;
|
|
131
|
+
}): Promise<APIResponse<SpotFundFlowV2>>;
|
|
132
|
+
getTradeDataSupportSymbols(): Promise<APIResponse<{
|
|
133
|
+
spotList: string[];
|
|
134
|
+
futureList: string[];
|
|
135
|
+
}>>;
|
|
136
|
+
getSpotFundNetFlowData(params: {
|
|
137
|
+
symbol: string;
|
|
138
|
+
}): Promise<APIResponse<{
|
|
139
|
+
netFlow: string;
|
|
140
|
+
ts: string;
|
|
141
|
+
}[]>>;
|
|
142
|
+
getFuturesActiveLongShortAccountData(params: {
|
|
143
|
+
symbol: string;
|
|
144
|
+
period?: string;
|
|
145
|
+
}): Promise<APIResponse<FuturesActiveLongShortAccountV2[]>>;
|
|
146
|
+
/**
|
|
147
|
+
*
|
|
148
|
+
* * Common | Virtual Subaccount
|
|
149
|
+
*
|
|
150
|
+
*/
|
|
151
|
+
createVirtualSubaccount(params: {
|
|
152
|
+
subAccountList: string[];
|
|
153
|
+
}): Promise<APIResponse<CreateVirtualSubAccountV2>>;
|
|
154
|
+
modifyVirtualSubaccount(params: ModifyVirtualSubRequestV2): Promise<APIResponse<{
|
|
155
|
+
result: string;
|
|
156
|
+
}>>;
|
|
157
|
+
batchCreateVirtualSubaccountAndAPIKey(params: CreateVirtualSubRequestV2): Promise<APIResponse<CreateVirtualSubAccountAndApiKeyV2[]>>;
|
|
158
|
+
getVirtualSubaccounts(params?: {
|
|
159
|
+
limit?: string;
|
|
160
|
+
idLessThan?: string;
|
|
161
|
+
status?: 'normal' | 'freeze';
|
|
162
|
+
}): Promise<APIResponse<{
|
|
163
|
+
endId: string;
|
|
164
|
+
subAccountList: VirtualSubAccountV2[];
|
|
165
|
+
}>>;
|
|
166
|
+
createVirtualSubaccountAPIKey(params: CreateVirtualSubApiKeyRequestV2): Promise<APIResponse<CreateVirtualSubAccountApiKeyV2>>;
|
|
167
|
+
modifyVirtualSubaccountAPIKey(params: ModifyVirtualSubApiKeyRequestV2): Promise<APIResponse<ModifyVirtualSubAccountApiKeyV2>>;
|
|
168
|
+
getVirtualSubaccountAPIKeys(params: {
|
|
169
|
+
subAccountUid: string;
|
|
170
|
+
}): Promise<APIResponse<SubAccountApiKeyItemV2[]>>;
|
|
171
|
+
/**
|
|
172
|
+
*
|
|
173
|
+
* * Common | Assets
|
|
174
|
+
*
|
|
175
|
+
*/
|
|
176
|
+
getFundingAssets(params?: {
|
|
177
|
+
coin?: string;
|
|
178
|
+
}): Promise<APIResponse<FundingAssetV2[]>>;
|
|
179
|
+
getBotAccount(params?: {
|
|
180
|
+
accountType?: string;
|
|
181
|
+
}): Promise<APIResponse<BotAssetV2[]>>;
|
|
182
|
+
/** Get assets overview */
|
|
183
|
+
getBalances(): Promise<APIResponse<{
|
|
184
|
+
accountType: string;
|
|
185
|
+
usdtBalance: string;
|
|
186
|
+
}[]>>;
|
|
187
|
+
/**
|
|
188
|
+
*
|
|
189
|
+
* * Common | Convert
|
|
190
|
+
*
|
|
191
|
+
*/
|
|
192
|
+
getConvertCoins(): Promise<APIResponse<ConvertCurrencyV2[]>>;
|
|
193
|
+
getConvertQuotedPrice(params: ConvertQuoteRequestV2): Promise<APIResponse<ConvertQuotedPriceV2>>;
|
|
194
|
+
convert(params: ConvertRequestV2): Promise<APIResponse<ConvertTradeResponseV2>>;
|
|
195
|
+
getConvertHistory(params: GetConvertHistoryRequestV2): Promise<APIResponse<{
|
|
196
|
+
dataList: ConvertRecordV2[];
|
|
197
|
+
endId: string;
|
|
198
|
+
}>>;
|
|
199
|
+
/**
|
|
200
|
+
*
|
|
201
|
+
* * Common | BGB Convert
|
|
202
|
+
*
|
|
203
|
+
*/
|
|
204
|
+
getConvertBGBCoins(): Promise<APIResponse<{
|
|
205
|
+
coinList: BGBConvertCoinV2[];
|
|
206
|
+
}>>;
|
|
207
|
+
convertBGB(params: {
|
|
208
|
+
coinList: string;
|
|
209
|
+
}): Promise<APIResponse<ConvertBGBResponseV2>>;
|
|
210
|
+
getConvertBGBHistory(params: GetConvertBGBHistoryRequestV2): Promise<APIResponse<BGBConvertHistoryV2[]>>;
|
|
211
|
+
/**
|
|
212
|
+
*
|
|
213
|
+
*
|
|
214
|
+
* Spot
|
|
215
|
+
*
|
|
216
|
+
*
|
|
217
|
+
*/
|
|
218
|
+
/**
|
|
219
|
+
*
|
|
220
|
+
* * Spot | Market
|
|
221
|
+
*
|
|
222
|
+
*/
|
|
223
|
+
getSpotCoinInfo(params?: {
|
|
224
|
+
coin?: string;
|
|
225
|
+
}): Promise<APIResponse<SpotCoinInfoV2[]>>;
|
|
226
|
+
getSpotSymbolInfo(params?: {
|
|
227
|
+
symbol?: string;
|
|
228
|
+
}): Promise<APIResponse<SpotSymbolInfoV2[]>>;
|
|
229
|
+
getSpotVIPFeeRate(): Promise<APIResponse<SpotVipFeeRateV2[]>>;
|
|
230
|
+
getSpotTicker(params?: {
|
|
231
|
+
symbol?: string;
|
|
232
|
+
}): Promise<APIResponse<SpotTickerV2[]>>;
|
|
233
|
+
getSpotMergeDepth(params: {
|
|
234
|
+
symbol: string;
|
|
235
|
+
precision?: string;
|
|
236
|
+
limit?: string;
|
|
237
|
+
}): Promise<APIResponse<SpotMergeDepthV2>>;
|
|
238
|
+
getSpotOrderBookDepth(params: {
|
|
239
|
+
symbol: string;
|
|
240
|
+
type?: string;
|
|
241
|
+
limit?: string;
|
|
242
|
+
}): Promise<APIResponse<SpotOrderBookDepthV2>>;
|
|
243
|
+
getSpotCandles(params: SpotCandlesRequestV2): Promise<APIResponse<SpotCandlestickV2[]>>;
|
|
244
|
+
getSpotHistoricCandles(params: SpotHistoricCandlesRequestV2): Promise<APIResponse<SpotCandlestickV2[]>>;
|
|
245
|
+
getSpotRecentTrades(params: {
|
|
246
|
+
symbol: string;
|
|
247
|
+
limit?: string;
|
|
248
|
+
}): Promise<APIResponse<SpotTradeV2[]>>;
|
|
249
|
+
getSpotHistoricTrades(params: SpotHistoricTradesRequestV2): Promise<APIResponse<SpotTradeV2[]>>;
|
|
250
|
+
/**
|
|
251
|
+
*
|
|
252
|
+
* * Spot | Trade
|
|
253
|
+
*
|
|
254
|
+
*/
|
|
255
|
+
spotSubmitOrder(params: SpotOrderRequestV2): Promise<APIResponse<{
|
|
256
|
+
orderId: string;
|
|
257
|
+
clientOid: string;
|
|
258
|
+
}>>;
|
|
259
|
+
spotCancelandSubmitOrder(params: SpotCancelandSubmitOrderRequestV2): Promise<APIResponse<CancelAndSubmitSpotOrderResponseV2>>;
|
|
260
|
+
spotBatchCancelandSubmitOrder(params: {
|
|
261
|
+
orderList: SpotCancelandSubmitOrderRequestV2[];
|
|
262
|
+
}): Promise<APIResponse<CancelAndSubmitSpotOrderResponseV2[]>>;
|
|
263
|
+
spotCancelOrder(params: SpotCancelOrderRequestV2): Promise<APIResponse<{
|
|
264
|
+
orderId: string;
|
|
265
|
+
clientOid: string;
|
|
266
|
+
}>>;
|
|
267
|
+
spotBatchSubmitOrders(params: SpotBatchOrderRequestV2): Promise<APIResponse<SubmitSpotBatchOrdersResponseV2>>;
|
|
268
|
+
spotBatchCancelOrders(params: SpotBatchCancelOrderRequestV2): Promise<APIResponse<SubmitSpotBatchOrdersResponseV2>>;
|
|
269
|
+
spotCancelSymbolOrder(params: {
|
|
270
|
+
symbol: string;
|
|
271
|
+
}): Promise<APIResponse<{
|
|
272
|
+
symbol: string;
|
|
273
|
+
}>>;
|
|
274
|
+
getSpotOrder(params?: GetSpotOrderInfoRequestV2): Promise<APIResponse<SpotOrderInfoV2[]>>;
|
|
275
|
+
getSpotOpenOrders(params?: GetSpotOpenOrdersRequestV2): Promise<APIResponse<SpotOpenOrderV2[]>>;
|
|
276
|
+
getSpotHistoricOrders(params?: GetSpotHistoryOrdersRequestV2): Promise<APIResponse<SpotOrderInfoV2[]>>;
|
|
277
|
+
getSpotFills(params: GetSpotFillsRequestV2): Promise<APIResponse<SpotFillV2[]>>;
|
|
278
|
+
/**
|
|
279
|
+
*
|
|
280
|
+
* * Spot | Trigger Orders
|
|
281
|
+
*
|
|
282
|
+
*/
|
|
283
|
+
spotSubmitPlanOrder(params: SpotPlanOrderRequestV2): Promise<APIResponse<{
|
|
284
|
+
orderId: string;
|
|
285
|
+
clientOid: string;
|
|
286
|
+
}>>;
|
|
287
|
+
spotModifyPlanOrder(params: SpotModifyPlanOrderRequestV2): Promise<APIResponse<{
|
|
288
|
+
orderId: string;
|
|
289
|
+
clientOid: string;
|
|
290
|
+
}>>;
|
|
291
|
+
spotCancelPlanOrder(params: {
|
|
292
|
+
clientOid?: string;
|
|
293
|
+
orderId?: string;
|
|
294
|
+
}): Promise<APIResponse<{
|
|
295
|
+
result: string;
|
|
296
|
+
}>>;
|
|
297
|
+
getSpotCurrentPlanOrders(params: GetSpotCurrentPlanOrdersRequestV2): Promise<APIResponse<{
|
|
298
|
+
nextFlag: boolean;
|
|
299
|
+
idLessThan: string;
|
|
300
|
+
orderList: SpotCurrentPlanOrderV2[];
|
|
301
|
+
}>>;
|
|
302
|
+
getSpotPlanSubOrder(params: {
|
|
303
|
+
planOrderId: string;
|
|
304
|
+
}): Promise<APIResponse<SpotPlanSubOrderV2[]>>;
|
|
305
|
+
getSpotHistoricPlanOrders(params: GetSpotHistoryPlanOrdersRequestV2): Promise<APIResponse<{
|
|
306
|
+
nextFlag: boolean;
|
|
307
|
+
idLessThan: string;
|
|
308
|
+
orderList: SpotHistoryPlanOrderV2[];
|
|
309
|
+
}>>;
|
|
310
|
+
spotCancelPlanOrders(params?: {
|
|
311
|
+
symbolList?: string[];
|
|
312
|
+
}): Promise<APIResponse<SpotCancelPlanOrdersV2>>;
|
|
313
|
+
/**
|
|
314
|
+
*
|
|
315
|
+
* * Spot | Account
|
|
316
|
+
*
|
|
317
|
+
*/
|
|
318
|
+
getSpotAccount(): Promise<APIResponse<SpotAccountInfoV2>>;
|
|
319
|
+
getSpotAccountAssets(params?: {
|
|
320
|
+
coin?: string;
|
|
321
|
+
assetType?: string;
|
|
322
|
+
}): Promise<APIResponse<SpotAccountAssetV2[]>>;
|
|
323
|
+
getSpotSubAccountAssets(): Promise<APIResponse<SpotSubAccountAssetsV2[]>>;
|
|
324
|
+
spotModifyDepositAccount(params: {
|
|
325
|
+
accountType: string;
|
|
326
|
+
coin: string;
|
|
327
|
+
}): Promise<APIResponse<string>>;
|
|
328
|
+
getSpotAccountBills(params?: GetSpotAccountBillsRequestV2): Promise<APIResponse<SpotAccountBillV2[]>>;
|
|
329
|
+
spotTransfer(params: SpotTransferRequestV2): Promise<APIResponse<{
|
|
330
|
+
transferId: string;
|
|
331
|
+
clientOid: string;
|
|
332
|
+
}>>;
|
|
333
|
+
getSpotTransferableCoins(params: {
|
|
334
|
+
fromType: SpotAccountTypeV2;
|
|
335
|
+
toType: SpotAccountTypeV2;
|
|
336
|
+
}): Promise<APIResponse<string[]>>;
|
|
337
|
+
spotSubTransfer(params: SpotSubAccountTransferRequestV2): Promise<APIResponse<{
|
|
338
|
+
transferId: string;
|
|
339
|
+
clientOid: string;
|
|
340
|
+
}>>;
|
|
341
|
+
spotWithdraw(params: SpotWithdrawalRequestV2): Promise<APIResponse<{
|
|
342
|
+
orderId: string;
|
|
343
|
+
clientOid: string;
|
|
344
|
+
}>>;
|
|
345
|
+
getSpotMainSubTransferRecord(params: SpotMainSubTransferRecordRequestV2): Promise<APIResponse<SpotMainSubTransferRecordV2[]>>;
|
|
346
|
+
getSpotTransferHistory(params: GetSpotTransferRecordRequestV2): Promise<APIResponse<SpotTransferRecordV2[]>>;
|
|
347
|
+
spotSwitchBGBDeduct(params: {
|
|
348
|
+
deduct: boolean;
|
|
349
|
+
}): Promise<APIResponse<boolean>>;
|
|
350
|
+
getSpotDepositAddress(params: {
|
|
351
|
+
coin: string;
|
|
352
|
+
chain?: string;
|
|
353
|
+
size: string;
|
|
354
|
+
}): Promise<APIResponse<SpotDepositAddressV2>>;
|
|
355
|
+
getSpotSubDepositAddress(params: {
|
|
356
|
+
subUid: string;
|
|
357
|
+
coin: string;
|
|
358
|
+
chain?: string;
|
|
359
|
+
size: string;
|
|
360
|
+
}): Promise<APIResponse<SpotDepositAddressV2>>;
|
|
361
|
+
getSpotBGBDeductInfo(): Promise<APIResponse<{
|
|
362
|
+
deduct: string;
|
|
363
|
+
}>>;
|
|
364
|
+
spotCancelWithdrawal(params: {
|
|
365
|
+
orderId: string;
|
|
366
|
+
}): Promise<APIResponse<string>>;
|
|
367
|
+
getSubAccountDepositRecords(params: GetSpotSubAccountDepositRecordRequestV2): Promise<APIResponse<SpotSubAccountDepositRecordV2[]>>;
|
|
368
|
+
getSpotWithdrawalHistory(params: GetSpotWithdrawalRecordRequestV2): Promise<APIResponse<SpotWithdrawalRecordV2[]>>;
|
|
369
|
+
getSpotDepositHistory(params: GetSpotDepositRecordRequestV2): Promise<APIResponse<SpotDepositRecordV2[]>>;
|
|
370
|
+
/**
|
|
371
|
+
*
|
|
372
|
+
*
|
|
373
|
+
* Futures
|
|
374
|
+
*
|
|
375
|
+
*
|
|
376
|
+
*/
|
|
377
|
+
/**
|
|
378
|
+
*
|
|
379
|
+
* * Futures | Market
|
|
380
|
+
*
|
|
381
|
+
*/
|
|
382
|
+
getFuturesVIPFeeRate(): Promise<APIResponse<FuturesVipFeeRateV2[]>>;
|
|
383
|
+
getFuturesInterestRateHistory(params: {
|
|
384
|
+
coin: string;
|
|
385
|
+
}): Promise<APIResponse<{
|
|
386
|
+
coin: string;
|
|
387
|
+
historyInterestRateList: FuturesHistoryInterestRateV2[];
|
|
388
|
+
}>>;
|
|
389
|
+
getFuturesInterestExchangeRate(): Promise<APIResponse<{
|
|
390
|
+
coin: string;
|
|
391
|
+
exchangeRateList: FuturesInterestExchangeRateV2[];
|
|
392
|
+
}[]>>;
|
|
393
|
+
getFuturesDiscountRate(): Promise<APIResponse<FuturesDiscountRatesV2[]>>;
|
|
394
|
+
getFuturesMergeDepth(params: FuturesMergeDepthRequestV2): Promise<APIResponse<FuturesMergeDepthV2>>;
|
|
395
|
+
getFuturesTicker(params: {
|
|
396
|
+
symbol: string;
|
|
397
|
+
productType: FuturesProductTypeV2;
|
|
398
|
+
}): Promise<APIResponse<FuturesTickerV2[]>>;
|
|
399
|
+
getFuturesAllTickers(params: {
|
|
400
|
+
productType: FuturesProductTypeV2;
|
|
401
|
+
}): Promise<APIResponse<FuturesTickerV2[]>>;
|
|
402
|
+
getFuturesRecentTrades(params: FuturesRecentTradesRequestV2): Promise<APIResponse<FuturesFillV2[]>>;
|
|
403
|
+
getFuturesHistoricTrades(params: FuturesHistoricTradesRequestV2): Promise<APIResponse<FuturesFillV2[]>>;
|
|
404
|
+
getFuturesCandles(params: FuturesCandlesRequestV2): Promise<APIResponse<FuturesCandlestickV2[]>>;
|
|
405
|
+
getFuturesHistoricCandles(params: FuturesCandlesRequestV2): Promise<APIResponse<FuturesCandlestickV2[]>>;
|
|
406
|
+
getFuturesHistoricIndexPriceCandles(params: FuturesCandlesRequestV2): Promise<APIResponse<FuturesCandlestickV2[]>>;
|
|
407
|
+
getFuturesHistoricMarkPriceCandles(params: FuturesCandlesRequestV2): Promise<APIResponse<FuturesCandlestickV2[]>>;
|
|
408
|
+
getFuturesOpenInterest(params: {
|
|
409
|
+
symbol: string;
|
|
410
|
+
productType: FuturesProductTypeV2;
|
|
411
|
+
}): Promise<APIResponse<{
|
|
412
|
+
openInterestList: FuturesOpenInterestV2[];
|
|
413
|
+
ts: string;
|
|
414
|
+
}>>;
|
|
415
|
+
getFuturesNextFundingTime(params: {
|
|
416
|
+
symbol: string;
|
|
417
|
+
productType: FuturesProductTypeV2;
|
|
418
|
+
}): Promise<APIResponse<FuturesFundingTimeV2[]>>;
|
|
419
|
+
getFuturesSymbolPrice(params: {
|
|
420
|
+
symbol: string;
|
|
421
|
+
productType: FuturesProductTypeV2;
|
|
422
|
+
}): Promise<APIResponse<FuturesSymbolPriceV2[]>>;
|
|
423
|
+
getFuturesHistoricFundingRates(params: {
|
|
424
|
+
symbol: string;
|
|
425
|
+
productType: FuturesProductTypeV2;
|
|
426
|
+
pageSize?: string;
|
|
427
|
+
pageNo?: string;
|
|
428
|
+
}): Promise<APIResponse<FuturesHistoricalFundingRateV2>>;
|
|
429
|
+
getFuturesCurrentFundingRate(params: {
|
|
430
|
+
symbol: string;
|
|
431
|
+
productType: FuturesProductTypeV2;
|
|
432
|
+
}): Promise<APIResponse<{
|
|
433
|
+
symbol: string;
|
|
434
|
+
fundingRate: string;
|
|
435
|
+
}[]>>;
|
|
436
|
+
getFuturesContractConfig(params: {
|
|
437
|
+
symbol?: string;
|
|
438
|
+
productType: FuturesProductTypeV2;
|
|
439
|
+
}): Promise<APIResponse<FuturesContractConfigV2[]>>;
|
|
440
|
+
/**
|
|
441
|
+
*
|
|
442
|
+
* * Futures | Account
|
|
443
|
+
*
|
|
444
|
+
*/
|
|
445
|
+
getFuturesAccountAsset(params: FuturesSingleAccountRequestV2): Promise<APIResponse<FuturesAccountV2>>;
|
|
446
|
+
getFuturesAccountAssets(params: {
|
|
447
|
+
productType: FuturesProductTypeV2;
|
|
448
|
+
}): Promise<APIResponse<FuturesAccountsV2[]>>;
|
|
449
|
+
getFuturesSubAccountAssets(params: {
|
|
450
|
+
productType: FuturesProductTypeV2;
|
|
451
|
+
}): Promise<APIResponse<{
|
|
452
|
+
userId: number;
|
|
453
|
+
assetList: FuturesSubAccountAssetV2[];
|
|
454
|
+
}[]>>;
|
|
455
|
+
getFuturesInterestHistory(params: FuturesInterestHistoryRequestV2): Promise<APIResponse<FuturesInterestHistoryV2[]>>;
|
|
456
|
+
getFuturesOpenCount(params: FuturesOpenCountRequestV2): Promise<APIResponse<{
|
|
457
|
+
size: string;
|
|
458
|
+
}>>;
|
|
459
|
+
setFuturesPositionAutoMargin(params: FuturesSetAutoMarginRequestV2): Promise<APIResponse<string>>;
|
|
460
|
+
setFuturesLeverage(params: FuturesSetLeverageRequestV2): Promise<APIResponse<SetLeverageResponseV2>>;
|
|
461
|
+
setFuturesPositionMargin(params: FuturesSetPositionMarginRequestV2): Promise<APIResponse<string>>;
|
|
462
|
+
setFuturesAssetMode(params: {
|
|
463
|
+
productType: 'USDT-FUTURES' | 'SUSDT-FUTURES';
|
|
464
|
+
assetMode: 'single' | 'union';
|
|
465
|
+
}): Promise<APIResponse<string>>;
|
|
466
|
+
setFuturesMarginMode(params: FuturesSetMarginModeRequestV2): Promise<APIResponse<SetMarginModeResponseV2>>;
|
|
467
|
+
setFuturesPositionMode(params: {
|
|
468
|
+
productType: FuturesProductTypeV2;
|
|
469
|
+
posMode: 'one_way_mode' | 'hedge_mode';
|
|
470
|
+
}): Promise<APIResponse<{
|
|
471
|
+
posMode: 'one_way_mode' | 'hedge_mode';
|
|
472
|
+
}>>;
|
|
473
|
+
getFuturesAccountBills(params: FuturesAccountBillRequestV2): Promise<APIResponse<{
|
|
474
|
+
bills: FuturesAccountBillV2[];
|
|
475
|
+
endId: string;
|
|
476
|
+
}>>;
|
|
477
|
+
/**
|
|
478
|
+
*
|
|
479
|
+
* * Futures | Position
|
|
480
|
+
*
|
|
481
|
+
*/
|
|
482
|
+
getFuturesPositionTier(params: {
|
|
483
|
+
productType: FuturesProductTypeV2;
|
|
484
|
+
symbol: string;
|
|
485
|
+
}): Promise<APIResponse<FuturesPositionTierV2[]>>;
|
|
486
|
+
getFuturesPosition(params: {
|
|
487
|
+
productType: FuturesProductTypeV2;
|
|
488
|
+
symbol: string;
|
|
489
|
+
marginCoin: string;
|
|
490
|
+
}): Promise<APIResponse<FuturesPositionV2[]>>;
|
|
491
|
+
getFuturesPositions(params: {
|
|
492
|
+
productType: FuturesProductTypeV2;
|
|
493
|
+
marginCoin?: string;
|
|
494
|
+
}): Promise<APIResponse<FuturesPositionV2[]>>;
|
|
495
|
+
getFuturesHistoricPositions(params?: FuturesHistoricalPositionsRequestV2): Promise<APIResponse<{
|
|
496
|
+
list: FuturesHistoryPositionV2[];
|
|
497
|
+
endId: string;
|
|
498
|
+
}>>;
|
|
499
|
+
/**
|
|
500
|
+
*
|
|
501
|
+
* * Futures | Trade
|
|
502
|
+
*
|
|
503
|
+
*/
|
|
504
|
+
futuresSubmitOrder(params: FuturesPlaceOrderRequestV2): Promise<APIResponse<{
|
|
505
|
+
orderId: string;
|
|
506
|
+
clientOid: string;
|
|
507
|
+
}>>;
|
|
508
|
+
futuresSubmitReversal(params: FuturesReversalOrderRequestV2): Promise<APIResponse<{
|
|
509
|
+
orderId: string;
|
|
510
|
+
clientOid: string;
|
|
511
|
+
}>>;
|
|
512
|
+
futuresBatchSubmitOrders(params: FuturesBatchOrderRequestV2): Promise<APIResponse<FuturesBatchOrderResponseV2>>;
|
|
513
|
+
futuresModifyOrder(params: FuturesModifyOrderRequestV2): Promise<APIResponse<{
|
|
514
|
+
orderId: string;
|
|
515
|
+
clientOid: string;
|
|
516
|
+
}>>;
|
|
517
|
+
futuresCancelOrder(params: FuturesCancelOrderRequestV2): Promise<APIResponse<{
|
|
518
|
+
orderId: string;
|
|
519
|
+
clientOid: string;
|
|
520
|
+
}>>;
|
|
521
|
+
futuresBatchCancelOrders(params: FuturesBatchCancelOrderRequestV2): Promise<APIResponse<FuturesBatchOrderResponseV2>>;
|
|
522
|
+
futuresFlashClosePositions(params: FuturesFlashClosePositionsRequestV2): Promise<APIResponse<FuturesClosePositionResponseV2>>;
|
|
523
|
+
getFuturesOrder(params: FuturesGetOrderRequestV2): Promise<APIResponse<FuturesOrderDetailV2>>;
|
|
524
|
+
getFuturesFills(params: FuturesGetOrderFillsRequestV2): Promise<APIResponse<{
|
|
525
|
+
fillList: FuturesOrderFillV2[];
|
|
526
|
+
endId: string;
|
|
527
|
+
}>>;
|
|
528
|
+
getFuturesHistoricOrderFills(params: FuturesGetHistoricalFillsRequestV2): Promise<APIResponse<{
|
|
529
|
+
fillList: FuturesOrderFillV2[];
|
|
530
|
+
endId: string;
|
|
531
|
+
}>>;
|
|
532
|
+
getFuturesOpenOrders(params: FuturesGetOpenOrdersRequestV2): Promise<APIResponse<{
|
|
533
|
+
entrustedList: FuturesOpenOrderV2[];
|
|
534
|
+
endId: string;
|
|
535
|
+
}>>;
|
|
536
|
+
getFuturesHistoricOrders(params: FuturesGetHistoryOrdersRequestV2): Promise<APIResponse<{
|
|
537
|
+
entrustedList: FuturesHistoryOrderV2[];
|
|
538
|
+
endId: string;
|
|
539
|
+
}>>;
|
|
540
|
+
futuresCancelAllOrders(params: FuturesCancelAllOrdersRequestV2): Promise<APIResponse<FuturesCancelAllOrdersV2>>;
|
|
541
|
+
/**
|
|
542
|
+
*
|
|
543
|
+
* * Futures | Trigger Orders
|
|
544
|
+
*
|
|
545
|
+
*/
|
|
546
|
+
getFuturesTriggerSubOrder(params: {
|
|
547
|
+
planType: 'normal_plan' | 'track_plan';
|
|
548
|
+
planOrderId: string;
|
|
549
|
+
productType: FuturesProductTypeV2;
|
|
550
|
+
}): Promise<APIResponse<FuturesTriggerSubOrderV2[]>>;
|
|
551
|
+
futuresSubmitTPSLOrder(params: FuturesTPSLOrderRequestV2): Promise<APIResponse<{
|
|
552
|
+
orderId: string;
|
|
553
|
+
clientOid: string;
|
|
554
|
+
}>>;
|
|
555
|
+
futuresSubmitPlanOrder(params: FuturesPlanOrderRequestV2): Promise<APIResponse<{
|
|
556
|
+
orderId: string;
|
|
557
|
+
clientOid: string;
|
|
558
|
+
}>>;
|
|
559
|
+
futuresModifyTPSLPOrder(params: FuturesModifyTPSLOrderRequestV2): Promise<APIResponse<{
|
|
560
|
+
orderId: string;
|
|
561
|
+
clientOid: string;
|
|
562
|
+
}>>;
|
|
563
|
+
futuresModifyPlanOrder(params: FuturesModifyPlanOrderRequestV2): Promise<APIResponse<{
|
|
564
|
+
orderId: string;
|
|
565
|
+
clientOid: string;
|
|
566
|
+
}>>;
|
|
567
|
+
getFuturesPlanOrders(params: FuturesGetPlanOrdersRequestV2): Promise<APIResponse<{
|
|
568
|
+
entrustedList: FuturesPendingPlanOrderV2[];
|
|
569
|
+
endId: string;
|
|
570
|
+
}>>;
|
|
571
|
+
futuresCancelPlanOrder(params: FuturesCancelPlanOrderRequestV2): Promise<APIResponse<FuturesCancelPlanOrderV2>>;
|
|
572
|
+
getFuturesHistoricPlanOrders(params: FuturesGetHistoryPlanOrdersRequestV2): Promise<APIResponse<{
|
|
573
|
+
entrustedList: FuturesHistoryPlanOrderV2[];
|
|
574
|
+
endId: string;
|
|
575
|
+
}>>;
|
|
576
|
+
/**
|
|
577
|
+
*
|
|
578
|
+
*
|
|
579
|
+
* Broker
|
|
580
|
+
*
|
|
581
|
+
*
|
|
582
|
+
*/
|
|
583
|
+
/**
|
|
584
|
+
*
|
|
585
|
+
* * Broker | Subaccount
|
|
586
|
+
*
|
|
587
|
+
*/
|
|
588
|
+
modifySubaccountEmail(params: {
|
|
589
|
+
subUid: string;
|
|
590
|
+
subaccountEmail: string;
|
|
591
|
+
}): Promise<APIResponse<string>>;
|
|
592
|
+
getBrokerInfo(): Promise<APIResponse<{
|
|
593
|
+
subAccountSize: string;
|
|
594
|
+
maxSubAccountSize: string;
|
|
595
|
+
uTime: string;
|
|
596
|
+
}>>;
|
|
597
|
+
createSubaccount(params: {
|
|
598
|
+
subaccountName: string;
|
|
599
|
+
label: string;
|
|
600
|
+
}): Promise<APIResponse<CreateSubaccountResponseV2>>;
|
|
601
|
+
getSubaccounts(params?: GetSubAccountsRequestV2): Promise<APIResponse<{
|
|
602
|
+
hasNextPage: boolean;
|
|
603
|
+
idLessThan: number;
|
|
604
|
+
subList: BrokerSubaccountV2[];
|
|
605
|
+
}>>;
|
|
606
|
+
modifySubaccount(params: ModifySubRequestV2): Promise<APIResponse<ModifySubaccountResponseV2>>;
|
|
607
|
+
getSubaccountEmail(params: {
|
|
608
|
+
subUid: string;
|
|
609
|
+
}): Promise<APIResponse<SubaccountEmailV2>>;
|
|
610
|
+
getSubaccountSpotAssets(params: {
|
|
611
|
+
subUid: string;
|
|
612
|
+
coin?: string;
|
|
613
|
+
assetType?: 'hold_only' | 'all';
|
|
614
|
+
}): Promise<APIResponse<{
|
|
615
|
+
assetsList: BrokerSubaccountSpotAssetV2[];
|
|
616
|
+
}>>;
|
|
617
|
+
getSubaccountFuturesAssets(params: {
|
|
618
|
+
subUid: string;
|
|
619
|
+
productType: FuturesProductTypeV2;
|
|
620
|
+
}): Promise<APIResponse<{
|
|
621
|
+
assetsList: BrokerSubaccountFutureAssetV2[];
|
|
622
|
+
}>>;
|
|
623
|
+
createSubaccountDepositAddress(params: {
|
|
624
|
+
subUid: string;
|
|
625
|
+
coin: string;
|
|
626
|
+
chain?: string;
|
|
627
|
+
}): Promise<APIResponse<CreateSubaccountDepositAddressV2>>;
|
|
628
|
+
subaccountWithdrawal(params: SubWithdrawalRequestV2): Promise<APIResponse<{
|
|
629
|
+
orderId: string;
|
|
630
|
+
clientOid: string;
|
|
631
|
+
}>>;
|
|
632
|
+
subaccountSetAutoTransfer(params: {
|
|
633
|
+
subUid: string;
|
|
634
|
+
coin: string;
|
|
635
|
+
toAccountType: string;
|
|
636
|
+
}): Promise<APIResponse<string>>;
|
|
637
|
+
subaccountDepositRecords(params: SubDepositRecordsRequestV2): Promise<APIResponse<SubaccountDepositV2>>;
|
|
638
|
+
subaccountWithdrawalRecords(params: SubWithdrawalRecordsRequestV2): Promise<APIResponse<{
|
|
639
|
+
resultList: BrokerSubaccountWithdrawalV2[];
|
|
640
|
+
endId: string;
|
|
641
|
+
}>>;
|
|
642
|
+
/**
|
|
643
|
+
*
|
|
644
|
+
* Broker | Api Key
|
|
645
|
+
*
|
|
646
|
+
*/
|
|
647
|
+
createSubaccountApiKey(params: CreateSubAccountApiKeyRequestV2): Promise<APIResponse<CreateSubaccountApiKeyResponseV2>>;
|
|
648
|
+
getSubaccountApiKey(params: {
|
|
649
|
+
subUid: string;
|
|
650
|
+
}): Promise<APIResponse<SubaccountApiKeyV2[]>>;
|
|
651
|
+
modifySubaccountApiKey(params: ModifySubAccountApiKeyRequestV2): Promise<APIResponse<ModifySubaccountApiKeyResponseV2>>;
|
|
652
|
+
/**
|
|
653
|
+
*
|
|
654
|
+
*
|
|
655
|
+
* Margin
|
|
656
|
+
*
|
|
657
|
+
*
|
|
658
|
+
*/
|
|
659
|
+
/**
|
|
660
|
+
*
|
|
661
|
+
* * Margin | Common
|
|
662
|
+
*
|
|
663
|
+
*/
|
|
664
|
+
getMarginCurrencies(): Promise<APIResponse<MarginCurrencyV2[]>>;
|
|
665
|
+
/**
|
|
666
|
+
*
|
|
667
|
+
* * Margin | Cross/Isolated | Order Record
|
|
668
|
+
*
|
|
669
|
+
*/
|
|
670
|
+
getMarginBorrowHistory(marginType: MarginType, params: GetBorrowHistoryRequestV2): Promise<APIResponse<{
|
|
671
|
+
resultList: MarginBorrowHistoryItemV2[];
|
|
672
|
+
maxId: string;
|
|
673
|
+
minId: string;
|
|
674
|
+
}>>;
|
|
675
|
+
getMarginRepayHistory(marginType: MarginType, params: GetRepayHistoryRequestV2): Promise<APIResponse<{
|
|
676
|
+
resultList: MarginRepaymentHistoryItemV2[];
|
|
677
|
+
maxId: string;
|
|
678
|
+
minId: string;
|
|
679
|
+
}>>;
|
|
680
|
+
getMarginInterestHistory(marginType: MarginType, params: GetInterestHistoryRequestV2): Promise<APIResponse<{
|
|
681
|
+
resultList: MarginInterestHistoryItemV2[];
|
|
682
|
+
maxId: string;
|
|
683
|
+
minId: string;
|
|
684
|
+
}>>;
|
|
685
|
+
getMarginLiquidationHistory(marginType: MarginType, params: GetLiquidationHistoryRequestV2): Promise<APIResponse<{
|
|
686
|
+
resultList: MarginLiquidationHistoryItemV2[];
|
|
687
|
+
maxId: string;
|
|
688
|
+
minId: string;
|
|
689
|
+
}>>;
|
|
690
|
+
getMarginFinancialHistory(marginType: MarginType, params: GetFinancialHistoryRequestV2): Promise<APIResponse<{
|
|
691
|
+
resultList: MarginFinancialHistoryItemV2[];
|
|
692
|
+
maxId: string;
|
|
693
|
+
minId: string;
|
|
694
|
+
}>>;
|
|
695
|
+
/**
|
|
696
|
+
*
|
|
697
|
+
* * Margin | Cross/Isolated | Account
|
|
698
|
+
*
|
|
699
|
+
*/
|
|
700
|
+
getMarginAccountAssets(marginType: MarginType, params?: {
|
|
701
|
+
coin?: string;
|
|
702
|
+
}): Promise<APIResponse<MarginAccountAssetV2[]>>;
|
|
703
|
+
marginBorrow(marginType: MarginType, params: {
|
|
704
|
+
loanId: string;
|
|
705
|
+
symbol: string;
|
|
706
|
+
coin: string;
|
|
707
|
+
borrowAmount: string;
|
|
708
|
+
}): Promise<APIResponse<{
|
|
709
|
+
loanId: string;
|
|
710
|
+
symbol: string;
|
|
711
|
+
coin: string;
|
|
712
|
+
borrowAmount: string;
|
|
713
|
+
}>>;
|
|
714
|
+
marginRepay(marginType: MarginType, params: {
|
|
715
|
+
remainDebtAmount: string;
|
|
716
|
+
symbol: string;
|
|
717
|
+
repayId: string;
|
|
718
|
+
coin: string;
|
|
719
|
+
repayAmount: string;
|
|
720
|
+
}): Promise<APIResponse<{
|
|
721
|
+
symbol: string;
|
|
722
|
+
coin: string;
|
|
723
|
+
repayId: string;
|
|
724
|
+
remainDebtAmount: string;
|
|
725
|
+
repayAmount: string;
|
|
726
|
+
}>>;
|
|
727
|
+
getMarginRiskRate(marginType: MarginType): Promise<APIResponse<{
|
|
728
|
+
symbol: string;
|
|
729
|
+
riskRateRatio: string;
|
|
730
|
+
}[]>>;
|
|
731
|
+
getMarginMaxBorrowable(marginType: MarginType, params: {
|
|
732
|
+
coin: string;
|
|
733
|
+
}): Promise<APIResponse<CrossMaxBorrowableResponseV2 | IsolatedMaxBorrowableResponseV2>>;
|
|
734
|
+
getMarginMaxTransferable(marginType: MarginType, params: {
|
|
735
|
+
coin: string;
|
|
736
|
+
}): Promise<APIResponse<CrossMaxTransferableResponseV2 | IsolatedMaxTransferableResponseV2>>;
|
|
737
|
+
getMarginInterestRateAndMaxBorrowable(marginType: MarginType, params: {
|
|
738
|
+
coin: string;
|
|
739
|
+
}): Promise<APIResponse<IsolatedInterestRateAndLimitResponseV2[] | CrossInterestRateAndLimitResponseV2[]>>;
|
|
740
|
+
getMarginTierConfiguration(marginType: MarginType, params: {
|
|
741
|
+
coin: string;
|
|
742
|
+
}): Promise<APIResponse<CrossTierConfigurationResponseV2[] | IsolatedTierConfigurationResponseV2[]>>;
|
|
743
|
+
marginFlashRepay(marginType: MarginType, params: {
|
|
744
|
+
coin: string;
|
|
745
|
+
}): Promise<APIResponse<{
|
|
746
|
+
repayId: string;
|
|
747
|
+
coin?: string;
|
|
748
|
+
symbol?: string;
|
|
749
|
+
result?: string;
|
|
750
|
+
}>>;
|
|
751
|
+
getMarginFlashRepayResult(marginType: MarginType, params: {
|
|
752
|
+
idList: string;
|
|
753
|
+
}): Promise<APIResponse<{
|
|
754
|
+
repayId: string;
|
|
755
|
+
status: string;
|
|
756
|
+
}[]>>;
|
|
757
|
+
/**
|
|
758
|
+
*
|
|
759
|
+
* * Margin | Cross/Isolated | Trade
|
|
760
|
+
*
|
|
761
|
+
*/
|
|
762
|
+
marginSubmitOrder(marginType: MarginType, params: MarginPlaceOrderRequestV2): Promise<APIResponse<{
|
|
763
|
+
orderId: string;
|
|
764
|
+
clientOid: string;
|
|
765
|
+
}>>;
|
|
766
|
+
marginBatchSubmitOrders(marginType: MarginType, params: MarginBatchOrdersRequestV2): Promise<APIResponse<MarginBatchOrdersResponseV2>>;
|
|
767
|
+
marginCancelOrder(marginType: MarginType, params: {
|
|
768
|
+
symbol: string;
|
|
769
|
+
orderId?: string;
|
|
770
|
+
clientOid?: string;
|
|
771
|
+
}): Promise<APIResponse<{
|
|
772
|
+
orderId: string;
|
|
773
|
+
clientOid: string;
|
|
774
|
+
}>>;
|
|
775
|
+
marginBatchCancelOrders(marginType: MarginType, params: {
|
|
776
|
+
symbol: string;
|
|
777
|
+
orderIdList: string[];
|
|
778
|
+
}): Promise<APIResponse<MarginBatchOrdersResponseV2>>;
|
|
779
|
+
getMarginOpenOrders(marginType: MarginType, params: GetMarginCurrentOrdersRequestV2): Promise<APIResponse<{
|
|
780
|
+
orderList: MarginCurrentOrderV2[];
|
|
781
|
+
maxId: string;
|
|
782
|
+
minId: string;
|
|
783
|
+
}>>;
|
|
784
|
+
getMarginHistoricOrders(marginType: MarginType, params: GetHistoryOrdersRequestV2): Promise<APIResponse<{
|
|
785
|
+
orderList: MarginHistoryOrderV2[];
|
|
786
|
+
maxId: string;
|
|
787
|
+
minId: string;
|
|
788
|
+
}>>;
|
|
789
|
+
getMarginHistoricOrderFills(marginType: MarginType, params: GetMarginOrderFillsRequestV2): Promise<APIResponse<{
|
|
790
|
+
fills: MarginOrderFillV2[];
|
|
791
|
+
minId: string;
|
|
792
|
+
maxId: string;
|
|
793
|
+
}>>;
|
|
794
|
+
getMarginLiquidationOrders(marginType: MarginType, params: GetMarginLiquidationOrdersRequestV2): Promise<APIResponse<{
|
|
795
|
+
resultList: MarginLiquidationOrderV2[];
|
|
796
|
+
idLessThan: string;
|
|
797
|
+
}>>;
|
|
798
|
+
/**
|
|
799
|
+
*
|
|
800
|
+
*
|
|
801
|
+
* Copy Trading
|
|
802
|
+
*
|
|
803
|
+
*
|
|
804
|
+
*/
|
|
805
|
+
/**
|
|
806
|
+
*
|
|
807
|
+
*
|
|
808
|
+
* Copy Trading | Future copy trading | Trader Api
|
|
809
|
+
*
|
|
810
|
+
*
|
|
811
|
+
*/
|
|
812
|
+
getFuturesTraderCurrentOrder(params: GetFuturesTraderCurrentOrdersRequestV2): Promise<APIResponse<CTFuturesTraderCurrentOrdersV2>>;
|
|
813
|
+
getFuturesTraderHistoryOrders(params: GetFuturesTraderHistoryOrdersRequestV2): Promise<APIResponse<CTFuturesTraderHistoryOrderV2>>;
|
|
814
|
+
modifyFuturesTraderOrderTPSL(params: ModifyFuturesTraderOrderTPSLRequestV2): Promise<APIResponse<string>>;
|
|
815
|
+
getFuturesTraderOrder(): Promise<APIResponse<CTFuturesTraderTotalOrderSummaryV2>>;
|
|
816
|
+
getFuturesTraderProfitHistory(): Promise<APIResponse<CTFuturesTraderHistoryProfitSummaryV2>>;
|
|
817
|
+
getFuturesTraderProfitShareHistory(params: GetFuturesTraderProfitShareDetailRequestV2): Promise<APIResponse<CTFuturesTraderProfitShareHistoryV2>>;
|
|
818
|
+
closeFuturesTraderOrder(params: {
|
|
819
|
+
trackingNo: string;
|
|
820
|
+
symbol: string;
|
|
821
|
+
productType: CopyTradingProductTypeV2;
|
|
822
|
+
}): Promise<APIResponse<{
|
|
823
|
+
trackingNo: string;
|
|
824
|
+
symbol: string;
|
|
825
|
+
productType: string;
|
|
826
|
+
}[]>>;
|
|
827
|
+
getFuturesTraderProfitShare(params?: {
|
|
828
|
+
coin?: string;
|
|
829
|
+
pageSize?: string;
|
|
830
|
+
pageNo?: string;
|
|
831
|
+
}): Promise<APIResponse<{
|
|
832
|
+
coin: string;
|
|
833
|
+
profit: string;
|
|
834
|
+
nickName: string;
|
|
835
|
+
}[]>>;
|
|
836
|
+
getFuturesTraderProfitShareGroup(params?: {
|
|
837
|
+
pageSize?: string;
|
|
838
|
+
pageNo?: string;
|
|
839
|
+
}): Promise<APIResponse<{
|
|
840
|
+
coin: string;
|
|
841
|
+
profit: string;
|
|
842
|
+
profitTime: string;
|
|
843
|
+
}[]>>;
|
|
844
|
+
getFuturesTraderSymbolSettings(params: {
|
|
845
|
+
productType: CopyTradingProductTypeV2;
|
|
846
|
+
}): Promise<APIResponse<CTFuturesTraderSymbolSettingsV2[]>>;
|
|
847
|
+
updateFuturesTraderSymbolSettings(params: {
|
|
848
|
+
settingList: FuturesTraderSymbolSettingRequestV2[];
|
|
849
|
+
}): Promise<APIResponse<string>>;
|
|
850
|
+
updateFuturesTraderGlobalSettings(params?: {
|
|
851
|
+
enable?: 'YES' | 'NO';
|
|
852
|
+
showTotalEquity?: 'YES' | 'NO';
|
|
853
|
+
showTpsl?: 'YES' | 'NO';
|
|
854
|
+
}): Promise<APIResponse<string>>;
|
|
855
|
+
getFuturesTraderFollowers(params?: GetFuturesTraderFollowersRequestV2): Promise<APIResponse<CTFuturesTraderMyFollowersV2[]>>;
|
|
856
|
+
removeFuturesTraderFollower(params: {
|
|
857
|
+
followerUid: string;
|
|
858
|
+
}): Promise<APIResponse<string>>;
|
|
859
|
+
/**
|
|
860
|
+
*
|
|
861
|
+
*
|
|
862
|
+
* Copy Trading | Future copy trading | Follower Api
|
|
863
|
+
*
|
|
864
|
+
*
|
|
865
|
+
*/
|
|
866
|
+
getFuturesFollowerCurrentOrders(params: GetFollowerFuturesCurrentTrackingOrdersRequestV2): Promise<APIResponse<CTFuturesFollowerCurrentOrdersV2[]>>;
|
|
867
|
+
getFuturesFollowerHistoryOrders(params: GetFollowerFuturesHistoryTrackingOrdersRequestV2): Promise<APIResponse<CTFuturesFollowerHistoryOrdersV2>>;
|
|
868
|
+
updateFuturesFollowerTPSL(params: UpdateFuturesFollowerTPSLRequestV2): Promise<APIResponse<string>>;
|
|
869
|
+
updateFuturesFollowerSettings(params: UpdateFuturesFollowerSettingsRequestV2): Promise<APIResponse<string>>;
|
|
870
|
+
getFuturesFollowerSettings(params: {
|
|
871
|
+
traderId: string;
|
|
872
|
+
}): Promise<APIResponse<CTFuturesFollowerSettingsV2>>;
|
|
873
|
+
closeFuturesFollowerPositions(params: CloseFuturesFollowerPositionsRequestV2): Promise<APIResponse<{
|
|
874
|
+
orderIdList: string[];
|
|
875
|
+
}>>;
|
|
876
|
+
getFuturesFollowerTraders(params: GetFuturesFollowerTradersRequestV2): Promise<APIResponse<CTFuturesFollowerMyTradersV2[]>>;
|
|
877
|
+
getFuturesFollowerFollowLimit(params: {
|
|
878
|
+
symbol: string;
|
|
879
|
+
productType: CopyTradingProductTypeV2;
|
|
880
|
+
}): Promise<APIResponse<{
|
|
881
|
+
maxFollowSize: string;
|
|
882
|
+
minFollowSize: string;
|
|
883
|
+
symbol: string;
|
|
884
|
+
}[]>>;
|
|
885
|
+
unfollowFuturesTrader(params: {
|
|
886
|
+
traderId: string;
|
|
887
|
+
}): Promise<APIResponse<string>>;
|
|
888
|
+
/**
|
|
889
|
+
*
|
|
890
|
+
*
|
|
891
|
+
* Copy Trading | Future copy trading | Broker api
|
|
892
|
+
*
|
|
893
|
+
*
|
|
894
|
+
*/
|
|
895
|
+
getBrokerTraders(params: object): Promise<APIResponse<any>>;
|
|
896
|
+
getBrokerTradersHistoricalOrders(params: object): Promise<APIResponse<any>>;
|
|
897
|
+
getBrokerTradersPendingOrders(params: object): Promise<APIResponse<any>>;
|
|
898
|
+
/**
|
|
899
|
+
*
|
|
900
|
+
*
|
|
901
|
+
* Copy Trading | Spot copy trading | Trader api
|
|
902
|
+
*
|
|
903
|
+
*
|
|
904
|
+
*/
|
|
905
|
+
getSpotTraderProfit(): Promise<APIResponse<CTSpotTraderProfitSummaryV2>>;
|
|
906
|
+
getSpotTraderHistoryProfit(params: GetSpotTraderHistoryProfitRequestV2): Promise<APIResponse<CTSpotTraderHistoryProfitSharingV2>>;
|
|
907
|
+
getSpotTraderUnrealizedProfit(params?: {
|
|
908
|
+
coin?: string;
|
|
909
|
+
pageNo?: string;
|
|
910
|
+
pageSize?: string;
|
|
911
|
+
}): Promise<APIResponse<CTSpotTraderUnrealizedProfitV2[]>>;
|
|
912
|
+
getSpotTraderOrder(): Promise<APIResponse<CTSpotTraderTotalOrderDetailV2>>;
|
|
913
|
+
modifySpotTraderOrderTPSL(params: {
|
|
914
|
+
trackingNo: string;
|
|
915
|
+
stopSurplusPrice?: string;
|
|
916
|
+
stopLossPrice?: string;
|
|
917
|
+
}): Promise<APIResponse<string>>;
|
|
918
|
+
getSpotTraderHistoryOrders(params: GetSpotTraderHistoryOrdersRequestV2): Promise<APIResponse<CTSpotTraderHistoryOrdersV2>>;
|
|
919
|
+
getSpotTraderCurrentOrders(params: GetSpotTraderCurrentOrdersRequestV2): Promise<APIResponse<CTSpotTraderCurrentTrackingOrdersV2>>;
|
|
920
|
+
sellSpotTrader(params: {
|
|
921
|
+
trackingNoList: string[];
|
|
922
|
+
symbol: string;
|
|
923
|
+
}): Promise<APIResponse<string>>;
|
|
924
|
+
getSpotTraderSymbolSettings(params: {
|
|
925
|
+
symbolList: string[];
|
|
926
|
+
settingType: 'add' | 'delete';
|
|
927
|
+
}): Promise<APIResponse<string>>;
|
|
928
|
+
removeSpotTraderFollowers(params: {
|
|
929
|
+
followerUid: string;
|
|
930
|
+
}): Promise<APIResponse<string>>;
|
|
931
|
+
getSpotTraderConfiguration(): Promise<APIResponse<any>>;
|
|
932
|
+
getSpotTraderFollowers(params: GetSpotTraderFollowersRequestV2): Promise<APIResponse<CTSpotTraderFollowerListV2[]>>;
|
|
933
|
+
/**
|
|
934
|
+
*
|
|
935
|
+
*
|
|
936
|
+
* Copy Trading | Spot copy trading | Follower api
|
|
937
|
+
*
|
|
938
|
+
*
|
|
939
|
+
*/
|
|
940
|
+
cancelSpotFollowerOrder(params: {
|
|
941
|
+
trackingNoList: string[];
|
|
942
|
+
}): Promise<APIResponse<string>>;
|
|
943
|
+
updateSpotFollowerSettings(params: {
|
|
944
|
+
traderId: string;
|
|
945
|
+
autoCopy?: 'on' | 'off';
|
|
946
|
+
mode?: 'basic' | 'advanced';
|
|
947
|
+
settings: SpotFollowerCopyTradeSettingV2[];
|
|
948
|
+
}): Promise<APIResponse<string>>;
|
|
949
|
+
updateSpotFollowerTPSL(params: {
|
|
950
|
+
trackingNo: string;
|
|
951
|
+
stopSurplusPrice?: string;
|
|
952
|
+
stopLossPrice?: string;
|
|
953
|
+
}): Promise<APIResponse<string>>;
|
|
954
|
+
getSpotFollowerTraders(params?: {
|
|
955
|
+
pageNo?: string;
|
|
956
|
+
pageSize?: string;
|
|
957
|
+
startTime?: string;
|
|
958
|
+
endTime?: string;
|
|
959
|
+
}): Promise<APIResponse<CTSpotFollowerMyTradersV2>>;
|
|
960
|
+
getSpotFollowerCurrentTraderSymbols(params: {
|
|
961
|
+
traderId: string;
|
|
962
|
+
}): Promise<APIResponse<{
|
|
963
|
+
currentTradingList: string[];
|
|
964
|
+
}>>;
|
|
965
|
+
getSpotFollowerSettings(params: {
|
|
966
|
+
traderId: string;
|
|
967
|
+
}): Promise<APIResponse<CTSpotFollowerFollowConfigurationV2>>;
|
|
968
|
+
getSpotFollowerHistoryOrders(params: GetSpotFollowerHistoryOrdersRequestV2): Promise<APIResponse<CTSpotFollowerHistoryOrdersV2>>;
|
|
969
|
+
getSpotFollowerOpenOrders(params: GetSpotFollowerOpenOrdersRequestV2): Promise<APIResponse<CTSpotFollowerCurrentOrdersV2>>;
|
|
970
|
+
sellSpotFollower(params: {
|
|
971
|
+
trackingNoList: string[];
|
|
972
|
+
symbol: string;
|
|
973
|
+
}): Promise<APIResponse<string>>;
|
|
974
|
+
unfollowSpotTrader(params: {
|
|
975
|
+
traderId: string;
|
|
976
|
+
}): Promise<APIResponse<string>>;
|
|
977
|
+
/**
|
|
978
|
+
*
|
|
979
|
+
*
|
|
980
|
+
* Earn | Savings
|
|
981
|
+
*
|
|
982
|
+
*
|
|
983
|
+
*/
|
|
984
|
+
getEarnSavingsProducts(params?: {
|
|
985
|
+
coin?: string;
|
|
986
|
+
filter?: string;
|
|
987
|
+
}): Promise<APIResponse<EarnSavingsProductsV2[]>>;
|
|
988
|
+
getEarnSavingsAccount(): Promise<APIResponse<EarnSavingsAccountV2>>;
|
|
989
|
+
getEarnSavingsAssets(params: GetEarnSavingsAssetsRequestV2): Promise<APIResponse<EarnSavingsAssetsV2>>;
|
|
990
|
+
getEarnSavingsRecords(params: GetEarnSavingsRecordsRequestV2): Promise<APIResponse<EarnSavingsRecordsV2>>;
|
|
991
|
+
getEarnSavingsSubscription(params: {
|
|
992
|
+
productId: string;
|
|
993
|
+
periodType: string;
|
|
994
|
+
}): Promise<APIResponse<EarnSavingsSubscriptionDetailV2>>;
|
|
995
|
+
earnSubscribeSavings(params: {
|
|
996
|
+
productId: string;
|
|
997
|
+
periodType: string;
|
|
998
|
+
amount: string;
|
|
999
|
+
}): Promise<APIResponse<{
|
|
1000
|
+
orderId: string;
|
|
1001
|
+
status: string;
|
|
1002
|
+
}>>;
|
|
1003
|
+
getEarnSavingsSubscriptionResult(params: {
|
|
1004
|
+
productId: string;
|
|
1005
|
+
periodType: string;
|
|
1006
|
+
}): Promise<APIResponse<{
|
|
1007
|
+
result: 'success' | 'fail';
|
|
1008
|
+
msg: string;
|
|
1009
|
+
}>>;
|
|
1010
|
+
earnRedeemSavings(params: RedeemSavingsRequestV2): Promise<APIResponse<{
|
|
1011
|
+
orderId: string;
|
|
1012
|
+
status: string;
|
|
1013
|
+
}>>;
|
|
1014
|
+
getEarnSavingsRedemptionResult(params: {
|
|
1015
|
+
orderId: string;
|
|
1016
|
+
periodType: string;
|
|
1017
|
+
}): Promise<APIResponse<{
|
|
1018
|
+
result: 'success' | 'fail';
|
|
1019
|
+
msg: string;
|
|
1020
|
+
}>>;
|
|
1021
|
+
/**
|
|
1022
|
+
*
|
|
1023
|
+
*
|
|
1024
|
+
* Earn | Earn Account
|
|
1025
|
+
*
|
|
1026
|
+
*
|
|
1027
|
+
*/
|
|
1028
|
+
getEarnAccount(params?: {
|
|
1029
|
+
coin?: string;
|
|
1030
|
+
}): Promise<APIResponse<{
|
|
1031
|
+
coin: string;
|
|
1032
|
+
amount: string;
|
|
1033
|
+
}[]>>;
|
|
1034
|
+
/**
|
|
1035
|
+
*
|
|
1036
|
+
*
|
|
1037
|
+
* Earn | Shark Fin
|
|
1038
|
+
*
|
|
1039
|
+
*
|
|
1040
|
+
*/
|
|
1041
|
+
getSharkfinProducts(params: {
|
|
1042
|
+
coin: string;
|
|
1043
|
+
limit?: string;
|
|
1044
|
+
idLessThan?: string;
|
|
1045
|
+
}): Promise<APIResponse<EarnSharkfinProductsV2>>;
|
|
1046
|
+
getSharkfinAccount(): Promise<APIResponse<EarnSharkfinAccountV2>>;
|
|
1047
|
+
getSharkfinAssets(params: GetSharkfinAssetsRequestV2): Promise<APIResponse<EarnSharkfinAssetsV2>>;
|
|
1048
|
+
getSharkfinRecords(params: GetSharkfinRecordsRequestV2): Promise<APIResponse<EarnSharkfinRecordsV2>>;
|
|
1049
|
+
getSharkfinSubscription(params: {
|
|
1050
|
+
productId: string;
|
|
1051
|
+
}): Promise<APIResponse<EarnSharkfinSubscriptionDetailV2>>;
|
|
1052
|
+
subscribeSharkfin(params: {
|
|
1053
|
+
productId: string;
|
|
1054
|
+
amount: string;
|
|
1055
|
+
}): Promise<APIResponse<{
|
|
1056
|
+
orderId: string;
|
|
1057
|
+
status: string;
|
|
1058
|
+
}>>;
|
|
1059
|
+
getSharkfinSubscriptionResult(params: {
|
|
1060
|
+
orderId: string;
|
|
1061
|
+
}): Promise<APIResponse<{
|
|
1062
|
+
result: 'success' | 'fail';
|
|
1063
|
+
msg: string;
|
|
1064
|
+
}>>;
|
|
1065
|
+
/**
|
|
1066
|
+
*
|
|
1067
|
+
*
|
|
1068
|
+
* Earn | Loan
|
|
1069
|
+
*
|
|
1070
|
+
*
|
|
1071
|
+
*/
|
|
1072
|
+
getLoanCurrencies(params?: {
|
|
1073
|
+
coin?: string;
|
|
1074
|
+
}): Promise<APIResponse<EarnLoanCurrenciesV2>>;
|
|
1075
|
+
getLoanEstInterestAndBorrowable(params: GetLoanEstInterestAndBorrowableRequestV2): Promise<APIResponse<{
|
|
1076
|
+
hourInterest: string;
|
|
1077
|
+
loanAmount: string;
|
|
1078
|
+
}>>;
|
|
1079
|
+
borrowLoan(params: BorrowLoanRequestV2): Promise<APIResponse<{
|
|
1080
|
+
orderId: string;
|
|
1081
|
+
}>>;
|
|
1082
|
+
getOngoingLoanOrders(params?: {
|
|
1083
|
+
orderId?: string;
|
|
1084
|
+
loanCoin?: string;
|
|
1085
|
+
pledgeCoin?: string;
|
|
1086
|
+
}): Promise<APIResponse<EarnLoanOrdersV2[]>>;
|
|
1087
|
+
repayLoan(params: RepayLoanRequestV2): Promise<APIResponse<EarnLoanRepayResponseV2>>;
|
|
1088
|
+
getRepayHistory(params: GetLoanRepayHistoryRequestV2): Promise<APIResponse<EarnLoanRepayHistoryV2>>;
|
|
1089
|
+
updateLoanPledgeRate(params: ModifyLoanPledgeRateRequestV2): Promise<APIResponse<{
|
|
1090
|
+
loanCoin: string;
|
|
1091
|
+
pledgeCoin: string;
|
|
1092
|
+
afterPledgeRate: string;
|
|
1093
|
+
}>>;
|
|
1094
|
+
getLoanPledgeRateHistory(params: GetLoanPledgeRateHistoryRequestV2): Promise<APIResponse<EarnLoanPledgeRateHistoryV2[]>>;
|
|
1095
|
+
getLoanHistory(params: GetLoanHistoryRequestV2): Promise<APIResponse<EarnLoanHistoryV2[]>>;
|
|
1096
|
+
getLoanDebts(): Promise<APIResponse<EarnLoanDebtsV2>>;
|
|
1097
|
+
getLoanLiquidationRecords(params: GetLiquidationRecordsRequestV2): Promise<APIResponse<EarnLoanLiquidationRecordsV2[]>>;
|
|
1098
|
+
}
|