ccxt 4.4.52__py2.py3-none-any.whl → 4.4.57__py2.py3-none-any.whl
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.
- ccxt/__init__.py +1 -3
- ccxt/abstract/binance.py +0 -1
- ccxt/abstract/binancecoinm.py +0 -1
- ccxt/abstract/binanceus.py +0 -1
- ccxt/abstract/binanceusdm.py +0 -1
- ccxt/ace.py +3 -0
- ccxt/alpaca.py +5 -0
- ccxt/ascendex.py +2 -1
- ccxt/async_support/__init__.py +1 -3
- ccxt/async_support/ace.py +3 -0
- ccxt/async_support/alpaca.py +5 -0
- ccxt/async_support/ascendex.py +2 -1
- ccxt/async_support/base/exchange.py +24 -7
- ccxt/async_support/bigone.py +5 -0
- ccxt/async_support/binance.py +54 -54
- ccxt/async_support/bingx.py +25 -29
- ccxt/async_support/bit2c.py +3 -0
- ccxt/async_support/bitbank.py +3 -0
- ccxt/async_support/bitbns.py +3 -0
- ccxt/async_support/bitfinex.py +6 -1
- ccxt/async_support/bitflyer.py +6 -1
- ccxt/async_support/bitget.py +9 -5
- ccxt/async_support/bithumb.py +3 -1
- ccxt/async_support/bitmart.py +22 -12
- ccxt/async_support/bitmex.py +99 -93
- ccxt/async_support/bitopro.py +7 -2
- ccxt/async_support/bitrue.py +4 -0
- ccxt/async_support/bitso.py +5 -2
- ccxt/async_support/bitstamp.py +3 -0
- ccxt/async_support/bitteam.py +5 -0
- ccxt/async_support/bitvavo.py +4 -0
- ccxt/async_support/blockchaincom.py +4 -0
- ccxt/async_support/blofin.py +3 -0
- ccxt/async_support/btcalpha.py +5 -0
- ccxt/async_support/btcbox.py +3 -2
- ccxt/async_support/btcmarkets.py +5 -0
- ccxt/async_support/btcturk.py +3 -0
- ccxt/async_support/bybit.py +13 -5
- ccxt/async_support/cex.py +2 -0
- ccxt/async_support/coinbase.py +20 -13
- ccxt/async_support/coinbaseexchange.py +5 -0
- ccxt/async_support/coinbaseinternational.py +23 -4
- ccxt/async_support/coincatch.py +3 -0
- ccxt/async_support/coincheck.py +2 -0
- ccxt/async_support/coinex.py +6 -2
- ccxt/async_support/coinlist.py +5 -0
- ccxt/async_support/coinmate.py +4 -0
- ccxt/async_support/coinmetro.py +9 -5
- ccxt/async_support/coinone.py +3 -0
- ccxt/async_support/coinsph.py +4 -0
- ccxt/async_support/coinspot.py +1 -0
- ccxt/async_support/cryptocom.py +5 -0
- ccxt/async_support/currencycom.py +3 -0
- ccxt/async_support/defx.py +5 -0
- ccxt/async_support/delta.py +4 -1
- ccxt/async_support/deribit.py +15 -28
- ccxt/async_support/digifinex.py +10 -5
- ccxt/async_support/ellipx.py +9 -5
- ccxt/async_support/exmo.py +7 -4
- ccxt/async_support/gate.py +5 -1
- ccxt/async_support/gemini.py +3 -0
- ccxt/async_support/hashkey.py +5 -4
- ccxt/async_support/hitbtc.py +6 -2
- ccxt/async_support/hollaex.py +7 -2
- ccxt/async_support/htx.py +8 -1
- ccxt/async_support/huobijp.py +5 -0
- ccxt/async_support/hyperliquid.py +9 -4
- ccxt/async_support/idex.py +5 -1
- ccxt/async_support/independentreserve.py +4 -0
- ccxt/async_support/indodax.py +3 -0
- ccxt/async_support/kraken.py +7 -5
- ccxt/async_support/krakenfutures.py +5 -2
- ccxt/async_support/kucoin.py +13 -6
- ccxt/async_support/kucoinfutures.py +5 -1
- ccxt/async_support/kuna.py +3 -0
- ccxt/async_support/latoken.py +4 -0
- ccxt/async_support/lbank.py +6 -1
- ccxt/async_support/luno.py +6 -1
- ccxt/async_support/mercado.py +4 -0
- ccxt/async_support/mexc.py +10 -9
- ccxt/async_support/ndax.py +6 -1
- ccxt/async_support/novadax.py +5 -0
- ccxt/async_support/oceanex.py +6 -2
- ccxt/async_support/okcoin.py +4 -0
- ccxt/async_support/okx.py +17 -5
- ccxt/async_support/onetrading.py +4 -0
- ccxt/async_support/oxfun.py +3 -0
- ccxt/async_support/p2b.py +3 -0
- ccxt/async_support/paradex.py +8 -2
- ccxt/async_support/phemex.py +10 -4
- ccxt/async_support/poloniex.py +6 -3
- ccxt/async_support/poloniexfutures.py +5 -1
- ccxt/async_support/probit.py +4 -0
- ccxt/async_support/timex.py +4 -0
- ccxt/async_support/tokocrypto.py +5 -0
- ccxt/async_support/tradeogre.py +2 -0
- ccxt/async_support/upbit.py +5 -2
- ccxt/async_support/vertex.py +6 -2
- ccxt/async_support/wavesexchange.py +20 -3
- ccxt/async_support/wazirx.py +2 -0
- ccxt/async_support/whitebit.py +5 -4
- ccxt/async_support/woo.py +15 -5
- ccxt/async_support/woofipro.py +23 -9
- ccxt/async_support/xt.py +5 -0
- ccxt/async_support/yobit.py +5 -2
- ccxt/async_support/zaif.py +2 -0
- ccxt/async_support/zonda.py +2 -0
- ccxt/base/exchange.py +96 -54
- ccxt/base/types.py +1 -1
- ccxt/bigone.py +5 -0
- ccxt/binance.py +54 -54
- ccxt/bingx.py +25 -29
- ccxt/bit2c.py +3 -0
- ccxt/bitbank.py +3 -0
- ccxt/bitbns.py +3 -0
- ccxt/bitfinex.py +6 -1
- ccxt/bitflyer.py +6 -1
- ccxt/bitget.py +9 -5
- ccxt/bithumb.py +3 -1
- ccxt/bitmart.py +22 -12
- ccxt/bitmex.py +99 -93
- ccxt/bitopro.py +7 -2
- ccxt/bitrue.py +4 -0
- ccxt/bitso.py +5 -2
- ccxt/bitstamp.py +3 -0
- ccxt/bitteam.py +5 -0
- ccxt/bitvavo.py +4 -0
- ccxt/blockchaincom.py +4 -0
- ccxt/blofin.py +3 -0
- ccxt/btcalpha.py +5 -0
- ccxt/btcbox.py +3 -2
- ccxt/btcmarkets.py +5 -0
- ccxt/btcturk.py +3 -0
- ccxt/bybit.py +13 -5
- ccxt/cex.py +2 -0
- ccxt/coinbase.py +20 -13
- ccxt/coinbaseexchange.py +5 -0
- ccxt/coinbaseinternational.py +23 -4
- ccxt/coincatch.py +3 -0
- ccxt/coincheck.py +2 -0
- ccxt/coinex.py +6 -2
- ccxt/coinlist.py +5 -0
- ccxt/coinmate.py +4 -0
- ccxt/coinmetro.py +9 -5
- ccxt/coinone.py +3 -0
- ccxt/coinsph.py +4 -0
- ccxt/coinspot.py +1 -0
- ccxt/cryptocom.py +5 -0
- ccxt/currencycom.py +3 -0
- ccxt/defx.py +5 -0
- ccxt/delta.py +4 -1
- ccxt/deribit.py +15 -28
- ccxt/digifinex.py +10 -5
- ccxt/ellipx.py +9 -5
- ccxt/exmo.py +7 -4
- ccxt/gate.py +5 -1
- ccxt/gemini.py +3 -0
- ccxt/hashkey.py +5 -4
- ccxt/hitbtc.py +6 -2
- ccxt/hollaex.py +7 -2
- ccxt/htx.py +8 -1
- ccxt/huobijp.py +5 -0
- ccxt/hyperliquid.py +9 -4
- ccxt/idex.py +5 -1
- ccxt/independentreserve.py +4 -0
- ccxt/indodax.py +3 -0
- ccxt/kraken.py +7 -5
- ccxt/krakenfutures.py +5 -2
- ccxt/kucoin.py +13 -6
- ccxt/kucoinfutures.py +5 -1
- ccxt/kuna.py +3 -0
- ccxt/latoken.py +4 -0
- ccxt/lbank.py +6 -1
- ccxt/luno.py +6 -1
- ccxt/mercado.py +4 -0
- ccxt/mexc.py +10 -9
- ccxt/ndax.py +6 -1
- ccxt/novadax.py +5 -0
- ccxt/oceanex.py +6 -2
- ccxt/okcoin.py +4 -0
- ccxt/okx.py +17 -5
- ccxt/onetrading.py +4 -0
- ccxt/oxfun.py +3 -0
- ccxt/p2b.py +3 -0
- ccxt/paradex.py +8 -2
- ccxt/phemex.py +10 -4
- ccxt/poloniex.py +6 -3
- ccxt/poloniexfutures.py +5 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +2 -2
- ccxt/pro/bitcoincom.py +1 -4
- ccxt/pro/bitget.py +3 -3
- ccxt/pro/bitopro.py +1 -1
- ccxt/pro/bybit.py +7 -2
- ccxt/pro/cex.py +1 -1
- ccxt/pro/coincatch.py +3 -3
- ccxt/pro/mexc.py +3 -3
- ccxt/pro/okx.py +1 -1
- ccxt/probit.py +4 -0
- ccxt/test/tests_async.py +57 -30
- ccxt/test/tests_sync.py +57 -30
- ccxt/timex.py +4 -0
- ccxt/tokocrypto.py +5 -0
- ccxt/tradeogre.py +2 -0
- ccxt/upbit.py +5 -2
- ccxt/vertex.py +6 -2
- ccxt/wavesexchange.py +20 -3
- ccxt/wazirx.py +2 -0
- ccxt/whitebit.py +5 -4
- ccxt/woo.py +15 -5
- ccxt/woofipro.py +23 -9
- ccxt/xt.py +5 -0
- ccxt/yobit.py +5 -2
- ccxt/zaif.py +2 -0
- ccxt/zonda.py +2 -0
- {ccxt-4.4.52.dist-info → ccxt-4.4.57.dist-info}/METADATA +225 -143
- {ccxt-4.4.52.dist-info → ccxt-4.4.57.dist-info}/RECORD +220 -223
- ccxt/abstract/lykke.py +0 -29
- ccxt/async_support/lykke.py +0 -1370
- ccxt/lykke.py +0 -1370
- {ccxt-4.4.52.dist-info → ccxt-4.4.57.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.52.dist-info → ccxt-4.4.57.dist-info}/WHEEL +0 -0
- {ccxt-4.4.52.dist-info → ccxt-4.4.57.dist-info}/top_level.txt +0 -0
ccxt/bitso.py
CHANGED
@@ -227,17 +227,20 @@ class bitso(Exchange, ImplicitAPI):
|
|
227
227
|
'limit': 100,
|
228
228
|
'daysBack': None,
|
229
229
|
'untilDays': None,
|
230
|
+
'symbolRequired': True,
|
230
231
|
},
|
231
232
|
'fetchOrder': {
|
232
233
|
'marginMode': False,
|
233
234
|
'trigger': False,
|
234
235
|
'trailing': False,
|
236
|
+
'symbolRequired': True,
|
235
237
|
},
|
236
238
|
'fetchOpenOrders': {
|
237
239
|
'marginMode': False,
|
238
240
|
'limit': 500,
|
239
241
|
'trigger': False,
|
240
242
|
'trailing': False,
|
243
|
+
'symbolRequired': True,
|
241
244
|
},
|
242
245
|
'fetchOrders': None,
|
243
246
|
'fetchClosedOrders': None,
|
@@ -1064,7 +1067,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1064
1067
|
'id': orderId,
|
1065
1068
|
})
|
1066
1069
|
|
1067
|
-
def cancel_orders(self, ids, symbol: Str = None, params={}):
|
1070
|
+
def cancel_orders(self, ids, symbol: Str = None, params={}) -> List[Order]:
|
1068
1071
|
"""
|
1069
1072
|
cancel multiple orders
|
1070
1073
|
|
@@ -1098,7 +1101,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1098
1101
|
orders.append(self.parse_order(id, market))
|
1099
1102
|
return orders
|
1100
1103
|
|
1101
|
-
def cancel_all_orders(self, symbol: Str = None, params={}):
|
1104
|
+
def cancel_all_orders(self, symbol: Str = None, params={}) -> List[Order]:
|
1102
1105
|
"""
|
1103
1106
|
cancel all open orders
|
1104
1107
|
|
ccxt/bitstamp.py
CHANGED
@@ -537,17 +537,20 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
537
537
|
'limit': 1000,
|
538
538
|
'daysBack': None,
|
539
539
|
'untilDays': 30,
|
540
|
+
'symbolRequired': False,
|
540
541
|
},
|
541
542
|
'fetchOrder': {
|
542
543
|
'marginMode': False,
|
543
544
|
'trigger': False,
|
544
545
|
'trailing': False,
|
546
|
+
'symbolRequired': False,
|
545
547
|
},
|
546
548
|
'fetchOpenOrders': {
|
547
549
|
'marginMode': False,
|
548
550
|
'limit': None,
|
549
551
|
'trigger': False,
|
550
552
|
'trailing': False,
|
553
|
+
'symbolRequired': False,
|
551
554
|
},
|
552
555
|
'fetchOrders': None,
|
553
556
|
'fetchClosedOrders': None,
|
ccxt/bitteam.py
CHANGED
@@ -258,17 +258,20 @@ class bitteam(Exchange, ImplicitAPI):
|
|
258
258
|
'limit': 100,
|
259
259
|
'daysBack': 100000,
|
260
260
|
'untilDays': 100000,
|
261
|
+
'symbolRequired': False,
|
261
262
|
},
|
262
263
|
'fetchOrder': {
|
263
264
|
'marginMode': False,
|
264
265
|
'trigger': False,
|
265
266
|
'trailing': False,
|
267
|
+
'symbolRequired': False,
|
266
268
|
},
|
267
269
|
'fetchOpenOrders': {
|
268
270
|
'marginMode': False,
|
269
271
|
'limit': 100,
|
270
272
|
'trigger': False,
|
271
273
|
'trailing': False,
|
274
|
+
'symbolRequired': False,
|
272
275
|
},
|
273
276
|
'fetchOrders': {
|
274
277
|
'marginMode': True,
|
@@ -277,6 +280,7 @@ class bitteam(Exchange, ImplicitAPI):
|
|
277
280
|
'untilDays': None,
|
278
281
|
'trigger': False,
|
279
282
|
'trailing': False,
|
283
|
+
'symbolRequired': False,
|
280
284
|
},
|
281
285
|
'fetchClosedOrders': {
|
282
286
|
'marginMode': False,
|
@@ -286,6 +290,7 @@ class bitteam(Exchange, ImplicitAPI):
|
|
286
290
|
'untilDays': None,
|
287
291
|
'trigger': False,
|
288
292
|
'trailing': False,
|
293
|
+
'symbolRequired': False,
|
289
294
|
},
|
290
295
|
'fetchOHLCV': {
|
291
296
|
'limit': 1000,
|
ccxt/bitvavo.py
CHANGED
@@ -243,17 +243,20 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
243
243
|
'limit': 1000,
|
244
244
|
'daysBack': 100000,
|
245
245
|
'untilDays': 100000,
|
246
|
+
'symbolRequired': True,
|
246
247
|
},
|
247
248
|
'fetchOrder': {
|
248
249
|
'marginMode': False,
|
249
250
|
'trigger': False,
|
250
251
|
'trailing': False,
|
252
|
+
'symbolRequired': True,
|
251
253
|
},
|
252
254
|
'fetchOpenOrders': {
|
253
255
|
'marginMode': False,
|
254
256
|
'limit': None,
|
255
257
|
'trigger': False,
|
256
258
|
'trailing': False,
|
259
|
+
'symbolRequired': True,
|
257
260
|
},
|
258
261
|
'fetchOrders': {
|
259
262
|
'marginMode': True,
|
@@ -262,6 +265,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
262
265
|
'untilDays': 100000,
|
263
266
|
'trigger': False,
|
264
267
|
'trailing': False,
|
268
|
+
'symbolRequired': True,
|
265
269
|
},
|
266
270
|
'fetchClosedOrders': None,
|
267
271
|
'fetchOHLCV': {
|
ccxt/blockchaincom.py
CHANGED
@@ -250,10 +250,12 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
250
250
|
'limit': 1000,
|
251
251
|
'daysBack': 100000, # todo implementation
|
252
252
|
'untilDays': 100000, # todo implementation
|
253
|
+
'symbolRequired': False,
|
253
254
|
},
|
254
255
|
'fetchOrder': {
|
255
256
|
'marginMode': False,
|
256
257
|
'trigger': False,
|
258
|
+
'symbolRequired': False,
|
257
259
|
'trailing': False,
|
258
260
|
},
|
259
261
|
'fetchOpenOrders': {
|
@@ -261,6 +263,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
261
263
|
'limit': 1000,
|
262
264
|
'trigger': False,
|
263
265
|
'trailing': False,
|
266
|
+
'symbolRequired': False,
|
264
267
|
},
|
265
268
|
'fetchOrders': None, # todo implement
|
266
269
|
'fetchClosedOrders': {
|
@@ -271,6 +274,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
271
274
|
'untilDays': 100000,
|
272
275
|
'trigger': False,
|
273
276
|
'trailing': False,
|
277
|
+
'symbolRequired': False,
|
274
278
|
},
|
275
279
|
'fetchOHLCV': None, # todo webapi
|
276
280
|
},
|
ccxt/blofin.py
CHANGED
@@ -279,6 +279,7 @@ class blofin(Exchange, ImplicitAPI):
|
|
279
279
|
'limit': 100,
|
280
280
|
'daysBack': 100000,
|
281
281
|
'untilDays': 100000,
|
282
|
+
'symbolRequired': False,
|
282
283
|
},
|
283
284
|
'fetchOrder': None,
|
284
285
|
'fetchOpenOrders': {
|
@@ -286,6 +287,7 @@ class blofin(Exchange, ImplicitAPI):
|
|
286
287
|
'limit': 100,
|
287
288
|
'trigger': True,
|
288
289
|
'trailing': False,
|
290
|
+
'symbolRequired': False,
|
289
291
|
},
|
290
292
|
'fetchOrders': None,
|
291
293
|
'fetchClosedOrders': {
|
@@ -296,6 +298,7 @@ class blofin(Exchange, ImplicitAPI):
|
|
296
298
|
'untilDays': 100000,
|
297
299
|
'trigger': True,
|
298
300
|
'trailing': False,
|
301
|
+
'symbolRequired': False,
|
299
302
|
},
|
300
303
|
'fetchOHLCV': {
|
301
304
|
'limit': 1440,
|
ccxt/btcalpha.py
CHANGED
@@ -181,17 +181,20 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
181
181
|
'limit': 100,
|
182
182
|
'daysBack': None,
|
183
183
|
'untilDays': None,
|
184
|
+
'symbolRequired': False,
|
184
185
|
},
|
185
186
|
'fetchOrder': {
|
186
187
|
'marginMode': False,
|
187
188
|
'trigger': False,
|
188
189
|
'trailing': False,
|
190
|
+
'symbolRequired': False,
|
189
191
|
},
|
190
192
|
'fetchOpenOrders': {
|
191
193
|
'marginMode': False,
|
192
194
|
'limit': 2000,
|
193
195
|
'trigger': False,
|
194
196
|
'trailing': False,
|
197
|
+
'symbolRequired': False,
|
195
198
|
},
|
196
199
|
'fetchOrders': {
|
197
200
|
'marginMode': False,
|
@@ -200,6 +203,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
200
203
|
'untilDays': None,
|
201
204
|
'trigger': False,
|
202
205
|
'trailing': False,
|
206
|
+
'symbolRequired': False,
|
203
207
|
},
|
204
208
|
'fetchClosedOrders': {
|
205
209
|
'marginMode': False,
|
@@ -209,6 +213,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
209
213
|
'untilDays': None,
|
210
214
|
'trigger': False,
|
211
215
|
'trailing': False,
|
216
|
+
'symbolRequired': False,
|
212
217
|
},
|
213
218
|
'fetchOHLCV': {
|
214
219
|
'max': 720,
|
ccxt/btcbox.py
CHANGED
@@ -147,12 +147,14 @@ class btcbox(Exchange, ImplicitAPI):
|
|
147
147
|
'marginMode': False,
|
148
148
|
'trigger': False,
|
149
149
|
'trailing': False,
|
150
|
+
'symbolRequired': True,
|
150
151
|
},
|
151
152
|
'fetchOpenOrders': {
|
152
153
|
'marginMode': False,
|
153
154
|
'limit': 100,
|
154
155
|
'trigger': False,
|
155
156
|
'trailing': False,
|
157
|
+
'symbolRequired': True,
|
156
158
|
},
|
157
159
|
'fetchOrders': {
|
158
160
|
'marginMode': False,
|
@@ -161,6 +163,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
161
163
|
'untilDays': None,
|
162
164
|
'trigger': False,
|
163
165
|
'trailing': False,
|
166
|
+
'symbolRequired': True,
|
164
167
|
},
|
165
168
|
'fetchClosedOrders': None,
|
166
169
|
'fetchOHLCV': None,
|
@@ -652,8 +655,6 @@ class btcbox(Exchange, ImplicitAPI):
|
|
652
655
|
def fetch_orders_by_type(self, type, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
653
656
|
self.load_markets()
|
654
657
|
# a special case for btcbox – default symbol is BTC/JPY
|
655
|
-
if symbol is None:
|
656
|
-
symbol = 'BTC/JPY'
|
657
658
|
market = self.market(symbol)
|
658
659
|
request: dict = {
|
659
660
|
'type': type, # 'open' or 'all'
|
ccxt/btcmarkets.py
CHANGED
@@ -190,17 +190,20 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
190
190
|
'limit': 100,
|
191
191
|
'daysBack': 100000,
|
192
192
|
'untilDays': 100000,
|
193
|
+
'symbolRequired': True,
|
193
194
|
},
|
194
195
|
'fetchOrder': {
|
195
196
|
'marginMode': False,
|
196
197
|
'trigger': False,
|
197
198
|
'trailing': False,
|
199
|
+
'symbolRequired': False,
|
198
200
|
},
|
199
201
|
'fetchOpenOrders': {
|
200
202
|
'marginMode': False,
|
201
203
|
'limit': 100,
|
202
204
|
'trigger': False,
|
203
205
|
'trailing': False,
|
206
|
+
'symbolRequired': False,
|
204
207
|
},
|
205
208
|
'fetchOrders': {
|
206
209
|
'marginMode': False,
|
@@ -209,6 +212,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
209
212
|
'untilDays': 100000,
|
210
213
|
'trigger': False,
|
211
214
|
'trailing': False,
|
215
|
+
'symbolRequired': False,
|
212
216
|
},
|
213
217
|
'fetchClosedOrders': {
|
214
218
|
'marginMode': False,
|
@@ -218,6 +222,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
218
222
|
'untilDays': 100000,
|
219
223
|
'trigger': False,
|
220
224
|
'trailing': False,
|
225
|
+
'symbolRequired': False,
|
221
226
|
},
|
222
227
|
'fetchOHLCV': {
|
223
228
|
'limit': 1000,
|
ccxt/btcturk.py
CHANGED
@@ -167,6 +167,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
167
167
|
'limit': 100,
|
168
168
|
'daysBack': 100000,
|
169
169
|
'untilDays': 30,
|
170
|
+
'symbolRequired': True,
|
170
171
|
},
|
171
172
|
'fetchOrder': None,
|
172
173
|
'fetchOpenOrders': {
|
@@ -174,6 +175,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
174
175
|
'limit': None,
|
175
176
|
'trigger': False,
|
176
177
|
'trailing': False,
|
178
|
+
'symbolRequired': True,
|
177
179
|
},
|
178
180
|
'fetchOrders': {
|
179
181
|
'marginMode': False,
|
@@ -182,6 +184,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
182
184
|
'untilDays': 30,
|
183
185
|
'trigger': False,
|
184
186
|
'trailing': False,
|
187
|
+
'symbolRequired': True,
|
185
188
|
},
|
186
189
|
'fetchClosedOrders': None,
|
187
190
|
'fetchOHLCV': {
|
ccxt/bybit.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bybit import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, BorrowInterest, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, Greeks, Int, LedgerEntry, Leverage, LeverageTier, LeverageTiers, LongShortRatio, Market,
|
9
|
+
from ccxt.base.types import Balances, BorrowInterest, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, Greeks, Int, LedgerEntry, Leverage, LeverageTier, LeverageTiers, LongShortRatio, Market, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, MarketInterface, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -1210,17 +1210,20 @@ class bybit(Exchange, ImplicitAPI):
|
|
1210
1210
|
'limit': 100,
|
1211
1211
|
'daysBack': 365 * 2, # 2 years
|
1212
1212
|
'untilDays': 7, # days between start-end
|
1213
|
+
'symbolRequired': False,
|
1213
1214
|
},
|
1214
1215
|
'fetchOrder': {
|
1215
1216
|
'marginMode': False,
|
1216
1217
|
'trigger': True,
|
1217
1218
|
'trailing': False,
|
1219
|
+
'symbolRequired': True,
|
1218
1220
|
},
|
1219
1221
|
'fetchOpenOrders': {
|
1220
1222
|
'marginMode': False,
|
1221
1223
|
'limit': 50,
|
1222
1224
|
'trigger': True,
|
1223
1225
|
'trailing': False,
|
1226
|
+
'symbolRequired': False,
|
1224
1227
|
},
|
1225
1228
|
'fetchOrders': None,
|
1226
1229
|
'fetchClosedOrders': {
|
@@ -1231,6 +1234,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1231
1234
|
'untilDays': 7,
|
1232
1235
|
'trigger': True,
|
1233
1236
|
'trailing': False,
|
1237
|
+
'symbolRequired': False,
|
1234
1238
|
},
|
1235
1239
|
'fetchOHLCV': {
|
1236
1240
|
'limit': 1000,
|
@@ -1516,6 +1520,8 @@ class bybit(Exchange, ImplicitAPI):
|
|
1516
1520
|
return amountString
|
1517
1521
|
|
1518
1522
|
def get_price(self, symbol: str, price: str):
|
1523
|
+
if price is None:
|
1524
|
+
return price
|
1519
1525
|
market = self.market(symbol)
|
1520
1526
|
emptyPrecisionPrice = (market['precision']['price'] is None)
|
1521
1527
|
if not emptyPrecisionPrice:
|
@@ -1720,7 +1726,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1720
1726
|
derivativeMarkets = self.array_concat(futureMarkets, optionMarkets)
|
1721
1727
|
return self.array_concat(spotMarkets, derivativeMarkets)
|
1722
1728
|
|
1723
|
-
def fetch_spot_markets(self, params):
|
1729
|
+
def fetch_spot_markets(self, params) -> List[Market]:
|
1724
1730
|
request: dict = {
|
1725
1731
|
'category': 'spot',
|
1726
1732
|
}
|
@@ -1835,7 +1841,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1835
1841
|
}))
|
1836
1842
|
return result
|
1837
1843
|
|
1838
|
-
def fetch_future_markets(self, params):
|
1844
|
+
def fetch_future_markets(self, params) -> List[Market]:
|
1839
1845
|
params = self.extend(params)
|
1840
1846
|
params['limit'] = 1000 # minimize number of requests
|
1841
1847
|
preLaunchMarkets = []
|
@@ -2017,7 +2023,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
2017
2023
|
}))
|
2018
2024
|
return result
|
2019
2025
|
|
2020
|
-
def fetch_option_markets(self, params):
|
2026
|
+
def fetch_option_markets(self, params) -> List[Market]:
|
2021
2027
|
request: dict = {
|
2022
2028
|
'category': 'option',
|
2023
2029
|
}
|
@@ -6482,7 +6488,7 @@ classic accounts only/ spot not supported* fetches information on an order made
|
|
6482
6488
|
:returns: An array of open interest structures
|
6483
6489
|
"""
|
6484
6490
|
if timeframe == '1m':
|
6485
|
-
raise BadRequest(self.id + 'fetchOpenInterestHistory cannot use the 1m timeframe')
|
6491
|
+
raise BadRequest(self.id + ' fetchOpenInterestHistory cannot use the 1m timeframe')
|
6486
6492
|
self.load_markets()
|
6487
6493
|
paginate = self.safe_bool(params, 'paginate')
|
6488
6494
|
if paginate:
|
@@ -8698,6 +8704,8 @@ classic accounts only/ spot not supported* fetches information on an order made
|
|
8698
8704
|
feedback = self.id + ' private api uses /user/v3/private/query-api to check if you have a unified account. The API key of user id must own one of permissions: "Account Transfer", "Subaccount Transfer", "Withdrawal" ' + body
|
8699
8705
|
else:
|
8700
8706
|
feedback = self.id + ' ' + body
|
8707
|
+
if body.find('Withdraw address chain or destination tag are not equal'):
|
8708
|
+
feedback = feedback + '; You might also need to ensure the address is whitelisted'
|
8701
8709
|
self.throw_broadly_matched_exception(self.exceptions['broad'], body, feedback)
|
8702
8710
|
self.throw_exactly_matched_exception(self.exceptions['exact'], errorCode, feedback)
|
8703
8711
|
raise ExchangeError(feedback) # unknown message
|
ccxt/cex.py
CHANGED
@@ -151,6 +151,7 @@ class cex(Exchange, ImplicitAPI):
|
|
151
151
|
'limit': 1000,
|
152
152
|
'trigger': False,
|
153
153
|
'trailing': False,
|
154
|
+
'symbolRequired': False,
|
154
155
|
},
|
155
156
|
'fetchOrders': None,
|
156
157
|
'fetchClosedOrders': {
|
@@ -161,6 +162,7 @@ class cex(Exchange, ImplicitAPI):
|
|
161
162
|
'untilDays': 100000,
|
162
163
|
'trigger': False,
|
163
164
|
'trailing': False,
|
165
|
+
'symbolRequired': False,
|
164
166
|
},
|
165
167
|
'fetchOHLCV': {
|
166
168
|
'limit': 1000,
|
ccxt/coinbase.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinbase import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Conversion, Currencies, Currency, DepositAddress, Int, LedgerEntry, Market,
|
9
|
+
from ccxt.base.types import Account, Balances, Conversion, Currencies, Currency, DepositAddress, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, MarketInterface
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -417,17 +417,20 @@ class coinbase(Exchange, ImplicitAPI):
|
|
417
417
|
'limit': 3000,
|
418
418
|
'daysBack': None,
|
419
419
|
'untilDays': 10000,
|
420
|
+
'symbolRequired': False,
|
420
421
|
},
|
421
422
|
'fetchOrder': {
|
422
423
|
'marginMode': False,
|
423
424
|
'trigger': False,
|
424
425
|
'trailing': False,
|
426
|
+
'symbolRequired': False,
|
425
427
|
},
|
426
428
|
'fetchOpenOrders': {
|
427
429
|
'marginMode': False,
|
428
430
|
'limit': None,
|
429
431
|
'trigger': False,
|
430
432
|
'trailing': False,
|
433
|
+
'symbolRequired': False,
|
431
434
|
},
|
432
435
|
'fetchOrders': {
|
433
436
|
'marginMode': False,
|
@@ -436,6 +439,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
436
439
|
'untilDays': 10000,
|
437
440
|
'trigger': False,
|
438
441
|
'trailing': False,
|
442
|
+
'symbolRequired': False,
|
439
443
|
},
|
440
444
|
'fetchClosedOrders': {
|
441
445
|
'marginMode': False,
|
@@ -445,9 +449,10 @@ class coinbase(Exchange, ImplicitAPI):
|
|
445
449
|
'untilDays': 10000,
|
446
450
|
'trigger': False,
|
447
451
|
'trailing': False,
|
452
|
+
'symbolRequired': False,
|
448
453
|
},
|
449
454
|
'fetchOHLCV': {
|
450
|
-
'limit':
|
455
|
+
'limit': 300,
|
451
456
|
},
|
452
457
|
},
|
453
458
|
'spot': {
|
@@ -748,7 +753,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
748
753
|
accountId = account['id']
|
749
754
|
break
|
750
755
|
if accountId is None:
|
751
|
-
raise ExchangeError(self.id + ' createDepositAddress() could not find the account with matching currency code, specify an `account_id` extra param')
|
756
|
+
raise ExchangeError(self.id + ' createDepositAddress() could not find the account with matching currency code ' + code + ', specify an `account_id` extra param to target specific wallet')
|
752
757
|
request: dict = {
|
753
758
|
'account_id': accountId,
|
754
759
|
}
|
@@ -1264,7 +1269,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1264
1269
|
return self.fetch_markets_v3(params)
|
1265
1270
|
return self.fetch_markets_v2(params)
|
1266
1271
|
|
1267
|
-
def fetch_markets_v2(self, params={}):
|
1272
|
+
def fetch_markets_v2(self, params={}) -> List[Market]:
|
1268
1273
|
response = self.fetch_currencies_from_cache(params)
|
1269
1274
|
currencies = self.safe_dict(response, 'currencies', {})
|
1270
1275
|
exchangeRates = self.safe_dict(response, 'exchangeRates', {})
|
@@ -1283,7 +1288,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1283
1288
|
quoteCurrency = data[j]
|
1284
1289
|
quoteId = self.safe_string(quoteCurrency, 'id')
|
1285
1290
|
quote = self.safe_currency_code(quoteId)
|
1286
|
-
result.append({
|
1291
|
+
result.append(self.safe_market_structure({
|
1287
1292
|
'id': baseId + '-' + quoteId,
|
1288
1293
|
'symbol': base + '/' + quote,
|
1289
1294
|
'base': base,
|
@@ -1330,10 +1335,10 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1330
1335
|
},
|
1331
1336
|
},
|
1332
1337
|
'info': quoteCurrency,
|
1333
|
-
})
|
1338
|
+
}))
|
1334
1339
|
return result
|
1335
1340
|
|
1336
|
-
def fetch_markets_v3(self, params={}):
|
1341
|
+
def fetch_markets_v3(self, params={}) -> List[Market]:
|
1337
1342
|
usePrivate = False
|
1338
1343
|
usePrivate, params = self.handle_option_and_params(params, 'fetchMarkets', 'usePrivate', False)
|
1339
1344
|
spotUnresolvedPromises = []
|
@@ -1911,7 +1916,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1911
1916
|
return self.fetch_tickers_v3(symbols, params)
|
1912
1917
|
return self.fetch_tickers_v2(symbols, params)
|
1913
1918
|
|
1914
|
-
def fetch_tickers_v2(self, symbols: Strings = None, params={}):
|
1919
|
+
def fetch_tickers_v2(self, symbols: Strings = None, params={}) -> Tickers:
|
1915
1920
|
self.load_markets()
|
1916
1921
|
symbols = self.market_symbols(symbols)
|
1917
1922
|
request: dict = {
|
@@ -1944,7 +1949,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1944
1949
|
result[symbol] = self.parse_ticker(rates[baseId], market)
|
1945
1950
|
return self.filter_by_array_tickers(result, 'symbol', symbols)
|
1946
1951
|
|
1947
|
-
def fetch_tickers_v3(self, symbols: Strings = None, params={}):
|
1952
|
+
def fetch_tickers_v3(self, symbols: Strings = None, params={}) -> Tickers:
|
1948
1953
|
self.load_markets()
|
1949
1954
|
symbols = self.market_symbols(symbols)
|
1950
1955
|
request: dict = {}
|
@@ -3933,7 +3938,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
3933
3938
|
self.load_markets()
|
3934
3939
|
currency = self.currency(code)
|
3935
3940
|
request = None
|
3936
|
-
request, params = self.prepare_account_request_with_currency_code(currency['code'])
|
3941
|
+
request, params = self.prepare_account_request_with_currency_code(currency['code'], None, params)
|
3937
3942
|
response = self.v2PrivateGetAccountsAccountIdAddresses(self.extend(request, params))
|
3938
3943
|
#
|
3939
3944
|
# {
|
@@ -4043,12 +4048,14 @@ class coinbase(Exchange, ImplicitAPI):
|
|
4043
4048
|
networkId = self.safe_string(depositAddress, 'network')
|
4044
4049
|
code = self.safe_currency_code(None, currency)
|
4045
4050
|
addressLabel = self.safe_string(depositAddress, 'address_label')
|
4046
|
-
|
4047
|
-
|
4051
|
+
currencyId = None
|
4052
|
+
if addressLabel is not None:
|
4053
|
+
splitAddressLabel = addressLabel.split(' ')
|
4054
|
+
currencyId = self.safe_string(splitAddressLabel, 0)
|
4048
4055
|
addressInfo = self.safe_dict(depositAddress, 'address_info')
|
4049
4056
|
return {
|
4050
4057
|
'info': depositAddress,
|
4051
|
-
'currency': self.safe_currency_code(
|
4058
|
+
'currency': self.safe_currency_code(currencyId, currency),
|
4052
4059
|
'network': self.network_id_to_code(networkId, code),
|
4053
4060
|
'address': address,
|
4054
4061
|
'tag': self.safe_string(addressInfo, 'destination_tag'),
|
ccxt/coinbaseexchange.py
CHANGED
@@ -256,17 +256,20 @@ class coinbaseexchange(Exchange, ImplicitAPI):
|
|
256
256
|
'limit': 100,
|
257
257
|
'daysBack': 100000,
|
258
258
|
'untilDays': 100000,
|
259
|
+
'symbolRequired': True,
|
259
260
|
},
|
260
261
|
'fetchOrder': {
|
261
262
|
'marginMode': False,
|
262
263
|
'trigger': False,
|
263
264
|
'trailing': False,
|
265
|
+
'symbolRequired': False,
|
264
266
|
},
|
265
267
|
'fetchOpenOrders': {
|
266
268
|
'marginMode': False,
|
267
269
|
'limit': 100,
|
268
270
|
'trigger': False,
|
269
271
|
'trailing': False,
|
272
|
+
'symbolRequired': False,
|
270
273
|
},
|
271
274
|
'fetchOrders': {
|
272
275
|
'marginMode': False,
|
@@ -275,6 +278,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
|
|
275
278
|
'untilDays': 100000,
|
276
279
|
'trigger': False,
|
277
280
|
'trailing': False,
|
281
|
+
'symbolRequired': False,
|
278
282
|
},
|
279
283
|
'fetchClosedOrders': {
|
280
284
|
'marginMode': False,
|
@@ -284,6 +288,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
|
|
284
288
|
'untilDays': 100000,
|
285
289
|
'trigger': False,
|
286
290
|
'trailing': False,
|
291
|
+
'symbolRequired': False,
|
287
292
|
},
|
288
293
|
'fetchOHLCV': {
|
289
294
|
'limit': 300,
|
ccxt/coinbaseinternational.py
CHANGED
@@ -296,17 +296,20 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
296
296
|
'limit': 100,
|
297
297
|
'daysBack': None,
|
298
298
|
'untilDays': 10000,
|
299
|
+
'symbolRequired': False,
|
299
300
|
},
|
300
301
|
'fetchOrder': {
|
301
302
|
'marginMode': False,
|
302
303
|
'trigger': False,
|
303
304
|
'trailing': False,
|
305
|
+
'symbolRequired': False,
|
304
306
|
},
|
305
307
|
'fetchOpenOrders': {
|
306
308
|
'marginMode': False,
|
307
309
|
'limit': 100,
|
308
310
|
'trigger': False,
|
309
311
|
'trailing': False,
|
312
|
+
'symbolRequired': False,
|
310
313
|
},
|
311
314
|
'fetchOrders': None,
|
312
315
|
'fetchClosedOrders': None,
|
@@ -797,7 +800,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
797
800
|
currency = self.currency(code)
|
798
801
|
networks = self.safe_dict(currency, 'networks')
|
799
802
|
if networks is not None:
|
800
|
-
return
|
803
|
+
return False
|
801
804
|
request: dict = {
|
802
805
|
'asset': currency['id'],
|
803
806
|
}
|
@@ -805,7 +808,23 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
805
808
|
#
|
806
809
|
# [
|
807
810
|
# {
|
808
|
-
# "asset_id"
|
811
|
+
# "asset_id":"1",
|
812
|
+
# "asset_uuid":"2b92315d-eab7-5bef-84fa-089a131333f5",
|
813
|
+
# "asset_name":"USDC",
|
814
|
+
# "network_arn_id":"networks/ethereum-mainnet/assets/9bc140b4-69c3-5fc9-bd0d-b041bcf40039",
|
815
|
+
# "min_withdrawal_amt":"1",
|
816
|
+
# "max_withdrawal_amt":"100000000",
|
817
|
+
# "network_confirms":35,
|
818
|
+
# "processing_time":485,
|
819
|
+
# "is_default":true,
|
820
|
+
# "network_name":"ethereum",
|
821
|
+
# "display_name":"Ethereum"
|
822
|
+
# },
|
823
|
+
# ....
|
824
|
+
# ]
|
825
|
+
#
|
826
|
+
currency['networks'] = self.parse_networks(rawNetworks)
|
827
|
+
return True
|
809
828
|
|
810
829
|
def parse_networks(self, networks, params={}):
|
811
830
|
result: dict = {}
|
@@ -1665,7 +1684,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
1665
1684
|
request['type'] = typeId
|
1666
1685
|
if type == 'limit':
|
1667
1686
|
if price is None:
|
1668
|
-
raise InvalidOrder(self.id + 'createOrder() requires a price parameter for a limit order types')
|
1687
|
+
raise InvalidOrder(self.id + ' createOrder() requires a price parameter for a limit order types')
|
1669
1688
|
request['price'] = price
|
1670
1689
|
portfolio = None
|
1671
1690
|
portfolio, params = self.handle_portfolio_and_params('createOrder', params)
|
@@ -1676,7 +1695,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
1676
1695
|
# market orders must be IOC
|
1677
1696
|
if typeId == 'MARKET':
|
1678
1697
|
if tif is not None and tif != 'IOC':
|
1679
|
-
raise InvalidOrder(self.id + 'createOrder() market orders must have tif set to "IOC"')
|
1698
|
+
raise InvalidOrder(self.id + ' createOrder() market orders must have tif set to "IOC"')
|
1680
1699
|
tif = 'IOC'
|
1681
1700
|
else:
|
1682
1701
|
tif = 'GTC' if (tif is None) else tif
|