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/async_support/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
|
-
async def cancel_orders(self, ids, symbol: Str = None, params={}):
|
1070
|
+
async 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
|
-
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
1104
|
+
async def cancel_all_orders(self, symbol: Str = None, params={}) -> List[Order]:
|
1102
1105
|
"""
|
1103
1106
|
cancel all open orders
|
1104
1107
|
|
ccxt/async_support/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/async_support/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/async_support/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': {
|
@@ -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/async_support/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/async_support/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/async_support/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
|
async def fetch_orders_by_type(self, type, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
653
656
|
await 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/async_support/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/async_support/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/async_support/bybit.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.bybit import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Balances, BorrowInterest, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, Greeks, Int, LedgerEntry, Leverage, LeverageTier, LeverageTiers, LongShortRatio, Market,
|
10
|
+
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
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -1211,17 +1211,20 @@ class bybit(Exchange, ImplicitAPI):
|
|
1211
1211
|
'limit': 100,
|
1212
1212
|
'daysBack': 365 * 2, # 2 years
|
1213
1213
|
'untilDays': 7, # days between start-end
|
1214
|
+
'symbolRequired': False,
|
1214
1215
|
},
|
1215
1216
|
'fetchOrder': {
|
1216
1217
|
'marginMode': False,
|
1217
1218
|
'trigger': True,
|
1218
1219
|
'trailing': False,
|
1220
|
+
'symbolRequired': True,
|
1219
1221
|
},
|
1220
1222
|
'fetchOpenOrders': {
|
1221
1223
|
'marginMode': False,
|
1222
1224
|
'limit': 50,
|
1223
1225
|
'trigger': True,
|
1224
1226
|
'trailing': False,
|
1227
|
+
'symbolRequired': False,
|
1225
1228
|
},
|
1226
1229
|
'fetchOrders': None,
|
1227
1230
|
'fetchClosedOrders': {
|
@@ -1232,6 +1235,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1232
1235
|
'untilDays': 7,
|
1233
1236
|
'trigger': True,
|
1234
1237
|
'trailing': False,
|
1238
|
+
'symbolRequired': False,
|
1235
1239
|
},
|
1236
1240
|
'fetchOHLCV': {
|
1237
1241
|
'limit': 1000,
|
@@ -1517,6 +1521,8 @@ class bybit(Exchange, ImplicitAPI):
|
|
1517
1521
|
return amountString
|
1518
1522
|
|
1519
1523
|
def get_price(self, symbol: str, price: str):
|
1524
|
+
if price is None:
|
1525
|
+
return price
|
1520
1526
|
market = self.market(symbol)
|
1521
1527
|
emptyPrecisionPrice = (market['precision']['price'] is None)
|
1522
1528
|
if not emptyPrecisionPrice:
|
@@ -1721,7 +1727,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1721
1727
|
derivativeMarkets = self.array_concat(futureMarkets, optionMarkets)
|
1722
1728
|
return self.array_concat(spotMarkets, derivativeMarkets)
|
1723
1729
|
|
1724
|
-
async def fetch_spot_markets(self, params):
|
1730
|
+
async def fetch_spot_markets(self, params) -> List[Market]:
|
1725
1731
|
request: dict = {
|
1726
1732
|
'category': 'spot',
|
1727
1733
|
}
|
@@ -1836,7 +1842,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1836
1842
|
}))
|
1837
1843
|
return result
|
1838
1844
|
|
1839
|
-
async def fetch_future_markets(self, params):
|
1845
|
+
async def fetch_future_markets(self, params) -> List[Market]:
|
1840
1846
|
params = self.extend(params)
|
1841
1847
|
params['limit'] = 1000 # minimize number of requests
|
1842
1848
|
preLaunchMarkets = []
|
@@ -2018,7 +2024,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
2018
2024
|
}))
|
2019
2025
|
return result
|
2020
2026
|
|
2021
|
-
async def fetch_option_markets(self, params):
|
2027
|
+
async def fetch_option_markets(self, params) -> List[Market]:
|
2022
2028
|
request: dict = {
|
2023
2029
|
'category': 'option',
|
2024
2030
|
}
|
@@ -6483,7 +6489,7 @@ classic accounts only/ spot not supported* fetches information on an order made
|
|
6483
6489
|
:returns: An array of open interest structures
|
6484
6490
|
"""
|
6485
6491
|
if timeframe == '1m':
|
6486
|
-
raise BadRequest(self.id + 'fetchOpenInterestHistory cannot use the 1m timeframe')
|
6492
|
+
raise BadRequest(self.id + ' fetchOpenInterestHistory cannot use the 1m timeframe')
|
6487
6493
|
await self.load_markets()
|
6488
6494
|
paginate = self.safe_bool(params, 'paginate')
|
6489
6495
|
if paginate:
|
@@ -8699,6 +8705,8 @@ classic accounts only/ spot not supported* fetches information on an order made
|
|
8699
8705
|
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
|
8700
8706
|
else:
|
8701
8707
|
feedback = self.id + ' ' + body
|
8708
|
+
if body.find('Withdraw address chain or destination tag are not equal'):
|
8709
|
+
feedback = feedback + '; You might also need to ensure the address is whitelisted'
|
8702
8710
|
self.throw_broadly_matched_exception(self.exceptions['broad'], body, feedback)
|
8703
8711
|
self.throw_exactly_matched_exception(self.exceptions['exact'], errorCode, feedback)
|
8704
8712
|
raise ExchangeError(feedback) # unknown message
|
ccxt/async_support/cex.py
CHANGED
@@ -152,6 +152,7 @@ class cex(Exchange, ImplicitAPI):
|
|
152
152
|
'limit': 1000,
|
153
153
|
'trigger': False,
|
154
154
|
'trailing': False,
|
155
|
+
'symbolRequired': False,
|
155
156
|
},
|
156
157
|
'fetchOrders': None,
|
157
158
|
'fetchClosedOrders': {
|
@@ -162,6 +163,7 @@ class cex(Exchange, ImplicitAPI):
|
|
162
163
|
'untilDays': 100000,
|
163
164
|
'trigger': False,
|
164
165
|
'trailing': False,
|
166
|
+
'symbolRequired': False,
|
165
167
|
},
|
166
168
|
'fetchOHLCV': {
|
167
169
|
'limit': 1000,
|
ccxt/async_support/coinbase.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.coinbase import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Account, Balances, Conversion, Currencies, Currency, DepositAddress, Int, LedgerEntry, Market,
|
10
|
+
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
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -418,17 +418,20 @@ class coinbase(Exchange, ImplicitAPI):
|
|
418
418
|
'limit': 3000,
|
419
419
|
'daysBack': None,
|
420
420
|
'untilDays': 10000,
|
421
|
+
'symbolRequired': False,
|
421
422
|
},
|
422
423
|
'fetchOrder': {
|
423
424
|
'marginMode': False,
|
424
425
|
'trigger': False,
|
425
426
|
'trailing': False,
|
427
|
+
'symbolRequired': False,
|
426
428
|
},
|
427
429
|
'fetchOpenOrders': {
|
428
430
|
'marginMode': False,
|
429
431
|
'limit': None,
|
430
432
|
'trigger': False,
|
431
433
|
'trailing': False,
|
434
|
+
'symbolRequired': False,
|
432
435
|
},
|
433
436
|
'fetchOrders': {
|
434
437
|
'marginMode': False,
|
@@ -437,6 +440,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
437
440
|
'untilDays': 10000,
|
438
441
|
'trigger': False,
|
439
442
|
'trailing': False,
|
443
|
+
'symbolRequired': False,
|
440
444
|
},
|
441
445
|
'fetchClosedOrders': {
|
442
446
|
'marginMode': False,
|
@@ -446,9 +450,10 @@ class coinbase(Exchange, ImplicitAPI):
|
|
446
450
|
'untilDays': 10000,
|
447
451
|
'trigger': False,
|
448
452
|
'trailing': False,
|
453
|
+
'symbolRequired': False,
|
449
454
|
},
|
450
455
|
'fetchOHLCV': {
|
451
|
-
'limit':
|
456
|
+
'limit': 300,
|
452
457
|
},
|
453
458
|
},
|
454
459
|
'spot': {
|
@@ -749,7 +754,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
749
754
|
accountId = account['id']
|
750
755
|
break
|
751
756
|
if accountId is None:
|
752
|
-
raise ExchangeError(self.id + ' createDepositAddress() could not find the account with matching currency code, specify an `account_id` extra param')
|
757
|
+
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')
|
753
758
|
request: dict = {
|
754
759
|
'account_id': accountId,
|
755
760
|
}
|
@@ -1265,7 +1270,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1265
1270
|
return await self.fetch_markets_v3(params)
|
1266
1271
|
return await self.fetch_markets_v2(params)
|
1267
1272
|
|
1268
|
-
async def fetch_markets_v2(self, params={}):
|
1273
|
+
async def fetch_markets_v2(self, params={}) -> List[Market]:
|
1269
1274
|
response = await self.fetch_currencies_from_cache(params)
|
1270
1275
|
currencies = self.safe_dict(response, 'currencies', {})
|
1271
1276
|
exchangeRates = self.safe_dict(response, 'exchangeRates', {})
|
@@ -1284,7 +1289,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1284
1289
|
quoteCurrency = data[j]
|
1285
1290
|
quoteId = self.safe_string(quoteCurrency, 'id')
|
1286
1291
|
quote = self.safe_currency_code(quoteId)
|
1287
|
-
result.append({
|
1292
|
+
result.append(self.safe_market_structure({
|
1288
1293
|
'id': baseId + '-' + quoteId,
|
1289
1294
|
'symbol': base + '/' + quote,
|
1290
1295
|
'base': base,
|
@@ -1331,10 +1336,10 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1331
1336
|
},
|
1332
1337
|
},
|
1333
1338
|
'info': quoteCurrency,
|
1334
|
-
})
|
1339
|
+
}))
|
1335
1340
|
return result
|
1336
1341
|
|
1337
|
-
async def fetch_markets_v3(self, params={}):
|
1342
|
+
async def fetch_markets_v3(self, params={}) -> List[Market]:
|
1338
1343
|
usePrivate = False
|
1339
1344
|
usePrivate, params = self.handle_option_and_params(params, 'fetchMarkets', 'usePrivate', False)
|
1340
1345
|
spotUnresolvedPromises = []
|
@@ -1912,7 +1917,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1912
1917
|
return await self.fetch_tickers_v3(symbols, params)
|
1913
1918
|
return await self.fetch_tickers_v2(symbols, params)
|
1914
1919
|
|
1915
|
-
async def fetch_tickers_v2(self, symbols: Strings = None, params={}):
|
1920
|
+
async def fetch_tickers_v2(self, symbols: Strings = None, params={}) -> Tickers:
|
1916
1921
|
await self.load_markets()
|
1917
1922
|
symbols = self.market_symbols(symbols)
|
1918
1923
|
request: dict = {
|
@@ -1945,7 +1950,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1945
1950
|
result[symbol] = self.parse_ticker(rates[baseId], market)
|
1946
1951
|
return self.filter_by_array_tickers(result, 'symbol', symbols)
|
1947
1952
|
|
1948
|
-
async def fetch_tickers_v3(self, symbols: Strings = None, params={}):
|
1953
|
+
async def fetch_tickers_v3(self, symbols: Strings = None, params={}) -> Tickers:
|
1949
1954
|
await self.load_markets()
|
1950
1955
|
symbols = self.market_symbols(symbols)
|
1951
1956
|
request: dict = {}
|
@@ -3934,7 +3939,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
3934
3939
|
await self.load_markets()
|
3935
3940
|
currency = self.currency(code)
|
3936
3941
|
request = None
|
3937
|
-
request, params = await self.prepare_account_request_with_currency_code(currency['code'])
|
3942
|
+
request, params = await self.prepare_account_request_with_currency_code(currency['code'], None, params)
|
3938
3943
|
response = await self.v2PrivateGetAccountsAccountIdAddresses(self.extend(request, params))
|
3939
3944
|
#
|
3940
3945
|
# {
|
@@ -4044,12 +4049,14 @@ class coinbase(Exchange, ImplicitAPI):
|
|
4044
4049
|
networkId = self.safe_string(depositAddress, 'network')
|
4045
4050
|
code = self.safe_currency_code(None, currency)
|
4046
4051
|
addressLabel = self.safe_string(depositAddress, 'address_label')
|
4047
|
-
|
4048
|
-
|
4052
|
+
currencyId = None
|
4053
|
+
if addressLabel is not None:
|
4054
|
+
splitAddressLabel = addressLabel.split(' ')
|
4055
|
+
currencyId = self.safe_string(splitAddressLabel, 0)
|
4049
4056
|
addressInfo = self.safe_dict(depositAddress, 'address_info')
|
4050
4057
|
return {
|
4051
4058
|
'info': depositAddress,
|
4052
|
-
'currency': self.safe_currency_code(
|
4059
|
+
'currency': self.safe_currency_code(currencyId, currency),
|
4053
4060
|
'network': self.network_id_to_code(networkId, code),
|
4054
4061
|
'address': address,
|
4055
4062
|
'tag': self.safe_string(addressInfo, 'destination_tag'),
|
@@ -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,
|
@@ -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 = await 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
|