ccxt 4.1.53 → 4.1.55
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 +8 -7
- package/dist/ccxt.browser.js +2329 -818
- package/dist/ccxt.browser.min.js +10 -10
- package/dist/cjs/ccxt.js +4 -1
- package/dist/cjs/src/abstract/p2b.js +9 -0
- package/dist/cjs/src/ace.js +2 -2
- package/dist/cjs/src/alpaca.js +1 -1
- package/dist/cjs/src/base/Exchange.js +25 -62
- package/dist/cjs/src/base/errors.js +1 -1
- package/dist/cjs/src/bigone.js +1 -6
- package/dist/cjs/src/binance.js +10 -3
- package/dist/cjs/src/bingx.js +1 -1
- package/dist/cjs/src/bitget.js +670 -405
- package/dist/cjs/src/bitmart.js +29 -62
- package/dist/cjs/src/bitmex.js +2 -2
- package/dist/cjs/src/bittrex.js +1 -3
- package/dist/cjs/src/coinbase.js +53 -3
- package/dist/cjs/src/coinex.js +23 -33
- package/dist/cjs/src/coinone.js +2 -2
- package/dist/cjs/src/digifinex.js +2 -2
- package/dist/cjs/src/idex.js +2 -2
- package/dist/cjs/src/kuna.js +6 -0
- package/dist/cjs/src/p2b.js +1246 -0
- package/dist/cjs/src/phemex.js +8 -8
- package/dist/cjs/src/poloniex.js +3 -2
- package/dist/cjs/src/poloniexfutures.js +1 -1
- package/dist/cjs/src/pro/hitbtc.js +1 -1
- package/dist/cjs/src/tidex.js +2 -2
- package/dist/cjs/src/timex.js +1 -1
- package/dist/cjs/src/whitebit.js +2 -2
- package/js/ccxt.d.ts +5 -2
- package/js/ccxt.js +4 -2
- package/js/src/abstract/binance.d.ts +1 -0
- package/js/src/abstract/binancecoinm.d.ts +1 -0
- package/js/src/abstract/binanceus.d.ts +1 -0
- package/js/src/abstract/binanceusdm.d.ts +1 -0
- package/js/src/abstract/bitget.d.ts +495 -254
- package/js/src/abstract/coinbase.d.ts +2 -0
- package/js/src/abstract/p2b.d.ts +25 -0
- package/js/src/abstract/p2b.js +11 -0
- package/js/src/ace.d.ts +7 -7
- package/js/src/ace.js +2 -2
- package/js/src/alpaca.d.ts +4 -4
- package/js/src/alpaca.js +1 -1
- package/js/src/ascendex.d.ts +26 -26
- package/js/src/base/Exchange.d.ts +48 -48
- package/js/src/base/Exchange.js +25 -62
- package/js/src/base/Precise.d.ts +13 -12
- package/js/src/base/errorHierarchy.d.ts +10 -9
- package/js/src/base/errorHierarchy.js +10 -9
- package/js/src/base/errors.d.ts +1 -1
- package/js/src/base/errors.js +1 -1
- package/js/src/base/functions/type.d.ts +18 -18
- package/js/src/base/types.d.ts +27 -23
- package/js/src/bigone.d.ts +9 -9
- package/js/src/bigone.js +1 -6
- package/js/src/binance.d.ts +57 -100
- package/js/src/binance.js +10 -3
- package/js/src/binancecoinm.d.ts +2 -2
- package/js/src/binanceusdm.d.ts +2 -2
- package/js/src/bingx.d.ts +22 -22
- package/js/src/bingx.js +1 -1
- package/js/src/bit2c.d.ts +7 -7
- package/js/src/bitbank.d.ts +7 -7
- package/js/src/bitbns.d.ts +6 -6
- package/js/src/bitfinex.d.ts +12 -12
- package/js/src/bitfinex2.d.ts +19 -19
- package/js/src/bitflyer.d.ts +8 -8
- package/js/src/bitforex.d.ts +5 -5
- package/js/src/bitget.d.ts +44 -44
- package/js/src/bitget.js +670 -405
- package/js/src/bithumb.d.ts +8 -8
- package/js/src/bitmart.d.ts +41 -36
- package/js/src/bitmart.js +29 -62
- package/js/src/bitmex.d.ts +21 -21
- package/js/src/bitmex.js +2 -2
- package/js/src/bitopro.d.ts +10 -10
- package/js/src/bitpanda.d.ts +10 -10
- package/js/src/bitrue.d.ts +11 -11
- package/js/src/bitso.d.ts +9 -9
- package/js/src/bitstamp.d.ts +13 -13
- package/js/src/bittrex.d.ts +14 -14
- package/js/src/bittrex.js +1 -3
- package/js/src/bitvavo.d.ts +9 -9
- package/js/src/bl3p.d.ts +3 -3
- package/js/src/blockchaincom.d.ts +6 -6
- package/js/src/btcalpha.d.ts +8 -8
- package/js/src/btcbox.d.ts +4 -4
- package/js/src/btcmarkets.d.ts +7 -7
- package/js/src/btcturk.d.ts +7 -7
- package/js/src/bybit.d.ts +36 -79
- package/js/src/cex.d.ts +6 -6
- package/js/src/coinbase.d.ts +16 -15
- package/js/src/coinbase.js +53 -3
- package/js/src/coinbasepro.d.ts +10 -10
- package/js/src/coincheck.d.ts +5 -5
- package/js/src/coinex.d.ts +52 -46
- package/js/src/coinex.js +23 -33
- package/js/src/coinlist.d.ts +14 -14
- package/js/src/coinmate.d.ts +5 -5
- package/js/src/coinone.d.ts +5 -5
- package/js/src/coinone.js +2 -2
- package/js/src/coinsph.d.ts +13 -13
- package/js/src/coinspot.d.ts +4 -4
- package/js/src/cryptocom.d.ts +19 -19
- package/js/src/currencycom.d.ts +14 -14
- package/js/src/delta.d.ts +29 -72
- package/js/src/deribit.d.ts +21 -21
- package/js/src/digifinex.d.ts +39 -39
- package/js/src/digifinex.js +2 -2
- package/js/src/exmo.d.ts +15 -15
- package/js/src/gate.d.ts +46 -89
- package/js/src/gemini.d.ts +8 -8
- package/js/src/hitbtc.d.ts +28 -28
- package/js/src/hollaex.d.ts +13 -13
- package/js/src/htx.d.ts +38 -38
- package/js/src/huobijp.d.ts +10 -10
- package/js/src/idex.d.ts +7 -7
- package/js/src/idex.js +2 -2
- package/js/src/independentreserve.d.ts +4 -4
- package/js/src/indodax.d.ts +7 -7
- package/js/src/kraken.d.ts +17 -17
- package/js/src/krakenfutures.d.ts +15 -15
- package/js/src/kucoin.d.ts +24 -24
- package/js/src/kucoinfutures.d.ts +16 -16
- package/js/src/kuna.d.ts +11 -11
- package/js/src/kuna.js +2 -2
- package/js/src/latoken.d.ts +11 -11
- package/js/src/lbank.d.ts +11 -11
- package/js/src/luno.d.ts +7 -7
- package/js/src/lykke.d.ts +6 -6
- package/js/src/mercado.d.ts +6 -6
- package/js/src/mexc.d.ts +25 -25
- package/js/src/ndax.d.ts +10 -10
- package/js/src/novadax.d.ts +13 -13
- package/js/src/oceanex.d.ts +8 -8
- package/js/src/okcoin.d.ts +16 -16
- package/js/src/okx.d.ts +50 -93
- package/js/src/p2b.d.ts +35 -0
- package/js/src/p2b.js +1246 -0
- package/js/src/paymium.d.ts +10 -10
- package/js/src/phemex.d.ts +34 -34
- package/js/src/phemex.js +8 -8
- package/js/src/poloniex.d.ts +14 -14
- package/js/src/poloniex.js +3 -2
- package/js/src/poloniexfutures.d.ts +10 -10
- package/js/src/poloniexfutures.js +1 -1
- package/js/src/pro/binance.d.ts +5 -5
- package/js/src/pro/bitget.d.ts +3 -3
- package/js/src/pro/bitpanda.d.ts +3 -3
- package/js/src/pro/bybit.d.ts +4 -4
- package/js/src/pro/cex.d.ts +2 -2
- package/js/src/pro/coinbasepro.d.ts +4 -4
- package/js/src/pro/coinex.d.ts +2 -2
- package/js/src/pro/cryptocom.d.ts +3 -3
- package/js/src/pro/currencycom.d.ts +1 -1
- package/js/src/pro/gate.d.ts +4 -4
- package/js/src/pro/hitbtc.d.ts +2 -2
- package/js/src/pro/hitbtc.js +1 -1
- package/js/src/pro/htx.d.ts +2 -2
- package/js/src/pro/kraken.d.ts +1 -1
- package/js/src/pro/krakenfutures.d.ts +3 -3
- package/js/src/pro/kucoin.d.ts +2 -2
- package/js/src/pro/okx.d.ts +4 -4
- package/js/src/pro/poloniex.d.ts +2 -2
- package/js/src/pro/poloniexfutures.d.ts +1 -1
- package/js/src/pro/wazirx.d.ts +2 -2
- package/js/src/pro/woo.d.ts +2 -2
- package/js/src/probit.d.ts +13 -13
- package/js/src/tidex.d.ts +7 -7
- package/js/src/tidex.js +2 -2
- package/js/src/timex.d.ts +13 -13
- package/js/src/timex.js +1 -1
- package/js/src/tokocrypto.d.ts +8 -8
- package/js/src/upbit.d.ts +21 -21
- package/js/src/wavesexchange.d.ts +10 -10
- package/js/src/wazirx.d.ts +7 -7
- package/js/src/whitebit.d.ts +17 -17
- package/js/src/whitebit.js +2 -2
- package/js/src/woo.d.ts +23 -23
- package/js/src/yobit.d.ts +6 -6
- package/js/src/zaif.d.ts +6 -6
- package/js/src/zonda.d.ts +16 -16
- package/package.json +11 -6
- package/skip-tests.json +7 -0
package/js/src/bitget.js
CHANGED
|
@@ -129,9 +129,21 @@ export default class bitget extends Exchange {
|
|
|
129
129
|
'p2p': 'https://api.{hostname}',
|
|
130
130
|
'broker': 'https://api.{hostname}',
|
|
131
131
|
'margin': 'https://api.{hostname}',
|
|
132
|
+
'common': 'https://api.{hostname}',
|
|
133
|
+
'tax': 'https://api.{hostname}',
|
|
134
|
+
'convert': 'https://api.{hostname}',
|
|
135
|
+
'copy': 'https://api.{hostname}',
|
|
136
|
+
'earn': 'https://api.{hostname}',
|
|
132
137
|
},
|
|
133
138
|
'www': 'https://www.bitget.com',
|
|
134
139
|
'doc': [
|
|
140
|
+
'https://www.bitget.com/api-doc/common/intro',
|
|
141
|
+
'https://www.bitget.com/api-doc/spot/intro',
|
|
142
|
+
'https://www.bitget.com/api-doc/contract/intro',
|
|
143
|
+
'https://www.bitget.com/api-doc/broker/intro',
|
|
144
|
+
'https://www.bitget.com/api-doc/margin/intro',
|
|
145
|
+
'https://www.bitget.com/api-doc/copytrading/intro',
|
|
146
|
+
'https://www.bitget.com/api-doc/earn/intro',
|
|
135
147
|
'https://bitgetlimited.github.io/apidoc/en/mix',
|
|
136
148
|
'https://bitgetlimited.github.io/apidoc/en/spot',
|
|
137
149
|
'https://bitgetlimited.github.io/apidoc/en/broker',
|
|
@@ -142,306 +154,577 @@ export default class bitget extends Exchange {
|
|
|
142
154
|
},
|
|
143
155
|
'api': {
|
|
144
156
|
'public': {
|
|
157
|
+
'common': {
|
|
158
|
+
'get': {
|
|
159
|
+
'v2/public/annoucements': 1,
|
|
160
|
+
'v2/public/time': 1,
|
|
161
|
+
'v2/common/trade-rate': 2,
|
|
162
|
+
},
|
|
163
|
+
},
|
|
145
164
|
'spot': {
|
|
146
165
|
'get': {
|
|
147
|
-
'notice/queryAllNotices': 1,
|
|
148
|
-
'public/time': 1,
|
|
149
|
-
'public/currencies': 6.6667,
|
|
150
|
-
'public/products': 1,
|
|
151
|
-
'public/product': 1,
|
|
152
|
-
'market/ticker': 1,
|
|
153
|
-
'market/tickers': 1,
|
|
154
|
-
'market/fills': 2,
|
|
155
|
-
'market/fills-history': 2,
|
|
156
|
-
'market/candles': 1,
|
|
157
|
-
'market/depth': 1,
|
|
158
|
-
'market/spot-vip-level': 2,
|
|
159
|
-
'market/merge-depth': 1,
|
|
160
|
-
'market/history-candles': 1,
|
|
161
|
-
'public/loan/coinInfos': 2,
|
|
162
|
-
'public/loan/hour-interest': 2,
|
|
166
|
+
'spot/v1/notice/queryAllNotices': 1,
|
|
167
|
+
'spot/v1/public/time': 1,
|
|
168
|
+
'spot/v1/public/currencies': 6.6667,
|
|
169
|
+
'spot/v1/public/products': 1,
|
|
170
|
+
'spot/v1/public/product': 1,
|
|
171
|
+
'spot/v1/market/ticker': 1,
|
|
172
|
+
'spot/v1/market/tickers': 1,
|
|
173
|
+
'spot/v1/market/fills': 2,
|
|
174
|
+
'spot/v1/market/fills-history': 2,
|
|
175
|
+
'spot/v1/market/candles': 1,
|
|
176
|
+
'spot/v1/market/depth': 1,
|
|
177
|
+
'spot/v1/market/spot-vip-level': 2,
|
|
178
|
+
'spot/v1/market/merge-depth': 1,
|
|
179
|
+
'spot/v1/market/history-candles': 1,
|
|
180
|
+
'spot/v1/public/loan/coinInfos': 2,
|
|
181
|
+
'spot/v1/public/loan/hour-interest': 2,
|
|
182
|
+
'v2/spot/public/coins': 6.6667,
|
|
183
|
+
'v2/spot/public/symbols': 1,
|
|
184
|
+
'v2/spot/market/vip-fee-rate': 2,
|
|
185
|
+
'v2/spot/market/tickers': 1,
|
|
186
|
+
'v2/spot/market/merge-depth': 1,
|
|
187
|
+
'v2/spot/market/orderbook': 1,
|
|
188
|
+
'v2/spot/market/candles': 1,
|
|
189
|
+
'v2/spot/market/history-candles': 1,
|
|
190
|
+
'v2/spot/market/fills': 2,
|
|
191
|
+
'v2/spot/market/fills-history': 2,
|
|
163
192
|
},
|
|
164
193
|
},
|
|
165
194
|
'mix': {
|
|
166
195
|
'get': {
|
|
167
|
-
'market/contracts': 1,
|
|
168
|
-
'market/depth': 1,
|
|
169
|
-
'market/ticker': 1,
|
|
170
|
-
'market/tickers': 1,
|
|
171
|
-
'market/contract-vip-level': 2,
|
|
172
|
-
'market/fills': 1,
|
|
173
|
-
'market/fills-history': 2,
|
|
174
|
-
'market/candles': 1,
|
|
175
|
-
'market/index': 1,
|
|
176
|
-
'market/funding-time': 1,
|
|
177
|
-
'market/history-fundRate': 1,
|
|
178
|
-
'market/current-fundRate': 1,
|
|
179
|
-
'market/open-interest': 1,
|
|
180
|
-
'market/mark-price': 1,
|
|
181
|
-
'market/symbol-leverage': 1,
|
|
182
|
-
'market/queryPositionLever': 1,
|
|
183
|
-
'market/open-limit': 1,
|
|
184
|
-
'market/history-candles': 1,
|
|
185
|
-
'market/history-index-candles': 1,
|
|
186
|
-
'market/history-mark-candles': 1,
|
|
187
|
-
'market/merge-depth': 1,
|
|
196
|
+
'mix/v1/market/contracts': 1,
|
|
197
|
+
'mix/v1/market/depth': 1,
|
|
198
|
+
'mix/v1/market/ticker': 1,
|
|
199
|
+
'mix/v1/market/tickers': 1,
|
|
200
|
+
'mix/v1/market/contract-vip-level': 2,
|
|
201
|
+
'mix/v1/market/fills': 1,
|
|
202
|
+
'mix/v1/market/fills-history': 2,
|
|
203
|
+
'mix/v1/market/candles': 1,
|
|
204
|
+
'mix/v1/market/index': 1,
|
|
205
|
+
'mix/v1/market/funding-time': 1,
|
|
206
|
+
'mix/v1/market/history-fundRate': 1,
|
|
207
|
+
'mix/v1/market/current-fundRate': 1,
|
|
208
|
+
'mix/v1/market/open-interest': 1,
|
|
209
|
+
'mix/v1/market/mark-price': 1,
|
|
210
|
+
'mix/v1/market/symbol-leverage': 1,
|
|
211
|
+
'mix/v1/market/queryPositionLever': 1,
|
|
212
|
+
'mix/v1/market/open-limit': 1,
|
|
213
|
+
'mix/v1/market/history-candles': 1,
|
|
214
|
+
'mix/v1/market/history-index-candles': 1,
|
|
215
|
+
'mix/v1/market/history-mark-candles': 1,
|
|
216
|
+
'mix/v1/market/merge-depth': 1,
|
|
217
|
+
'v2/mix/market/vip-fee-rate': 2,
|
|
218
|
+
'v2/mix/market/merge-depth': 1,
|
|
219
|
+
'v2/mix/market/ticker': 1,
|
|
220
|
+
'v2/mix/market/tickers': 1,
|
|
221
|
+
'v2/mix/market/fills': 1,
|
|
222
|
+
'v2/mix/market/fills-history': 2,
|
|
223
|
+
'v2/mix/market/candles': 1,
|
|
224
|
+
'v2/mix/market/history-candles': 1,
|
|
225
|
+
'v2/mix/market/history-index-candles': 1,
|
|
226
|
+
'v2/mix/market/history-mark-candles': 1,
|
|
227
|
+
'v2/mix/market/open-interest': 1,
|
|
228
|
+
'v2/mix/market/funding-time': 1,
|
|
229
|
+
'v2/mix/market/symbol-price': 1,
|
|
230
|
+
'v2/mix/market/history-fund-rate': 1,
|
|
231
|
+
'v2/mix/market/current-fund-rate': 1,
|
|
232
|
+
'v2/mix/market/contracts': 1,
|
|
233
|
+
'v2/mix/market/query-position-lever': 2,
|
|
188
234
|
},
|
|
189
235
|
},
|
|
190
236
|
'margin': {
|
|
191
237
|
'get': {
|
|
192
|
-
'cross/public/interestRateAndLimit': 2,
|
|
193
|
-
'isolated/public/interestRateAndLimit': 2,
|
|
194
|
-
'cross/public/tierData': 2,
|
|
195
|
-
'isolated/public/tierData': 2,
|
|
196
|
-
'public/currencies': 1,
|
|
238
|
+
'margin/v1/cross/public/interestRateAndLimit': 2,
|
|
239
|
+
'margin/v1/isolated/public/interestRateAndLimit': 2,
|
|
240
|
+
'margin/v1/cross/public/tierData': 2,
|
|
241
|
+
'margin/v1/isolated/public/tierData': 2,
|
|
242
|
+
'margin/v1/public/currencies': 1,
|
|
243
|
+
'v2/margin/currencies': 2,
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
'earn': {
|
|
247
|
+
'get': {
|
|
248
|
+
'v2/earn/loan/public/coinInfos': 2,
|
|
249
|
+
'v2/earn/loan/public/hour-interest': 2,
|
|
197
250
|
},
|
|
198
251
|
},
|
|
199
252
|
},
|
|
200
253
|
'private': {
|
|
201
254
|
'spot': {
|
|
202
255
|
'get': {
|
|
203
|
-
'wallet/deposit-address': 4,
|
|
204
|
-
'wallet/withdrawal-list': 1,
|
|
205
|
-
'wallet/deposit-list': 1,
|
|
206
|
-
'account/getInfo': 20,
|
|
207
|
-
'account/assets': 2,
|
|
208
|
-
'account/assets-lite': 2,
|
|
209
|
-
'account/transferRecords': 1,
|
|
210
|
-
'convert/currencies': 2,
|
|
211
|
-
'convert/convert-record': 2,
|
|
212
|
-
'loan/ongoing-orders': 2,
|
|
213
|
-
'loan/repay-history': 2,
|
|
214
|
-
'loan/revise-history': 2,
|
|
215
|
-
'loan/borrow-history': 2,
|
|
216
|
-
'loan/debts': 2,
|
|
256
|
+
'spot/v1/wallet/deposit-address': 4,
|
|
257
|
+
'spot/v1/wallet/withdrawal-list': 1,
|
|
258
|
+
'spot/v1/wallet/deposit-list': 1,
|
|
259
|
+
'spot/v1/account/getInfo': 20,
|
|
260
|
+
'spot/v1/account/assets': 2,
|
|
261
|
+
'spot/v1/account/assets-lite': 2,
|
|
262
|
+
'spot/v1/account/transferRecords': 1,
|
|
263
|
+
'spot/v1/convert/currencies': 2,
|
|
264
|
+
'spot/v1/convert/convert-record': 2,
|
|
265
|
+
'spot/v1/loan/ongoing-orders': 2,
|
|
266
|
+
'spot/v1/loan/repay-history': 2,
|
|
267
|
+
'spot/v1/loan/revise-history': 2,
|
|
268
|
+
'spot/v1/loan/borrow-history': 2,
|
|
269
|
+
'spot/v1/loan/debts': 2,
|
|
270
|
+
'v2/spot/trade/orderInfo': 1,
|
|
271
|
+
'v2/spot/trade/unfilled-orders': 1,
|
|
272
|
+
'v2/spot/trade/history-orders': 1,
|
|
273
|
+
'v2/spot/trade/fills': 2,
|
|
274
|
+
'v2/spot/trade/current-plan-order': 1,
|
|
275
|
+
'v2/spot/trade/history-plan-order': 1,
|
|
276
|
+
'v2/spot/account/info': 20,
|
|
277
|
+
'v2/spot/account/assets': 2,
|
|
278
|
+
'v2/spot/account/subaccount-assets': 2,
|
|
279
|
+
'v2/spot/account/bills': 2,
|
|
280
|
+
'v2/spot/account/transferRecords': 1,
|
|
281
|
+
'v2/spot/wallet/deposit-address': 2,
|
|
282
|
+
'v2/spot/wallet/deposit-records': 2,
|
|
283
|
+
'v2/spot/wallet/withdrawal-records': 2,
|
|
217
284
|
},
|
|
218
285
|
'post': {
|
|
219
|
-
'wallet/transfer': 4,
|
|
220
|
-
'wallet/transfer-v2': 4,
|
|
221
|
-
'wallet/subTransfer': 10,
|
|
222
|
-
'wallet/withdrawal': 4,
|
|
223
|
-
'wallet/withdrawal-v2': 4,
|
|
224
|
-
'wallet/withdrawal-inner': 4,
|
|
225
|
-
'wallet/withdrawal-inner-v2': 4,
|
|
226
|
-
'account/sub-account-spot-assets': 200,
|
|
227
|
-
'account/bills': 2,
|
|
228
|
-
'trade/orders': 2,
|
|
229
|
-
'trade/batch-orders': 4,
|
|
230
|
-
'trade/cancel-order': 2,
|
|
231
|
-
'trade/cancel-order-v2': 2,
|
|
232
|
-
'trade/cancel-symbol-order': 2,
|
|
233
|
-
'trade/cancel-batch-orders': 4,
|
|
234
|
-
'trade/cancel-batch-orders-v2': 4,
|
|
235
|
-
'trade/orderInfo': 1,
|
|
236
|
-
'trade/open-orders': 1,
|
|
237
|
-
'trade/history': 1,
|
|
238
|
-
'trade/fills': 1,
|
|
239
|
-
'plan/placePlan': 1,
|
|
240
|
-
'plan/modifyPlan': 1,
|
|
241
|
-
'plan/cancelPlan': 1,
|
|
242
|
-
'plan/currentPlan': 1,
|
|
243
|
-
'plan/historyPlan': 1,
|
|
244
|
-
'plan/batchCancelPlan': 2,
|
|
245
|
-
'convert/quoted-price': 4,
|
|
246
|
-
'convert/trade': 4,
|
|
247
|
-
'loan/borrow': 2,
|
|
248
|
-
'loan/repay': 2,
|
|
249
|
-
'loan/revise-pledge': 2,
|
|
250
|
-
'trace/order/orderCurrentList': 2,
|
|
251
|
-
'trace/order/orderHistoryList': 2,
|
|
252
|
-
'trace/order/closeTrackingOrder': 2,
|
|
253
|
-
'trace/order/updateTpsl': 2,
|
|
254
|
-
'trace/order/followerEndOrder': 2,
|
|
255
|
-
'trace/order/spotInfoList': 2,
|
|
256
|
-
'trace/config/getTraderSettings': 2,
|
|
257
|
-
'trace/config/getFollowerSettings': 2,
|
|
258
|
-
'trace/user/myTraders': 2,
|
|
259
|
-
'trace/config/setFollowerConfig': 2,
|
|
260
|
-
'trace/user/myFollowers': 2,
|
|
261
|
-
'trace/config/setProductCode': 2,
|
|
262
|
-
'trace/user/removeTrader': 2,
|
|
263
|
-
'trace/getRemovableFollower': 2,
|
|
264
|
-
'trace/user/removeFollower': 2,
|
|
265
|
-
'trace/profit/totalProfitInfo': 2,
|
|
266
|
-
'trace/profit/totalProfitList': 2,
|
|
267
|
-
'trace/profit/profitHisList': 2,
|
|
268
|
-
'trace/profit/profitHisDetailList': 2,
|
|
269
|
-
'trace/profit/waitProfitDetailList': 2,
|
|
270
|
-
'trace/user/getTraderInfo': 2,
|
|
286
|
+
'spot/v1/wallet/transfer': 4,
|
|
287
|
+
'spot/v1/wallet/transfer-v2': 4,
|
|
288
|
+
'spot/v1/wallet/subTransfer': 10,
|
|
289
|
+
'spot/v1/wallet/withdrawal': 4,
|
|
290
|
+
'spot/v1/wallet/withdrawal-v2': 4,
|
|
291
|
+
'spot/v1/wallet/withdrawal-inner': 4,
|
|
292
|
+
'spot/v1/wallet/withdrawal-inner-v2': 4,
|
|
293
|
+
'spot/v1/account/sub-account-spot-assets': 200,
|
|
294
|
+
'spot/v1/account/bills': 2,
|
|
295
|
+
'spot/v1/trade/orders': 2,
|
|
296
|
+
'spot/v1/trade/batch-orders': 4,
|
|
297
|
+
'spot/v1/trade/cancel-order': 2,
|
|
298
|
+
'spot/v1/trade/cancel-order-v2': 2,
|
|
299
|
+
'spot/v1/trade/cancel-symbol-order': 2,
|
|
300
|
+
'spot/v1/trade/cancel-batch-orders': 4,
|
|
301
|
+
'spot/v1/trade/cancel-batch-orders-v2': 4,
|
|
302
|
+
'spot/v1/trade/orderInfo': 1,
|
|
303
|
+
'spot/v1/trade/open-orders': 1,
|
|
304
|
+
'spot/v1/trade/history': 1,
|
|
305
|
+
'spot/v1/trade/fills': 1,
|
|
306
|
+
'spot/v1/plan/placePlan': 1,
|
|
307
|
+
'spot/v1/plan/modifyPlan': 1,
|
|
308
|
+
'spot/v1/plan/cancelPlan': 1,
|
|
309
|
+
'spot/v1/plan/currentPlan': 1,
|
|
310
|
+
'spot/v1/plan/historyPlan': 1,
|
|
311
|
+
'spot/v1/plan/batchCancelPlan': 2,
|
|
312
|
+
'spot/v1/convert/quoted-price': 4,
|
|
313
|
+
'spot/v1/convert/trade': 4,
|
|
314
|
+
'spot/v1/loan/borrow': 2,
|
|
315
|
+
'spot/v1/loan/repay': 2,
|
|
316
|
+
'spot/v1/loan/revise-pledge': 2,
|
|
317
|
+
'spot/v1/trace/order/orderCurrentList': 2,
|
|
318
|
+
'spot/v1/trace/order/orderHistoryList': 2,
|
|
319
|
+
'spot/v1/trace/order/closeTrackingOrder': 2,
|
|
320
|
+
'spot/v1/trace/order/updateTpsl': 2,
|
|
321
|
+
'spot/v1/trace/order/followerEndOrder': 2,
|
|
322
|
+
'spot/v1/trace/order/spotInfoList': 2,
|
|
323
|
+
'spot/v1/trace/config/getTraderSettings': 2,
|
|
324
|
+
'spot/v1/trace/config/getFollowerSettings': 2,
|
|
325
|
+
'spot/v1/trace/user/myTraders': 2,
|
|
326
|
+
'spot/v1/trace/config/setFollowerConfig': 2,
|
|
327
|
+
'spot/v1/trace/user/myFollowers': 2,
|
|
328
|
+
'spot/v1/trace/config/setProductCode': 2,
|
|
329
|
+
'spot/v1/trace/user/removeTrader': 2,
|
|
330
|
+
'spot/v1/trace/getRemovableFollower': 2,
|
|
331
|
+
'spot/v1/trace/user/removeFollower': 2,
|
|
332
|
+
'spot/v1/trace/profit/totalProfitInfo': 2,
|
|
333
|
+
'spot/v1/trace/profit/totalProfitList': 2,
|
|
334
|
+
'spot/v1/trace/profit/profitHisList': 2,
|
|
335
|
+
'spot/v1/trace/profit/profitHisDetailList': 2,
|
|
336
|
+
'spot/v1/trace/profit/waitProfitDetailList': 2,
|
|
337
|
+
'spot/v1/trace/user/getTraderInfo': 2,
|
|
338
|
+
'v2/spot/trade/place-order': 2,
|
|
339
|
+
'v2/spot/trade/cancel-order': 2,
|
|
340
|
+
'v2/spot/trade/batch-orders': 20,
|
|
341
|
+
'v2/spot/trade/batch-cancel-order': 2,
|
|
342
|
+
'v2/spot/trade/cancel-symbol-order': 4,
|
|
343
|
+
'v2/spot/trade/place-plan-order': 1,
|
|
344
|
+
'v2/spot/trade/modify-plan-order': 1,
|
|
345
|
+
'v2/spot/trade/cancel-plan-order': 1,
|
|
346
|
+
'v2/spot/trade/batch-cancel-plan-order': 2,
|
|
347
|
+
'v2/spot/wallet/transfer': 2,
|
|
348
|
+
'v2/spot/wallet/subaccount-transfer': 2,
|
|
349
|
+
'v2/spot/wallet/withdrawal': 2,
|
|
271
350
|
},
|
|
272
351
|
},
|
|
273
352
|
'mix': {
|
|
274
353
|
'get': {
|
|
275
|
-
'account/account': 2,
|
|
276
|
-
'account/accounts': 2,
|
|
277
|
-
'position/singlePosition': 2,
|
|
278
|
-
'position/singlePosition-v2': 2,
|
|
279
|
-
'position/allPosition': 4,
|
|
280
|
-
'position/allPosition-v2': 4,
|
|
281
|
-
'position/history-position': 1,
|
|
282
|
-
'account/accountBill': 2,
|
|
283
|
-
'account/accountBusinessBill': 4,
|
|
284
|
-
'order/current': 1,
|
|
285
|
-
'order/marginCoinCurrent': 1,
|
|
286
|
-
'order/history': 2,
|
|
287
|
-
'order/historyProductType': 4,
|
|
288
|
-
'order/detail': 2,
|
|
289
|
-
'order/fills': 2,
|
|
290
|
-
'order/allFills': 2,
|
|
291
|
-
'plan/currentPlan': 1,
|
|
292
|
-
'plan/historyPlan': 2,
|
|
293
|
-
'trace/currentTrack': 2,
|
|
294
|
-
'trace/followerOrder': 2,
|
|
295
|
-
'trace/followerHistoryOrders': 2,
|
|
296
|
-
'trace/historyTrack': 2,
|
|
297
|
-
'trace/summary': 1,
|
|
298
|
-
'trace/profitSettleTokenIdGroup': 1,
|
|
299
|
-
'trace/profitDateGroupList': 1,
|
|
300
|
-
'trade/profitDateList': 2,
|
|
301
|
-
'trace/waitProfitDateList': 1,
|
|
302
|
-
'trace/traderSymbols': 1,
|
|
303
|
-
'trace/traderList': 2,
|
|
304
|
-
'trace/traderDetail': 2,
|
|
305
|
-
'trace/queryTraceConfig': 2,
|
|
354
|
+
'mix/v1/account/account': 2,
|
|
355
|
+
'mix/v1/account/accounts': 2,
|
|
356
|
+
'mix/v1/position/singlePosition': 2,
|
|
357
|
+
'mix/v1/position/singlePosition-v2': 2,
|
|
358
|
+
'mix/v1/position/allPosition': 4,
|
|
359
|
+
'mix/v1/position/allPosition-v2': 4,
|
|
360
|
+
'mix/v1/position/history-position': 1,
|
|
361
|
+
'mix/v1/account/accountBill': 2,
|
|
362
|
+
'mix/v1/account/accountBusinessBill': 4,
|
|
363
|
+
'mix/v1/order/current': 1,
|
|
364
|
+
'mix/v1/order/marginCoinCurrent': 1,
|
|
365
|
+
'mix/v1/order/history': 2,
|
|
366
|
+
'mix/v1/order/historyProductType': 4,
|
|
367
|
+
'mix/v1/order/detail': 2,
|
|
368
|
+
'mix/v1/order/fills': 2,
|
|
369
|
+
'mix/v1/order/allFills': 2,
|
|
370
|
+
'mix/v1/plan/currentPlan': 1,
|
|
371
|
+
'mix/v1/plan/historyPlan': 2,
|
|
372
|
+
'mix/v1/trace/currentTrack': 2,
|
|
373
|
+
'mix/v1/trace/followerOrder': 2,
|
|
374
|
+
'mix/v1/trace/followerHistoryOrders': 2,
|
|
375
|
+
'mix/v1/trace/historyTrack': 2,
|
|
376
|
+
'mix/v1/trace/summary': 1,
|
|
377
|
+
'mix/v1/trace/profitSettleTokenIdGroup': 1,
|
|
378
|
+
'mix/v1/trace/profitDateGroupList': 1,
|
|
379
|
+
'mix/v1/trade/profitDateList': 2,
|
|
380
|
+
'mix/v1/trace/waitProfitDateList': 1,
|
|
381
|
+
'mix/v1/trace/traderSymbols': 1,
|
|
382
|
+
'mix/v1/trace/traderList': 2,
|
|
383
|
+
'mix/v1/trace/traderDetail': 2,
|
|
384
|
+
'mix/v1/trace/queryTraceConfig': 2,
|
|
385
|
+
'v2/mix/account/account': 2,
|
|
386
|
+
'v2/mix/account/accounts': 2,
|
|
387
|
+
'v2/mix/account/sub-account-assets': 200,
|
|
388
|
+
'v2/mix/account/open-count': 2,
|
|
389
|
+
'v2/mix/account/bill': 2,
|
|
390
|
+
'v2/mix/market/query-position-lever': 2,
|
|
391
|
+
'v2/mix/position/single-position': 2,
|
|
392
|
+
'v2/mix/position/all-position': 4,
|
|
393
|
+
'v2/mix/position/history-position': 1,
|
|
394
|
+
'v2/mix/order/detail': 2,
|
|
395
|
+
'v2/mix/order/fills': 2,
|
|
396
|
+
'v2/mix/order/fill-history': 2,
|
|
397
|
+
'v2/mix/order/orders-pending': 2,
|
|
398
|
+
'v2/mix/order/orders-history': 2,
|
|
399
|
+
'v2/mix/order/orders-plan-pending': 2,
|
|
400
|
+
'v2/mix/order/orders-plan-history': 2,
|
|
306
401
|
},
|
|
307
402
|
'post': {
|
|
308
|
-
'account/sub-account-contract-assets': 200,
|
|
309
|
-
'account/open-count': 1,
|
|
310
|
-
'account/setLeverage': 4,
|
|
311
|
-
'account/setMargin': 4,
|
|
312
|
-
'account/setMarginMode': 4,
|
|
313
|
-
'account/setPositionMode': 4,
|
|
314
|
-
'order/placeOrder': 2,
|
|
315
|
-
'order/batch-orders': 2,
|
|
316
|
-
'order/cancel-order': 2,
|
|
317
|
-
'order/cancel-batch-orders': 2,
|
|
318
|
-
'order/modifyOrder': 2,
|
|
319
|
-
'order/cancel-symbol-orders': 2,
|
|
320
|
-
'order/cancel-all-orders': 2,
|
|
321
|
-
'order/close-all-positions': 20,
|
|
322
|
-
'plan/placePlan': 2,
|
|
323
|
-
'plan/modifyPlan': 2,
|
|
324
|
-
'plan/modifyPlanPreset': 2,
|
|
325
|
-
'plan/placeTPSL': 2,
|
|
326
|
-
'plan/placeTrailStop': 2,
|
|
327
|
-
'plan/placePositionsTPSL': 2,
|
|
328
|
-
'plan/modifyTPSLPlan': 2,
|
|
329
|
-
'plan/cancelPlan': 2,
|
|
330
|
-
'plan/cancelSymbolPlan': 2,
|
|
331
|
-
'plan/cancelAllPlan': 2,
|
|
332
|
-
'trace/closeTrackOrder': 2,
|
|
333
|
-
'trace/modifyTPSL': 2,
|
|
334
|
-
'trace/closeTrackOrderBySymbol': 2,
|
|
335
|
-
'trace/setUpCopySymbols': 2,
|
|
336
|
-
'trace/followerSetBatchTraceConfig': 2,
|
|
337
|
-
'trace/followerCloseByTrackingNo': 2,
|
|
338
|
-
'trace/followerCloseByAll': 2,
|
|
339
|
-
'trace/followerSetTpsl': 2,
|
|
340
|
-
'trace/cancelCopyTrader': 4,
|
|
341
|
-
'trace/traderUpdateConfig': 2,
|
|
342
|
-
'trace/myTraderList': 2,
|
|
343
|
-
'trace/myFollowerList': 2,
|
|
344
|
-
'trace/removeFollower': 2,
|
|
345
|
-
'trace/public/getFollowerConfig': 2,
|
|
346
|
-
'trace/report/order/historyList': 2,
|
|
347
|
-
'trace/report/order/currentList': 2,
|
|
348
|
-
'trace/queryTraderTpslRatioConfig': 2,
|
|
349
|
-
'trace/traderUpdateTpslRatioConfig': 2,
|
|
403
|
+
'mix/v1/account/sub-account-contract-assets': 200,
|
|
404
|
+
'mix/v1/account/open-count': 1,
|
|
405
|
+
'mix/v1/account/setLeverage': 4,
|
|
406
|
+
'mix/v1/account/setMargin': 4,
|
|
407
|
+
'mix/v1/account/setMarginMode': 4,
|
|
408
|
+
'mix/v1/account/setPositionMode': 4,
|
|
409
|
+
'mix/v1/order/placeOrder': 2,
|
|
410
|
+
'mix/v1/order/batch-orders': 2,
|
|
411
|
+
'mix/v1/order/cancel-order': 2,
|
|
412
|
+
'mix/v1/order/cancel-batch-orders': 2,
|
|
413
|
+
'mix/v1/order/modifyOrder': 2,
|
|
414
|
+
'mix/v1/order/cancel-symbol-orders': 2,
|
|
415
|
+
'mix/v1/order/cancel-all-orders': 2,
|
|
416
|
+
'mix/v1/order/close-all-positions': 20,
|
|
417
|
+
'mix/v1/plan/placePlan': 2,
|
|
418
|
+
'mix/v1/plan/modifyPlan': 2,
|
|
419
|
+
'mix/v1/plan/modifyPlanPreset': 2,
|
|
420
|
+
'mix/v1/plan/placeTPSL': 2,
|
|
421
|
+
'mix/v1/plan/placeTrailStop': 2,
|
|
422
|
+
'mix/v1/plan/placePositionsTPSL': 2,
|
|
423
|
+
'mix/v1/plan/modifyTPSLPlan': 2,
|
|
424
|
+
'mix/v1/plan/cancelPlan': 2,
|
|
425
|
+
'mix/v1/plan/cancelSymbolPlan': 2,
|
|
426
|
+
'mix/v1/plan/cancelAllPlan': 2,
|
|
427
|
+
'mix/v1/trace/closeTrackOrder': 2,
|
|
428
|
+
'mix/v1/trace/modifyTPSL': 2,
|
|
429
|
+
'mix/v1/trace/closeTrackOrderBySymbol': 2,
|
|
430
|
+
'mix/v1/trace/setUpCopySymbols': 2,
|
|
431
|
+
'mix/v1/trace/followerSetBatchTraceConfig': 2,
|
|
432
|
+
'mix/v1/trace/followerCloseByTrackingNo': 2,
|
|
433
|
+
'mix/v1/trace/followerCloseByAll': 2,
|
|
434
|
+
'mix/v1/trace/followerSetTpsl': 2,
|
|
435
|
+
'mix/v1/trace/cancelCopyTrader': 4,
|
|
436
|
+
'mix/v1/trace/traderUpdateConfig': 2,
|
|
437
|
+
'mix/v1/trace/myTraderList': 2,
|
|
438
|
+
'mix/v1/trace/myFollowerList': 2,
|
|
439
|
+
'mix/v1/trace/removeFollower': 2,
|
|
440
|
+
'mix/v1/trace/public/getFollowerConfig': 2,
|
|
441
|
+
'mix/v1/trace/report/order/historyList': 2,
|
|
442
|
+
'mix/v1/trace/report/order/currentList': 2,
|
|
443
|
+
'mix/v1/trace/queryTraderTpslRatioConfig': 2,
|
|
444
|
+
'mix/v1/trace/traderUpdateTpslRatioConfig': 2,
|
|
445
|
+
'v2/mix/account/set-leverage': 4,
|
|
446
|
+
'v2/mix/account/set-margin': 4,
|
|
447
|
+
'v2/mix/account/set-margin-mode': 4,
|
|
448
|
+
'v2/mix/account/set-position-mode': 4,
|
|
449
|
+
'v2/mix/order/place-order': 20,
|
|
450
|
+
'v2/mix/order/click-backhand': 20,
|
|
451
|
+
'v2/mix/order/batch-place-order': 20,
|
|
452
|
+
'v2/mix/order/modify-order': 2,
|
|
453
|
+
'v2/mix/order/cancel-order': 2,
|
|
454
|
+
'v2/mix/order/batch-cancel-orders': 2,
|
|
455
|
+
'v2/mix/order/close-positions': 20,
|
|
456
|
+
'v2/mix/order/place-tpsl-order': 2,
|
|
457
|
+
'v2/mix/order/place-plan-order': 2,
|
|
458
|
+
'v2/mix/order/modify-tpsl-order': 2,
|
|
459
|
+
'v2/mix/order/modify-plan-order': 2,
|
|
460
|
+
'v2/mix/order/cancel-plan-order': 2,
|
|
350
461
|
},
|
|
351
462
|
},
|
|
352
463
|
'user': {
|
|
353
464
|
'get': {
|
|
354
|
-
'fee/query': 2,
|
|
355
|
-
'sub/virtual-list': 2,
|
|
356
|
-
'sub/virtual-api-list': 2,
|
|
357
|
-
'tax/spot-record': 1,
|
|
358
|
-
'tax/future-record': 1,
|
|
359
|
-
'tax/margin-record': 1,
|
|
360
|
-
'tax/p2p-record': 1,
|
|
465
|
+
'user/v1/fee/query': 2,
|
|
466
|
+
'user/v1/sub/virtual-list': 2,
|
|
467
|
+
'user/v1/sub/virtual-api-list': 2,
|
|
468
|
+
'user/v1/tax/spot-record': 1,
|
|
469
|
+
'user/v1/tax/future-record': 1,
|
|
470
|
+
'user/v1/tax/margin-record': 1,
|
|
471
|
+
'user/v1/tax/p2p-record': 1,
|
|
472
|
+
'v2/user/virtual-subaccount-list': 2,
|
|
473
|
+
'v2/user/virtual-subaccount-apikey-list': 2,
|
|
361
474
|
},
|
|
362
475
|
'post': {
|
|
363
|
-
'sub/virtual-create': 4,
|
|
364
|
-
'sub/virtual-modify': 4,
|
|
365
|
-
'sub/virtual-api-batch-create': 20,
|
|
366
|
-
'sub/virtual-api-create': 4,
|
|
367
|
-
'sub/virtual-api-modify': 4,
|
|
476
|
+
'user/v1/sub/virtual-create': 4,
|
|
477
|
+
'user/v1/sub/virtual-modify': 4,
|
|
478
|
+
'user/v1/sub/virtual-api-batch-create': 20,
|
|
479
|
+
'user/v1/sub/virtual-api-create': 4,
|
|
480
|
+
'user/v1/sub/virtual-api-modify': 4,
|
|
481
|
+
'v2/user/create-virtual-subaccount': 4,
|
|
482
|
+
'v2/user/modify-virtual-subaccount': 4,
|
|
483
|
+
'v2/user/batch-create-subaccount-and-apikey': 20,
|
|
484
|
+
'v2/user/create-virtual-subaccount-apikey': 4,
|
|
485
|
+
'v2/user/modify-virtual-subaccount-apikey': 4,
|
|
368
486
|
},
|
|
369
487
|
},
|
|
370
488
|
'p2p': {
|
|
371
489
|
'get': {
|
|
372
|
-
'merchant/merchantList': 2,
|
|
373
|
-
'merchant/merchantInfo': 2,
|
|
374
|
-
'merchant/advList': 2,
|
|
375
|
-
'merchant/orderList': 2,
|
|
490
|
+
'p2p/v1/merchant/merchantList': 2,
|
|
491
|
+
'p2p/v1/merchant/merchantInfo': 2,
|
|
492
|
+
'p2p/v1/merchant/advList': 2,
|
|
493
|
+
'p2p/v1/merchant/orderList': 2,
|
|
494
|
+
'v2/p2p/merchantList': 2,
|
|
495
|
+
'v2/p2p/merchantInfo': 2,
|
|
496
|
+
'v2/p2p/orderList': 2,
|
|
497
|
+
'v2/p2p/advList': 2,
|
|
376
498
|
},
|
|
377
499
|
},
|
|
378
500
|
'broker': {
|
|
379
501
|
'get': {
|
|
380
|
-
'account/info': 2,
|
|
381
|
-
'account/sub-list': 20,
|
|
382
|
-
'account/sub-email': 20,
|
|
383
|
-
'account/sub-spot-assets': 2,
|
|
384
|
-
'account/sub-future-assets': 2,
|
|
385
|
-
'account/subaccount-transfer': 1,
|
|
386
|
-
'account/subaccount-deposit': 1,
|
|
387
|
-
'account/subaccount-withdrawal': 1,
|
|
388
|
-
'account/sub-api-list': 2,
|
|
502
|
+
'broker/v1/account/info': 2,
|
|
503
|
+
'broker/v1/account/sub-list': 20,
|
|
504
|
+
'broker/v1/account/sub-email': 20,
|
|
505
|
+
'broker/v1/account/sub-spot-assets': 2,
|
|
506
|
+
'broker/v1/account/sub-future-assets': 2,
|
|
507
|
+
'broker/v1/account/subaccount-transfer': 1,
|
|
508
|
+
'broker/v1/account/subaccount-deposit': 1,
|
|
509
|
+
'broker/v1/account/subaccount-withdrawal': 1,
|
|
510
|
+
'broker/v1/account/sub-api-list': 2,
|
|
511
|
+
'v2/broker/account/info': 2,
|
|
512
|
+
'v2/broker/account/subaccount-list': 20,
|
|
513
|
+
'v2/broker/account/subaccount-email': 2,
|
|
514
|
+
'v2/broker/account/subaccount-spot-assets': 2,
|
|
515
|
+
'v2/broker/account/subaccount-future-assets': 2,
|
|
516
|
+
'v2/broker/manage/subaccount-apikey-list': 2,
|
|
389
517
|
},
|
|
390
518
|
'post': {
|
|
391
|
-
'account/sub-create': 20,
|
|
392
|
-
'account/sub-modify': 20,
|
|
393
|
-
'account/sub-modify-email': 20,
|
|
394
|
-
'account/sub-address': 2,
|
|
395
|
-
'account/sub-withdrawal': 2,
|
|
396
|
-
'account/sub-auto-transfer': 4,
|
|
397
|
-
'account/sub-api-create': 2,
|
|
398
|
-
'account/sub-api-modify': 2,
|
|
519
|
+
'broker/v1/account/sub-create': 20,
|
|
520
|
+
'broker/v1/account/sub-modify': 20,
|
|
521
|
+
'broker/v1/account/sub-modify-email': 20,
|
|
522
|
+
'broker/v1/account/sub-address': 2,
|
|
523
|
+
'broker/v1/account/sub-withdrawal': 2,
|
|
524
|
+
'broker/v1/account/sub-auto-transfer': 4,
|
|
525
|
+
'broker/v1/account/sub-api-create': 2,
|
|
526
|
+
'broker/v1/account/sub-api-modify': 2,
|
|
527
|
+
'v2/broker/account/modify-subaccount-email': 2,
|
|
528
|
+
'v2/broker/account/create-subaccount': 20,
|
|
529
|
+
'v2/broker/account/modify-subaccount': 20,
|
|
530
|
+
'v2/broker/account/subaccount-address': 2,
|
|
531
|
+
'v2/broker/account/subaccount-withdrawal': 2,
|
|
532
|
+
'v2/broker/account/set-subaccount-autotransfer': 2,
|
|
533
|
+
'v2/broker/manage/create-subaccount-apikey': 2,
|
|
534
|
+
'v2/broker/manage/modify-subaccount-apikey': 2,
|
|
399
535
|
},
|
|
400
536
|
},
|
|
401
537
|
'margin': {
|
|
402
538
|
'get': {
|
|
403
|
-
'cross/account/riskRate': 2,
|
|
404
|
-
'cross/account/maxTransferOutAmount': 2,
|
|
405
|
-
'isolated/account/maxTransferOutAmount': 2,
|
|
406
|
-
'isolated/order/openOrders': 2,
|
|
407
|
-
'isolated/order/history': 2,
|
|
408
|
-
'isolated/order/fills': 2,
|
|
409
|
-
'isolated/loan/list': 2,
|
|
410
|
-
'isolated/repay/list': 2,
|
|
411
|
-
'isolated/interest/list': 2,
|
|
412
|
-
'isolated/liquidation/list': 2,
|
|
413
|
-
'isolated/fin/list': 2,
|
|
414
|
-
'cross/order/openOrders': 2,
|
|
415
|
-
'cross/order/history': 2,
|
|
416
|
-
'cross/order/fills': 2,
|
|
417
|
-
'cross/loan/list': 2,
|
|
418
|
-
'cross/repay/list': 2,
|
|
419
|
-
'cross/interest/list': 2,
|
|
420
|
-
'cross/liquidation/list': 2,
|
|
421
|
-
'cross/fin/list': 2,
|
|
422
|
-
'cross/account/assets': 2,
|
|
423
|
-
'isolated/account/assets': 2,
|
|
539
|
+
'margin/v1/cross/account/riskRate': 2,
|
|
540
|
+
'margin/v1/cross/account/maxTransferOutAmount': 2,
|
|
541
|
+
'margin/v1/isolated/account/maxTransferOutAmount': 2,
|
|
542
|
+
'margin/v1/isolated/order/openOrders': 2,
|
|
543
|
+
'margin/v1/isolated/order/history': 2,
|
|
544
|
+
'margin/v1/isolated/order/fills': 2,
|
|
545
|
+
'margin/v1/isolated/loan/list': 2,
|
|
546
|
+
'margin/v1/isolated/repay/list': 2,
|
|
547
|
+
'margin/v1/isolated/interest/list': 2,
|
|
548
|
+
'margin/v1/isolated/liquidation/list': 2,
|
|
549
|
+
'margin/v1/isolated/fin/list': 2,
|
|
550
|
+
'margin/v1/cross/order/openOrders': 2,
|
|
551
|
+
'margin/v1/cross/order/history': 2,
|
|
552
|
+
'margin/v1/cross/order/fills': 2,
|
|
553
|
+
'margin/v1/cross/loan/list': 2,
|
|
554
|
+
'margin/v1/cross/repay/list': 2,
|
|
555
|
+
'margin/v1/cross/interest/list': 2,
|
|
556
|
+
'margin/v1/cross/liquidation/list': 2,
|
|
557
|
+
'margin/v1/cross/fin/list': 2,
|
|
558
|
+
'margin/v1/cross/account/assets': 2,
|
|
559
|
+
'margin/v1/isolated/account/assets': 2,
|
|
560
|
+
'v2/margin/crossed/borrow-history': 2,
|
|
561
|
+
'v2/margin/crossed/repay-history': 2,
|
|
562
|
+
'v2/margin/crossed/interest-history': 2,
|
|
563
|
+
'v2/margin/crossed/liquidation-history': 2,
|
|
564
|
+
'v2/margin/crossed/financial-records': 2,
|
|
565
|
+
'v2/margin/crossed/account-assets': 2,
|
|
566
|
+
'v2/margin/crossed/account/risk-rate': 2,
|
|
567
|
+
'v2/margin/crossed/account/max-borrowable-amount': 2,
|
|
568
|
+
'v2/margin/crossed/account/max-transfer-out-amount': 2,
|
|
569
|
+
'v2/margin/crossed/interest-rate-and-limit': 2,
|
|
570
|
+
'v2/margin/crossed/tier-data': 2,
|
|
571
|
+
'v2/margin/crossed/open-orders': 2,
|
|
572
|
+
'v2/margin/crossed/history-orders': 2,
|
|
573
|
+
'v2/margin/crossed/fills': 2,
|
|
574
|
+
'v2/margin/isolated/borrow-history': 2,
|
|
575
|
+
'v2/margin/isolated/repay-history': 2,
|
|
576
|
+
'v2/margin/isolated/interest-history': 2,
|
|
577
|
+
'v2/margin/isolated/liquidation-history': 2,
|
|
578
|
+
'v2/margin/isolated/financial-records': 2,
|
|
579
|
+
'v2/margin/isolated/account-assets': 2,
|
|
580
|
+
'v2/margin/isolated/account/risk-rate': 2,
|
|
581
|
+
'v2/margin/isolated/account/max-borrowable-amount': 2,
|
|
582
|
+
'v2/margin/isolated/account/max-transfer-out-amount': 2,
|
|
583
|
+
'v2/margin/isolated/interest-rate-and-limit': 2,
|
|
584
|
+
'v2/margin/isolated/tier-data': 2,
|
|
585
|
+
'v2/margin/isolated/open-orders': 2,
|
|
586
|
+
'v2/margin/isolated/history-orders': 2,
|
|
587
|
+
'v2/margin/isolated/fills': 2,
|
|
424
588
|
},
|
|
425
589
|
'post': {
|
|
426
|
-
'cross/account/borrow': 2,
|
|
427
|
-
'isolated/account/borrow': 2,
|
|
428
|
-
'cross/account/repay': 2,
|
|
429
|
-
'isolated/account/repay': 2,
|
|
430
|
-
'isolated/account/riskRate': 2,
|
|
431
|
-
'cross/account/maxBorrowableAmount': 2,
|
|
432
|
-
'isolated/account/maxBorrowableAmount': 2,
|
|
433
|
-
'isolated/account/flashRepay': 2,
|
|
434
|
-
'isolated/account/queryFlashRepayStatus': 2,
|
|
435
|
-
'cross/account/flashRepay': 2,
|
|
436
|
-
'cross/account/queryFlashRepayStatus': 2,
|
|
437
|
-
'isolated/order/placeOrder': 4,
|
|
438
|
-
'isolated/order/batchPlaceOrder': 4,
|
|
439
|
-
'isolated/order/cancelOrder': 2,
|
|
440
|
-
'isolated/order/batchCancelOrder': 2,
|
|
441
|
-
'cross/order/placeOrder': 2,
|
|
442
|
-
'cross/order/batchPlaceOrder': 2,
|
|
443
|
-
'cross/order/cancelOrder': 2,
|
|
444
|
-
'cross/order/batchCancelOrder': 2,
|
|
590
|
+
'margin/v1/cross/account/borrow': 2,
|
|
591
|
+
'margin/v1/isolated/account/borrow': 2,
|
|
592
|
+
'margin/v1/cross/account/repay': 2,
|
|
593
|
+
'margin/v1/isolated/account/repay': 2,
|
|
594
|
+
'margin/v1/isolated/account/riskRate': 2,
|
|
595
|
+
'margin/v1/cross/account/maxBorrowableAmount': 2,
|
|
596
|
+
'margin/v1/isolated/account/maxBorrowableAmount': 2,
|
|
597
|
+
'margin/v1/isolated/account/flashRepay': 2,
|
|
598
|
+
'margin/v1/isolated/account/queryFlashRepayStatus': 2,
|
|
599
|
+
'margin/v1/cross/account/flashRepay': 2,
|
|
600
|
+
'margin/v1/cross/account/queryFlashRepayStatus': 2,
|
|
601
|
+
'margin/v1/isolated/order/placeOrder': 4,
|
|
602
|
+
'margin/v1/isolated/order/batchPlaceOrder': 4,
|
|
603
|
+
'margin/v1/isolated/order/cancelOrder': 2,
|
|
604
|
+
'margin/v1/isolated/order/batchCancelOrder': 2,
|
|
605
|
+
'margin/v1/cross/order/placeOrder': 2,
|
|
606
|
+
'margin/v1/cross/order/batchPlaceOrder': 2,
|
|
607
|
+
'margin/v1/cross/order/cancelOrder': 2,
|
|
608
|
+
'margin/v1/cross/order/batchCancelOrder': 2,
|
|
609
|
+
'v2/margin/crossed/account/borrow': 2,
|
|
610
|
+
'v2/margin/crossed/account/repay': 2,
|
|
611
|
+
'v2/margin/crossed/account/flash-repay': 2,
|
|
612
|
+
'v2/margin/crossed/account/query-flash-repay-status': 2,
|
|
613
|
+
'v2/margin/crossed/place-order': 2,
|
|
614
|
+
'v2/margin/crossed/batch-place-order': 2,
|
|
615
|
+
'v2/margin/crossed/cancel-order': 2,
|
|
616
|
+
'v2/margin/crossed/batch-cancel-order': 2,
|
|
617
|
+
'v2/margin/isolated/account/borrow': 2,
|
|
618
|
+
'v2/margin/isolated/account/repay': 2,
|
|
619
|
+
'v2/margin/isolated/account/flash-repay': 2,
|
|
620
|
+
'v2/margin/isolated/account/query-flash-repay-status': 2,
|
|
621
|
+
'v2/margin/isolated/place-order': 2,
|
|
622
|
+
'v2/margin/isolated/batch-place-order': 2,
|
|
623
|
+
'v2/margin/isolated/cancel-order': 2,
|
|
624
|
+
'v2/margin/isolated/batch-cancel-order': 2,
|
|
625
|
+
},
|
|
626
|
+
},
|
|
627
|
+
'copy': {
|
|
628
|
+
'get': {
|
|
629
|
+
'v2/copy/mix-trader/order-current-track': 2,
|
|
630
|
+
'v2/copy/mix-trader/order-history-track': 2,
|
|
631
|
+
'v2/copy/mix-trader/order-total-detail': 2,
|
|
632
|
+
'v2/copy/mix-trader/profit-history-summarys': 1,
|
|
633
|
+
'v2/copy/mix-trader/profit-history-details': 1,
|
|
634
|
+
'v2/copy/mix-trader/profit-details': 1,
|
|
635
|
+
'v2/copy/mix-trader/profits-group-coin-date': 1,
|
|
636
|
+
'v2/copy/mix-trader/config-query-symbols': 1,
|
|
637
|
+
'v2/copy/mix-trader/config-query-followers': 2,
|
|
638
|
+
'v2/copy/mix-follower/query-current-orders': 2,
|
|
639
|
+
'v2/copy/mix-follower/query-history-orders': 1,
|
|
640
|
+
'v2/copy/mix-follower/query-settings': 2,
|
|
641
|
+
'v2/copy/mix-follower/query-traders': 2,
|
|
642
|
+
'v2/copy/mix-follower/query-quantity-limit': 2,
|
|
643
|
+
'v2/copy/mix-broker/query-traders': 2,
|
|
644
|
+
'v2/copy/mix-broker/query-history-traces': 2,
|
|
645
|
+
'v2/copy/mix-broker/query-current-traces': 2,
|
|
646
|
+
'v2/copy/spot-trader/profit-summarys': 2,
|
|
647
|
+
'v2/copy/spot-trader/profit-history-details': 2,
|
|
648
|
+
'v2/copy/spot-trader/profit-details': 2,
|
|
649
|
+
'v2/copy/spot-trader/order-total-detail': 2,
|
|
650
|
+
'v2/copy/spot-trader/order-history-track': 2,
|
|
651
|
+
'v2/copy/spot-trader/order-current-track': 2,
|
|
652
|
+
'v2/copy/spot-trader/config-query-settings': 2,
|
|
653
|
+
'v2/copy/spot-trader/config-query-followers': 2,
|
|
654
|
+
'v2/copy/spot-follower/query-traders': 2,
|
|
655
|
+
'v2/copy/spot-follower/query-trader-symbols': 2,
|
|
656
|
+
'v2/copy/spot-follower/query-settings': 2,
|
|
657
|
+
'v2/copy/spot-follower/query-history-orders': 2,
|
|
658
|
+
'v2/copy/spot-follower/query-current-orders': 2,
|
|
659
|
+
},
|
|
660
|
+
'post': {
|
|
661
|
+
'v2/copy/mix-trader/order-modify-tpsl': 2,
|
|
662
|
+
'v2/copy/mix-trader/order-close-positions': 2,
|
|
663
|
+
'v2/copy/mix-trader/config-setting-symbols': 2,
|
|
664
|
+
'v2/copy/mix-trader/config-setting-base': 2,
|
|
665
|
+
'v2/copy/mix-trader/config-remove-follower': 2,
|
|
666
|
+
'v2/copy/mix-follower/setting-tpsl': 1,
|
|
667
|
+
'v2/copy/mix-follower/settings': 2,
|
|
668
|
+
'v2/copy/mix-follower/close-positions': 2,
|
|
669
|
+
'v2/copy/mix-follower/cancel-trader': 4,
|
|
670
|
+
'v2/copy/spot-trader/order-modify-tpsl': 2,
|
|
671
|
+
'v2/copy/spot-trader/order-close-tracking': 2,
|
|
672
|
+
'v2/copy/spot-trader/config-setting-symbols': 2,
|
|
673
|
+
'v2/copy/spot-trader/config-remove-follower': 2,
|
|
674
|
+
'v2/copy/spot-follower/stop-order': 2,
|
|
675
|
+
'v2/copy/spot-follower/settings': 2,
|
|
676
|
+
'v2/copy/spot-follower/setting-tpsl': 2,
|
|
677
|
+
'v2/copy/spot-follower/order-close-tracking': 2,
|
|
678
|
+
'v2/copy/spot-follower/cancel-trader': 2,
|
|
679
|
+
},
|
|
680
|
+
},
|
|
681
|
+
'tax': {
|
|
682
|
+
'get': {
|
|
683
|
+
'v2/tax/spot-record': 20,
|
|
684
|
+
'v2/tax/future-record': 20,
|
|
685
|
+
'v2/tax/margin-record': 20,
|
|
686
|
+
'v2/tax/p2p-record': 20,
|
|
687
|
+
},
|
|
688
|
+
},
|
|
689
|
+
'convert': {
|
|
690
|
+
'get': {
|
|
691
|
+
'v2/convert/currencies': 2,
|
|
692
|
+
'v2/convert/quoted-price': 2,
|
|
693
|
+
'v2/convert/convert-record': 2,
|
|
694
|
+
},
|
|
695
|
+
'post': {
|
|
696
|
+
'v2/convert/trade': 2,
|
|
697
|
+
},
|
|
698
|
+
},
|
|
699
|
+
'earn': {
|
|
700
|
+
'get': {
|
|
701
|
+
'v2/earn/savings/product': 2,
|
|
702
|
+
'v2/earn/savings/account': 2,
|
|
703
|
+
'v2/earn/savings/assets': 2,
|
|
704
|
+
'v2/earn/savings/records': 2,
|
|
705
|
+
'v2/earn/savings/subscribe-info': 2,
|
|
706
|
+
'v2/earn/savings/subscribe-result': 2,
|
|
707
|
+
'v2/earn/savings/redeem-result': 2,
|
|
708
|
+
'v2/earn/sharkfin/product': 2,
|
|
709
|
+
'v2/earn/sharkfin/account': 2,
|
|
710
|
+
'v2/earn/sharkfin/assets': 2,
|
|
711
|
+
'v2/earn/sharkfin/records': 2,
|
|
712
|
+
'v2/earn/sharkfin/subscribe-info': 2,
|
|
713
|
+
'v2/earn/sharkfin/subscribe-result': 4,
|
|
714
|
+
'v2/earn/loan/ongoing-orders': 2,
|
|
715
|
+
'v2/earn/loan/repay-history': 2,
|
|
716
|
+
'v2/earn/loan/revise-history': 2,
|
|
717
|
+
'v2/earn/loan/borrow-history': 2,
|
|
718
|
+
'v2/earn/loan/debts': 2,
|
|
719
|
+
'v2/earn/loan/reduces': 2,
|
|
720
|
+
},
|
|
721
|
+
'post': {
|
|
722
|
+
'v2/earn/savings/subscribe': 2,
|
|
723
|
+
'v2/earn/savings/redeem': 2,
|
|
724
|
+
'v2/earn/sharkfin/subscribe': 2,
|
|
725
|
+
'v2/earn/loan/borrow': 2,
|
|
726
|
+
'v2/earn/loan/repay': 2,
|
|
727
|
+
'v2/earn/loan/revise-pledge': 2,
|
|
445
728
|
},
|
|
446
729
|
},
|
|
447
730
|
},
|
|
@@ -1023,18 +1306,18 @@ export default class bitget extends Exchange {
|
|
|
1023
1306
|
},
|
|
1024
1307
|
'fetchOHLCV': {
|
|
1025
1308
|
'spot': {
|
|
1026
|
-
'method': '
|
|
1309
|
+
'method': 'publicSpotGetSpotV1MarketCandles', // or publicSpotGetSpotV1MarketHistoryCandles
|
|
1027
1310
|
},
|
|
1028
1311
|
'swap': {
|
|
1029
|
-
'method': '
|
|
1312
|
+
'method': 'publicMixGetMixV1MarketCandles', // or publicMixGetMixV1MarketHistoryCandles or publicMixGetMixV1MarketHistoryIndexCandles or publicMixGetMixV1MarketHistoryMarkCandles
|
|
1030
1313
|
},
|
|
1031
1314
|
},
|
|
1032
1315
|
'fetchTrades': {
|
|
1033
1316
|
'spot': {
|
|
1034
|
-
'method': '
|
|
1317
|
+
'method': 'publicSpotGetSpotV1MarketFillsHistory', // or publicSpotGetSpotV1MarketFills
|
|
1035
1318
|
},
|
|
1036
1319
|
'swap': {
|
|
1037
|
-
'method': '
|
|
1320
|
+
'method': 'publicMixGetMixV1MarketFillsHistory', // or publicMixGetMixV1MarketFills
|
|
1038
1321
|
},
|
|
1039
1322
|
},
|
|
1040
1323
|
'accountsByType': {
|
|
@@ -1061,7 +1344,7 @@ export default class bitget extends Exchange {
|
|
|
1061
1344
|
'BSC': 'BEP20',
|
|
1062
1345
|
},
|
|
1063
1346
|
'fetchPositions': {
|
|
1064
|
-
'method': '
|
|
1347
|
+
'method': 'privateMixGetMixV1PositionAllPositionV2', // or privateMixGetMixV1PositionHistoryPosition
|
|
1065
1348
|
},
|
|
1066
1349
|
'defaultTimeInForce': 'GTC', // 'GTC' = Good To Cancel (default), 'IOC' = Immediate Or Cancel
|
|
1067
1350
|
},
|
|
@@ -1079,7 +1362,7 @@ export default class bitget extends Exchange {
|
|
|
1079
1362
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
1080
1363
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1081
1364
|
*/
|
|
1082
|
-
const response = await this.
|
|
1365
|
+
const response = await this.publicSpotGetSpotV1PublicTime(params);
|
|
1083
1366
|
//
|
|
1084
1367
|
// {
|
|
1085
1368
|
// "code": "00000",
|
|
@@ -1303,10 +1586,10 @@ export default class bitget extends Exchange {
|
|
|
1303
1586
|
async fetchMarketsByType(type, params = {}) {
|
|
1304
1587
|
let response = undefined;
|
|
1305
1588
|
if (type === 'spot') {
|
|
1306
|
-
response = await this.
|
|
1589
|
+
response = await this.publicSpotGetSpotV1PublicProducts(params);
|
|
1307
1590
|
}
|
|
1308
1591
|
else if (type === 'swap') {
|
|
1309
|
-
response = await this.
|
|
1592
|
+
response = await this.publicMixGetMixV1MarketContracts(params);
|
|
1310
1593
|
}
|
|
1311
1594
|
else {
|
|
1312
1595
|
throw new NotSupported(this.id + ' does not support ' + type + ' market');
|
|
@@ -1373,7 +1656,7 @@ export default class bitget extends Exchange {
|
|
|
1373
1656
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
1374
1657
|
* @returns {object} an associative dictionary of currencies
|
|
1375
1658
|
*/
|
|
1376
|
-
const response = await this.
|
|
1659
|
+
const response = await this.publicSpotGetSpotV1PublicCurrencies(params);
|
|
1377
1660
|
//
|
|
1378
1661
|
// {
|
|
1379
1662
|
// "code": "00000",
|
|
@@ -1517,11 +1800,11 @@ export default class bitget extends Exchange {
|
|
|
1517
1800
|
const productType = this.safeStringUpper(parts, 1);
|
|
1518
1801
|
request['symbol'] = marketId;
|
|
1519
1802
|
request['productType'] = productType;
|
|
1520
|
-
response = await this.
|
|
1803
|
+
response = await this.publicMixGetMixV1MarketQueryPositionLever(this.extend(request, params));
|
|
1521
1804
|
}
|
|
1522
1805
|
else if (marginMode === 'isolated') {
|
|
1523
1806
|
request['symbol'] = market['info']['symbolName'];
|
|
1524
|
-
response = await this.
|
|
1807
|
+
response = await this.publicMarginGetMarginV1IsolatedPublicTierData(this.extend(request, params));
|
|
1525
1808
|
}
|
|
1526
1809
|
else if (marginMode === 'cross') {
|
|
1527
1810
|
const code = this.safeString(params, 'code');
|
|
@@ -1529,7 +1812,7 @@ export default class bitget extends Exchange {
|
|
|
1529
1812
|
params = this.omit(params, 'code');
|
|
1530
1813
|
const currency = this.currency(code);
|
|
1531
1814
|
request['coin'] = currency['code'];
|
|
1532
|
-
response = await this.
|
|
1815
|
+
response = await this.publicMarginGetMarginV1CrossPublicTierData(this.extend(request, params));
|
|
1533
1816
|
}
|
|
1534
1817
|
else {
|
|
1535
1818
|
throw new BadRequest(this.id + ' fetchMarketLeverageTiers() symbol does not support market ' + symbol);
|
|
@@ -1697,7 +1980,7 @@ export default class bitget extends Exchange {
|
|
|
1697
1980
|
request['pageSize'] = limit;
|
|
1698
1981
|
}
|
|
1699
1982
|
[request, params] = this.handleUntilOption('endTime', request, params);
|
|
1700
|
-
const response = await this.
|
|
1983
|
+
const response = await this.privateSpotGetSpotV1WalletDepositList(this.extend(request, params));
|
|
1701
1984
|
//
|
|
1702
1985
|
// {
|
|
1703
1986
|
// "code": "00000",
|
|
@@ -1754,7 +2037,7 @@ export default class bitget extends Exchange {
|
|
|
1754
2037
|
if (tag !== undefined) {
|
|
1755
2038
|
request['tag'] = tag;
|
|
1756
2039
|
}
|
|
1757
|
-
const response = await this.
|
|
2040
|
+
const response = await this.privateSpotPostSpotV1WalletWithdrawalV2(this.extend(request, params));
|
|
1758
2041
|
//
|
|
1759
2042
|
// {
|
|
1760
2043
|
// "code": "00000",
|
|
@@ -1853,7 +2136,7 @@ export default class bitget extends Exchange {
|
|
|
1853
2136
|
if (limit !== undefined) {
|
|
1854
2137
|
request['pageSize'] = limit;
|
|
1855
2138
|
}
|
|
1856
|
-
const response = await this.
|
|
2139
|
+
const response = await this.privateSpotGetSpotV1WalletWithdrawalList(this.extend(request, params));
|
|
1857
2140
|
//
|
|
1858
2141
|
// {
|
|
1859
2142
|
// "code": "00000",
|
|
@@ -1963,7 +2246,7 @@ export default class bitget extends Exchange {
|
|
|
1963
2246
|
if (networkId !== undefined) {
|
|
1964
2247
|
request['chain'] = networkId;
|
|
1965
2248
|
}
|
|
1966
|
-
const response = await this.
|
|
2249
|
+
const response = await this.privateSpotGetSpotV1WalletDepositAddress(this.extend(request, params));
|
|
1967
2250
|
//
|
|
1968
2251
|
// {
|
|
1969
2252
|
// "code": "00000",
|
|
@@ -2023,10 +2306,10 @@ export default class bitget extends Exchange {
|
|
|
2023
2306
|
}
|
|
2024
2307
|
let response = undefined;
|
|
2025
2308
|
if (market['spot']) {
|
|
2026
|
-
response = await this.
|
|
2309
|
+
response = await this.publicSpotGetSpotV1MarketDepth(this.extend(request, params));
|
|
2027
2310
|
}
|
|
2028
2311
|
else {
|
|
2029
|
-
response = await this.
|
|
2312
|
+
response = await this.publicMixGetMixV1MarketDepth(this.extend(request, params));
|
|
2030
2313
|
}
|
|
2031
2314
|
//
|
|
2032
2315
|
// {
|
|
@@ -2180,10 +2463,10 @@ export default class bitget extends Exchange {
|
|
|
2180
2463
|
let response = undefined;
|
|
2181
2464
|
const extended = this.extend(request, params);
|
|
2182
2465
|
if (market['spot']) {
|
|
2183
|
-
response = await this.
|
|
2466
|
+
response = await this.publicSpotGetSpotV1MarketTicker(extended);
|
|
2184
2467
|
}
|
|
2185
2468
|
else {
|
|
2186
|
-
response = await this.
|
|
2469
|
+
response = await this.publicMixGetMixV1MarketTicker(extended);
|
|
2187
2470
|
}
|
|
2188
2471
|
//
|
|
2189
2472
|
// {
|
|
@@ -2240,10 +2523,10 @@ export default class bitget extends Exchange {
|
|
|
2240
2523
|
const extended = this.extend(request, params);
|
|
2241
2524
|
let response = undefined;
|
|
2242
2525
|
if (type === 'spot') {
|
|
2243
|
-
response = await this.
|
|
2526
|
+
response = await this.publicSpotGetSpotV1MarketTickers(extended);
|
|
2244
2527
|
}
|
|
2245
2528
|
else {
|
|
2246
|
-
response = await this.
|
|
2529
|
+
response = await this.publicMixGetMixV1MarketTickers(extended);
|
|
2247
2530
|
}
|
|
2248
2531
|
//
|
|
2249
2532
|
// spot
|
|
@@ -2445,23 +2728,23 @@ export default class bitget extends Exchange {
|
|
|
2445
2728
|
let response = undefined;
|
|
2446
2729
|
if (market['spot']) {
|
|
2447
2730
|
const spotOptions = this.safeValue(options, 'spot', {});
|
|
2448
|
-
const defaultSpotMethod = this.safeString(spotOptions, 'method', '
|
|
2731
|
+
const defaultSpotMethod = this.safeString(spotOptions, 'method', 'publicSpotGetSpotV1MarketFillsHistory');
|
|
2449
2732
|
const spotMethod = this.safeString(params, 'method', defaultSpotMethod);
|
|
2450
2733
|
params = this.omit(params, 'method');
|
|
2451
|
-
if (spotMethod === '
|
|
2452
|
-
response = await this.
|
|
2734
|
+
if (spotMethod === 'publicSpotGetSpotV1MarketFillsHistory') {
|
|
2735
|
+
response = await this.publicSpotGetSpotV1MarketFillsHistory(this.extend(request, params));
|
|
2453
2736
|
}
|
|
2454
|
-
else if (spotMethod === '
|
|
2455
|
-
response = await this.
|
|
2737
|
+
else if (spotMethod === 'publicSpotGetSpotV1MarketFills') {
|
|
2738
|
+
response = await this.publicSpotGetSpotV1MarketFills(this.extend(request, params));
|
|
2456
2739
|
}
|
|
2457
2740
|
}
|
|
2458
2741
|
else {
|
|
2459
2742
|
const swapOptions = this.safeValue(options, 'swap', {});
|
|
2460
|
-
const defaultSwapMethod = this.safeString(swapOptions, 'method', '
|
|
2743
|
+
const defaultSwapMethod = this.safeString(swapOptions, 'method', 'publicMixGetMixV1MarketFillsHistory');
|
|
2461
2744
|
const swapMethod = this.safeString(params, 'method', defaultSwapMethod);
|
|
2462
2745
|
params = this.omit(params, 'method');
|
|
2463
|
-
if (swapMethod === '
|
|
2464
|
-
response = await this.
|
|
2746
|
+
if (swapMethod === 'publicMixGetMixV1MarketFillsHistory') {
|
|
2747
|
+
response = await this.publicMixGetMixV1MarketFillsHistory(this.extend(request, params));
|
|
2465
2748
|
//
|
|
2466
2749
|
// {
|
|
2467
2750
|
// "tradeId": "1084459062491590657",
|
|
@@ -2473,8 +2756,8 @@ export default class bitget extends Exchange {
|
|
|
2473
2756
|
// }
|
|
2474
2757
|
//
|
|
2475
2758
|
}
|
|
2476
|
-
else if (swapMethod === '
|
|
2477
|
-
response = await this.
|
|
2759
|
+
else if (swapMethod === 'publicMixGetMixV1MarketFills') {
|
|
2760
|
+
response = await this.publicMixGetMixV1MarketFills(this.extend(request, params));
|
|
2478
2761
|
}
|
|
2479
2762
|
}
|
|
2480
2763
|
//
|
|
@@ -2532,7 +2815,7 @@ export default class bitget extends Exchange {
|
|
|
2532
2815
|
const request = {
|
|
2533
2816
|
'symbol': market['id'],
|
|
2534
2817
|
};
|
|
2535
|
-
const response = await this.
|
|
2818
|
+
const response = await this.publicSpotGetSpotV1PublicProduct(this.extend(request, params));
|
|
2536
2819
|
//
|
|
2537
2820
|
// {
|
|
2538
2821
|
// "code": "00000",
|
|
@@ -2566,7 +2849,7 @@ export default class bitget extends Exchange {
|
|
|
2566
2849
|
* @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
|
|
2567
2850
|
*/
|
|
2568
2851
|
await this.loadMarkets();
|
|
2569
|
-
const response = await this.
|
|
2852
|
+
const response = await this.publicSpotGetSpotV1PublicProducts(params);
|
|
2570
2853
|
//
|
|
2571
2854
|
// {
|
|
2572
2855
|
// "code": "00000",
|
|
@@ -2720,39 +3003,39 @@ export default class bitget extends Exchange {
|
|
|
2720
3003
|
let response = undefined;
|
|
2721
3004
|
if (market['spot']) {
|
|
2722
3005
|
const spotOptions = this.safeValue(options, 'spot', {});
|
|
2723
|
-
const defaultSpotMethod = this.safeString(spotOptions, 'method', '
|
|
3006
|
+
const defaultSpotMethod = this.safeString(spotOptions, 'method', 'publicSpotGetSpotV1MarketCandles');
|
|
2724
3007
|
const method = this.safeString(params, 'method', defaultSpotMethod);
|
|
2725
3008
|
params = this.omit(params, 'method');
|
|
2726
|
-
if (method === '
|
|
3009
|
+
if (method === 'publicSpotGetSpotV1MarketCandles') {
|
|
2727
3010
|
if (limitIsUndefined) {
|
|
2728
3011
|
request['limit'] = 1000;
|
|
2729
3012
|
}
|
|
2730
|
-
response = await this.
|
|
3013
|
+
response = await this.publicSpotGetSpotV1MarketCandles(this.extend(request, params));
|
|
2731
3014
|
}
|
|
2732
|
-
else if (method === '
|
|
2733
|
-
response = await this.
|
|
3015
|
+
else if (method === 'publicSpotGetSpotV1MarketHistoryCandles') {
|
|
3016
|
+
response = await this.publicSpotGetSpotV1MarketHistoryCandles(this.extend(request, params));
|
|
2734
3017
|
}
|
|
2735
3018
|
}
|
|
2736
3019
|
else {
|
|
2737
3020
|
const swapOptions = this.safeValue(options, 'swap', {});
|
|
2738
|
-
const defaultSwapMethod = this.safeString(swapOptions, 'method', '
|
|
3021
|
+
const defaultSwapMethod = this.safeString(swapOptions, 'method', 'publicMixGetMixV1MarketCandles');
|
|
2739
3022
|
const swapMethod = this.safeString(params, 'method', defaultSwapMethod);
|
|
2740
3023
|
const priceType = this.safeString(params, 'price');
|
|
2741
3024
|
params = this.omit(params, ['method', 'price']);
|
|
2742
|
-
if ((priceType === 'mark') || (swapMethod === '
|
|
2743
|
-
response = await this.
|
|
3025
|
+
if ((priceType === 'mark') || (swapMethod === 'publicMixGetMixV1MarketHistoryMarkCandles')) {
|
|
3026
|
+
response = await this.publicMixGetMixV1MarketHistoryMarkCandles(this.extend(request, params));
|
|
2744
3027
|
}
|
|
2745
|
-
else if ((priceType === 'index') || (swapMethod === '
|
|
2746
|
-
response = await this.
|
|
3028
|
+
else if ((priceType === 'index') || (swapMethod === 'publicMixGetMixV1MarketHistoryIndexCandles')) {
|
|
3029
|
+
response = await this.publicMixGetMixV1MarketHistoryIndexCandles(this.extend(request, params));
|
|
2747
3030
|
}
|
|
2748
|
-
else if (swapMethod === '
|
|
3031
|
+
else if (swapMethod === 'publicMixGetMixV1MarketCandles') {
|
|
2749
3032
|
if (limitIsUndefined) {
|
|
2750
3033
|
request['limit'] = 1000;
|
|
2751
3034
|
}
|
|
2752
|
-
response = await this.
|
|
3035
|
+
response = await this.publicMixGetMixV1MarketCandles(this.extend(request, params));
|
|
2753
3036
|
}
|
|
2754
|
-
else if (swapMethod === '
|
|
2755
|
-
response = await this.
|
|
3037
|
+
else if (swapMethod === 'publicMixGetMixV1MarketHistoryCandles') {
|
|
3038
|
+
response = await this.publicMixGetMixV1MarketHistoryCandles(this.extend(request, params));
|
|
2756
3039
|
}
|
|
2757
3040
|
}
|
|
2758
3041
|
if (response === '') {
|
|
@@ -2790,16 +3073,16 @@ export default class bitget extends Exchange {
|
|
|
2790
3073
|
productType = 'S' + productType;
|
|
2791
3074
|
}
|
|
2792
3075
|
request['productType'] = productType;
|
|
2793
|
-
response = await this.
|
|
3076
|
+
response = await this.privateMixGetMixV1AccountAccounts(this.extend(request, params));
|
|
2794
3077
|
}
|
|
2795
3078
|
else if (marginMode === 'isolated') {
|
|
2796
|
-
response = await this.
|
|
3079
|
+
response = await this.privateMarginGetMarginV1IsolatedAccountAssets(this.extend(request, params));
|
|
2797
3080
|
}
|
|
2798
3081
|
else if (marginMode === 'cross') {
|
|
2799
|
-
response = await this.
|
|
3082
|
+
response = await this.privateMarginGetMarginV1CrossAccountAssets(this.extend(request, params));
|
|
2800
3083
|
}
|
|
2801
3084
|
else if (marketType === 'spot') {
|
|
2802
|
-
response = await this.
|
|
3085
|
+
response = await this.privateSpotGetSpotV1AccountAssets(this.extend(request, params));
|
|
2803
3086
|
}
|
|
2804
3087
|
else {
|
|
2805
3088
|
throw new NotSupported(this.id + ' fetchBalance() does not support ' + marketType + ' accounts');
|
|
@@ -3198,8 +3481,8 @@ export default class bitget extends Exchange {
|
|
|
3198
3481
|
*/
|
|
3199
3482
|
await this.loadMarkets();
|
|
3200
3483
|
const market = this.market(symbol);
|
|
3201
|
-
|
|
3202
|
-
|
|
3484
|
+
const marginParams = this.handleMarginModeAndParams('createOrder', params);
|
|
3485
|
+
const marginMode = marginParams[0];
|
|
3203
3486
|
const triggerPrice = this.safeValue2(params, 'stopPrice', 'triggerPrice');
|
|
3204
3487
|
const stopLossTriggerPrice = this.safeValue(params, 'stopLossPrice');
|
|
3205
3488
|
const takeProfitTriggerPrice = this.safeValue(params, 'takeProfitPrice');
|
|
@@ -3211,27 +3494,27 @@ export default class bitget extends Exchange {
|
|
|
3211
3494
|
let response = undefined;
|
|
3212
3495
|
if (market['spot']) {
|
|
3213
3496
|
if (isTriggerOrder) {
|
|
3214
|
-
response = await this.
|
|
3497
|
+
response = await this.privateSpotPostSpotV1PlanPlacePlan(request);
|
|
3215
3498
|
}
|
|
3216
3499
|
else if (marginMode === 'isolated') {
|
|
3217
|
-
response = await this.
|
|
3500
|
+
response = await this.privateMarginPostMarginV1IsolatedOrderPlaceOrder(request);
|
|
3218
3501
|
}
|
|
3219
3502
|
else if (marginMode === 'cross') {
|
|
3220
|
-
response = await this.
|
|
3503
|
+
response = await this.privateMarginPostMarginV1CrossOrderPlaceOrder(request);
|
|
3221
3504
|
}
|
|
3222
3505
|
else {
|
|
3223
|
-
response = await this.
|
|
3506
|
+
response = await this.privateSpotPostSpotV1TradeOrders(request);
|
|
3224
3507
|
}
|
|
3225
3508
|
}
|
|
3226
3509
|
else {
|
|
3227
3510
|
if (isTriggerOrder) {
|
|
3228
|
-
response = await this.
|
|
3511
|
+
response = await this.privateMixPostMixV1PlanPlacePlan(request);
|
|
3229
3512
|
}
|
|
3230
3513
|
else if (isStopLossOrTakeProfitTrigger) {
|
|
3231
|
-
response = await this.
|
|
3514
|
+
response = await this.privateMixPostMixV1PlanPlacePositionsTPSL(request);
|
|
3232
3515
|
}
|
|
3233
3516
|
else {
|
|
3234
|
-
response = await this.
|
|
3517
|
+
response = await this.privateMixPostMixV1OrderPlaceOrder(request);
|
|
3235
3518
|
}
|
|
3236
3519
|
}
|
|
3237
3520
|
//
|
|
@@ -3491,16 +3774,16 @@ export default class bitget extends Exchange {
|
|
|
3491
3774
|
if ((market['swap']) || (market['future'])) {
|
|
3492
3775
|
request['orderDataList'] = ordersRequests;
|
|
3493
3776
|
request['marginCoin'] = market['settleId'];
|
|
3494
|
-
response = await this.
|
|
3777
|
+
response = await this.privateMixPostMixV1OrderBatchOrders(request);
|
|
3495
3778
|
}
|
|
3496
3779
|
else if (marginMode === 'isolated') {
|
|
3497
|
-
response = await this.
|
|
3780
|
+
response = await this.privateMarginPostMarginV1IsolatedOrderBatchPlaceOrder(request);
|
|
3498
3781
|
}
|
|
3499
3782
|
else if (marginMode === 'cross') {
|
|
3500
|
-
response = await this.
|
|
3783
|
+
response = await this.privateMarginPostMarginV1CrossOrderBatchPlaceOrder(request);
|
|
3501
3784
|
}
|
|
3502
3785
|
else {
|
|
3503
|
-
response = await this.
|
|
3786
|
+
response = await this.privateSpotPostSpotV1TradeBatchOrders(request);
|
|
3504
3787
|
}
|
|
3505
3788
|
//
|
|
3506
3789
|
// {
|
|
@@ -3597,7 +3880,7 @@ export default class bitget extends Exchange {
|
|
|
3597
3880
|
else {
|
|
3598
3881
|
request['size'] = this.amountToPrecision(symbol, amount);
|
|
3599
3882
|
}
|
|
3600
|
-
response = await this.
|
|
3883
|
+
response = await this.privateSpotPostSpotV1PlanModifyPlan(this.extend(request, omitted));
|
|
3601
3884
|
}
|
|
3602
3885
|
else {
|
|
3603
3886
|
request['symbol'] = market['id'];
|
|
@@ -3618,10 +3901,10 @@ export default class bitget extends Exchange {
|
|
|
3618
3901
|
request['triggerPrice'] = this.priceToPrecision(symbol, takeProfitPrice);
|
|
3619
3902
|
request['planType'] = 'profit_plan';
|
|
3620
3903
|
}
|
|
3621
|
-
response = await this.
|
|
3904
|
+
response = await this.privateMixPostMixV1PlanModifyTPSLPlan(this.extend(request, omitted));
|
|
3622
3905
|
}
|
|
3623
3906
|
else {
|
|
3624
|
-
response = await this.
|
|
3907
|
+
response = await this.privateMixPostMixV1PlanModifyPlan(this.extend(request, omitted));
|
|
3625
3908
|
}
|
|
3626
3909
|
}
|
|
3627
3910
|
//
|
|
@@ -3679,27 +3962,27 @@ export default class bitget extends Exchange {
|
|
|
3679
3962
|
throw new ArgumentsRequired(this.id + ' cancelOrder() requires a planType parameter for stop orders, either normal_plan, profit_plan or loss_plan');
|
|
3680
3963
|
}
|
|
3681
3964
|
request['planType'] = planType;
|
|
3682
|
-
response = await this.
|
|
3965
|
+
response = await this.privateMixPostMixV1PlanCancelPlan(this.extend(request, params));
|
|
3683
3966
|
}
|
|
3684
3967
|
else {
|
|
3685
|
-
response = await this.
|
|
3968
|
+
response = await this.privateMixPostMixV1OrderCancelOrder(this.extend(request, params));
|
|
3686
3969
|
}
|
|
3687
3970
|
}
|
|
3688
3971
|
else if (marketType === 'spot') {
|
|
3689
3972
|
if (marginMode !== undefined) {
|
|
3690
3973
|
if (marginMode === 'isolated') {
|
|
3691
|
-
response = await this.
|
|
3974
|
+
response = await this.privateMarginPostMarginV1IsolatedOrderCancelOrder(this.extend(request, params));
|
|
3692
3975
|
}
|
|
3693
3976
|
else if (marginMode === 'cross') {
|
|
3694
|
-
response = await this.
|
|
3977
|
+
response = await this.privateMarginPostMarginV1CrossOrderCancelOrder(this.extend(request, params));
|
|
3695
3978
|
}
|
|
3696
3979
|
}
|
|
3697
3980
|
else {
|
|
3698
3981
|
if (stop) {
|
|
3699
|
-
response = await this.
|
|
3982
|
+
response = await this.privateSpotPostSpotV1PlanCancelPlan(this.extend(request, params));
|
|
3700
3983
|
}
|
|
3701
3984
|
else {
|
|
3702
|
-
response = await this.
|
|
3985
|
+
response = await this.privateSpotPostSpotV1TradeCancelOrder(this.extend(request, params));
|
|
3703
3986
|
}
|
|
3704
3987
|
}
|
|
3705
3988
|
}
|
|
@@ -3802,21 +4085,21 @@ export default class bitget extends Exchange {
|
|
|
3802
4085
|
request['orderIds'] = ids;
|
|
3803
4086
|
if (marginMode !== undefined) {
|
|
3804
4087
|
if (marginMode === 'cross') {
|
|
3805
|
-
response = await this.
|
|
4088
|
+
response = await this.privateMarginPostMarginV1CrossOrderBatchCancelOrder(this.extend(request, params));
|
|
3806
4089
|
}
|
|
3807
4090
|
else {
|
|
3808
|
-
response = await this.
|
|
4091
|
+
response = await this.privateMarginPostMarginV1IsolatedOrderBatchCancelOrder(this.extend(request, params));
|
|
3809
4092
|
}
|
|
3810
4093
|
}
|
|
3811
4094
|
else {
|
|
3812
|
-
response = await this.
|
|
4095
|
+
response = await this.privateSpotPostSpotV1TradeCancelBatchOrdersV2(this.extend(request, params));
|
|
3813
4096
|
}
|
|
3814
4097
|
}
|
|
3815
4098
|
else {
|
|
3816
4099
|
request['symbol'] = market['id'];
|
|
3817
4100
|
request['marginCoin'] = market['quote'];
|
|
3818
4101
|
request['orderIds'] = ids;
|
|
3819
|
-
response = await this.
|
|
4102
|
+
response = await this.privateMixPostMixV1OrderCancelBatchOrders(this.extend(request, params));
|
|
3820
4103
|
}
|
|
3821
4104
|
//
|
|
3822
4105
|
// spot
|
|
@@ -3895,10 +4178,10 @@ export default class bitget extends Exchange {
|
|
|
3895
4178
|
'symbol': market['info']['symbolName'], // regular id like LTCUSDT_SPBL does not work here
|
|
3896
4179
|
};
|
|
3897
4180
|
if (marginMode === 'cross') {
|
|
3898
|
-
return await this.
|
|
4181
|
+
return await this.privateMarginPostMarginV1CrossOrderBatchCancelOrder(this.extend(spotMarginRequest, params));
|
|
3899
4182
|
}
|
|
3900
4183
|
else {
|
|
3901
|
-
return await this.
|
|
4184
|
+
return await this.privateMarginPostMarginV1IsolatedOrderBatchCancelOrder(this.extend(spotMarginRequest, params));
|
|
3902
4185
|
}
|
|
3903
4186
|
}
|
|
3904
4187
|
const request = {
|
|
@@ -3913,10 +4196,10 @@ export default class bitget extends Exchange {
|
|
|
3913
4196
|
if (planType === undefined) {
|
|
3914
4197
|
throw new 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');
|
|
3915
4198
|
}
|
|
3916
|
-
response = await this.
|
|
4199
|
+
response = await this.privateMixPostMixV1PlanCancelAllPlan(this.extend(request, params));
|
|
3917
4200
|
}
|
|
3918
4201
|
else {
|
|
3919
|
-
response = await this.
|
|
4202
|
+
response = await this.privateMixPostMixV1OrderCancelAllOrders(this.extend(request, params));
|
|
3920
4203
|
}
|
|
3921
4204
|
//
|
|
3922
4205
|
// {
|
|
@@ -3959,10 +4242,10 @@ export default class bitget extends Exchange {
|
|
|
3959
4242
|
};
|
|
3960
4243
|
let response = undefined;
|
|
3961
4244
|
if (marketType === 'spot') {
|
|
3962
|
-
response = await this.
|
|
4245
|
+
response = await this.privateSpotPostSpotV1TradeOrderInfo(this.extend(request, query));
|
|
3963
4246
|
}
|
|
3964
4247
|
else if ((marketType === 'swap') || (marketType === 'future')) {
|
|
3965
|
-
response = await this.
|
|
4248
|
+
response = await this.privateMixGetMixV1OrderDetail(this.extend(request, query));
|
|
3966
4249
|
}
|
|
3967
4250
|
else {
|
|
3968
4251
|
throw new NotSupported(this.id + ' fetchOrder() does not support ' + marketType + ' market');
|
|
@@ -4065,10 +4348,10 @@ export default class bitget extends Exchange {
|
|
|
4065
4348
|
if (limit !== undefined) {
|
|
4066
4349
|
request['pageSize'] = limit;
|
|
4067
4350
|
}
|
|
4068
|
-
response = await this.
|
|
4351
|
+
response = await this.privateSpotPostSpotV1PlanCurrentPlan(this.extend(request, params));
|
|
4069
4352
|
}
|
|
4070
4353
|
else {
|
|
4071
|
-
response = await this.
|
|
4354
|
+
response = await this.privateMixGetMixV1PlanCurrentPlan(this.extend(request, params));
|
|
4072
4355
|
}
|
|
4073
4356
|
}
|
|
4074
4357
|
else {
|
|
@@ -4090,14 +4373,14 @@ export default class bitget extends Exchange {
|
|
|
4090
4373
|
request['pageSize'] = limit;
|
|
4091
4374
|
}
|
|
4092
4375
|
if (marginMode === 'isolated') {
|
|
4093
|
-
response = await this.
|
|
4376
|
+
response = await this.privateMarginGetMarginV1IsolatedOrderOpenOrders(this.extend(request, params));
|
|
4094
4377
|
}
|
|
4095
4378
|
else if (marginMode === 'cross') {
|
|
4096
|
-
response = await this.
|
|
4379
|
+
response = await this.privateMarginGetMarginV1CrossOrderOpenOrders(this.extend(request, params));
|
|
4097
4380
|
}
|
|
4098
4381
|
}
|
|
4099
4382
|
else {
|
|
4100
|
-
response = await this.
|
|
4383
|
+
response = await this.privateSpotPostSpotV1TradeOpenOrders(this.extend(request, params));
|
|
4101
4384
|
}
|
|
4102
4385
|
}
|
|
4103
4386
|
else {
|
|
@@ -4110,11 +4393,11 @@ export default class bitget extends Exchange {
|
|
|
4110
4393
|
productType = 'S' + productType;
|
|
4111
4394
|
}
|
|
4112
4395
|
request['productType'] = productType;
|
|
4113
|
-
response = await this.
|
|
4396
|
+
response = await this.privateMixGetMixV1OrderMarginCoinCurrent(this.extend(request, params));
|
|
4114
4397
|
}
|
|
4115
4398
|
else {
|
|
4116
4399
|
this.checkRequiredSymbol('fetchOpenOrders', symbol);
|
|
4117
|
-
response = await this.
|
|
4400
|
+
response = await this.privateMixGetMixV1OrderCurrent(this.extend(request, params));
|
|
4118
4401
|
}
|
|
4119
4402
|
}
|
|
4120
4403
|
}
|
|
@@ -4385,15 +4668,15 @@ export default class bitget extends Exchange {
|
|
|
4385
4668
|
}
|
|
4386
4669
|
if (stop) {
|
|
4387
4670
|
if (marketType === 'spot') {
|
|
4388
|
-
response = await this.
|
|
4671
|
+
response = await this.privateSpotPostSpotV1PlanHistoryPlan(this.extend(request, params));
|
|
4389
4672
|
}
|
|
4390
4673
|
else {
|
|
4391
|
-
response = await this.
|
|
4674
|
+
response = await this.privateMixGetMixV1PlanHistoryPlan(this.extend(request, params));
|
|
4392
4675
|
}
|
|
4393
4676
|
}
|
|
4394
4677
|
else {
|
|
4395
4678
|
if ((marketType === 'swap') || (marketType === 'future')) {
|
|
4396
|
-
response = await this.
|
|
4679
|
+
response = await this.privateMixGetMixV1OrderHistory(this.extend(request, params));
|
|
4397
4680
|
}
|
|
4398
4681
|
else {
|
|
4399
4682
|
if (marginMode !== undefined) {
|
|
@@ -4408,10 +4691,10 @@ export default class bitget extends Exchange {
|
|
|
4408
4691
|
request['pageSize'] = limit;
|
|
4409
4692
|
}
|
|
4410
4693
|
if (marginMode === 'isolated') {
|
|
4411
|
-
response = await this.
|
|
4694
|
+
response = await this.privateMarginGetMarginV1IsolatedOrderHistory(this.extend(request, params));
|
|
4412
4695
|
}
|
|
4413
4696
|
else if (marginMode === 'cross') {
|
|
4414
|
-
response = await this.
|
|
4697
|
+
response = await this.privateMarginGetMarginV1CrossOrderHistory(this.extend(request, params));
|
|
4415
4698
|
}
|
|
4416
4699
|
}
|
|
4417
4700
|
else {
|
|
@@ -4425,7 +4708,7 @@ export default class bitget extends Exchange {
|
|
|
4425
4708
|
params = this.omit(params, 'endTime');
|
|
4426
4709
|
request['before'] = endTime;
|
|
4427
4710
|
}
|
|
4428
|
-
response = await this.
|
|
4711
|
+
response = await this.privateSpotPostSpotV1TradeHistory(this.extend(request, params));
|
|
4429
4712
|
}
|
|
4430
4713
|
}
|
|
4431
4714
|
}
|
|
@@ -4637,7 +4920,7 @@ export default class bitget extends Exchange {
|
|
|
4637
4920
|
request['before'] = since;
|
|
4638
4921
|
}
|
|
4639
4922
|
[request, params] = this.handleUntilOption('after', request, params);
|
|
4640
|
-
const response = await this.
|
|
4923
|
+
const response = await this.privateSpotPostSpotV1AccountBills(this.extend(request, params));
|
|
4641
4924
|
//
|
|
4642
4925
|
// {
|
|
4643
4926
|
// "code": "00000",
|
|
@@ -4758,10 +5041,10 @@ export default class bitget extends Exchange {
|
|
|
4758
5041
|
request['pageSize'] = limit;
|
|
4759
5042
|
}
|
|
4760
5043
|
if (marginMode === 'isolated') {
|
|
4761
|
-
response = await this.
|
|
5044
|
+
response = await this.privateMarginGetMarginV1IsolatedOrderFills(this.extend(request, params));
|
|
4762
5045
|
}
|
|
4763
5046
|
else if (marginMode === 'cross') {
|
|
4764
|
-
response = await this.
|
|
5047
|
+
response = await this.privateMarginGetMarginV1CrossOrderFills(this.extend(request, params));
|
|
4765
5048
|
}
|
|
4766
5049
|
}
|
|
4767
5050
|
else {
|
|
@@ -4772,7 +5055,7 @@ export default class bitget extends Exchange {
|
|
|
4772
5055
|
if (limit !== undefined) {
|
|
4773
5056
|
request['limit'] = limit;
|
|
4774
5057
|
}
|
|
4775
|
-
response = await this.
|
|
5058
|
+
response = await this.privateSpotPostSpotV1TradeFills(this.extend(request, params));
|
|
4776
5059
|
}
|
|
4777
5060
|
}
|
|
4778
5061
|
else {
|
|
@@ -4787,7 +5070,7 @@ export default class bitget extends Exchange {
|
|
|
4787
5070
|
if (!('endTime' in request) && (orderId === undefined)) {
|
|
4788
5071
|
request['endTime'] = this.milliseconds();
|
|
4789
5072
|
}
|
|
4790
|
-
response = await this.
|
|
5073
|
+
response = await this.privateMixGetMixV1OrderFills(this.extend(request, params));
|
|
4791
5074
|
}
|
|
4792
5075
|
//
|
|
4793
5076
|
// spot
|
|
@@ -4898,10 +5181,10 @@ export default class bitget extends Exchange {
|
|
|
4898
5181
|
};
|
|
4899
5182
|
let response = undefined;
|
|
4900
5183
|
if (marketType === 'spot') {
|
|
4901
|
-
response = await this.
|
|
5184
|
+
response = await this.privateSpotPostSpotV1TradeFills(this.extend(request, query));
|
|
4902
5185
|
}
|
|
4903
5186
|
else if ((marketType === 'swap') || (marketType === 'future')) {
|
|
4904
|
-
response = await this.
|
|
5187
|
+
response = await this.privateMixGetMixV1OrderFills(this.extend(request, query));
|
|
4905
5188
|
}
|
|
4906
5189
|
else {
|
|
4907
5190
|
throw new NotSupported(this.id + ' fetchOrderTrades() does not support ' + marketType + ' market');
|
|
@@ -4948,7 +5231,7 @@ export default class bitget extends Exchange {
|
|
|
4948
5231
|
'symbol': market['id'],
|
|
4949
5232
|
'marginCoin': market['settleId'],
|
|
4950
5233
|
};
|
|
4951
|
-
const response = await this.
|
|
5234
|
+
const response = await this.privateMixGetMixV1PositionSinglePositionV2(this.extend(request, params));
|
|
4952
5235
|
//
|
|
4953
5236
|
// {
|
|
4954
5237
|
// "code": "00000",
|
|
@@ -4996,7 +5279,7 @@ export default class bitget extends Exchange {
|
|
|
4996
5279
|
const sandboxMode = this.safeValue(this.options, 'sandboxMode', false);
|
|
4997
5280
|
await this.loadMarkets();
|
|
4998
5281
|
const fetchPositionsOptions = this.safeValue(this.options, 'fetchPositions', {});
|
|
4999
|
-
const method = this.safeString(fetchPositionsOptions, 'method', '
|
|
5282
|
+
const method = this.safeString(fetchPositionsOptions, 'method', 'privateMixGetMixV1PositionAllPositionV2');
|
|
5000
5283
|
let market = undefined;
|
|
5001
5284
|
if (symbols !== undefined) {
|
|
5002
5285
|
const first = this.safeString(symbols, 0);
|
|
@@ -5011,7 +5294,7 @@ export default class bitget extends Exchange {
|
|
|
5011
5294
|
const request = {
|
|
5012
5295
|
'productType': productType,
|
|
5013
5296
|
};
|
|
5014
|
-
if (method === '
|
|
5297
|
+
if (method === 'privateMixGetMixV1PositionHistoryPosition') {
|
|
5015
5298
|
// endTime and startTime mandatory
|
|
5016
5299
|
let since = this.safeInteger2(params, 'startTime', 'since');
|
|
5017
5300
|
if (since === undefined) {
|
|
@@ -5026,12 +5309,12 @@ export default class bitget extends Exchange {
|
|
|
5026
5309
|
}
|
|
5027
5310
|
let response = undefined;
|
|
5028
5311
|
let isHistory = false;
|
|
5029
|
-
if (method === '
|
|
5030
|
-
response = await this.
|
|
5312
|
+
if (method === 'privateMixGetMixV1PositionAllPositionV2') {
|
|
5313
|
+
response = await this.privateMixGetMixV1PositionAllPositionV2(this.extend(request, params));
|
|
5031
5314
|
}
|
|
5032
5315
|
else {
|
|
5033
5316
|
isHistory = true;
|
|
5034
|
-
response = await this.
|
|
5317
|
+
response = await this.privateMixGetMixV1PositionHistoryPosition(this.extend(request, params));
|
|
5035
5318
|
}
|
|
5036
5319
|
//
|
|
5037
5320
|
// {
|
|
@@ -5274,7 +5557,7 @@ export default class bitget extends Exchange {
|
|
|
5274
5557
|
request['pageSize'] = limit;
|
|
5275
5558
|
}
|
|
5276
5559
|
request['nextPage'] = true;
|
|
5277
|
-
const response = await this.
|
|
5560
|
+
const response = await this.publicMixGetMixV1MarketHistoryFundRate(this.extend(request, params));
|
|
5278
5561
|
//
|
|
5279
5562
|
// {
|
|
5280
5563
|
// "code": "00000",
|
|
@@ -5325,7 +5608,7 @@ export default class bitget extends Exchange {
|
|
|
5325
5608
|
const request = {
|
|
5326
5609
|
'symbol': market['id'],
|
|
5327
5610
|
};
|
|
5328
|
-
const response = await this.
|
|
5611
|
+
const response = await this.publicMixGetMixV1MarketCurrentFundRate(this.extend(request, params));
|
|
5329
5612
|
//
|
|
5330
5613
|
// {
|
|
5331
5614
|
// "code": "00000",
|
|
@@ -5399,7 +5682,7 @@ export default class bitget extends Exchange {
|
|
|
5399
5682
|
if (limit !== undefined) {
|
|
5400
5683
|
request['pageSize'] = limit;
|
|
5401
5684
|
}
|
|
5402
|
-
const response = await this.
|
|
5685
|
+
const response = await this.privateMixGetMixV1AccountAccountBill(this.extend(request, params));
|
|
5403
5686
|
//
|
|
5404
5687
|
// {
|
|
5405
5688
|
// "code": "00000",
|
|
@@ -5483,7 +5766,7 @@ export default class bitget extends Exchange {
|
|
|
5483
5766
|
'holdSide': holdSide, // long or short
|
|
5484
5767
|
};
|
|
5485
5768
|
params = this.omit(params, 'holdSide');
|
|
5486
|
-
const response = await this.
|
|
5769
|
+
const response = await this.privateMixPostMixV1AccountSetMargin(this.extend(request, params));
|
|
5487
5770
|
//
|
|
5488
5771
|
// {
|
|
5489
5772
|
// "code": "00000",
|
|
@@ -5565,7 +5848,7 @@ export default class bitget extends Exchange {
|
|
|
5565
5848
|
'symbol': market['id'],
|
|
5566
5849
|
'marginCoin': market['settleId'],
|
|
5567
5850
|
};
|
|
5568
|
-
const response = await this.
|
|
5851
|
+
const response = await this.privateMixGetMixV1AccountAccount(this.extend(request, params));
|
|
5569
5852
|
//
|
|
5570
5853
|
// {
|
|
5571
5854
|
// "code": "00000",
|
|
@@ -5614,7 +5897,7 @@ export default class bitget extends Exchange {
|
|
|
5614
5897
|
'leverage': leverage,
|
|
5615
5898
|
// 'holdSide': 'long',
|
|
5616
5899
|
};
|
|
5617
|
-
return await this.
|
|
5900
|
+
return await this.privateMixPostMixV1AccountSetLeverage(this.extend(request, params));
|
|
5618
5901
|
}
|
|
5619
5902
|
async setMarginMode(marginMode, symbol = undefined, params = {}) {
|
|
5620
5903
|
/**
|
|
@@ -5645,7 +5928,7 @@ export default class bitget extends Exchange {
|
|
|
5645
5928
|
'marginCoin': market['settleId'],
|
|
5646
5929
|
'marginMode': marginMode,
|
|
5647
5930
|
};
|
|
5648
|
-
return await this.
|
|
5931
|
+
return await this.privateMixPostMixV1AccountSetMarginMode(this.extend(request, params));
|
|
5649
5932
|
}
|
|
5650
5933
|
async setPositionMode(hedged, symbol = undefined, params = {}) {
|
|
5651
5934
|
/**
|
|
@@ -5676,7 +5959,7 @@ export default class bitget extends Exchange {
|
|
|
5676
5959
|
productType = 'S' + productType;
|
|
5677
5960
|
}
|
|
5678
5961
|
request['productType'] = productType;
|
|
5679
|
-
const response = await this.
|
|
5962
|
+
const response = await this.privateMixPostMixV1AccountSetPositionMode(this.extend(request, params));
|
|
5680
5963
|
//
|
|
5681
5964
|
// {
|
|
5682
5965
|
// "code": "40919",
|
|
@@ -5705,7 +5988,7 @@ export default class bitget extends Exchange {
|
|
|
5705
5988
|
const request = {
|
|
5706
5989
|
'symbol': market['id'],
|
|
5707
5990
|
};
|
|
5708
|
-
const response = await this.
|
|
5991
|
+
const response = await this.publicMixGetMixV1MarketOpenInterest(this.extend(request, params));
|
|
5709
5992
|
//
|
|
5710
5993
|
// {
|
|
5711
5994
|
// "code": "00000",
|
|
@@ -5762,7 +6045,7 @@ export default class bitget extends Exchange {
|
|
|
5762
6045
|
request['limit'] = limit;
|
|
5763
6046
|
}
|
|
5764
6047
|
[request, params] = this.handleUntilOption('after', request, params);
|
|
5765
|
-
const response = await this.
|
|
6048
|
+
const response = await this.privateSpotGetSpotV1AccountTransferRecords(this.extend(request, params));
|
|
5766
6049
|
//
|
|
5767
6050
|
// {
|
|
5768
6051
|
// "code":"00000",
|
|
@@ -5816,7 +6099,7 @@ export default class bitget extends Exchange {
|
|
|
5816
6099
|
'amount': amount,
|
|
5817
6100
|
'coin': currency['info']['coinName'],
|
|
5818
6101
|
};
|
|
5819
|
-
const response = await this.
|
|
6102
|
+
const response = await this.privateSpotPostSpotV1WalletTransferV2(this.extend(request, params));
|
|
5820
6103
|
//
|
|
5821
6104
|
// {
|
|
5822
6105
|
// "code": "00000",
|
|
@@ -5955,7 +6238,7 @@ export default class bitget extends Exchange {
|
|
|
5955
6238
|
* @returns {object} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
5956
6239
|
*/
|
|
5957
6240
|
await this.loadMarkets();
|
|
5958
|
-
const response = await this.
|
|
6241
|
+
const response = await this.publicSpotGetSpotV1PublicCurrencies(params);
|
|
5959
6242
|
const data = this.safeValue(response, 'data');
|
|
5960
6243
|
return this.parseDepositWithdrawFees(data, codes, 'coinName');
|
|
5961
6244
|
}
|
|
@@ -6017,10 +6300,10 @@ export default class bitget extends Exchange {
|
|
|
6017
6300
|
const parts = marketId.split('_');
|
|
6018
6301
|
const marginMarketId = this.safeStringUpper(parts, 0);
|
|
6019
6302
|
request['symbol'] = marginMarketId;
|
|
6020
|
-
response = await this.
|
|
6303
|
+
response = await this.privateMarginPostMarginV1IsolatedAccountBorrow(this.extend(request, params));
|
|
6021
6304
|
}
|
|
6022
6305
|
else {
|
|
6023
|
-
response = await this.
|
|
6306
|
+
response = await this.privateMarginPostMarginV1CrossAccountBorrow(this.extend(request, params));
|
|
6024
6307
|
}
|
|
6025
6308
|
//
|
|
6026
6309
|
// isolated
|
|
@@ -6083,10 +6366,10 @@ export default class bitget extends Exchange {
|
|
|
6083
6366
|
const parts = marketId.split('_');
|
|
6084
6367
|
const marginMarketId = this.safeStringUpper(parts, 0);
|
|
6085
6368
|
request['symbol'] = marginMarketId;
|
|
6086
|
-
response = await this.
|
|
6369
|
+
response = await this.privateMarginPostMarginV1IsolatedAccountRepay(this.extend(request, params));
|
|
6087
6370
|
}
|
|
6088
6371
|
else {
|
|
6089
|
-
response = await this.
|
|
6372
|
+
response = await this.privateMarginPostMarginV1CrossAccountRepay(this.extend(request, params));
|
|
6090
6373
|
}
|
|
6091
6374
|
//
|
|
6092
6375
|
// isolated
|
|
@@ -6217,10 +6500,10 @@ export default class bitget extends Exchange {
|
|
|
6217
6500
|
if (marginMode === 'isolated') {
|
|
6218
6501
|
this.checkRequiredSymbol('fetchMyLiquidations', symbol);
|
|
6219
6502
|
request['symbol'] = market['info']['symbolName'];
|
|
6220
|
-
response = await this.
|
|
6503
|
+
response = await this.privateMarginGetMarginV1IsolatedLiquidationList(this.extend(request, params));
|
|
6221
6504
|
}
|
|
6222
6505
|
else if (marginMode === 'cross') {
|
|
6223
|
-
response = await this.
|
|
6506
|
+
response = await this.privateMarginGetMarginV1CrossLiquidationList(this.extend(request, params));
|
|
6224
6507
|
}
|
|
6225
6508
|
//
|
|
6226
6509
|
// isolated
|
|
@@ -6349,11 +6632,11 @@ export default class bitget extends Exchange {
|
|
|
6349
6632
|
if ((symbol !== undefined) || (marginMode === 'isolated')) {
|
|
6350
6633
|
this.checkRequiredSymbol('fetchBorrowRate', symbol);
|
|
6351
6634
|
request['symbol'] = market['info']['symbolName'];
|
|
6352
|
-
response = await this.
|
|
6635
|
+
response = await this.publicMarginGetMarginV1IsolatedPublicInterestRateAndLimit(this.extend(request, params));
|
|
6353
6636
|
}
|
|
6354
6637
|
else if (marginMode === 'cross') {
|
|
6355
6638
|
request['coin'] = currency['code'];
|
|
6356
|
-
response = await this.
|
|
6639
|
+
response = await this.publicMarginGetMarginV1CrossPublicInterestRateAndLimit(this.extend(request, params));
|
|
6357
6640
|
}
|
|
6358
6641
|
//
|
|
6359
6642
|
// isolated
|
|
@@ -6557,10 +6840,10 @@ export default class bitget extends Exchange {
|
|
|
6557
6840
|
if (marginMode === 'isolated') {
|
|
6558
6841
|
this.checkRequiredSymbol('fetchBorrowInterest', symbol);
|
|
6559
6842
|
request['symbol'] = market['info']['symbolName'];
|
|
6560
|
-
response = await this.
|
|
6843
|
+
response = await this.privateMarginGetMarginV1IsolatedInterestList(this.extend(request, params));
|
|
6561
6844
|
}
|
|
6562
6845
|
else if (marginMode === 'cross') {
|
|
6563
|
-
response = await this.
|
|
6846
|
+
response = await this.privateMarginGetMarginV1CrossInterestList(this.extend(request, params));
|
|
6564
6847
|
}
|
|
6565
6848
|
//
|
|
6566
6849
|
// isolated
|
|
@@ -6706,25 +6989,7 @@ export default class bitget extends Exchange {
|
|
|
6706
6989
|
sign(path, api = [], method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
6707
6990
|
const signed = api[0] === 'private';
|
|
6708
6991
|
const endpoint = api[1];
|
|
6709
|
-
|
|
6710
|
-
if (endpoint === 'spot') {
|
|
6711
|
-
pathPart = '/api/spot/v1';
|
|
6712
|
-
}
|
|
6713
|
-
else if (endpoint === 'mix') {
|
|
6714
|
-
pathPart = '/api/mix/v1';
|
|
6715
|
-
}
|
|
6716
|
-
else if (endpoint === 'user') {
|
|
6717
|
-
pathPart = '/api/user/v1';
|
|
6718
|
-
}
|
|
6719
|
-
else if (endpoint === 'broker') {
|
|
6720
|
-
pathPart = '/api/broker/v1';
|
|
6721
|
-
}
|
|
6722
|
-
else if (endpoint === 'margin') {
|
|
6723
|
-
pathPart = '/api/margin/v1';
|
|
6724
|
-
}
|
|
6725
|
-
else {
|
|
6726
|
-
pathPart = '/api/p2p/v1';
|
|
6727
|
-
}
|
|
6992
|
+
const pathPart = '/api';
|
|
6728
6993
|
const request = '/' + this.implodeParams(path, params);
|
|
6729
6994
|
const payload = pathPart + request;
|
|
6730
6995
|
let url = this.implodeHostname(this.urls['api'][endpoint]) + payload;
|