ccxt 4.1.52 → 4.1.54
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 +9 -10
- package/dist/ccxt.browser.js +3517 -3374
- package/dist/ccxt.browser.min.js +10 -10
- package/dist/cjs/ccxt.js +4 -7
- package/dist/cjs/src/abstract/p2b.js +9 -0
- package/dist/cjs/src/ace.js +56 -59
- package/dist/cjs/src/ascendex.js +1 -2
- package/dist/cjs/src/base/Exchange.js +11 -17
- package/dist/cjs/src/bingx.js +48 -8
- package/dist/cjs/src/bitget.js +670 -405
- package/dist/cjs/src/bybit.js +2 -11
- package/dist/cjs/src/cryptocom.js +1 -0
- package/dist/cjs/src/digifinex.js +9 -6
- package/dist/cjs/src/lbank.js +2333 -443
- package/dist/cjs/src/ndax.js +59 -61
- package/dist/cjs/src/novadax.js +57 -59
- package/dist/cjs/src/oceanex.js +58 -60
- package/dist/cjs/src/okcoin.js +1 -9
- package/dist/cjs/src/okx.js +0 -7
- package/dist/cjs/src/p2b.js +1246 -0
- package/dist/cjs/src/poloniex.js +55 -57
- package/dist/cjs/src/poloniexfutures.js +67 -70
- package/dist/cjs/src/pro/bingx.js +18 -11
- package/dist/cjs/src/pro/poloniexfutures.js +9 -0
- package/dist/cjs/src/probit.js +62 -65
- package/dist/cjs/src/timex.js +1 -5
- package/dist/cjs/src/upbit.js +56 -58
- package/dist/cjs/src/wazirx.js +72 -74
- package/dist/cjs/src/whitebit.js +88 -91
- package/dist/cjs/src/woo.js +75 -77
- package/dist/cjs/src/zaif.js +57 -71
- package/dist/cjs/src/zonda.js +67 -70
- package/js/ccxt.d.ts +5 -8
- package/js/ccxt.js +4 -6
- package/js/src/abstract/bitget.d.ts +495 -254
- package/js/src/abstract/bybit.d.ts +1 -0
- package/js/src/abstract/lbank.d.ts +57 -15
- package/js/src/abstract/p2b.d.ts +25 -0
- package/js/src/ace.d.ts +9 -8
- package/js/src/ace.js +56 -59
- package/js/src/alpaca.d.ts +5 -5
- package/js/src/ascendex.d.ts +17 -17
- package/js/src/ascendex.js +1 -2
- package/js/src/base/Exchange.d.ts +5 -5
- package/js/src/base/Exchange.js +11 -17
- package/js/src/base/types.d.ts +73 -68
- package/js/src/bigone.d.ts +12 -12
- package/js/src/binance.d.ts +37 -37
- package/js/src/bingx.d.ts +20 -20
- package/js/src/bingx.js +48 -8
- package/js/src/bit2c.d.ts +5 -5
- package/js/src/bitbank.d.ts +6 -6
- package/js/src/bitbns.d.ts +8 -8
- package/js/src/bitfinex.d.ts +11 -11
- package/js/src/bitfinex2.d.ts +15 -15
- package/js/src/bitflyer.d.ts +10 -10
- package/js/src/bitforex.d.ts +6 -6
- package/js/src/bitget.d.ts +28 -28
- package/js/src/bitget.js +670 -405
- package/js/src/bithumb.d.ts +5 -5
- package/js/src/bitmart.d.ts +23 -23
- package/js/src/bitmex.d.ts +19 -19
- package/js/src/bitopro.d.ts +15 -15
- package/js/src/bitpanda.d.ts +13 -13
- package/js/src/bitrue.d.ts +12 -12
- package/js/src/bitso.d.ts +13 -13
- package/js/src/bitstamp.d.ts +12 -12
- package/js/src/bitstamp1.d.ts +4 -4
- package/js/src/bittrex.d.ts +18 -18
- package/js/src/bitvavo.d.ts +11 -11
- package/js/src/bl3p.d.ts +2 -2
- package/js/src/blockchaincom.d.ts +14 -14
- package/js/src/btcalpha.d.ts +11 -11
- package/js/src/btcbox.d.ts +6 -6
- package/js/src/btcmarkets.d.ts +13 -13
- package/js/src/btcturk.d.ts +7 -7
- package/js/src/bybit.d.ts +33 -33
- package/js/src/bybit.js +2 -11
- package/js/src/cex.d.ts +7 -7
- package/js/src/coinbase.d.ts +21 -21
- package/js/src/coinbasepro.d.ts +14 -14
- package/js/src/coincheck.d.ts +6 -6
- package/js/src/coinex.d.ts +24 -24
- package/js/src/coinlist.d.ts +16 -16
- package/js/src/coinmate.d.ts +7 -7
- package/js/src/coinone.d.ts +6 -6
- package/js/src/coinsph.d.ts +11 -11
- package/js/src/coinspot.d.ts +4 -4
- package/js/src/cryptocom.d.ts +19 -19
- package/js/src/cryptocom.js +1 -0
- package/js/src/currencycom.d.ts +12 -12
- package/js/src/delta.d.ts +14 -14
- package/js/src/deribit.d.ts +16 -16
- package/js/src/digifinex.d.ts +22 -22
- package/js/src/digifinex.js +9 -6
- package/js/src/exmo.d.ts +15 -15
- package/js/src/gate.d.ts +25 -25
- package/js/src/gemini.d.ts +7 -7
- package/js/src/hitbtc.d.ts +20 -20
- package/js/src/hollaex.d.ts +16 -16
- package/js/src/htx.d.ts +34 -34
- package/js/src/huobijp.d.ts +18 -18
- package/js/src/idex.d.ts +14 -14
- package/js/src/independentreserve.d.ts +6 -6
- package/js/src/indodax.d.ts +7 -7
- package/js/src/kraken.d.ts +18 -18
- package/js/src/krakenfutures.d.ts +14 -14
- package/js/src/kucoin.d.ts +17 -17
- package/js/src/kucoinfutures.d.ts +12 -12
- package/js/src/kuna.d.ts +13 -13
- package/js/src/latoken.d.ts +10 -10
- package/js/src/lbank.d.ts +66 -13
- package/js/src/lbank.js +2334 -444
- package/js/src/lbank2.d.ts +11 -11
- package/js/src/luno.d.ts +11 -11
- package/js/src/lykke.d.ts +9 -9
- package/js/src/mercado.d.ts +6 -6
- package/js/src/mexc.d.ts +28 -28
- package/js/src/ndax.d.ts +13 -12
- package/js/src/ndax.js +59 -61
- package/js/src/novadax.d.ts +14 -13
- package/js/src/novadax.js +57 -59
- package/js/src/oceanex.d.ts +12 -11
- package/js/src/oceanex.js +58 -60
- package/js/src/okcoin.d.ts +13 -14
- package/js/src/okcoin.js +1 -9
- package/js/src/okx.d.ts +30 -31
- package/js/src/okx.js +0 -7
- package/js/src/p2b.d.ts +34 -0
- package/js/src/p2b.js +1246 -0
- package/js/src/paymium.d.ts +2 -2
- package/js/src/phemex.d.ts +19 -19
- package/js/src/poloniex.d.ts +17 -16
- package/js/src/poloniex.js +55 -57
- package/js/src/poloniexfutures.d.ts +13 -12
- package/js/src/poloniexfutures.js +67 -70
- package/js/src/pro/alpaca.d.ts +3 -3
- package/js/src/pro/ascendex.d.ts +2 -2
- package/js/src/pro/binance.d.ts +12 -12
- package/js/src/pro/bingx.d.ts +3 -3
- package/js/src/pro/bingx.js +19 -12
- package/js/src/pro/bitfinex.d.ts +3 -3
- package/js/src/pro/bitfinex2.d.ts +3 -3
- package/js/src/pro/bitget.d.ts +5 -5
- package/js/src/pro/bitmart.d.ts +2 -2
- package/js/src/pro/bitmex.d.ts +3 -3
- package/js/src/pro/bitpanda.d.ts +5 -5
- package/js/src/pro/bitrue.d.ts +2 -2
- package/js/src/pro/bitstamp.d.ts +2 -2
- package/js/src/pro/bittrex.d.ts +3 -3
- package/js/src/pro/bitvavo.d.ts +3 -3
- package/js/src/pro/blockchaincom.d.ts +2 -2
- package/js/src/pro/bybit.d.ts +7 -7
- package/js/src/pro/cex.d.ts +4 -4
- package/js/src/pro/coinbasepro.d.ts +6 -6
- package/js/src/pro/coinex.d.ts +3 -3
- package/js/src/pro/cryptocom.d.ts +7 -7
- package/js/src/pro/deribit.d.ts +3 -3
- package/js/src/pro/exmo.d.ts +2 -2
- package/js/src/pro/gate.d.ts +6 -6
- package/js/src/pro/gemini.d.ts +2 -2
- package/js/src/pro/hitbtc.d.ts +5 -5
- package/js/src/pro/hollaex.d.ts +3 -3
- package/js/src/pro/htx.d.ts +4 -4
- package/js/src/pro/idex.d.ts +3 -3
- package/js/src/pro/kraken.d.ts +8 -8
- package/js/src/pro/krakenfutures.d.ts +6 -6
- package/js/src/pro/kucoin.d.ts +4 -4
- package/js/src/pro/kucoinfutures.d.ts +3 -3
- package/js/src/pro/mexc.d.ts +3 -3
- package/js/src/pro/okcoin.d.ts +2 -2
- package/js/src/pro/okx.d.ts +9 -9
- package/js/src/pro/phemex.d.ts +3 -3
- package/js/src/pro/poloniex.d.ts +4 -4
- package/js/src/pro/poloniexfutures.d.ts +3 -3
- package/js/src/pro/poloniexfutures.js +9 -0
- package/js/src/pro/probit.d.ts +3 -3
- package/js/src/pro/wazirx.d.ts +4 -4
- package/js/src/pro/whitebit.d.ts +3 -3
- package/js/src/pro/woo.d.ts +3 -3
- package/js/src/probit.d.ts +13 -12
- package/js/src/probit.js +62 -65
- package/js/src/tidex.d.ts +7 -7
- package/js/src/timex.d.ts +11 -11
- package/js/src/timex.js +1 -5
- package/js/src/tokocrypto.d.ts +11 -11
- package/js/src/upbit.d.ts +13 -12
- package/js/src/upbit.js +56 -58
- package/js/src/wavesexchange.d.ts +10 -10
- package/js/src/wazirx.d.ts +8 -7
- package/js/src/wazirx.js +72 -74
- package/js/src/whitebit.d.ts +15 -14
- package/js/src/whitebit.js +88 -91
- package/js/src/woo.d.ts +22 -21
- package/js/src/woo.js +75 -77
- package/js/src/yobit.d.ts +7 -7
- package/js/src/zaif.d.ts +6 -5
- package/js/src/zaif.js +57 -71
- package/js/src/zonda.d.ts +8 -7
- package/js/src/zonda.js +67 -70
- package/package.json +1 -1
- package/skip-tests.json +7 -15
- package/test.ts +0 -0
- package/js/src/abstract/bitstamp1.d.ts +0 -26
- package/js/src/abstract/lbank2.d.ts +0 -64
- package/js/src/abstract/lbank2.js +0 -11
- /package/js/src/abstract/{bitstamp1.js → p2b.js} +0 -0
package/dist/cjs/src/bitget.js
CHANGED
|
@@ -126,9 +126,21 @@ class bitget extends bitget$1 {
|
|
|
126
126
|
'p2p': 'https://api.{hostname}',
|
|
127
127
|
'broker': 'https://api.{hostname}',
|
|
128
128
|
'margin': 'https://api.{hostname}',
|
|
129
|
+
'common': 'https://api.{hostname}',
|
|
130
|
+
'tax': 'https://api.{hostname}',
|
|
131
|
+
'convert': 'https://api.{hostname}',
|
|
132
|
+
'copy': 'https://api.{hostname}',
|
|
133
|
+
'earn': 'https://api.{hostname}',
|
|
129
134
|
},
|
|
130
135
|
'www': 'https://www.bitget.com',
|
|
131
136
|
'doc': [
|
|
137
|
+
'https://www.bitget.com/api-doc/common/intro',
|
|
138
|
+
'https://www.bitget.com/api-doc/spot/intro',
|
|
139
|
+
'https://www.bitget.com/api-doc/contract/intro',
|
|
140
|
+
'https://www.bitget.com/api-doc/broker/intro',
|
|
141
|
+
'https://www.bitget.com/api-doc/margin/intro',
|
|
142
|
+
'https://www.bitget.com/api-doc/copytrading/intro',
|
|
143
|
+
'https://www.bitget.com/api-doc/earn/intro',
|
|
132
144
|
'https://bitgetlimited.github.io/apidoc/en/mix',
|
|
133
145
|
'https://bitgetlimited.github.io/apidoc/en/spot',
|
|
134
146
|
'https://bitgetlimited.github.io/apidoc/en/broker',
|
|
@@ -139,306 +151,577 @@ class bitget extends bitget$1 {
|
|
|
139
151
|
},
|
|
140
152
|
'api': {
|
|
141
153
|
'public': {
|
|
154
|
+
'common': {
|
|
155
|
+
'get': {
|
|
156
|
+
'v2/public/annoucements': 1,
|
|
157
|
+
'v2/public/time': 1,
|
|
158
|
+
'v2/common/trade-rate': 2,
|
|
159
|
+
},
|
|
160
|
+
},
|
|
142
161
|
'spot': {
|
|
143
162
|
'get': {
|
|
144
|
-
'notice/queryAllNotices': 1,
|
|
145
|
-
'public/time': 1,
|
|
146
|
-
'public/currencies': 6.6667,
|
|
147
|
-
'public/products': 1,
|
|
148
|
-
'public/product': 1,
|
|
149
|
-
'market/ticker': 1,
|
|
150
|
-
'market/tickers': 1,
|
|
151
|
-
'market/fills': 2,
|
|
152
|
-
'market/fills-history': 2,
|
|
153
|
-
'market/candles': 1,
|
|
154
|
-
'market/depth': 1,
|
|
155
|
-
'market/spot-vip-level': 2,
|
|
156
|
-
'market/merge-depth': 1,
|
|
157
|
-
'market/history-candles': 1,
|
|
158
|
-
'public/loan/coinInfos': 2,
|
|
159
|
-
'public/loan/hour-interest': 2,
|
|
163
|
+
'spot/v1/notice/queryAllNotices': 1,
|
|
164
|
+
'spot/v1/public/time': 1,
|
|
165
|
+
'spot/v1/public/currencies': 6.6667,
|
|
166
|
+
'spot/v1/public/products': 1,
|
|
167
|
+
'spot/v1/public/product': 1,
|
|
168
|
+
'spot/v1/market/ticker': 1,
|
|
169
|
+
'spot/v1/market/tickers': 1,
|
|
170
|
+
'spot/v1/market/fills': 2,
|
|
171
|
+
'spot/v1/market/fills-history': 2,
|
|
172
|
+
'spot/v1/market/candles': 1,
|
|
173
|
+
'spot/v1/market/depth': 1,
|
|
174
|
+
'spot/v1/market/spot-vip-level': 2,
|
|
175
|
+
'spot/v1/market/merge-depth': 1,
|
|
176
|
+
'spot/v1/market/history-candles': 1,
|
|
177
|
+
'spot/v1/public/loan/coinInfos': 2,
|
|
178
|
+
'spot/v1/public/loan/hour-interest': 2,
|
|
179
|
+
'v2/spot/public/coins': 6.6667,
|
|
180
|
+
'v2/spot/public/symbols': 1,
|
|
181
|
+
'v2/spot/market/vip-fee-rate': 2,
|
|
182
|
+
'v2/spot/market/tickers': 1,
|
|
183
|
+
'v2/spot/market/merge-depth': 1,
|
|
184
|
+
'v2/spot/market/orderbook': 1,
|
|
185
|
+
'v2/spot/market/candles': 1,
|
|
186
|
+
'v2/spot/market/history-candles': 1,
|
|
187
|
+
'v2/spot/market/fills': 2,
|
|
188
|
+
'v2/spot/market/fills-history': 2,
|
|
160
189
|
},
|
|
161
190
|
},
|
|
162
191
|
'mix': {
|
|
163
192
|
'get': {
|
|
164
|
-
'market/contracts': 1,
|
|
165
|
-
'market/depth': 1,
|
|
166
|
-
'market/ticker': 1,
|
|
167
|
-
'market/tickers': 1,
|
|
168
|
-
'market/contract-vip-level': 2,
|
|
169
|
-
'market/fills': 1,
|
|
170
|
-
'market/fills-history': 2,
|
|
171
|
-
'market/candles': 1,
|
|
172
|
-
'market/index': 1,
|
|
173
|
-
'market/funding-time': 1,
|
|
174
|
-
'market/history-fundRate': 1,
|
|
175
|
-
'market/current-fundRate': 1,
|
|
176
|
-
'market/open-interest': 1,
|
|
177
|
-
'market/mark-price': 1,
|
|
178
|
-
'market/symbol-leverage': 1,
|
|
179
|
-
'market/queryPositionLever': 1,
|
|
180
|
-
'market/open-limit': 1,
|
|
181
|
-
'market/history-candles': 1,
|
|
182
|
-
'market/history-index-candles': 1,
|
|
183
|
-
'market/history-mark-candles': 1,
|
|
184
|
-
'market/merge-depth': 1,
|
|
193
|
+
'mix/v1/market/contracts': 1,
|
|
194
|
+
'mix/v1/market/depth': 1,
|
|
195
|
+
'mix/v1/market/ticker': 1,
|
|
196
|
+
'mix/v1/market/tickers': 1,
|
|
197
|
+
'mix/v1/market/contract-vip-level': 2,
|
|
198
|
+
'mix/v1/market/fills': 1,
|
|
199
|
+
'mix/v1/market/fills-history': 2,
|
|
200
|
+
'mix/v1/market/candles': 1,
|
|
201
|
+
'mix/v1/market/index': 1,
|
|
202
|
+
'mix/v1/market/funding-time': 1,
|
|
203
|
+
'mix/v1/market/history-fundRate': 1,
|
|
204
|
+
'mix/v1/market/current-fundRate': 1,
|
|
205
|
+
'mix/v1/market/open-interest': 1,
|
|
206
|
+
'mix/v1/market/mark-price': 1,
|
|
207
|
+
'mix/v1/market/symbol-leverage': 1,
|
|
208
|
+
'mix/v1/market/queryPositionLever': 1,
|
|
209
|
+
'mix/v1/market/open-limit': 1,
|
|
210
|
+
'mix/v1/market/history-candles': 1,
|
|
211
|
+
'mix/v1/market/history-index-candles': 1,
|
|
212
|
+
'mix/v1/market/history-mark-candles': 1,
|
|
213
|
+
'mix/v1/market/merge-depth': 1,
|
|
214
|
+
'v2/mix/market/vip-fee-rate': 2,
|
|
215
|
+
'v2/mix/market/merge-depth': 1,
|
|
216
|
+
'v2/mix/market/ticker': 1,
|
|
217
|
+
'v2/mix/market/tickers': 1,
|
|
218
|
+
'v2/mix/market/fills': 1,
|
|
219
|
+
'v2/mix/market/fills-history': 2,
|
|
220
|
+
'v2/mix/market/candles': 1,
|
|
221
|
+
'v2/mix/market/history-candles': 1,
|
|
222
|
+
'v2/mix/market/history-index-candles': 1,
|
|
223
|
+
'v2/mix/market/history-mark-candles': 1,
|
|
224
|
+
'v2/mix/market/open-interest': 1,
|
|
225
|
+
'v2/mix/market/funding-time': 1,
|
|
226
|
+
'v2/mix/market/symbol-price': 1,
|
|
227
|
+
'v2/mix/market/history-fund-rate': 1,
|
|
228
|
+
'v2/mix/market/current-fund-rate': 1,
|
|
229
|
+
'v2/mix/market/contracts': 1,
|
|
230
|
+
'v2/mix/market/query-position-lever': 2,
|
|
185
231
|
},
|
|
186
232
|
},
|
|
187
233
|
'margin': {
|
|
188
234
|
'get': {
|
|
189
|
-
'cross/public/interestRateAndLimit': 2,
|
|
190
|
-
'isolated/public/interestRateAndLimit': 2,
|
|
191
|
-
'cross/public/tierData': 2,
|
|
192
|
-
'isolated/public/tierData': 2,
|
|
193
|
-
'public/currencies': 1,
|
|
235
|
+
'margin/v1/cross/public/interestRateAndLimit': 2,
|
|
236
|
+
'margin/v1/isolated/public/interestRateAndLimit': 2,
|
|
237
|
+
'margin/v1/cross/public/tierData': 2,
|
|
238
|
+
'margin/v1/isolated/public/tierData': 2,
|
|
239
|
+
'margin/v1/public/currencies': 1,
|
|
240
|
+
'v2/margin/currencies': 2,
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
'earn': {
|
|
244
|
+
'get': {
|
|
245
|
+
'v2/earn/loan/public/coinInfos': 2,
|
|
246
|
+
'v2/earn/loan/public/hour-interest': 2,
|
|
194
247
|
},
|
|
195
248
|
},
|
|
196
249
|
},
|
|
197
250
|
'private': {
|
|
198
251
|
'spot': {
|
|
199
252
|
'get': {
|
|
200
|
-
'wallet/deposit-address': 4,
|
|
201
|
-
'wallet/withdrawal-list': 1,
|
|
202
|
-
'wallet/deposit-list': 1,
|
|
203
|
-
'account/getInfo': 20,
|
|
204
|
-
'account/assets': 2,
|
|
205
|
-
'account/assets-lite': 2,
|
|
206
|
-
'account/transferRecords': 1,
|
|
207
|
-
'convert/currencies': 2,
|
|
208
|
-
'convert/convert-record': 2,
|
|
209
|
-
'loan/ongoing-orders': 2,
|
|
210
|
-
'loan/repay-history': 2,
|
|
211
|
-
'loan/revise-history': 2,
|
|
212
|
-
'loan/borrow-history': 2,
|
|
213
|
-
'loan/debts': 2,
|
|
253
|
+
'spot/v1/wallet/deposit-address': 4,
|
|
254
|
+
'spot/v1/wallet/withdrawal-list': 1,
|
|
255
|
+
'spot/v1/wallet/deposit-list': 1,
|
|
256
|
+
'spot/v1/account/getInfo': 20,
|
|
257
|
+
'spot/v1/account/assets': 2,
|
|
258
|
+
'spot/v1/account/assets-lite': 2,
|
|
259
|
+
'spot/v1/account/transferRecords': 1,
|
|
260
|
+
'spot/v1/convert/currencies': 2,
|
|
261
|
+
'spot/v1/convert/convert-record': 2,
|
|
262
|
+
'spot/v1/loan/ongoing-orders': 2,
|
|
263
|
+
'spot/v1/loan/repay-history': 2,
|
|
264
|
+
'spot/v1/loan/revise-history': 2,
|
|
265
|
+
'spot/v1/loan/borrow-history': 2,
|
|
266
|
+
'spot/v1/loan/debts': 2,
|
|
267
|
+
'v2/spot/trade/orderInfo': 1,
|
|
268
|
+
'v2/spot/trade/unfilled-orders': 1,
|
|
269
|
+
'v2/spot/trade/history-orders': 1,
|
|
270
|
+
'v2/spot/trade/fills': 2,
|
|
271
|
+
'v2/spot/trade/current-plan-order': 1,
|
|
272
|
+
'v2/spot/trade/history-plan-order': 1,
|
|
273
|
+
'v2/spot/account/info': 20,
|
|
274
|
+
'v2/spot/account/assets': 2,
|
|
275
|
+
'v2/spot/account/subaccount-assets': 2,
|
|
276
|
+
'v2/spot/account/bills': 2,
|
|
277
|
+
'v2/spot/account/transferRecords': 1,
|
|
278
|
+
'v2/spot/wallet/deposit-address': 2,
|
|
279
|
+
'v2/spot/wallet/deposit-records': 2,
|
|
280
|
+
'v2/spot/wallet/withdrawal-records': 2,
|
|
214
281
|
},
|
|
215
282
|
'post': {
|
|
216
|
-
'wallet/transfer': 4,
|
|
217
|
-
'wallet/transfer-v2': 4,
|
|
218
|
-
'wallet/subTransfer': 10,
|
|
219
|
-
'wallet/withdrawal': 4,
|
|
220
|
-
'wallet/withdrawal-v2': 4,
|
|
221
|
-
'wallet/withdrawal-inner': 4,
|
|
222
|
-
'wallet/withdrawal-inner-v2': 4,
|
|
223
|
-
'account/sub-account-spot-assets': 200,
|
|
224
|
-
'account/bills': 2,
|
|
225
|
-
'trade/orders': 2,
|
|
226
|
-
'trade/batch-orders': 4,
|
|
227
|
-
'trade/cancel-order': 2,
|
|
228
|
-
'trade/cancel-order-v2': 2,
|
|
229
|
-
'trade/cancel-symbol-order': 2,
|
|
230
|
-
'trade/cancel-batch-orders': 4,
|
|
231
|
-
'trade/cancel-batch-orders-v2': 4,
|
|
232
|
-
'trade/orderInfo': 1,
|
|
233
|
-
'trade/open-orders': 1,
|
|
234
|
-
'trade/history': 1,
|
|
235
|
-
'trade/fills': 1,
|
|
236
|
-
'plan/placePlan': 1,
|
|
237
|
-
'plan/modifyPlan': 1,
|
|
238
|
-
'plan/cancelPlan': 1,
|
|
239
|
-
'plan/currentPlan': 1,
|
|
240
|
-
'plan/historyPlan': 1,
|
|
241
|
-
'plan/batchCancelPlan': 2,
|
|
242
|
-
'convert/quoted-price': 4,
|
|
243
|
-
'convert/trade': 4,
|
|
244
|
-
'loan/borrow': 2,
|
|
245
|
-
'loan/repay': 2,
|
|
246
|
-
'loan/revise-pledge': 2,
|
|
247
|
-
'trace/order/orderCurrentList': 2,
|
|
248
|
-
'trace/order/orderHistoryList': 2,
|
|
249
|
-
'trace/order/closeTrackingOrder': 2,
|
|
250
|
-
'trace/order/updateTpsl': 2,
|
|
251
|
-
'trace/order/followerEndOrder': 2,
|
|
252
|
-
'trace/order/spotInfoList': 2,
|
|
253
|
-
'trace/config/getTraderSettings': 2,
|
|
254
|
-
'trace/config/getFollowerSettings': 2,
|
|
255
|
-
'trace/user/myTraders': 2,
|
|
256
|
-
'trace/config/setFollowerConfig': 2,
|
|
257
|
-
'trace/user/myFollowers': 2,
|
|
258
|
-
'trace/config/setProductCode': 2,
|
|
259
|
-
'trace/user/removeTrader': 2,
|
|
260
|
-
'trace/getRemovableFollower': 2,
|
|
261
|
-
'trace/user/removeFollower': 2,
|
|
262
|
-
'trace/profit/totalProfitInfo': 2,
|
|
263
|
-
'trace/profit/totalProfitList': 2,
|
|
264
|
-
'trace/profit/profitHisList': 2,
|
|
265
|
-
'trace/profit/profitHisDetailList': 2,
|
|
266
|
-
'trace/profit/waitProfitDetailList': 2,
|
|
267
|
-
'trace/user/getTraderInfo': 2,
|
|
283
|
+
'spot/v1/wallet/transfer': 4,
|
|
284
|
+
'spot/v1/wallet/transfer-v2': 4,
|
|
285
|
+
'spot/v1/wallet/subTransfer': 10,
|
|
286
|
+
'spot/v1/wallet/withdrawal': 4,
|
|
287
|
+
'spot/v1/wallet/withdrawal-v2': 4,
|
|
288
|
+
'spot/v1/wallet/withdrawal-inner': 4,
|
|
289
|
+
'spot/v1/wallet/withdrawal-inner-v2': 4,
|
|
290
|
+
'spot/v1/account/sub-account-spot-assets': 200,
|
|
291
|
+
'spot/v1/account/bills': 2,
|
|
292
|
+
'spot/v1/trade/orders': 2,
|
|
293
|
+
'spot/v1/trade/batch-orders': 4,
|
|
294
|
+
'spot/v1/trade/cancel-order': 2,
|
|
295
|
+
'spot/v1/trade/cancel-order-v2': 2,
|
|
296
|
+
'spot/v1/trade/cancel-symbol-order': 2,
|
|
297
|
+
'spot/v1/trade/cancel-batch-orders': 4,
|
|
298
|
+
'spot/v1/trade/cancel-batch-orders-v2': 4,
|
|
299
|
+
'spot/v1/trade/orderInfo': 1,
|
|
300
|
+
'spot/v1/trade/open-orders': 1,
|
|
301
|
+
'spot/v1/trade/history': 1,
|
|
302
|
+
'spot/v1/trade/fills': 1,
|
|
303
|
+
'spot/v1/plan/placePlan': 1,
|
|
304
|
+
'spot/v1/plan/modifyPlan': 1,
|
|
305
|
+
'spot/v1/plan/cancelPlan': 1,
|
|
306
|
+
'spot/v1/plan/currentPlan': 1,
|
|
307
|
+
'spot/v1/plan/historyPlan': 1,
|
|
308
|
+
'spot/v1/plan/batchCancelPlan': 2,
|
|
309
|
+
'spot/v1/convert/quoted-price': 4,
|
|
310
|
+
'spot/v1/convert/trade': 4,
|
|
311
|
+
'spot/v1/loan/borrow': 2,
|
|
312
|
+
'spot/v1/loan/repay': 2,
|
|
313
|
+
'spot/v1/loan/revise-pledge': 2,
|
|
314
|
+
'spot/v1/trace/order/orderCurrentList': 2,
|
|
315
|
+
'spot/v1/trace/order/orderHistoryList': 2,
|
|
316
|
+
'spot/v1/trace/order/closeTrackingOrder': 2,
|
|
317
|
+
'spot/v1/trace/order/updateTpsl': 2,
|
|
318
|
+
'spot/v1/trace/order/followerEndOrder': 2,
|
|
319
|
+
'spot/v1/trace/order/spotInfoList': 2,
|
|
320
|
+
'spot/v1/trace/config/getTraderSettings': 2,
|
|
321
|
+
'spot/v1/trace/config/getFollowerSettings': 2,
|
|
322
|
+
'spot/v1/trace/user/myTraders': 2,
|
|
323
|
+
'spot/v1/trace/config/setFollowerConfig': 2,
|
|
324
|
+
'spot/v1/trace/user/myFollowers': 2,
|
|
325
|
+
'spot/v1/trace/config/setProductCode': 2,
|
|
326
|
+
'spot/v1/trace/user/removeTrader': 2,
|
|
327
|
+
'spot/v1/trace/getRemovableFollower': 2,
|
|
328
|
+
'spot/v1/trace/user/removeFollower': 2,
|
|
329
|
+
'spot/v1/trace/profit/totalProfitInfo': 2,
|
|
330
|
+
'spot/v1/trace/profit/totalProfitList': 2,
|
|
331
|
+
'spot/v1/trace/profit/profitHisList': 2,
|
|
332
|
+
'spot/v1/trace/profit/profitHisDetailList': 2,
|
|
333
|
+
'spot/v1/trace/profit/waitProfitDetailList': 2,
|
|
334
|
+
'spot/v1/trace/user/getTraderInfo': 2,
|
|
335
|
+
'v2/spot/trade/place-order': 2,
|
|
336
|
+
'v2/spot/trade/cancel-order': 2,
|
|
337
|
+
'v2/spot/trade/batch-orders': 20,
|
|
338
|
+
'v2/spot/trade/batch-cancel-order': 2,
|
|
339
|
+
'v2/spot/trade/cancel-symbol-order': 4,
|
|
340
|
+
'v2/spot/trade/place-plan-order': 1,
|
|
341
|
+
'v2/spot/trade/modify-plan-order': 1,
|
|
342
|
+
'v2/spot/trade/cancel-plan-order': 1,
|
|
343
|
+
'v2/spot/trade/batch-cancel-plan-order': 2,
|
|
344
|
+
'v2/spot/wallet/transfer': 2,
|
|
345
|
+
'v2/spot/wallet/subaccount-transfer': 2,
|
|
346
|
+
'v2/spot/wallet/withdrawal': 2,
|
|
268
347
|
},
|
|
269
348
|
},
|
|
270
349
|
'mix': {
|
|
271
350
|
'get': {
|
|
272
|
-
'account/account': 2,
|
|
273
|
-
'account/accounts': 2,
|
|
274
|
-
'position/singlePosition': 2,
|
|
275
|
-
'position/singlePosition-v2': 2,
|
|
276
|
-
'position/allPosition': 4,
|
|
277
|
-
'position/allPosition-v2': 4,
|
|
278
|
-
'position/history-position': 1,
|
|
279
|
-
'account/accountBill': 2,
|
|
280
|
-
'account/accountBusinessBill': 4,
|
|
281
|
-
'order/current': 1,
|
|
282
|
-
'order/marginCoinCurrent': 1,
|
|
283
|
-
'order/history': 2,
|
|
284
|
-
'order/historyProductType': 4,
|
|
285
|
-
'order/detail': 2,
|
|
286
|
-
'order/fills': 2,
|
|
287
|
-
'order/allFills': 2,
|
|
288
|
-
'plan/currentPlan': 1,
|
|
289
|
-
'plan/historyPlan': 2,
|
|
290
|
-
'trace/currentTrack': 2,
|
|
291
|
-
'trace/followerOrder': 2,
|
|
292
|
-
'trace/followerHistoryOrders': 2,
|
|
293
|
-
'trace/historyTrack': 2,
|
|
294
|
-
'trace/summary': 1,
|
|
295
|
-
'trace/profitSettleTokenIdGroup': 1,
|
|
296
|
-
'trace/profitDateGroupList': 1,
|
|
297
|
-
'trade/profitDateList': 2,
|
|
298
|
-
'trace/waitProfitDateList': 1,
|
|
299
|
-
'trace/traderSymbols': 1,
|
|
300
|
-
'trace/traderList': 2,
|
|
301
|
-
'trace/traderDetail': 2,
|
|
302
|
-
'trace/queryTraceConfig': 2,
|
|
351
|
+
'mix/v1/account/account': 2,
|
|
352
|
+
'mix/v1/account/accounts': 2,
|
|
353
|
+
'mix/v1/position/singlePosition': 2,
|
|
354
|
+
'mix/v1/position/singlePosition-v2': 2,
|
|
355
|
+
'mix/v1/position/allPosition': 4,
|
|
356
|
+
'mix/v1/position/allPosition-v2': 4,
|
|
357
|
+
'mix/v1/position/history-position': 1,
|
|
358
|
+
'mix/v1/account/accountBill': 2,
|
|
359
|
+
'mix/v1/account/accountBusinessBill': 4,
|
|
360
|
+
'mix/v1/order/current': 1,
|
|
361
|
+
'mix/v1/order/marginCoinCurrent': 1,
|
|
362
|
+
'mix/v1/order/history': 2,
|
|
363
|
+
'mix/v1/order/historyProductType': 4,
|
|
364
|
+
'mix/v1/order/detail': 2,
|
|
365
|
+
'mix/v1/order/fills': 2,
|
|
366
|
+
'mix/v1/order/allFills': 2,
|
|
367
|
+
'mix/v1/plan/currentPlan': 1,
|
|
368
|
+
'mix/v1/plan/historyPlan': 2,
|
|
369
|
+
'mix/v1/trace/currentTrack': 2,
|
|
370
|
+
'mix/v1/trace/followerOrder': 2,
|
|
371
|
+
'mix/v1/trace/followerHistoryOrders': 2,
|
|
372
|
+
'mix/v1/trace/historyTrack': 2,
|
|
373
|
+
'mix/v1/trace/summary': 1,
|
|
374
|
+
'mix/v1/trace/profitSettleTokenIdGroup': 1,
|
|
375
|
+
'mix/v1/trace/profitDateGroupList': 1,
|
|
376
|
+
'mix/v1/trade/profitDateList': 2,
|
|
377
|
+
'mix/v1/trace/waitProfitDateList': 1,
|
|
378
|
+
'mix/v1/trace/traderSymbols': 1,
|
|
379
|
+
'mix/v1/trace/traderList': 2,
|
|
380
|
+
'mix/v1/trace/traderDetail': 2,
|
|
381
|
+
'mix/v1/trace/queryTraceConfig': 2,
|
|
382
|
+
'v2/mix/account/account': 2,
|
|
383
|
+
'v2/mix/account/accounts': 2,
|
|
384
|
+
'v2/mix/account/sub-account-assets': 200,
|
|
385
|
+
'v2/mix/account/open-count': 2,
|
|
386
|
+
'v2/mix/account/bill': 2,
|
|
387
|
+
'v2/mix/market/query-position-lever': 2,
|
|
388
|
+
'v2/mix/position/single-position': 2,
|
|
389
|
+
'v2/mix/position/all-position': 4,
|
|
390
|
+
'v2/mix/position/history-position': 1,
|
|
391
|
+
'v2/mix/order/detail': 2,
|
|
392
|
+
'v2/mix/order/fills': 2,
|
|
393
|
+
'v2/mix/order/fill-history': 2,
|
|
394
|
+
'v2/mix/order/orders-pending': 2,
|
|
395
|
+
'v2/mix/order/orders-history': 2,
|
|
396
|
+
'v2/mix/order/orders-plan-pending': 2,
|
|
397
|
+
'v2/mix/order/orders-plan-history': 2,
|
|
303
398
|
},
|
|
304
399
|
'post': {
|
|
305
|
-
'account/sub-account-contract-assets': 200,
|
|
306
|
-
'account/open-count': 1,
|
|
307
|
-
'account/setLeverage': 4,
|
|
308
|
-
'account/setMargin': 4,
|
|
309
|
-
'account/setMarginMode': 4,
|
|
310
|
-
'account/setPositionMode': 4,
|
|
311
|
-
'order/placeOrder': 2,
|
|
312
|
-
'order/batch-orders': 2,
|
|
313
|
-
'order/cancel-order': 2,
|
|
314
|
-
'order/cancel-batch-orders': 2,
|
|
315
|
-
'order/modifyOrder': 2,
|
|
316
|
-
'order/cancel-symbol-orders': 2,
|
|
317
|
-
'order/cancel-all-orders': 2,
|
|
318
|
-
'order/close-all-positions': 20,
|
|
319
|
-
'plan/placePlan': 2,
|
|
320
|
-
'plan/modifyPlan': 2,
|
|
321
|
-
'plan/modifyPlanPreset': 2,
|
|
322
|
-
'plan/placeTPSL': 2,
|
|
323
|
-
'plan/placeTrailStop': 2,
|
|
324
|
-
'plan/placePositionsTPSL': 2,
|
|
325
|
-
'plan/modifyTPSLPlan': 2,
|
|
326
|
-
'plan/cancelPlan': 2,
|
|
327
|
-
'plan/cancelSymbolPlan': 2,
|
|
328
|
-
'plan/cancelAllPlan': 2,
|
|
329
|
-
'trace/closeTrackOrder': 2,
|
|
330
|
-
'trace/modifyTPSL': 2,
|
|
331
|
-
'trace/closeTrackOrderBySymbol': 2,
|
|
332
|
-
'trace/setUpCopySymbols': 2,
|
|
333
|
-
'trace/followerSetBatchTraceConfig': 2,
|
|
334
|
-
'trace/followerCloseByTrackingNo': 2,
|
|
335
|
-
'trace/followerCloseByAll': 2,
|
|
336
|
-
'trace/followerSetTpsl': 2,
|
|
337
|
-
'trace/cancelCopyTrader': 4,
|
|
338
|
-
'trace/traderUpdateConfig': 2,
|
|
339
|
-
'trace/myTraderList': 2,
|
|
340
|
-
'trace/myFollowerList': 2,
|
|
341
|
-
'trace/removeFollower': 2,
|
|
342
|
-
'trace/public/getFollowerConfig': 2,
|
|
343
|
-
'trace/report/order/historyList': 2,
|
|
344
|
-
'trace/report/order/currentList': 2,
|
|
345
|
-
'trace/queryTraderTpslRatioConfig': 2,
|
|
346
|
-
'trace/traderUpdateTpslRatioConfig': 2,
|
|
400
|
+
'mix/v1/account/sub-account-contract-assets': 200,
|
|
401
|
+
'mix/v1/account/open-count': 1,
|
|
402
|
+
'mix/v1/account/setLeverage': 4,
|
|
403
|
+
'mix/v1/account/setMargin': 4,
|
|
404
|
+
'mix/v1/account/setMarginMode': 4,
|
|
405
|
+
'mix/v1/account/setPositionMode': 4,
|
|
406
|
+
'mix/v1/order/placeOrder': 2,
|
|
407
|
+
'mix/v1/order/batch-orders': 2,
|
|
408
|
+
'mix/v1/order/cancel-order': 2,
|
|
409
|
+
'mix/v1/order/cancel-batch-orders': 2,
|
|
410
|
+
'mix/v1/order/modifyOrder': 2,
|
|
411
|
+
'mix/v1/order/cancel-symbol-orders': 2,
|
|
412
|
+
'mix/v1/order/cancel-all-orders': 2,
|
|
413
|
+
'mix/v1/order/close-all-positions': 20,
|
|
414
|
+
'mix/v1/plan/placePlan': 2,
|
|
415
|
+
'mix/v1/plan/modifyPlan': 2,
|
|
416
|
+
'mix/v1/plan/modifyPlanPreset': 2,
|
|
417
|
+
'mix/v1/plan/placeTPSL': 2,
|
|
418
|
+
'mix/v1/plan/placeTrailStop': 2,
|
|
419
|
+
'mix/v1/plan/placePositionsTPSL': 2,
|
|
420
|
+
'mix/v1/plan/modifyTPSLPlan': 2,
|
|
421
|
+
'mix/v1/plan/cancelPlan': 2,
|
|
422
|
+
'mix/v1/plan/cancelSymbolPlan': 2,
|
|
423
|
+
'mix/v1/plan/cancelAllPlan': 2,
|
|
424
|
+
'mix/v1/trace/closeTrackOrder': 2,
|
|
425
|
+
'mix/v1/trace/modifyTPSL': 2,
|
|
426
|
+
'mix/v1/trace/closeTrackOrderBySymbol': 2,
|
|
427
|
+
'mix/v1/trace/setUpCopySymbols': 2,
|
|
428
|
+
'mix/v1/trace/followerSetBatchTraceConfig': 2,
|
|
429
|
+
'mix/v1/trace/followerCloseByTrackingNo': 2,
|
|
430
|
+
'mix/v1/trace/followerCloseByAll': 2,
|
|
431
|
+
'mix/v1/trace/followerSetTpsl': 2,
|
|
432
|
+
'mix/v1/trace/cancelCopyTrader': 4,
|
|
433
|
+
'mix/v1/trace/traderUpdateConfig': 2,
|
|
434
|
+
'mix/v1/trace/myTraderList': 2,
|
|
435
|
+
'mix/v1/trace/myFollowerList': 2,
|
|
436
|
+
'mix/v1/trace/removeFollower': 2,
|
|
437
|
+
'mix/v1/trace/public/getFollowerConfig': 2,
|
|
438
|
+
'mix/v1/trace/report/order/historyList': 2,
|
|
439
|
+
'mix/v1/trace/report/order/currentList': 2,
|
|
440
|
+
'mix/v1/trace/queryTraderTpslRatioConfig': 2,
|
|
441
|
+
'mix/v1/trace/traderUpdateTpslRatioConfig': 2,
|
|
442
|
+
'v2/mix/account/set-leverage': 4,
|
|
443
|
+
'v2/mix/account/set-margin': 4,
|
|
444
|
+
'v2/mix/account/set-margin-mode': 4,
|
|
445
|
+
'v2/mix/account/set-position-mode': 4,
|
|
446
|
+
'v2/mix/order/place-order': 20,
|
|
447
|
+
'v2/mix/order/click-backhand': 20,
|
|
448
|
+
'v2/mix/order/batch-place-order': 20,
|
|
449
|
+
'v2/mix/order/modify-order': 2,
|
|
450
|
+
'v2/mix/order/cancel-order': 2,
|
|
451
|
+
'v2/mix/order/batch-cancel-orders': 2,
|
|
452
|
+
'v2/mix/order/close-positions': 20,
|
|
453
|
+
'v2/mix/order/place-tpsl-order': 2,
|
|
454
|
+
'v2/mix/order/place-plan-order': 2,
|
|
455
|
+
'v2/mix/order/modify-tpsl-order': 2,
|
|
456
|
+
'v2/mix/order/modify-plan-order': 2,
|
|
457
|
+
'v2/mix/order/cancel-plan-order': 2,
|
|
347
458
|
},
|
|
348
459
|
},
|
|
349
460
|
'user': {
|
|
350
461
|
'get': {
|
|
351
|
-
'fee/query': 2,
|
|
352
|
-
'sub/virtual-list': 2,
|
|
353
|
-
'sub/virtual-api-list': 2,
|
|
354
|
-
'tax/spot-record': 1,
|
|
355
|
-
'tax/future-record': 1,
|
|
356
|
-
'tax/margin-record': 1,
|
|
357
|
-
'tax/p2p-record': 1,
|
|
462
|
+
'user/v1/fee/query': 2,
|
|
463
|
+
'user/v1/sub/virtual-list': 2,
|
|
464
|
+
'user/v1/sub/virtual-api-list': 2,
|
|
465
|
+
'user/v1/tax/spot-record': 1,
|
|
466
|
+
'user/v1/tax/future-record': 1,
|
|
467
|
+
'user/v1/tax/margin-record': 1,
|
|
468
|
+
'user/v1/tax/p2p-record': 1,
|
|
469
|
+
'v2/user/virtual-subaccount-list': 2,
|
|
470
|
+
'v2/user/virtual-subaccount-apikey-list': 2,
|
|
358
471
|
},
|
|
359
472
|
'post': {
|
|
360
|
-
'sub/virtual-create': 4,
|
|
361
|
-
'sub/virtual-modify': 4,
|
|
362
|
-
'sub/virtual-api-batch-create': 20,
|
|
363
|
-
'sub/virtual-api-create': 4,
|
|
364
|
-
'sub/virtual-api-modify': 4,
|
|
473
|
+
'user/v1/sub/virtual-create': 4,
|
|
474
|
+
'user/v1/sub/virtual-modify': 4,
|
|
475
|
+
'user/v1/sub/virtual-api-batch-create': 20,
|
|
476
|
+
'user/v1/sub/virtual-api-create': 4,
|
|
477
|
+
'user/v1/sub/virtual-api-modify': 4,
|
|
478
|
+
'v2/user/create-virtual-subaccount': 4,
|
|
479
|
+
'v2/user/modify-virtual-subaccount': 4,
|
|
480
|
+
'v2/user/batch-create-subaccount-and-apikey': 20,
|
|
481
|
+
'v2/user/create-virtual-subaccount-apikey': 4,
|
|
482
|
+
'v2/user/modify-virtual-subaccount-apikey': 4,
|
|
365
483
|
},
|
|
366
484
|
},
|
|
367
485
|
'p2p': {
|
|
368
486
|
'get': {
|
|
369
|
-
'merchant/merchantList': 2,
|
|
370
|
-
'merchant/merchantInfo': 2,
|
|
371
|
-
'merchant/advList': 2,
|
|
372
|
-
'merchant/orderList': 2,
|
|
487
|
+
'p2p/v1/merchant/merchantList': 2,
|
|
488
|
+
'p2p/v1/merchant/merchantInfo': 2,
|
|
489
|
+
'p2p/v1/merchant/advList': 2,
|
|
490
|
+
'p2p/v1/merchant/orderList': 2,
|
|
491
|
+
'v2/p2p/merchantList': 2,
|
|
492
|
+
'v2/p2p/merchantInfo': 2,
|
|
493
|
+
'v2/p2p/orderList': 2,
|
|
494
|
+
'v2/p2p/advList': 2,
|
|
373
495
|
},
|
|
374
496
|
},
|
|
375
497
|
'broker': {
|
|
376
498
|
'get': {
|
|
377
|
-
'account/info': 2,
|
|
378
|
-
'account/sub-list': 20,
|
|
379
|
-
'account/sub-email': 20,
|
|
380
|
-
'account/sub-spot-assets': 2,
|
|
381
|
-
'account/sub-future-assets': 2,
|
|
382
|
-
'account/subaccount-transfer': 1,
|
|
383
|
-
'account/subaccount-deposit': 1,
|
|
384
|
-
'account/subaccount-withdrawal': 1,
|
|
385
|
-
'account/sub-api-list': 2,
|
|
499
|
+
'broker/v1/account/info': 2,
|
|
500
|
+
'broker/v1/account/sub-list': 20,
|
|
501
|
+
'broker/v1/account/sub-email': 20,
|
|
502
|
+
'broker/v1/account/sub-spot-assets': 2,
|
|
503
|
+
'broker/v1/account/sub-future-assets': 2,
|
|
504
|
+
'broker/v1/account/subaccount-transfer': 1,
|
|
505
|
+
'broker/v1/account/subaccount-deposit': 1,
|
|
506
|
+
'broker/v1/account/subaccount-withdrawal': 1,
|
|
507
|
+
'broker/v1/account/sub-api-list': 2,
|
|
508
|
+
'v2/broker/account/info': 2,
|
|
509
|
+
'v2/broker/account/subaccount-list': 20,
|
|
510
|
+
'v2/broker/account/subaccount-email': 2,
|
|
511
|
+
'v2/broker/account/subaccount-spot-assets': 2,
|
|
512
|
+
'v2/broker/account/subaccount-future-assets': 2,
|
|
513
|
+
'v2/broker/manage/subaccount-apikey-list': 2,
|
|
386
514
|
},
|
|
387
515
|
'post': {
|
|
388
|
-
'account/sub-create': 20,
|
|
389
|
-
'account/sub-modify': 20,
|
|
390
|
-
'account/sub-modify-email': 20,
|
|
391
|
-
'account/sub-address': 2,
|
|
392
|
-
'account/sub-withdrawal': 2,
|
|
393
|
-
'account/sub-auto-transfer': 4,
|
|
394
|
-
'account/sub-api-create': 2,
|
|
395
|
-
'account/sub-api-modify': 2,
|
|
516
|
+
'broker/v1/account/sub-create': 20,
|
|
517
|
+
'broker/v1/account/sub-modify': 20,
|
|
518
|
+
'broker/v1/account/sub-modify-email': 20,
|
|
519
|
+
'broker/v1/account/sub-address': 2,
|
|
520
|
+
'broker/v1/account/sub-withdrawal': 2,
|
|
521
|
+
'broker/v1/account/sub-auto-transfer': 4,
|
|
522
|
+
'broker/v1/account/sub-api-create': 2,
|
|
523
|
+
'broker/v1/account/sub-api-modify': 2,
|
|
524
|
+
'v2/broker/account/modify-subaccount-email': 2,
|
|
525
|
+
'v2/broker/account/create-subaccount': 20,
|
|
526
|
+
'v2/broker/account/modify-subaccount': 20,
|
|
527
|
+
'v2/broker/account/subaccount-address': 2,
|
|
528
|
+
'v2/broker/account/subaccount-withdrawal': 2,
|
|
529
|
+
'v2/broker/account/set-subaccount-autotransfer': 2,
|
|
530
|
+
'v2/broker/manage/create-subaccount-apikey': 2,
|
|
531
|
+
'v2/broker/manage/modify-subaccount-apikey': 2,
|
|
396
532
|
},
|
|
397
533
|
},
|
|
398
534
|
'margin': {
|
|
399
535
|
'get': {
|
|
400
|
-
'cross/account/riskRate': 2,
|
|
401
|
-
'cross/account/maxTransferOutAmount': 2,
|
|
402
|
-
'isolated/account/maxTransferOutAmount': 2,
|
|
403
|
-
'isolated/order/openOrders': 2,
|
|
404
|
-
'isolated/order/history': 2,
|
|
405
|
-
'isolated/order/fills': 2,
|
|
406
|
-
'isolated/loan/list': 2,
|
|
407
|
-
'isolated/repay/list': 2,
|
|
408
|
-
'isolated/interest/list': 2,
|
|
409
|
-
'isolated/liquidation/list': 2,
|
|
410
|
-
'isolated/fin/list': 2,
|
|
411
|
-
'cross/order/openOrders': 2,
|
|
412
|
-
'cross/order/history': 2,
|
|
413
|
-
'cross/order/fills': 2,
|
|
414
|
-
'cross/loan/list': 2,
|
|
415
|
-
'cross/repay/list': 2,
|
|
416
|
-
'cross/interest/list': 2,
|
|
417
|
-
'cross/liquidation/list': 2,
|
|
418
|
-
'cross/fin/list': 2,
|
|
419
|
-
'cross/account/assets': 2,
|
|
420
|
-
'isolated/account/assets': 2,
|
|
536
|
+
'margin/v1/cross/account/riskRate': 2,
|
|
537
|
+
'margin/v1/cross/account/maxTransferOutAmount': 2,
|
|
538
|
+
'margin/v1/isolated/account/maxTransferOutAmount': 2,
|
|
539
|
+
'margin/v1/isolated/order/openOrders': 2,
|
|
540
|
+
'margin/v1/isolated/order/history': 2,
|
|
541
|
+
'margin/v1/isolated/order/fills': 2,
|
|
542
|
+
'margin/v1/isolated/loan/list': 2,
|
|
543
|
+
'margin/v1/isolated/repay/list': 2,
|
|
544
|
+
'margin/v1/isolated/interest/list': 2,
|
|
545
|
+
'margin/v1/isolated/liquidation/list': 2,
|
|
546
|
+
'margin/v1/isolated/fin/list': 2,
|
|
547
|
+
'margin/v1/cross/order/openOrders': 2,
|
|
548
|
+
'margin/v1/cross/order/history': 2,
|
|
549
|
+
'margin/v1/cross/order/fills': 2,
|
|
550
|
+
'margin/v1/cross/loan/list': 2,
|
|
551
|
+
'margin/v1/cross/repay/list': 2,
|
|
552
|
+
'margin/v1/cross/interest/list': 2,
|
|
553
|
+
'margin/v1/cross/liquidation/list': 2,
|
|
554
|
+
'margin/v1/cross/fin/list': 2,
|
|
555
|
+
'margin/v1/cross/account/assets': 2,
|
|
556
|
+
'margin/v1/isolated/account/assets': 2,
|
|
557
|
+
'v2/margin/crossed/borrow-history': 2,
|
|
558
|
+
'v2/margin/crossed/repay-history': 2,
|
|
559
|
+
'v2/margin/crossed/interest-history': 2,
|
|
560
|
+
'v2/margin/crossed/liquidation-history': 2,
|
|
561
|
+
'v2/margin/crossed/financial-records': 2,
|
|
562
|
+
'v2/margin/crossed/account-assets': 2,
|
|
563
|
+
'v2/margin/crossed/account/risk-rate': 2,
|
|
564
|
+
'v2/margin/crossed/account/max-borrowable-amount': 2,
|
|
565
|
+
'v2/margin/crossed/account/max-transfer-out-amount': 2,
|
|
566
|
+
'v2/margin/crossed/interest-rate-and-limit': 2,
|
|
567
|
+
'v2/margin/crossed/tier-data': 2,
|
|
568
|
+
'v2/margin/crossed/open-orders': 2,
|
|
569
|
+
'v2/margin/crossed/history-orders': 2,
|
|
570
|
+
'v2/margin/crossed/fills': 2,
|
|
571
|
+
'v2/margin/isolated/borrow-history': 2,
|
|
572
|
+
'v2/margin/isolated/repay-history': 2,
|
|
573
|
+
'v2/margin/isolated/interest-history': 2,
|
|
574
|
+
'v2/margin/isolated/liquidation-history': 2,
|
|
575
|
+
'v2/margin/isolated/financial-records': 2,
|
|
576
|
+
'v2/margin/isolated/account-assets': 2,
|
|
577
|
+
'v2/margin/isolated/account/risk-rate': 2,
|
|
578
|
+
'v2/margin/isolated/account/max-borrowable-amount': 2,
|
|
579
|
+
'v2/margin/isolated/account/max-transfer-out-amount': 2,
|
|
580
|
+
'v2/margin/isolated/interest-rate-and-limit': 2,
|
|
581
|
+
'v2/margin/isolated/tier-data': 2,
|
|
582
|
+
'v2/margin/isolated/open-orders': 2,
|
|
583
|
+
'v2/margin/isolated/history-orders': 2,
|
|
584
|
+
'v2/margin/isolated/fills': 2,
|
|
421
585
|
},
|
|
422
586
|
'post': {
|
|
423
|
-
'cross/account/borrow': 2,
|
|
424
|
-
'isolated/account/borrow': 2,
|
|
425
|
-
'cross/account/repay': 2,
|
|
426
|
-
'isolated/account/repay': 2,
|
|
427
|
-
'isolated/account/riskRate': 2,
|
|
428
|
-
'cross/account/maxBorrowableAmount': 2,
|
|
429
|
-
'isolated/account/maxBorrowableAmount': 2,
|
|
430
|
-
'isolated/account/flashRepay': 2,
|
|
431
|
-
'isolated/account/queryFlashRepayStatus': 2,
|
|
432
|
-
'cross/account/flashRepay': 2,
|
|
433
|
-
'cross/account/queryFlashRepayStatus': 2,
|
|
434
|
-
'isolated/order/placeOrder': 4,
|
|
435
|
-
'isolated/order/batchPlaceOrder': 4,
|
|
436
|
-
'isolated/order/cancelOrder': 2,
|
|
437
|
-
'isolated/order/batchCancelOrder': 2,
|
|
438
|
-
'cross/order/placeOrder': 2,
|
|
439
|
-
'cross/order/batchPlaceOrder': 2,
|
|
440
|
-
'cross/order/cancelOrder': 2,
|
|
441
|
-
'cross/order/batchCancelOrder': 2,
|
|
587
|
+
'margin/v1/cross/account/borrow': 2,
|
|
588
|
+
'margin/v1/isolated/account/borrow': 2,
|
|
589
|
+
'margin/v1/cross/account/repay': 2,
|
|
590
|
+
'margin/v1/isolated/account/repay': 2,
|
|
591
|
+
'margin/v1/isolated/account/riskRate': 2,
|
|
592
|
+
'margin/v1/cross/account/maxBorrowableAmount': 2,
|
|
593
|
+
'margin/v1/isolated/account/maxBorrowableAmount': 2,
|
|
594
|
+
'margin/v1/isolated/account/flashRepay': 2,
|
|
595
|
+
'margin/v1/isolated/account/queryFlashRepayStatus': 2,
|
|
596
|
+
'margin/v1/cross/account/flashRepay': 2,
|
|
597
|
+
'margin/v1/cross/account/queryFlashRepayStatus': 2,
|
|
598
|
+
'margin/v1/isolated/order/placeOrder': 4,
|
|
599
|
+
'margin/v1/isolated/order/batchPlaceOrder': 4,
|
|
600
|
+
'margin/v1/isolated/order/cancelOrder': 2,
|
|
601
|
+
'margin/v1/isolated/order/batchCancelOrder': 2,
|
|
602
|
+
'margin/v1/cross/order/placeOrder': 2,
|
|
603
|
+
'margin/v1/cross/order/batchPlaceOrder': 2,
|
|
604
|
+
'margin/v1/cross/order/cancelOrder': 2,
|
|
605
|
+
'margin/v1/cross/order/batchCancelOrder': 2,
|
|
606
|
+
'v2/margin/crossed/account/borrow': 2,
|
|
607
|
+
'v2/margin/crossed/account/repay': 2,
|
|
608
|
+
'v2/margin/crossed/account/flash-repay': 2,
|
|
609
|
+
'v2/margin/crossed/account/query-flash-repay-status': 2,
|
|
610
|
+
'v2/margin/crossed/place-order': 2,
|
|
611
|
+
'v2/margin/crossed/batch-place-order': 2,
|
|
612
|
+
'v2/margin/crossed/cancel-order': 2,
|
|
613
|
+
'v2/margin/crossed/batch-cancel-order': 2,
|
|
614
|
+
'v2/margin/isolated/account/borrow': 2,
|
|
615
|
+
'v2/margin/isolated/account/repay': 2,
|
|
616
|
+
'v2/margin/isolated/account/flash-repay': 2,
|
|
617
|
+
'v2/margin/isolated/account/query-flash-repay-status': 2,
|
|
618
|
+
'v2/margin/isolated/place-order': 2,
|
|
619
|
+
'v2/margin/isolated/batch-place-order': 2,
|
|
620
|
+
'v2/margin/isolated/cancel-order': 2,
|
|
621
|
+
'v2/margin/isolated/batch-cancel-order': 2,
|
|
622
|
+
},
|
|
623
|
+
},
|
|
624
|
+
'copy': {
|
|
625
|
+
'get': {
|
|
626
|
+
'v2/copy/mix-trader/order-current-track': 2,
|
|
627
|
+
'v2/copy/mix-trader/order-history-track': 2,
|
|
628
|
+
'v2/copy/mix-trader/order-total-detail': 2,
|
|
629
|
+
'v2/copy/mix-trader/profit-history-summarys': 1,
|
|
630
|
+
'v2/copy/mix-trader/profit-history-details': 1,
|
|
631
|
+
'v2/copy/mix-trader/profit-details': 1,
|
|
632
|
+
'v2/copy/mix-trader/profits-group-coin-date': 1,
|
|
633
|
+
'v2/copy/mix-trader/config-query-symbols': 1,
|
|
634
|
+
'v2/copy/mix-trader/config-query-followers': 2,
|
|
635
|
+
'v2/copy/mix-follower/query-current-orders': 2,
|
|
636
|
+
'v2/copy/mix-follower/query-history-orders': 1,
|
|
637
|
+
'v2/copy/mix-follower/query-settings': 2,
|
|
638
|
+
'v2/copy/mix-follower/query-traders': 2,
|
|
639
|
+
'v2/copy/mix-follower/query-quantity-limit': 2,
|
|
640
|
+
'v2/copy/mix-broker/query-traders': 2,
|
|
641
|
+
'v2/copy/mix-broker/query-history-traces': 2,
|
|
642
|
+
'v2/copy/mix-broker/query-current-traces': 2,
|
|
643
|
+
'v2/copy/spot-trader/profit-summarys': 2,
|
|
644
|
+
'v2/copy/spot-trader/profit-history-details': 2,
|
|
645
|
+
'v2/copy/spot-trader/profit-details': 2,
|
|
646
|
+
'v2/copy/spot-trader/order-total-detail': 2,
|
|
647
|
+
'v2/copy/spot-trader/order-history-track': 2,
|
|
648
|
+
'v2/copy/spot-trader/order-current-track': 2,
|
|
649
|
+
'v2/copy/spot-trader/config-query-settings': 2,
|
|
650
|
+
'v2/copy/spot-trader/config-query-followers': 2,
|
|
651
|
+
'v2/copy/spot-follower/query-traders': 2,
|
|
652
|
+
'v2/copy/spot-follower/query-trader-symbols': 2,
|
|
653
|
+
'v2/copy/spot-follower/query-settings': 2,
|
|
654
|
+
'v2/copy/spot-follower/query-history-orders': 2,
|
|
655
|
+
'v2/copy/spot-follower/query-current-orders': 2,
|
|
656
|
+
},
|
|
657
|
+
'post': {
|
|
658
|
+
'v2/copy/mix-trader/order-modify-tpsl': 2,
|
|
659
|
+
'v2/copy/mix-trader/order-close-positions': 2,
|
|
660
|
+
'v2/copy/mix-trader/config-setting-symbols': 2,
|
|
661
|
+
'v2/copy/mix-trader/config-setting-base': 2,
|
|
662
|
+
'v2/copy/mix-trader/config-remove-follower': 2,
|
|
663
|
+
'v2/copy/mix-follower/setting-tpsl': 1,
|
|
664
|
+
'v2/copy/mix-follower/settings': 2,
|
|
665
|
+
'v2/copy/mix-follower/close-positions': 2,
|
|
666
|
+
'v2/copy/mix-follower/cancel-trader': 4,
|
|
667
|
+
'v2/copy/spot-trader/order-modify-tpsl': 2,
|
|
668
|
+
'v2/copy/spot-trader/order-close-tracking': 2,
|
|
669
|
+
'v2/copy/spot-trader/config-setting-symbols': 2,
|
|
670
|
+
'v2/copy/spot-trader/config-remove-follower': 2,
|
|
671
|
+
'v2/copy/spot-follower/stop-order': 2,
|
|
672
|
+
'v2/copy/spot-follower/settings': 2,
|
|
673
|
+
'v2/copy/spot-follower/setting-tpsl': 2,
|
|
674
|
+
'v2/copy/spot-follower/order-close-tracking': 2,
|
|
675
|
+
'v2/copy/spot-follower/cancel-trader': 2,
|
|
676
|
+
},
|
|
677
|
+
},
|
|
678
|
+
'tax': {
|
|
679
|
+
'get': {
|
|
680
|
+
'v2/tax/spot-record': 20,
|
|
681
|
+
'v2/tax/future-record': 20,
|
|
682
|
+
'v2/tax/margin-record': 20,
|
|
683
|
+
'v2/tax/p2p-record': 20,
|
|
684
|
+
},
|
|
685
|
+
},
|
|
686
|
+
'convert': {
|
|
687
|
+
'get': {
|
|
688
|
+
'v2/convert/currencies': 2,
|
|
689
|
+
'v2/convert/quoted-price': 2,
|
|
690
|
+
'v2/convert/convert-record': 2,
|
|
691
|
+
},
|
|
692
|
+
'post': {
|
|
693
|
+
'v2/convert/trade': 2,
|
|
694
|
+
},
|
|
695
|
+
},
|
|
696
|
+
'earn': {
|
|
697
|
+
'get': {
|
|
698
|
+
'v2/earn/savings/product': 2,
|
|
699
|
+
'v2/earn/savings/account': 2,
|
|
700
|
+
'v2/earn/savings/assets': 2,
|
|
701
|
+
'v2/earn/savings/records': 2,
|
|
702
|
+
'v2/earn/savings/subscribe-info': 2,
|
|
703
|
+
'v2/earn/savings/subscribe-result': 2,
|
|
704
|
+
'v2/earn/savings/redeem-result': 2,
|
|
705
|
+
'v2/earn/sharkfin/product': 2,
|
|
706
|
+
'v2/earn/sharkfin/account': 2,
|
|
707
|
+
'v2/earn/sharkfin/assets': 2,
|
|
708
|
+
'v2/earn/sharkfin/records': 2,
|
|
709
|
+
'v2/earn/sharkfin/subscribe-info': 2,
|
|
710
|
+
'v2/earn/sharkfin/subscribe-result': 4,
|
|
711
|
+
'v2/earn/loan/ongoing-orders': 2,
|
|
712
|
+
'v2/earn/loan/repay-history': 2,
|
|
713
|
+
'v2/earn/loan/revise-history': 2,
|
|
714
|
+
'v2/earn/loan/borrow-history': 2,
|
|
715
|
+
'v2/earn/loan/debts': 2,
|
|
716
|
+
'v2/earn/loan/reduces': 2,
|
|
717
|
+
},
|
|
718
|
+
'post': {
|
|
719
|
+
'v2/earn/savings/subscribe': 2,
|
|
720
|
+
'v2/earn/savings/redeem': 2,
|
|
721
|
+
'v2/earn/sharkfin/subscribe': 2,
|
|
722
|
+
'v2/earn/loan/borrow': 2,
|
|
723
|
+
'v2/earn/loan/repay': 2,
|
|
724
|
+
'v2/earn/loan/revise-pledge': 2,
|
|
442
725
|
},
|
|
443
726
|
},
|
|
444
727
|
},
|
|
@@ -1020,18 +1303,18 @@ class bitget extends bitget$1 {
|
|
|
1020
1303
|
},
|
|
1021
1304
|
'fetchOHLCV': {
|
|
1022
1305
|
'spot': {
|
|
1023
|
-
'method': '
|
|
1306
|
+
'method': 'publicSpotGetSpotV1MarketCandles', // or publicSpotGetSpotV1MarketHistoryCandles
|
|
1024
1307
|
},
|
|
1025
1308
|
'swap': {
|
|
1026
|
-
'method': '
|
|
1309
|
+
'method': 'publicMixGetMixV1MarketCandles', // or publicMixGetMixV1MarketHistoryCandles or publicMixGetMixV1MarketHistoryIndexCandles or publicMixGetMixV1MarketHistoryMarkCandles
|
|
1027
1310
|
},
|
|
1028
1311
|
},
|
|
1029
1312
|
'fetchTrades': {
|
|
1030
1313
|
'spot': {
|
|
1031
|
-
'method': '
|
|
1314
|
+
'method': 'publicSpotGetSpotV1MarketFillsHistory', // or publicSpotGetSpotV1MarketFills
|
|
1032
1315
|
},
|
|
1033
1316
|
'swap': {
|
|
1034
|
-
'method': '
|
|
1317
|
+
'method': 'publicMixGetMixV1MarketFillsHistory', // or publicMixGetMixV1MarketFills
|
|
1035
1318
|
},
|
|
1036
1319
|
},
|
|
1037
1320
|
'accountsByType': {
|
|
@@ -1058,7 +1341,7 @@ class bitget extends bitget$1 {
|
|
|
1058
1341
|
'BSC': 'BEP20',
|
|
1059
1342
|
},
|
|
1060
1343
|
'fetchPositions': {
|
|
1061
|
-
'method': '
|
|
1344
|
+
'method': 'privateMixGetMixV1PositionAllPositionV2', // or privateMixGetMixV1PositionHistoryPosition
|
|
1062
1345
|
},
|
|
1063
1346
|
'defaultTimeInForce': 'GTC', // 'GTC' = Good To Cancel (default), 'IOC' = Immediate Or Cancel
|
|
1064
1347
|
},
|
|
@@ -1076,7 +1359,7 @@ class bitget extends bitget$1 {
|
|
|
1076
1359
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
1077
1360
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1078
1361
|
*/
|
|
1079
|
-
const response = await this.
|
|
1362
|
+
const response = await this.publicSpotGetSpotV1PublicTime(params);
|
|
1080
1363
|
//
|
|
1081
1364
|
// {
|
|
1082
1365
|
// "code": "00000",
|
|
@@ -1300,10 +1583,10 @@ class bitget extends bitget$1 {
|
|
|
1300
1583
|
async fetchMarketsByType(type, params = {}) {
|
|
1301
1584
|
let response = undefined;
|
|
1302
1585
|
if (type === 'spot') {
|
|
1303
|
-
response = await this.
|
|
1586
|
+
response = await this.publicSpotGetSpotV1PublicProducts(params);
|
|
1304
1587
|
}
|
|
1305
1588
|
else if (type === 'swap') {
|
|
1306
|
-
response = await this.
|
|
1589
|
+
response = await this.publicMixGetMixV1MarketContracts(params);
|
|
1307
1590
|
}
|
|
1308
1591
|
else {
|
|
1309
1592
|
throw new errors.NotSupported(this.id + ' does not support ' + type + ' market');
|
|
@@ -1370,7 +1653,7 @@ class bitget extends bitget$1 {
|
|
|
1370
1653
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
1371
1654
|
* @returns {object} an associative dictionary of currencies
|
|
1372
1655
|
*/
|
|
1373
|
-
const response = await this.
|
|
1656
|
+
const response = await this.publicSpotGetSpotV1PublicCurrencies(params);
|
|
1374
1657
|
//
|
|
1375
1658
|
// {
|
|
1376
1659
|
// "code": "00000",
|
|
@@ -1514,11 +1797,11 @@ class bitget extends bitget$1 {
|
|
|
1514
1797
|
const productType = this.safeStringUpper(parts, 1);
|
|
1515
1798
|
request['symbol'] = marketId;
|
|
1516
1799
|
request['productType'] = productType;
|
|
1517
|
-
response = await this.
|
|
1800
|
+
response = await this.publicMixGetMixV1MarketQueryPositionLever(this.extend(request, params));
|
|
1518
1801
|
}
|
|
1519
1802
|
else if (marginMode === 'isolated') {
|
|
1520
1803
|
request['symbol'] = market['info']['symbolName'];
|
|
1521
|
-
response = await this.
|
|
1804
|
+
response = await this.publicMarginGetMarginV1IsolatedPublicTierData(this.extend(request, params));
|
|
1522
1805
|
}
|
|
1523
1806
|
else if (marginMode === 'cross') {
|
|
1524
1807
|
const code = this.safeString(params, 'code');
|
|
@@ -1526,7 +1809,7 @@ class bitget extends bitget$1 {
|
|
|
1526
1809
|
params = this.omit(params, 'code');
|
|
1527
1810
|
const currency = this.currency(code);
|
|
1528
1811
|
request['coin'] = currency['code'];
|
|
1529
|
-
response = await this.
|
|
1812
|
+
response = await this.publicMarginGetMarginV1CrossPublicTierData(this.extend(request, params));
|
|
1530
1813
|
}
|
|
1531
1814
|
else {
|
|
1532
1815
|
throw new errors.BadRequest(this.id + ' fetchMarketLeverageTiers() symbol does not support market ' + symbol);
|
|
@@ -1694,7 +1977,7 @@ class bitget extends bitget$1 {
|
|
|
1694
1977
|
request['pageSize'] = limit;
|
|
1695
1978
|
}
|
|
1696
1979
|
[request, params] = this.handleUntilOption('endTime', request, params);
|
|
1697
|
-
const response = await this.
|
|
1980
|
+
const response = await this.privateSpotGetSpotV1WalletDepositList(this.extend(request, params));
|
|
1698
1981
|
//
|
|
1699
1982
|
// {
|
|
1700
1983
|
// "code": "00000",
|
|
@@ -1751,7 +2034,7 @@ class bitget extends bitget$1 {
|
|
|
1751
2034
|
if (tag !== undefined) {
|
|
1752
2035
|
request['tag'] = tag;
|
|
1753
2036
|
}
|
|
1754
|
-
const response = await this.
|
|
2037
|
+
const response = await this.privateSpotPostSpotV1WalletWithdrawalV2(this.extend(request, params));
|
|
1755
2038
|
//
|
|
1756
2039
|
// {
|
|
1757
2040
|
// "code": "00000",
|
|
@@ -1850,7 +2133,7 @@ class bitget extends bitget$1 {
|
|
|
1850
2133
|
if (limit !== undefined) {
|
|
1851
2134
|
request['pageSize'] = limit;
|
|
1852
2135
|
}
|
|
1853
|
-
const response = await this.
|
|
2136
|
+
const response = await this.privateSpotGetSpotV1WalletWithdrawalList(this.extend(request, params));
|
|
1854
2137
|
//
|
|
1855
2138
|
// {
|
|
1856
2139
|
// "code": "00000",
|
|
@@ -1960,7 +2243,7 @@ class bitget extends bitget$1 {
|
|
|
1960
2243
|
if (networkId !== undefined) {
|
|
1961
2244
|
request['chain'] = networkId;
|
|
1962
2245
|
}
|
|
1963
|
-
const response = await this.
|
|
2246
|
+
const response = await this.privateSpotGetSpotV1WalletDepositAddress(this.extend(request, params));
|
|
1964
2247
|
//
|
|
1965
2248
|
// {
|
|
1966
2249
|
// "code": "00000",
|
|
@@ -2020,10 +2303,10 @@ class bitget extends bitget$1 {
|
|
|
2020
2303
|
}
|
|
2021
2304
|
let response = undefined;
|
|
2022
2305
|
if (market['spot']) {
|
|
2023
|
-
response = await this.
|
|
2306
|
+
response = await this.publicSpotGetSpotV1MarketDepth(this.extend(request, params));
|
|
2024
2307
|
}
|
|
2025
2308
|
else {
|
|
2026
|
-
response = await this.
|
|
2309
|
+
response = await this.publicMixGetMixV1MarketDepth(this.extend(request, params));
|
|
2027
2310
|
}
|
|
2028
2311
|
//
|
|
2029
2312
|
// {
|
|
@@ -2177,10 +2460,10 @@ class bitget extends bitget$1 {
|
|
|
2177
2460
|
let response = undefined;
|
|
2178
2461
|
const extended = this.extend(request, params);
|
|
2179
2462
|
if (market['spot']) {
|
|
2180
|
-
response = await this.
|
|
2463
|
+
response = await this.publicSpotGetSpotV1MarketTicker(extended);
|
|
2181
2464
|
}
|
|
2182
2465
|
else {
|
|
2183
|
-
response = await this.
|
|
2466
|
+
response = await this.publicMixGetMixV1MarketTicker(extended);
|
|
2184
2467
|
}
|
|
2185
2468
|
//
|
|
2186
2469
|
// {
|
|
@@ -2237,10 +2520,10 @@ class bitget extends bitget$1 {
|
|
|
2237
2520
|
const extended = this.extend(request, params);
|
|
2238
2521
|
let response = undefined;
|
|
2239
2522
|
if (type === 'spot') {
|
|
2240
|
-
response = await this.
|
|
2523
|
+
response = await this.publicSpotGetSpotV1MarketTickers(extended);
|
|
2241
2524
|
}
|
|
2242
2525
|
else {
|
|
2243
|
-
response = await this.
|
|
2526
|
+
response = await this.publicMixGetMixV1MarketTickers(extended);
|
|
2244
2527
|
}
|
|
2245
2528
|
//
|
|
2246
2529
|
// spot
|
|
@@ -2442,23 +2725,23 @@ class bitget extends bitget$1 {
|
|
|
2442
2725
|
let response = undefined;
|
|
2443
2726
|
if (market['spot']) {
|
|
2444
2727
|
const spotOptions = this.safeValue(options, 'spot', {});
|
|
2445
|
-
const defaultSpotMethod = this.safeString(spotOptions, 'method', '
|
|
2728
|
+
const defaultSpotMethod = this.safeString(spotOptions, 'method', 'publicSpotGetSpotV1MarketFillsHistory');
|
|
2446
2729
|
const spotMethod = this.safeString(params, 'method', defaultSpotMethod);
|
|
2447
2730
|
params = this.omit(params, 'method');
|
|
2448
|
-
if (spotMethod === '
|
|
2449
|
-
response = await this.
|
|
2731
|
+
if (spotMethod === 'publicSpotGetSpotV1MarketFillsHistory') {
|
|
2732
|
+
response = await this.publicSpotGetSpotV1MarketFillsHistory(this.extend(request, params));
|
|
2450
2733
|
}
|
|
2451
|
-
else if (spotMethod === '
|
|
2452
|
-
response = await this.
|
|
2734
|
+
else if (spotMethod === 'publicSpotGetSpotV1MarketFills') {
|
|
2735
|
+
response = await this.publicSpotGetSpotV1MarketFills(this.extend(request, params));
|
|
2453
2736
|
}
|
|
2454
2737
|
}
|
|
2455
2738
|
else {
|
|
2456
2739
|
const swapOptions = this.safeValue(options, 'swap', {});
|
|
2457
|
-
const defaultSwapMethod = this.safeString(swapOptions, 'method', '
|
|
2740
|
+
const defaultSwapMethod = this.safeString(swapOptions, 'method', 'publicMixGetMixV1MarketFillsHistory');
|
|
2458
2741
|
const swapMethod = this.safeString(params, 'method', defaultSwapMethod);
|
|
2459
2742
|
params = this.omit(params, 'method');
|
|
2460
|
-
if (swapMethod === '
|
|
2461
|
-
response = await this.
|
|
2743
|
+
if (swapMethod === 'publicMixGetMixV1MarketFillsHistory') {
|
|
2744
|
+
response = await this.publicMixGetMixV1MarketFillsHistory(this.extend(request, params));
|
|
2462
2745
|
//
|
|
2463
2746
|
// {
|
|
2464
2747
|
// "tradeId": "1084459062491590657",
|
|
@@ -2470,8 +2753,8 @@ class bitget extends bitget$1 {
|
|
|
2470
2753
|
// }
|
|
2471
2754
|
//
|
|
2472
2755
|
}
|
|
2473
|
-
else if (swapMethod === '
|
|
2474
|
-
response = await this.
|
|
2756
|
+
else if (swapMethod === 'publicMixGetMixV1MarketFills') {
|
|
2757
|
+
response = await this.publicMixGetMixV1MarketFills(this.extend(request, params));
|
|
2475
2758
|
}
|
|
2476
2759
|
}
|
|
2477
2760
|
//
|
|
@@ -2529,7 +2812,7 @@ class bitget extends bitget$1 {
|
|
|
2529
2812
|
const request = {
|
|
2530
2813
|
'symbol': market['id'],
|
|
2531
2814
|
};
|
|
2532
|
-
const response = await this.
|
|
2815
|
+
const response = await this.publicSpotGetSpotV1PublicProduct(this.extend(request, params));
|
|
2533
2816
|
//
|
|
2534
2817
|
// {
|
|
2535
2818
|
// "code": "00000",
|
|
@@ -2563,7 +2846,7 @@ class bitget extends bitget$1 {
|
|
|
2563
2846
|
* @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
|
|
2564
2847
|
*/
|
|
2565
2848
|
await this.loadMarkets();
|
|
2566
|
-
const response = await this.
|
|
2849
|
+
const response = await this.publicSpotGetSpotV1PublicProducts(params);
|
|
2567
2850
|
//
|
|
2568
2851
|
// {
|
|
2569
2852
|
// "code": "00000",
|
|
@@ -2717,39 +3000,39 @@ class bitget extends bitget$1 {
|
|
|
2717
3000
|
let response = undefined;
|
|
2718
3001
|
if (market['spot']) {
|
|
2719
3002
|
const spotOptions = this.safeValue(options, 'spot', {});
|
|
2720
|
-
const defaultSpotMethod = this.safeString(spotOptions, 'method', '
|
|
3003
|
+
const defaultSpotMethod = this.safeString(spotOptions, 'method', 'publicSpotGetSpotV1MarketCandles');
|
|
2721
3004
|
const method = this.safeString(params, 'method', defaultSpotMethod);
|
|
2722
3005
|
params = this.omit(params, 'method');
|
|
2723
|
-
if (method === '
|
|
3006
|
+
if (method === 'publicSpotGetSpotV1MarketCandles') {
|
|
2724
3007
|
if (limitIsUndefined) {
|
|
2725
3008
|
request['limit'] = 1000;
|
|
2726
3009
|
}
|
|
2727
|
-
response = await this.
|
|
3010
|
+
response = await this.publicSpotGetSpotV1MarketCandles(this.extend(request, params));
|
|
2728
3011
|
}
|
|
2729
|
-
else if (method === '
|
|
2730
|
-
response = await this.
|
|
3012
|
+
else if (method === 'publicSpotGetSpotV1MarketHistoryCandles') {
|
|
3013
|
+
response = await this.publicSpotGetSpotV1MarketHistoryCandles(this.extend(request, params));
|
|
2731
3014
|
}
|
|
2732
3015
|
}
|
|
2733
3016
|
else {
|
|
2734
3017
|
const swapOptions = this.safeValue(options, 'swap', {});
|
|
2735
|
-
const defaultSwapMethod = this.safeString(swapOptions, 'method', '
|
|
3018
|
+
const defaultSwapMethod = this.safeString(swapOptions, 'method', 'publicMixGetMixV1MarketCandles');
|
|
2736
3019
|
const swapMethod = this.safeString(params, 'method', defaultSwapMethod);
|
|
2737
3020
|
const priceType = this.safeString(params, 'price');
|
|
2738
3021
|
params = this.omit(params, ['method', 'price']);
|
|
2739
|
-
if ((priceType === 'mark') || (swapMethod === '
|
|
2740
|
-
response = await this.
|
|
3022
|
+
if ((priceType === 'mark') || (swapMethod === 'publicMixGetMixV1MarketHistoryMarkCandles')) {
|
|
3023
|
+
response = await this.publicMixGetMixV1MarketHistoryMarkCandles(this.extend(request, params));
|
|
2741
3024
|
}
|
|
2742
|
-
else if ((priceType === 'index') || (swapMethod === '
|
|
2743
|
-
response = await this.
|
|
3025
|
+
else if ((priceType === 'index') || (swapMethod === 'publicMixGetMixV1MarketHistoryIndexCandles')) {
|
|
3026
|
+
response = await this.publicMixGetMixV1MarketHistoryIndexCandles(this.extend(request, params));
|
|
2744
3027
|
}
|
|
2745
|
-
else if (swapMethod === '
|
|
3028
|
+
else if (swapMethod === 'publicMixGetMixV1MarketCandles') {
|
|
2746
3029
|
if (limitIsUndefined) {
|
|
2747
3030
|
request['limit'] = 1000;
|
|
2748
3031
|
}
|
|
2749
|
-
response = await this.
|
|
3032
|
+
response = await this.publicMixGetMixV1MarketCandles(this.extend(request, params));
|
|
2750
3033
|
}
|
|
2751
|
-
else if (swapMethod === '
|
|
2752
|
-
response = await this.
|
|
3034
|
+
else if (swapMethod === 'publicMixGetMixV1MarketHistoryCandles') {
|
|
3035
|
+
response = await this.publicMixGetMixV1MarketHistoryCandles(this.extend(request, params));
|
|
2753
3036
|
}
|
|
2754
3037
|
}
|
|
2755
3038
|
if (response === '') {
|
|
@@ -2787,16 +3070,16 @@ class bitget extends bitget$1 {
|
|
|
2787
3070
|
productType = 'S' + productType;
|
|
2788
3071
|
}
|
|
2789
3072
|
request['productType'] = productType;
|
|
2790
|
-
response = await this.
|
|
3073
|
+
response = await this.privateMixGetMixV1AccountAccounts(this.extend(request, params));
|
|
2791
3074
|
}
|
|
2792
3075
|
else if (marginMode === 'isolated') {
|
|
2793
|
-
response = await this.
|
|
3076
|
+
response = await this.privateMarginGetMarginV1IsolatedAccountAssets(this.extend(request, params));
|
|
2794
3077
|
}
|
|
2795
3078
|
else if (marginMode === 'cross') {
|
|
2796
|
-
response = await this.
|
|
3079
|
+
response = await this.privateMarginGetMarginV1CrossAccountAssets(this.extend(request, params));
|
|
2797
3080
|
}
|
|
2798
3081
|
else if (marketType === 'spot') {
|
|
2799
|
-
response = await this.
|
|
3082
|
+
response = await this.privateSpotGetSpotV1AccountAssets(this.extend(request, params));
|
|
2800
3083
|
}
|
|
2801
3084
|
else {
|
|
2802
3085
|
throw new errors.NotSupported(this.id + ' fetchBalance() does not support ' + marketType + ' accounts');
|
|
@@ -3195,8 +3478,8 @@ class bitget extends bitget$1 {
|
|
|
3195
3478
|
*/
|
|
3196
3479
|
await this.loadMarkets();
|
|
3197
3480
|
const market = this.market(symbol);
|
|
3198
|
-
|
|
3199
|
-
|
|
3481
|
+
const marginParams = this.handleMarginModeAndParams('createOrder', params);
|
|
3482
|
+
const marginMode = marginParams[0];
|
|
3200
3483
|
const triggerPrice = this.safeValue2(params, 'stopPrice', 'triggerPrice');
|
|
3201
3484
|
const stopLossTriggerPrice = this.safeValue(params, 'stopLossPrice');
|
|
3202
3485
|
const takeProfitTriggerPrice = this.safeValue(params, 'takeProfitPrice');
|
|
@@ -3208,27 +3491,27 @@ class bitget extends bitget$1 {
|
|
|
3208
3491
|
let response = undefined;
|
|
3209
3492
|
if (market['spot']) {
|
|
3210
3493
|
if (isTriggerOrder) {
|
|
3211
|
-
response = await this.
|
|
3494
|
+
response = await this.privateSpotPostSpotV1PlanPlacePlan(request);
|
|
3212
3495
|
}
|
|
3213
3496
|
else if (marginMode === 'isolated') {
|
|
3214
|
-
response = await this.
|
|
3497
|
+
response = await this.privateMarginPostMarginV1IsolatedOrderPlaceOrder(request);
|
|
3215
3498
|
}
|
|
3216
3499
|
else if (marginMode === 'cross') {
|
|
3217
|
-
response = await this.
|
|
3500
|
+
response = await this.privateMarginPostMarginV1CrossOrderPlaceOrder(request);
|
|
3218
3501
|
}
|
|
3219
3502
|
else {
|
|
3220
|
-
response = await this.
|
|
3503
|
+
response = await this.privateSpotPostSpotV1TradeOrders(request);
|
|
3221
3504
|
}
|
|
3222
3505
|
}
|
|
3223
3506
|
else {
|
|
3224
3507
|
if (isTriggerOrder) {
|
|
3225
|
-
response = await this.
|
|
3508
|
+
response = await this.privateMixPostMixV1PlanPlacePlan(request);
|
|
3226
3509
|
}
|
|
3227
3510
|
else if (isStopLossOrTakeProfitTrigger) {
|
|
3228
|
-
response = await this.
|
|
3511
|
+
response = await this.privateMixPostMixV1PlanPlacePositionsTPSL(request);
|
|
3229
3512
|
}
|
|
3230
3513
|
else {
|
|
3231
|
-
response = await this.
|
|
3514
|
+
response = await this.privateMixPostMixV1OrderPlaceOrder(request);
|
|
3232
3515
|
}
|
|
3233
3516
|
}
|
|
3234
3517
|
//
|
|
@@ -3488,16 +3771,16 @@ class bitget extends bitget$1 {
|
|
|
3488
3771
|
if ((market['swap']) || (market['future'])) {
|
|
3489
3772
|
request['orderDataList'] = ordersRequests;
|
|
3490
3773
|
request['marginCoin'] = market['settleId'];
|
|
3491
|
-
response = await this.
|
|
3774
|
+
response = await this.privateMixPostMixV1OrderBatchOrders(request);
|
|
3492
3775
|
}
|
|
3493
3776
|
else if (marginMode === 'isolated') {
|
|
3494
|
-
response = await this.
|
|
3777
|
+
response = await this.privateMarginPostMarginV1IsolatedOrderBatchPlaceOrder(request);
|
|
3495
3778
|
}
|
|
3496
3779
|
else if (marginMode === 'cross') {
|
|
3497
|
-
response = await this.
|
|
3780
|
+
response = await this.privateMarginPostMarginV1CrossOrderBatchPlaceOrder(request);
|
|
3498
3781
|
}
|
|
3499
3782
|
else {
|
|
3500
|
-
response = await this.
|
|
3783
|
+
response = await this.privateSpotPostSpotV1TradeBatchOrders(request);
|
|
3501
3784
|
}
|
|
3502
3785
|
//
|
|
3503
3786
|
// {
|
|
@@ -3594,7 +3877,7 @@ class bitget extends bitget$1 {
|
|
|
3594
3877
|
else {
|
|
3595
3878
|
request['size'] = this.amountToPrecision(symbol, amount);
|
|
3596
3879
|
}
|
|
3597
|
-
response = await this.
|
|
3880
|
+
response = await this.privateSpotPostSpotV1PlanModifyPlan(this.extend(request, omitted));
|
|
3598
3881
|
}
|
|
3599
3882
|
else {
|
|
3600
3883
|
request['symbol'] = market['id'];
|
|
@@ -3615,10 +3898,10 @@ class bitget extends bitget$1 {
|
|
|
3615
3898
|
request['triggerPrice'] = this.priceToPrecision(symbol, takeProfitPrice);
|
|
3616
3899
|
request['planType'] = 'profit_plan';
|
|
3617
3900
|
}
|
|
3618
|
-
response = await this.
|
|
3901
|
+
response = await this.privateMixPostMixV1PlanModifyTPSLPlan(this.extend(request, omitted));
|
|
3619
3902
|
}
|
|
3620
3903
|
else {
|
|
3621
|
-
response = await this.
|
|
3904
|
+
response = await this.privateMixPostMixV1PlanModifyPlan(this.extend(request, omitted));
|
|
3622
3905
|
}
|
|
3623
3906
|
}
|
|
3624
3907
|
//
|
|
@@ -3676,27 +3959,27 @@ class bitget extends bitget$1 {
|
|
|
3676
3959
|
throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires a planType parameter for stop orders, either normal_plan, profit_plan or loss_plan');
|
|
3677
3960
|
}
|
|
3678
3961
|
request['planType'] = planType;
|
|
3679
|
-
response = await this.
|
|
3962
|
+
response = await this.privateMixPostMixV1PlanCancelPlan(this.extend(request, params));
|
|
3680
3963
|
}
|
|
3681
3964
|
else {
|
|
3682
|
-
response = await this.
|
|
3965
|
+
response = await this.privateMixPostMixV1OrderCancelOrder(this.extend(request, params));
|
|
3683
3966
|
}
|
|
3684
3967
|
}
|
|
3685
3968
|
else if (marketType === 'spot') {
|
|
3686
3969
|
if (marginMode !== undefined) {
|
|
3687
3970
|
if (marginMode === 'isolated') {
|
|
3688
|
-
response = await this.
|
|
3971
|
+
response = await this.privateMarginPostMarginV1IsolatedOrderCancelOrder(this.extend(request, params));
|
|
3689
3972
|
}
|
|
3690
3973
|
else if (marginMode === 'cross') {
|
|
3691
|
-
response = await this.
|
|
3974
|
+
response = await this.privateMarginPostMarginV1CrossOrderCancelOrder(this.extend(request, params));
|
|
3692
3975
|
}
|
|
3693
3976
|
}
|
|
3694
3977
|
else {
|
|
3695
3978
|
if (stop) {
|
|
3696
|
-
response = await this.
|
|
3979
|
+
response = await this.privateSpotPostSpotV1PlanCancelPlan(this.extend(request, params));
|
|
3697
3980
|
}
|
|
3698
3981
|
else {
|
|
3699
|
-
response = await this.
|
|
3982
|
+
response = await this.privateSpotPostSpotV1TradeCancelOrder(this.extend(request, params));
|
|
3700
3983
|
}
|
|
3701
3984
|
}
|
|
3702
3985
|
}
|
|
@@ -3799,21 +4082,21 @@ class bitget extends bitget$1 {
|
|
|
3799
4082
|
request['orderIds'] = ids;
|
|
3800
4083
|
if (marginMode !== undefined) {
|
|
3801
4084
|
if (marginMode === 'cross') {
|
|
3802
|
-
response = await this.
|
|
4085
|
+
response = await this.privateMarginPostMarginV1CrossOrderBatchCancelOrder(this.extend(request, params));
|
|
3803
4086
|
}
|
|
3804
4087
|
else {
|
|
3805
|
-
response = await this.
|
|
4088
|
+
response = await this.privateMarginPostMarginV1IsolatedOrderBatchCancelOrder(this.extend(request, params));
|
|
3806
4089
|
}
|
|
3807
4090
|
}
|
|
3808
4091
|
else {
|
|
3809
|
-
response = await this.
|
|
4092
|
+
response = await this.privateSpotPostSpotV1TradeCancelBatchOrdersV2(this.extend(request, params));
|
|
3810
4093
|
}
|
|
3811
4094
|
}
|
|
3812
4095
|
else {
|
|
3813
4096
|
request['symbol'] = market['id'];
|
|
3814
4097
|
request['marginCoin'] = market['quote'];
|
|
3815
4098
|
request['orderIds'] = ids;
|
|
3816
|
-
response = await this.
|
|
4099
|
+
response = await this.privateMixPostMixV1OrderCancelBatchOrders(this.extend(request, params));
|
|
3817
4100
|
}
|
|
3818
4101
|
//
|
|
3819
4102
|
// spot
|
|
@@ -3892,10 +4175,10 @@ class bitget extends bitget$1 {
|
|
|
3892
4175
|
'symbol': market['info']['symbolName'], // regular id like LTCUSDT_SPBL does not work here
|
|
3893
4176
|
};
|
|
3894
4177
|
if (marginMode === 'cross') {
|
|
3895
|
-
return await this.
|
|
4178
|
+
return await this.privateMarginPostMarginV1CrossOrderBatchCancelOrder(this.extend(spotMarginRequest, params));
|
|
3896
4179
|
}
|
|
3897
4180
|
else {
|
|
3898
|
-
return await this.
|
|
4181
|
+
return await this.privateMarginPostMarginV1IsolatedOrderBatchCancelOrder(this.extend(spotMarginRequest, params));
|
|
3899
4182
|
}
|
|
3900
4183
|
}
|
|
3901
4184
|
const request = {
|
|
@@ -3910,10 +4193,10 @@ class bitget extends bitget$1 {
|
|
|
3910
4193
|
if (planType === undefined) {
|
|
3911
4194
|
throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires a planType parameter for stop orders, either normal_plan, profit_plan, loss_plan, pos_profit, pos_loss, moving_plan or track_plan');
|
|
3912
4195
|
}
|
|
3913
|
-
response = await this.
|
|
4196
|
+
response = await this.privateMixPostMixV1PlanCancelAllPlan(this.extend(request, params));
|
|
3914
4197
|
}
|
|
3915
4198
|
else {
|
|
3916
|
-
response = await this.
|
|
4199
|
+
response = await this.privateMixPostMixV1OrderCancelAllOrders(this.extend(request, params));
|
|
3917
4200
|
}
|
|
3918
4201
|
//
|
|
3919
4202
|
// {
|
|
@@ -3956,10 +4239,10 @@ class bitget extends bitget$1 {
|
|
|
3956
4239
|
};
|
|
3957
4240
|
let response = undefined;
|
|
3958
4241
|
if (marketType === 'spot') {
|
|
3959
|
-
response = await this.
|
|
4242
|
+
response = await this.privateSpotPostSpotV1TradeOrderInfo(this.extend(request, query));
|
|
3960
4243
|
}
|
|
3961
4244
|
else if ((marketType === 'swap') || (marketType === 'future')) {
|
|
3962
|
-
response = await this.
|
|
4245
|
+
response = await this.privateMixGetMixV1OrderDetail(this.extend(request, query));
|
|
3963
4246
|
}
|
|
3964
4247
|
else {
|
|
3965
4248
|
throw new errors.NotSupported(this.id + ' fetchOrder() does not support ' + marketType + ' market');
|
|
@@ -4062,10 +4345,10 @@ class bitget extends bitget$1 {
|
|
|
4062
4345
|
if (limit !== undefined) {
|
|
4063
4346
|
request['pageSize'] = limit;
|
|
4064
4347
|
}
|
|
4065
|
-
response = await this.
|
|
4348
|
+
response = await this.privateSpotPostSpotV1PlanCurrentPlan(this.extend(request, params));
|
|
4066
4349
|
}
|
|
4067
4350
|
else {
|
|
4068
|
-
response = await this.
|
|
4351
|
+
response = await this.privateMixGetMixV1PlanCurrentPlan(this.extend(request, params));
|
|
4069
4352
|
}
|
|
4070
4353
|
}
|
|
4071
4354
|
else {
|
|
@@ -4087,14 +4370,14 @@ class bitget extends bitget$1 {
|
|
|
4087
4370
|
request['pageSize'] = limit;
|
|
4088
4371
|
}
|
|
4089
4372
|
if (marginMode === 'isolated') {
|
|
4090
|
-
response = await this.
|
|
4373
|
+
response = await this.privateMarginGetMarginV1IsolatedOrderOpenOrders(this.extend(request, params));
|
|
4091
4374
|
}
|
|
4092
4375
|
else if (marginMode === 'cross') {
|
|
4093
|
-
response = await this.
|
|
4376
|
+
response = await this.privateMarginGetMarginV1CrossOrderOpenOrders(this.extend(request, params));
|
|
4094
4377
|
}
|
|
4095
4378
|
}
|
|
4096
4379
|
else {
|
|
4097
|
-
response = await this.
|
|
4380
|
+
response = await this.privateSpotPostSpotV1TradeOpenOrders(this.extend(request, params));
|
|
4098
4381
|
}
|
|
4099
4382
|
}
|
|
4100
4383
|
else {
|
|
@@ -4107,11 +4390,11 @@ class bitget extends bitget$1 {
|
|
|
4107
4390
|
productType = 'S' + productType;
|
|
4108
4391
|
}
|
|
4109
4392
|
request['productType'] = productType;
|
|
4110
|
-
response = await this.
|
|
4393
|
+
response = await this.privateMixGetMixV1OrderMarginCoinCurrent(this.extend(request, params));
|
|
4111
4394
|
}
|
|
4112
4395
|
else {
|
|
4113
4396
|
this.checkRequiredSymbol('fetchOpenOrders', symbol);
|
|
4114
|
-
response = await this.
|
|
4397
|
+
response = await this.privateMixGetMixV1OrderCurrent(this.extend(request, params));
|
|
4115
4398
|
}
|
|
4116
4399
|
}
|
|
4117
4400
|
}
|
|
@@ -4382,15 +4665,15 @@ class bitget extends bitget$1 {
|
|
|
4382
4665
|
}
|
|
4383
4666
|
if (stop) {
|
|
4384
4667
|
if (marketType === 'spot') {
|
|
4385
|
-
response = await this.
|
|
4668
|
+
response = await this.privateSpotPostSpotV1PlanHistoryPlan(this.extend(request, params));
|
|
4386
4669
|
}
|
|
4387
4670
|
else {
|
|
4388
|
-
response = await this.
|
|
4671
|
+
response = await this.privateMixGetMixV1PlanHistoryPlan(this.extend(request, params));
|
|
4389
4672
|
}
|
|
4390
4673
|
}
|
|
4391
4674
|
else {
|
|
4392
4675
|
if ((marketType === 'swap') || (marketType === 'future')) {
|
|
4393
|
-
response = await this.
|
|
4676
|
+
response = await this.privateMixGetMixV1OrderHistory(this.extend(request, params));
|
|
4394
4677
|
}
|
|
4395
4678
|
else {
|
|
4396
4679
|
if (marginMode !== undefined) {
|
|
@@ -4405,10 +4688,10 @@ class bitget extends bitget$1 {
|
|
|
4405
4688
|
request['pageSize'] = limit;
|
|
4406
4689
|
}
|
|
4407
4690
|
if (marginMode === 'isolated') {
|
|
4408
|
-
response = await this.
|
|
4691
|
+
response = await this.privateMarginGetMarginV1IsolatedOrderHistory(this.extend(request, params));
|
|
4409
4692
|
}
|
|
4410
4693
|
else if (marginMode === 'cross') {
|
|
4411
|
-
response = await this.
|
|
4694
|
+
response = await this.privateMarginGetMarginV1CrossOrderHistory(this.extend(request, params));
|
|
4412
4695
|
}
|
|
4413
4696
|
}
|
|
4414
4697
|
else {
|
|
@@ -4422,7 +4705,7 @@ class bitget extends bitget$1 {
|
|
|
4422
4705
|
params = this.omit(params, 'endTime');
|
|
4423
4706
|
request['before'] = endTime;
|
|
4424
4707
|
}
|
|
4425
|
-
response = await this.
|
|
4708
|
+
response = await this.privateSpotPostSpotV1TradeHistory(this.extend(request, params));
|
|
4426
4709
|
}
|
|
4427
4710
|
}
|
|
4428
4711
|
}
|
|
@@ -4634,7 +4917,7 @@ class bitget extends bitget$1 {
|
|
|
4634
4917
|
request['before'] = since;
|
|
4635
4918
|
}
|
|
4636
4919
|
[request, params] = this.handleUntilOption('after', request, params);
|
|
4637
|
-
const response = await this.
|
|
4920
|
+
const response = await this.privateSpotPostSpotV1AccountBills(this.extend(request, params));
|
|
4638
4921
|
//
|
|
4639
4922
|
// {
|
|
4640
4923
|
// "code": "00000",
|
|
@@ -4755,10 +5038,10 @@ class bitget extends bitget$1 {
|
|
|
4755
5038
|
request['pageSize'] = limit;
|
|
4756
5039
|
}
|
|
4757
5040
|
if (marginMode === 'isolated') {
|
|
4758
|
-
response = await this.
|
|
5041
|
+
response = await this.privateMarginGetMarginV1IsolatedOrderFills(this.extend(request, params));
|
|
4759
5042
|
}
|
|
4760
5043
|
else if (marginMode === 'cross') {
|
|
4761
|
-
response = await this.
|
|
5044
|
+
response = await this.privateMarginGetMarginV1CrossOrderFills(this.extend(request, params));
|
|
4762
5045
|
}
|
|
4763
5046
|
}
|
|
4764
5047
|
else {
|
|
@@ -4769,7 +5052,7 @@ class bitget extends bitget$1 {
|
|
|
4769
5052
|
if (limit !== undefined) {
|
|
4770
5053
|
request['limit'] = limit;
|
|
4771
5054
|
}
|
|
4772
|
-
response = await this.
|
|
5055
|
+
response = await this.privateSpotPostSpotV1TradeFills(this.extend(request, params));
|
|
4773
5056
|
}
|
|
4774
5057
|
}
|
|
4775
5058
|
else {
|
|
@@ -4784,7 +5067,7 @@ class bitget extends bitget$1 {
|
|
|
4784
5067
|
if (!('endTime' in request) && (orderId === undefined)) {
|
|
4785
5068
|
request['endTime'] = this.milliseconds();
|
|
4786
5069
|
}
|
|
4787
|
-
response = await this.
|
|
5070
|
+
response = await this.privateMixGetMixV1OrderFills(this.extend(request, params));
|
|
4788
5071
|
}
|
|
4789
5072
|
//
|
|
4790
5073
|
// spot
|
|
@@ -4895,10 +5178,10 @@ class bitget extends bitget$1 {
|
|
|
4895
5178
|
};
|
|
4896
5179
|
let response = undefined;
|
|
4897
5180
|
if (marketType === 'spot') {
|
|
4898
|
-
response = await this.
|
|
5181
|
+
response = await this.privateSpotPostSpotV1TradeFills(this.extend(request, query));
|
|
4899
5182
|
}
|
|
4900
5183
|
else if ((marketType === 'swap') || (marketType === 'future')) {
|
|
4901
|
-
response = await this.
|
|
5184
|
+
response = await this.privateMixGetMixV1OrderFills(this.extend(request, query));
|
|
4902
5185
|
}
|
|
4903
5186
|
else {
|
|
4904
5187
|
throw new errors.NotSupported(this.id + ' fetchOrderTrades() does not support ' + marketType + ' market');
|
|
@@ -4945,7 +5228,7 @@ class bitget extends bitget$1 {
|
|
|
4945
5228
|
'symbol': market['id'],
|
|
4946
5229
|
'marginCoin': market['settleId'],
|
|
4947
5230
|
};
|
|
4948
|
-
const response = await this.
|
|
5231
|
+
const response = await this.privateMixGetMixV1PositionSinglePositionV2(this.extend(request, params));
|
|
4949
5232
|
//
|
|
4950
5233
|
// {
|
|
4951
5234
|
// "code": "00000",
|
|
@@ -4993,7 +5276,7 @@ class bitget extends bitget$1 {
|
|
|
4993
5276
|
const sandboxMode = this.safeValue(this.options, 'sandboxMode', false);
|
|
4994
5277
|
await this.loadMarkets();
|
|
4995
5278
|
const fetchPositionsOptions = this.safeValue(this.options, 'fetchPositions', {});
|
|
4996
|
-
const method = this.safeString(fetchPositionsOptions, 'method', '
|
|
5279
|
+
const method = this.safeString(fetchPositionsOptions, 'method', 'privateMixGetMixV1PositionAllPositionV2');
|
|
4997
5280
|
let market = undefined;
|
|
4998
5281
|
if (symbols !== undefined) {
|
|
4999
5282
|
const first = this.safeString(symbols, 0);
|
|
@@ -5008,7 +5291,7 @@ class bitget extends bitget$1 {
|
|
|
5008
5291
|
const request = {
|
|
5009
5292
|
'productType': productType,
|
|
5010
5293
|
};
|
|
5011
|
-
if (method === '
|
|
5294
|
+
if (method === 'privateMixGetMixV1PositionHistoryPosition') {
|
|
5012
5295
|
// endTime and startTime mandatory
|
|
5013
5296
|
let since = this.safeInteger2(params, 'startTime', 'since');
|
|
5014
5297
|
if (since === undefined) {
|
|
@@ -5023,12 +5306,12 @@ class bitget extends bitget$1 {
|
|
|
5023
5306
|
}
|
|
5024
5307
|
let response = undefined;
|
|
5025
5308
|
let isHistory = false;
|
|
5026
|
-
if (method === '
|
|
5027
|
-
response = await this.
|
|
5309
|
+
if (method === 'privateMixGetMixV1PositionAllPositionV2') {
|
|
5310
|
+
response = await this.privateMixGetMixV1PositionAllPositionV2(this.extend(request, params));
|
|
5028
5311
|
}
|
|
5029
5312
|
else {
|
|
5030
5313
|
isHistory = true;
|
|
5031
|
-
response = await this.
|
|
5314
|
+
response = await this.privateMixGetMixV1PositionHistoryPosition(this.extend(request, params));
|
|
5032
5315
|
}
|
|
5033
5316
|
//
|
|
5034
5317
|
// {
|
|
@@ -5271,7 +5554,7 @@ class bitget extends bitget$1 {
|
|
|
5271
5554
|
request['pageSize'] = limit;
|
|
5272
5555
|
}
|
|
5273
5556
|
request['nextPage'] = true;
|
|
5274
|
-
const response = await this.
|
|
5557
|
+
const response = await this.publicMixGetMixV1MarketHistoryFundRate(this.extend(request, params));
|
|
5275
5558
|
//
|
|
5276
5559
|
// {
|
|
5277
5560
|
// "code": "00000",
|
|
@@ -5322,7 +5605,7 @@ class bitget extends bitget$1 {
|
|
|
5322
5605
|
const request = {
|
|
5323
5606
|
'symbol': market['id'],
|
|
5324
5607
|
};
|
|
5325
|
-
const response = await this.
|
|
5608
|
+
const response = await this.publicMixGetMixV1MarketCurrentFundRate(this.extend(request, params));
|
|
5326
5609
|
//
|
|
5327
5610
|
// {
|
|
5328
5611
|
// "code": "00000",
|
|
@@ -5396,7 +5679,7 @@ class bitget extends bitget$1 {
|
|
|
5396
5679
|
if (limit !== undefined) {
|
|
5397
5680
|
request['pageSize'] = limit;
|
|
5398
5681
|
}
|
|
5399
|
-
const response = await this.
|
|
5682
|
+
const response = await this.privateMixGetMixV1AccountAccountBill(this.extend(request, params));
|
|
5400
5683
|
//
|
|
5401
5684
|
// {
|
|
5402
5685
|
// "code": "00000",
|
|
@@ -5480,7 +5763,7 @@ class bitget extends bitget$1 {
|
|
|
5480
5763
|
'holdSide': holdSide, // long or short
|
|
5481
5764
|
};
|
|
5482
5765
|
params = this.omit(params, 'holdSide');
|
|
5483
|
-
const response = await this.
|
|
5766
|
+
const response = await this.privateMixPostMixV1AccountSetMargin(this.extend(request, params));
|
|
5484
5767
|
//
|
|
5485
5768
|
// {
|
|
5486
5769
|
// "code": "00000",
|
|
@@ -5562,7 +5845,7 @@ class bitget extends bitget$1 {
|
|
|
5562
5845
|
'symbol': market['id'],
|
|
5563
5846
|
'marginCoin': market['settleId'],
|
|
5564
5847
|
};
|
|
5565
|
-
const response = await this.
|
|
5848
|
+
const response = await this.privateMixGetMixV1AccountAccount(this.extend(request, params));
|
|
5566
5849
|
//
|
|
5567
5850
|
// {
|
|
5568
5851
|
// "code": "00000",
|
|
@@ -5611,7 +5894,7 @@ class bitget extends bitget$1 {
|
|
|
5611
5894
|
'leverage': leverage,
|
|
5612
5895
|
// 'holdSide': 'long',
|
|
5613
5896
|
};
|
|
5614
|
-
return await this.
|
|
5897
|
+
return await this.privateMixPostMixV1AccountSetLeverage(this.extend(request, params));
|
|
5615
5898
|
}
|
|
5616
5899
|
async setMarginMode(marginMode, symbol = undefined, params = {}) {
|
|
5617
5900
|
/**
|
|
@@ -5642,7 +5925,7 @@ class bitget extends bitget$1 {
|
|
|
5642
5925
|
'marginCoin': market['settleId'],
|
|
5643
5926
|
'marginMode': marginMode,
|
|
5644
5927
|
};
|
|
5645
|
-
return await this.
|
|
5928
|
+
return await this.privateMixPostMixV1AccountSetMarginMode(this.extend(request, params));
|
|
5646
5929
|
}
|
|
5647
5930
|
async setPositionMode(hedged, symbol = undefined, params = {}) {
|
|
5648
5931
|
/**
|
|
@@ -5673,7 +5956,7 @@ class bitget extends bitget$1 {
|
|
|
5673
5956
|
productType = 'S' + productType;
|
|
5674
5957
|
}
|
|
5675
5958
|
request['productType'] = productType;
|
|
5676
|
-
const response = await this.
|
|
5959
|
+
const response = await this.privateMixPostMixV1AccountSetPositionMode(this.extend(request, params));
|
|
5677
5960
|
//
|
|
5678
5961
|
// {
|
|
5679
5962
|
// "code": "40919",
|
|
@@ -5702,7 +5985,7 @@ class bitget extends bitget$1 {
|
|
|
5702
5985
|
const request = {
|
|
5703
5986
|
'symbol': market['id'],
|
|
5704
5987
|
};
|
|
5705
|
-
const response = await this.
|
|
5988
|
+
const response = await this.publicMixGetMixV1MarketOpenInterest(this.extend(request, params));
|
|
5706
5989
|
//
|
|
5707
5990
|
// {
|
|
5708
5991
|
// "code": "00000",
|
|
@@ -5759,7 +6042,7 @@ class bitget extends bitget$1 {
|
|
|
5759
6042
|
request['limit'] = limit;
|
|
5760
6043
|
}
|
|
5761
6044
|
[request, params] = this.handleUntilOption('after', request, params);
|
|
5762
|
-
const response = await this.
|
|
6045
|
+
const response = await this.privateSpotGetSpotV1AccountTransferRecords(this.extend(request, params));
|
|
5763
6046
|
//
|
|
5764
6047
|
// {
|
|
5765
6048
|
// "code":"00000",
|
|
@@ -5813,7 +6096,7 @@ class bitget extends bitget$1 {
|
|
|
5813
6096
|
'amount': amount,
|
|
5814
6097
|
'coin': currency['info']['coinName'],
|
|
5815
6098
|
};
|
|
5816
|
-
const response = await this.
|
|
6099
|
+
const response = await this.privateSpotPostSpotV1WalletTransferV2(this.extend(request, params));
|
|
5817
6100
|
//
|
|
5818
6101
|
// {
|
|
5819
6102
|
// "code": "00000",
|
|
@@ -5952,7 +6235,7 @@ class bitget extends bitget$1 {
|
|
|
5952
6235
|
* @returns {object} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
5953
6236
|
*/
|
|
5954
6237
|
await this.loadMarkets();
|
|
5955
|
-
const response = await this.
|
|
6238
|
+
const response = await this.publicSpotGetSpotV1PublicCurrencies(params);
|
|
5956
6239
|
const data = this.safeValue(response, 'data');
|
|
5957
6240
|
return this.parseDepositWithdrawFees(data, codes, 'coinName');
|
|
5958
6241
|
}
|
|
@@ -6014,10 +6297,10 @@ class bitget extends bitget$1 {
|
|
|
6014
6297
|
const parts = marketId.split('_');
|
|
6015
6298
|
const marginMarketId = this.safeStringUpper(parts, 0);
|
|
6016
6299
|
request['symbol'] = marginMarketId;
|
|
6017
|
-
response = await this.
|
|
6300
|
+
response = await this.privateMarginPostMarginV1IsolatedAccountBorrow(this.extend(request, params));
|
|
6018
6301
|
}
|
|
6019
6302
|
else {
|
|
6020
|
-
response = await this.
|
|
6303
|
+
response = await this.privateMarginPostMarginV1CrossAccountBorrow(this.extend(request, params));
|
|
6021
6304
|
}
|
|
6022
6305
|
//
|
|
6023
6306
|
// isolated
|
|
@@ -6080,10 +6363,10 @@ class bitget extends bitget$1 {
|
|
|
6080
6363
|
const parts = marketId.split('_');
|
|
6081
6364
|
const marginMarketId = this.safeStringUpper(parts, 0);
|
|
6082
6365
|
request['symbol'] = marginMarketId;
|
|
6083
|
-
response = await this.
|
|
6366
|
+
response = await this.privateMarginPostMarginV1IsolatedAccountRepay(this.extend(request, params));
|
|
6084
6367
|
}
|
|
6085
6368
|
else {
|
|
6086
|
-
response = await this.
|
|
6369
|
+
response = await this.privateMarginPostMarginV1CrossAccountRepay(this.extend(request, params));
|
|
6087
6370
|
}
|
|
6088
6371
|
//
|
|
6089
6372
|
// isolated
|
|
@@ -6214,10 +6497,10 @@ class bitget extends bitget$1 {
|
|
|
6214
6497
|
if (marginMode === 'isolated') {
|
|
6215
6498
|
this.checkRequiredSymbol('fetchMyLiquidations', symbol);
|
|
6216
6499
|
request['symbol'] = market['info']['symbolName'];
|
|
6217
|
-
response = await this.
|
|
6500
|
+
response = await this.privateMarginGetMarginV1IsolatedLiquidationList(this.extend(request, params));
|
|
6218
6501
|
}
|
|
6219
6502
|
else if (marginMode === 'cross') {
|
|
6220
|
-
response = await this.
|
|
6503
|
+
response = await this.privateMarginGetMarginV1CrossLiquidationList(this.extend(request, params));
|
|
6221
6504
|
}
|
|
6222
6505
|
//
|
|
6223
6506
|
// isolated
|
|
@@ -6346,11 +6629,11 @@ class bitget extends bitget$1 {
|
|
|
6346
6629
|
if ((symbol !== undefined) || (marginMode === 'isolated')) {
|
|
6347
6630
|
this.checkRequiredSymbol('fetchBorrowRate', symbol);
|
|
6348
6631
|
request['symbol'] = market['info']['symbolName'];
|
|
6349
|
-
response = await this.
|
|
6632
|
+
response = await this.publicMarginGetMarginV1IsolatedPublicInterestRateAndLimit(this.extend(request, params));
|
|
6350
6633
|
}
|
|
6351
6634
|
else if (marginMode === 'cross') {
|
|
6352
6635
|
request['coin'] = currency['code'];
|
|
6353
|
-
response = await this.
|
|
6636
|
+
response = await this.publicMarginGetMarginV1CrossPublicInterestRateAndLimit(this.extend(request, params));
|
|
6354
6637
|
}
|
|
6355
6638
|
//
|
|
6356
6639
|
// isolated
|
|
@@ -6554,10 +6837,10 @@ class bitget extends bitget$1 {
|
|
|
6554
6837
|
if (marginMode === 'isolated') {
|
|
6555
6838
|
this.checkRequiredSymbol('fetchBorrowInterest', symbol);
|
|
6556
6839
|
request['symbol'] = market['info']['symbolName'];
|
|
6557
|
-
response = await this.
|
|
6840
|
+
response = await this.privateMarginGetMarginV1IsolatedInterestList(this.extend(request, params));
|
|
6558
6841
|
}
|
|
6559
6842
|
else if (marginMode === 'cross') {
|
|
6560
|
-
response = await this.
|
|
6843
|
+
response = await this.privateMarginGetMarginV1CrossInterestList(this.extend(request, params));
|
|
6561
6844
|
}
|
|
6562
6845
|
//
|
|
6563
6846
|
// isolated
|
|
@@ -6703,25 +6986,7 @@ class bitget extends bitget$1 {
|
|
|
6703
6986
|
sign(path, api = [], method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
6704
6987
|
const signed = api[0] === 'private';
|
|
6705
6988
|
const endpoint = api[1];
|
|
6706
|
-
|
|
6707
|
-
if (endpoint === 'spot') {
|
|
6708
|
-
pathPart = '/api/spot/v1';
|
|
6709
|
-
}
|
|
6710
|
-
else if (endpoint === 'mix') {
|
|
6711
|
-
pathPart = '/api/mix/v1';
|
|
6712
|
-
}
|
|
6713
|
-
else if (endpoint === 'user') {
|
|
6714
|
-
pathPart = '/api/user/v1';
|
|
6715
|
-
}
|
|
6716
|
-
else if (endpoint === 'broker') {
|
|
6717
|
-
pathPart = '/api/broker/v1';
|
|
6718
|
-
}
|
|
6719
|
-
else if (endpoint === 'margin') {
|
|
6720
|
-
pathPart = '/api/margin/v1';
|
|
6721
|
-
}
|
|
6722
|
-
else {
|
|
6723
|
-
pathPart = '/api/p2p/v1';
|
|
6724
|
-
}
|
|
6989
|
+
const pathPart = '/api';
|
|
6725
6990
|
const request = '/' + this.implodeParams(path, params);
|
|
6726
6991
|
const payload = pathPart + request;
|
|
6727
6992
|
let url = this.implodeHostname(this.urls['api'][endpoint]) + payload;
|