ccxt 4.4.52__py2.py3-none-any.whl → 4.4.53__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 -1
- 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 -1
- 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 +20 -3
- ccxt/async_support/bigone.py +5 -0
- ccxt/async_support/binance.py +55 -69
- 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 +8 -4
- 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 +10 -4
- ccxt/async_support/cex.py +2 -0
- ccxt/async_support/coinbase.py +19 -12
- ccxt/async_support/coinbaseexchange.py +5 -0
- ccxt/async_support/coinbaseinternational.py +21 -2
- ccxt/async_support/coincatch.py +3 -0
- ccxt/async_support/coincheck.py +2 -0
- ccxt/async_support/coinex.py +5 -1
- 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 +7 -3
- ccxt/async_support/digifinex.py +10 -5
- ccxt/async_support/ellipx.py +9 -5
- ccxt/async_support/exmo.py +6 -3
- 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 +6 -1
- 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 +6 -4
- 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/lykke.py +4 -0
- 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 +21 -7
- 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 +92 -50
- ccxt/base/types.py +1 -1
- ccxt/bigone.py +5 -0
- ccxt/binance.py +55 -69
- 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 +8 -4
- 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 +10 -4
- ccxt/cex.py +2 -0
- ccxt/coinbase.py +19 -12
- ccxt/coinbaseexchange.py +5 -0
- ccxt/coinbaseinternational.py +21 -2
- ccxt/coincatch.py +3 -0
- ccxt/coincheck.py +2 -0
- ccxt/coinex.py +5 -1
- 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 +7 -3
- ccxt/digifinex.py +10 -5
- ccxt/ellipx.py +9 -5
- ccxt/exmo.py +6 -3
- 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 +6 -1
- ccxt/idex.py +5 -1
- ccxt/independentreserve.py +4 -0
- ccxt/indodax.py +3 -0
- ccxt/kraken.py +6 -4
- 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/lykke.py +4 -0
- 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/bitcoincom.py +1 -4
- ccxt/pro/bitopro.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 +21 -7
- 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.53.dist-info}/METADATA +225 -140
- {ccxt-4.4.52.dist-info → ccxt-4.4.53.dist-info}/RECORD +215 -224
- ccxt/static_dependencies/ethereum/abi/py.typed +0 -0
- ccxt/static_dependencies/ethereum/account/py.typed +0 -0
- ccxt/static_dependencies/ethereum/hexbytes/py.typed +0 -0
- ccxt/static_dependencies/ethereum/typing/py.typed +0 -0
- ccxt/static_dependencies/ethereum/utils/py.typed +0 -0
- ccxt/static_dependencies/lark/py.typed +0 -0
- ccxt/static_dependencies/marshmallow/py.typed +0 -0
- ccxt/static_dependencies/marshmallow_dataclass/py.typed +0 -0
- ccxt/static_dependencies/marshmallow_oneofschema/py.typed +0 -0
- {ccxt-4.4.52.dist-info → ccxt-4.4.53.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.52.dist-info → ccxt-4.4.53.dist-info}/WHEEL +0 -0
- {ccxt-4.4.52.dist-info → ccxt-4.4.53.dist-info}/top_level.txt +0 -0
ccxt/async_support/luno.py
CHANGED
@@ -214,17 +214,20 @@ class luno(Exchange, ImplicitAPI):
|
|
214
214
|
'limit': 1000,
|
215
215
|
'daysBack': 100000, # todo
|
216
216
|
'untilDays': 100000, # todo
|
217
|
+
'symbolRequired': True,
|
217
218
|
},
|
218
219
|
'fetchOrder': {
|
219
220
|
'marginMode': False,
|
220
221
|
'trigger': False,
|
221
222
|
'trailing': False,
|
223
|
+
'symbolRequired': False,
|
222
224
|
},
|
223
225
|
'fetchOpenOrders': {
|
224
226
|
'marginMode': False,
|
225
227
|
'limit': 1000,
|
226
228
|
'trigger': False,
|
227
229
|
'trailing': False,
|
230
|
+
'symbolRequired': False,
|
228
231
|
},
|
229
232
|
'fetchOrders': {
|
230
233
|
'marginMode': False,
|
@@ -233,6 +236,7 @@ class luno(Exchange, ImplicitAPI):
|
|
233
236
|
'untilDays': None,
|
234
237
|
'trigger': False,
|
235
238
|
'trailing': False,
|
239
|
+
'symbolRequired': False,
|
236
240
|
},
|
237
241
|
'fetchClosedOrders': {
|
238
242
|
'marginMode': False,
|
@@ -242,6 +246,7 @@ class luno(Exchange, ImplicitAPI):
|
|
242
246
|
'untilDays': None,
|
243
247
|
'trigger': False,
|
244
248
|
'trailing': False,
|
249
|
+
'symbolRequired': False,
|
245
250
|
},
|
246
251
|
'fetchOHLCV': {
|
247
252
|
'limit': None,
|
@@ -543,7 +548,7 @@ class luno(Exchange, ImplicitAPI):
|
|
543
548
|
response = await self.privateGetOrdersId(self.extend(request, params))
|
544
549
|
return self.parse_order(response)
|
545
550
|
|
546
|
-
async def fetch_orders_by_state(self, state
|
551
|
+
async def fetch_orders_by_state(self, state: Str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
547
552
|
await self.load_markets()
|
548
553
|
request: dict = {}
|
549
554
|
market = None
|
ccxt/async_support/lykke.py
CHANGED
@@ -223,17 +223,20 @@ class lykke(Exchange, ImplicitAPI):
|
|
223
223
|
'limit': 1000,
|
224
224
|
'daysBack': 100000, # todo
|
225
225
|
'untilDays': 100000, # todo
|
226
|
+
'symbolRequired': False,
|
226
227
|
},
|
227
228
|
'fetchOrder': {
|
228
229
|
'marginMode': False,
|
229
230
|
'trigger': False,
|
230
231
|
'trailing': False,
|
232
|
+
'symbolRequired': False,
|
231
233
|
},
|
232
234
|
'fetchOpenOrders': {
|
233
235
|
'marginMode': False,
|
234
236
|
'limit': 1000,
|
235
237
|
'trigger': False,
|
236
238
|
'trailing': False,
|
239
|
+
'symbolRequired': False,
|
237
240
|
},
|
238
241
|
'fetchOrders': None,
|
239
242
|
'fetchClosedOrders': {
|
@@ -244,6 +247,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
244
247
|
'untilDays': None,
|
245
248
|
'trigger': False,
|
246
249
|
'trailing': False,
|
250
|
+
'symbolRequired': False,
|
247
251
|
},
|
248
252
|
'fetchOHLCV': None,
|
249
253
|
},
|
ccxt/async_support/mercado.py
CHANGED
@@ -193,17 +193,20 @@ class mercado(Exchange, ImplicitAPI):
|
|
193
193
|
'limit': None, # todo
|
194
194
|
'daysBack': 100000, # todo
|
195
195
|
'untilDays': 100000, # todo
|
196
|
+
'symbolRequired': True,
|
196
197
|
},
|
197
198
|
'fetchOrder': {
|
198
199
|
'marginMode': False,
|
199
200
|
'trigger': False,
|
200
201
|
'trailing': False,
|
202
|
+
'symbolRequired': True,
|
201
203
|
},
|
202
204
|
'fetchOpenOrders': {
|
203
205
|
'marginMode': False,
|
204
206
|
'limit': None,
|
205
207
|
'trigger': False,
|
206
208
|
'trailing': False,
|
209
|
+
'symbolRequired': True,
|
207
210
|
},
|
208
211
|
'fetchOrders': {
|
209
212
|
'marginMode': False,
|
@@ -212,6 +215,7 @@ class mercado(Exchange, ImplicitAPI):
|
|
212
215
|
'untilDays': 100000,
|
213
216
|
'trigger': False,
|
214
217
|
'trailing': False,
|
218
|
+
'symbolRequired': True,
|
215
219
|
},
|
216
220
|
'fetchClosedOrders': None,
|
217
221
|
'fetchOHLCV': {
|
ccxt/async_support/mexc.py
CHANGED
@@ -727,17 +727,20 @@ class mexc(Exchange, ImplicitAPI):
|
|
727
727
|
'limit': 100,
|
728
728
|
'daysBack': 30,
|
729
729
|
'untilDays': None,
|
730
|
+
'symbolRequired': True,
|
730
731
|
},
|
731
732
|
'fetchOrder': {
|
732
733
|
'marginMode': False,
|
733
734
|
'trigger': False,
|
734
735
|
'trailing': False,
|
736
|
+
'symbolRequired': True,
|
735
737
|
},
|
736
738
|
'fetchOpenOrders': {
|
737
739
|
'marginMode': True,
|
738
740
|
'limit': None,
|
739
741
|
'trigger': False,
|
740
742
|
'trailing': False,
|
743
|
+
'symbolRequired': True,
|
741
744
|
},
|
742
745
|
'fetchOrders': {
|
743
746
|
'marginMode': True,
|
@@ -746,6 +749,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
746
749
|
'untilDays': 7,
|
747
750
|
'trigger': False,
|
748
751
|
'trailing': False,
|
752
|
+
'symbolRequired': True,
|
749
753
|
},
|
750
754
|
'fetchClosedOrders': {
|
751
755
|
'marginMode': True,
|
@@ -755,6 +759,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
755
759
|
'untilDays': 7,
|
756
760
|
'trigger': False,
|
757
761
|
'trailing': False,
|
762
|
+
'symbolRequired': True,
|
758
763
|
},
|
759
764
|
'fetchOHLCV': {
|
760
765
|
'limit': 1000,
|
@@ -2191,10 +2196,8 @@ class mexc(Exchange, ImplicitAPI):
|
|
2191
2196
|
market = self.market(symbol)
|
2192
2197
|
if not market['spot']:
|
2193
2198
|
raise NotSupported(self.id + ' createMarketBuyOrderWithCost() supports spot orders only')
|
2194
|
-
|
2195
|
-
|
2196
|
-
}
|
2197
|
-
return await self.create_order(symbol, 'market', 'buy', 0, None, self.extend(req, params))
|
2199
|
+
params['cost'] = cost
|
2200
|
+
return await self.create_order(symbol, 'market', 'buy', 0, None, params)
|
2198
2201
|
|
2199
2202
|
async def create_market_sell_order_with_cost(self, symbol: str, cost: float, params={}):
|
2200
2203
|
"""
|
@@ -2211,10 +2214,8 @@ class mexc(Exchange, ImplicitAPI):
|
|
2211
2214
|
market = self.market(symbol)
|
2212
2215
|
if not market['spot']:
|
2213
2216
|
raise NotSupported(self.id + ' createMarketBuyOrderWithCost() supports spot orders only')
|
2214
|
-
|
2215
|
-
|
2216
|
-
}
|
2217
|
-
return await self.create_order(symbol, 'market', 'sell', 0, None, self.extend(req, params))
|
2217
|
+
params['cost'] = cost
|
2218
|
+
return await self.create_order(symbol, 'market', 'sell', 0, None, params)
|
2218
2219
|
|
2219
2220
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
2220
2221
|
"""
|
@@ -4632,7 +4633,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
4632
4633
|
rawNetwork = self.safe_string(params, 'network')
|
4633
4634
|
if rawNetwork is not None:
|
4634
4635
|
params = self.omit(params, 'network')
|
4635
|
-
request['coin']
|
4636
|
+
request['coin'] = request['coin'] + '-' + rawNetwork
|
4636
4637
|
if since is not None:
|
4637
4638
|
request['startTime'] = since
|
4638
4639
|
if limit is not None:
|
ccxt/async_support/ndax.py
CHANGED
@@ -301,17 +301,20 @@ class ndax(Exchange, ImplicitAPI):
|
|
301
301
|
'limit': 100, # todo
|
302
302
|
'daysBack': 100000, # todo
|
303
303
|
'untilDays': 100000, # todo
|
304
|
+
'symbolRequired': False,
|
304
305
|
},
|
305
306
|
'fetchOrder': {
|
306
307
|
'marginMode': False,
|
307
308
|
'trigger': False,
|
308
309
|
'trailing': False,
|
310
|
+
'symbolRequired': False,
|
309
311
|
},
|
310
312
|
'fetchOpenOrders': {
|
311
313
|
'marginMode': False,
|
312
314
|
'limit': None,
|
313
315
|
'trigger': False,
|
314
316
|
'trailing': False,
|
317
|
+
'symbolRequired': False,
|
315
318
|
},
|
316
319
|
'fetchOrders': {
|
317
320
|
'marginMode': False,
|
@@ -320,6 +323,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
320
323
|
'untilDays': None,
|
321
324
|
'trigger': False,
|
322
325
|
'trailing': False,
|
326
|
+
'symbolRequired': False,
|
323
327
|
},
|
324
328
|
'fetchClosedOrders': None,
|
325
329
|
'fetchOHLCV': {
|
@@ -650,7 +654,8 @@ class ndax(Exchange, ImplicitAPI):
|
|
650
654
|
bidask = self.parse_bid_ask(level, priceKey, amountKey)
|
651
655
|
levelSide = self.safe_integer(level, 9)
|
652
656
|
side = asksKey if levelSide else bidsKey
|
653
|
-
result[side]
|
657
|
+
resultSide = result[side]
|
658
|
+
resultSide.append(bidask)
|
654
659
|
result['bids'] = self.sort_by(result['bids'], 0, True)
|
655
660
|
result['asks'] = self.sort_by(result['asks'], 0)
|
656
661
|
result['timestamp'] = timestamp
|
ccxt/async_support/novadax.py
CHANGED
@@ -255,17 +255,20 @@ class novadax(Exchange, ImplicitAPI):
|
|
255
255
|
'limit': 100,
|
256
256
|
'daysBack': 100000, # todo
|
257
257
|
'untilDays': 100000, # todo
|
258
|
+
'symbolRequired': False,
|
258
259
|
},
|
259
260
|
'fetchOrder': {
|
260
261
|
'marginMode': False,
|
261
262
|
'trigger': False,
|
262
263
|
'trailing': False,
|
264
|
+
'symbolRequired': False,
|
263
265
|
},
|
264
266
|
'fetchOpenOrders': {
|
265
267
|
'marginMode': False,
|
266
268
|
'limit': None,
|
267
269
|
'trigger': False,
|
268
270
|
'trailing': False,
|
271
|
+
'symbolRequired': False,
|
269
272
|
},
|
270
273
|
'fetchOrders': {
|
271
274
|
'marginMode': False,
|
@@ -274,6 +277,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
274
277
|
'untilDays': 100000, # todo
|
275
278
|
'trigger': False,
|
276
279
|
'trailing': False,
|
280
|
+
'symbolRequired': False,
|
277
281
|
},
|
278
282
|
'fetchClosedOrders': {
|
279
283
|
'marginMode': False,
|
@@ -283,6 +287,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
283
287
|
'untilDays': 100000, # todo
|
284
288
|
'trigger': False,
|
285
289
|
'trailing': False,
|
290
|
+
'symbolRequired': False,
|
286
291
|
},
|
287
292
|
'fetchOHLCV': {
|
288
293
|
'limit': None, # todo max 3000
|
ccxt/async_support/oceanex.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.oceanex import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees
|
8
|
+
from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, OrderBooks, Trade, TradingFees
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import AuthenticationError
|
@@ -170,12 +170,14 @@ class oceanex(Exchange, ImplicitAPI):
|
|
170
170
|
'marginMode': False,
|
171
171
|
'trigger': False,
|
172
172
|
'trailing': False,
|
173
|
+
'symbolRequired': False,
|
173
174
|
},
|
174
175
|
'fetchOpenOrders': {
|
175
176
|
'marginMode': False,
|
176
177
|
'limit': 100, # todo: max unknown
|
177
178
|
'trigger': False,
|
178
179
|
'trailing': False,
|
180
|
+
'symbolRequired': False,
|
179
181
|
},
|
180
182
|
'fetchOrders': {
|
181
183
|
'marginMode': False,
|
@@ -184,6 +186,7 @@ class oceanex(Exchange, ImplicitAPI):
|
|
184
186
|
'untilDays': 100000, # todo
|
185
187
|
'trigger': False,
|
186
188
|
'trailing': False,
|
189
|
+
'symbolRequired': False,
|
187
190
|
},
|
188
191
|
'fetchClosedOrders': {
|
189
192
|
'marginMode': False,
|
@@ -193,6 +196,7 @@ class oceanex(Exchange, ImplicitAPI):
|
|
193
196
|
'untilDays': 100000, # todo
|
194
197
|
'trigger': False,
|
195
198
|
'trailing': False,
|
199
|
+
'symbolRequired': False,
|
196
200
|
},
|
197
201
|
'fetchOHLCV': {
|
198
202
|
'limit': 100,
|
@@ -480,7 +484,7 @@ class oceanex(Exchange, ImplicitAPI):
|
|
480
484
|
timestamp = self.safe_timestamp(orderbook, 'timestamp')
|
481
485
|
return self.parse_order_book(orderbook, symbol, timestamp)
|
482
486
|
|
483
|
-
async def fetch_order_books(self, symbols: Strings = None, limit: Int = None, params={}):
|
487
|
+
async def fetch_order_books(self, symbols: Strings = None, limit: Int = None, params={}) -> OrderBooks:
|
484
488
|
"""
|
485
489
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data for multiple markets
|
486
490
|
|
ccxt/async_support/okcoin.py
CHANGED
@@ -264,17 +264,20 @@ class okcoin(Exchange, ImplicitAPI):
|
|
264
264
|
'limit': 100,
|
265
265
|
'daysBack': 90,
|
266
266
|
'untilDays': 90, # todo
|
267
|
+
'symbolRequired': False,
|
267
268
|
},
|
268
269
|
'fetchOrder': {
|
269
270
|
'marginMode': False,
|
270
271
|
'trigger': True,
|
271
272
|
'trailing': True, # todo
|
273
|
+
'symbolRequired': True,
|
272
274
|
},
|
273
275
|
'fetchOpenOrders': {
|
274
276
|
'marginMode': False,
|
275
277
|
'limit': 100,
|
276
278
|
'trigger': True,
|
277
279
|
'trailing': True,
|
280
|
+
'symbolRequired': False,
|
278
281
|
},
|
279
282
|
'fetchOrders': None,
|
280
283
|
'fetchClosedOrders': {
|
@@ -285,6 +288,7 @@ class okcoin(Exchange, ImplicitAPI):
|
|
285
288
|
'untilDays': 90, # todo
|
286
289
|
'trigger': True,
|
287
290
|
'trailing': True,
|
291
|
+
'symbolRequired': False,
|
288
292
|
},
|
289
293
|
'fetchOHLCV': {
|
290
294
|
'limit': 100, # 300 is only possible for 'recent' 1440 candles, which does not make much sense
|
ccxt/async_support/okx.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.okx import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Account, Balances, BorrowInterest, Conversion, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, DepositAddress, Greeks, Int, LedgerEntry, Leverage, LeverageTier, LongShortRatio, MarginModification, Market,
|
10
|
+
from ccxt.base.types import Account, Balances, BorrowInterest, Conversion, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, DepositAddress, Greeks, Int, LedgerEntry, Leverage, LeverageTier, LongShortRatio, MarginModification, Market, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, Transaction, MarketInterface, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from typing import Any
|
13
13
|
from ccxt.base.errors import ExchangeError
|
@@ -1252,17 +1252,20 @@ class okx(Exchange, ImplicitAPI):
|
|
1252
1252
|
'daysBack': 90,
|
1253
1253
|
'limit': 100,
|
1254
1254
|
'untilDays': 10000,
|
1255
|
+
'symbolRequired': False,
|
1255
1256
|
},
|
1256
1257
|
'fetchOrder': {
|
1257
1258
|
'marginMode': False,
|
1258
1259
|
'trigger': True,
|
1259
1260
|
'trailing': True,
|
1261
|
+
'symbolRequired': True,
|
1260
1262
|
},
|
1261
1263
|
'fetchOpenOrders': {
|
1262
1264
|
'marginMode': False,
|
1263
1265
|
'limit': 100,
|
1264
1266
|
'trigger': True,
|
1265
1267
|
'trailing': True,
|
1268
|
+
'symbolRequired': False,
|
1266
1269
|
},
|
1267
1270
|
'fetchOrders': None, # not supported
|
1268
1271
|
'fetchClosedOrders': {
|
@@ -1273,6 +1276,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1273
1276
|
'untilDays': None,
|
1274
1277
|
'trigger': True,
|
1275
1278
|
'trailing': True,
|
1279
|
+
'symbolRequired': False,
|
1276
1280
|
},
|
1277
1281
|
'fetchOHLCV': {
|
1278
1282
|
'limit': 300,
|
@@ -1816,7 +1820,8 @@ class okx(Exchange, ImplicitAPI):
|
|
1816
1820
|
currencyActive = active if (active) else currencyActive
|
1817
1821
|
networkId = self.safe_string(chain, 'chain')
|
1818
1822
|
if (networkId is not None) and (networkId.find('-') >= 0):
|
1819
|
-
|
1823
|
+
idParts = networkId.split('-')
|
1824
|
+
parts = self.array_slice(idParts, 1)
|
1820
1825
|
chainPart = '-'.join(parts)
|
1821
1826
|
networkCode = self.network_id_to_code(chainPart, currency['code'])
|
1822
1827
|
precision = self.parse_precision(self.safe_string(chain, 'wdTickSz'))
|
@@ -2990,11 +2995,17 @@ class okx(Exchange, ImplicitAPI):
|
|
2990
2995
|
request['ordType'] = 'oco'
|
2991
2996
|
if takeProfitPrice is not None:
|
2992
2997
|
request['tpTriggerPx'] = self.price_to_precision(symbol, takeProfitPrice)
|
2993
|
-
|
2998
|
+
tpOrdPxReq = '-1'
|
2999
|
+
if tpOrdPx is not None:
|
3000
|
+
tpOrdPxReq = self.price_to_precision(symbol, tpOrdPx)
|
3001
|
+
request['tpOrdPx'] = tpOrdPxReq
|
2994
3002
|
request['tpTriggerPxType'] = tpTriggerPxType
|
2995
3003
|
if stopLossPrice is not None:
|
2996
3004
|
request['slTriggerPx'] = self.price_to_precision(symbol, stopLossPrice)
|
2997
|
-
|
3005
|
+
slOrdPxReq = '-1'
|
3006
|
+
if slOrdPx is not None:
|
3007
|
+
slOrdPxReq = self.price_to_precision(symbol, slOrdPx)
|
3008
|
+
request['slOrdPx'] = slOrdPxReq
|
2998
3009
|
request['slTriggerPxType'] = slTriggerPxType
|
2999
3010
|
if clientOrderId is None:
|
3000
3011
|
brokerId = self.safe_string(self.options, 'brokerId')
|
@@ -6449,7 +6460,8 @@ class okx(Exchange, ImplicitAPI):
|
|
6449
6460
|
if not (code in borrowRateHistories):
|
6450
6461
|
borrowRateHistories[code] = []
|
6451
6462
|
borrowRateStructure = self.parse_borrow_rate(item)
|
6452
|
-
borrowRateHistories[code]
|
6463
|
+
borrrowRateCode = borrowRateHistories[code]
|
6464
|
+
borrrowRateCode.append(borrowRateStructure)
|
6453
6465
|
keys = list(borrowRateHistories.keys())
|
6454
6466
|
for i in range(0, len(keys)):
|
6455
6467
|
code = keys[i]
|
ccxt/async_support/onetrading.py
CHANGED
@@ -333,17 +333,20 @@ class onetrading(Exchange, ImplicitAPI):
|
|
333
333
|
'limit': 100,
|
334
334
|
'daysBack': 100000, # todo
|
335
335
|
'untilDays': 100000, # todo
|
336
|
+
'symbolRequired': False,
|
336
337
|
},
|
337
338
|
'fetchOrder': {
|
338
339
|
'marginMode': False,
|
339
340
|
'trigger': False,
|
340
341
|
'trailing': False,
|
342
|
+
'symbolRequired': False,
|
341
343
|
},
|
342
344
|
'fetchOpenOrders': {
|
343
345
|
'marginMode': False,
|
344
346
|
'limit': 100,
|
345
347
|
'trigger': False,
|
346
348
|
'trailing': False,
|
349
|
+
'symbolRequired': False,
|
347
350
|
},
|
348
351
|
'fetchOrders': None, # todo
|
349
352
|
'fetchClosedOrders': {
|
@@ -354,6 +357,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
354
357
|
'untilDays': 100000, # todo
|
355
358
|
'trigger': False,
|
356
359
|
'trailing': False,
|
360
|
+
'symbolRequired': False,
|
357
361
|
},
|
358
362
|
'fetchOHLCV': {
|
359
363
|
'limit': 5000,
|
ccxt/async_support/oxfun.py
CHANGED
@@ -293,17 +293,20 @@ class oxfun(Exchange, ImplicitAPI):
|
|
293
293
|
'limit': 500,
|
294
294
|
'daysBack': 100000, # todo
|
295
295
|
'untilDays': 7,
|
296
|
+
'symbolRequired': False,
|
296
297
|
},
|
297
298
|
'fetchOrder': {
|
298
299
|
'marginMode': False,
|
299
300
|
'trigger': False,
|
300
301
|
'trailing': False,
|
302
|
+
'symbolRequired': False,
|
301
303
|
},
|
302
304
|
'fetchOpenOrders': {
|
303
305
|
'marginMode': False,
|
304
306
|
'limit': None,
|
305
307
|
'trigger': False,
|
306
308
|
'trailing': False,
|
309
|
+
'symbolRequired': False,
|
307
310
|
},
|
308
311
|
'fetchOrders': None,
|
309
312
|
'fetchClosedOrders': None, # todo?
|
ccxt/async_support/p2b.py
CHANGED
@@ -219,6 +219,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
219
219
|
'limit': 100,
|
220
220
|
'daysBack': 100000, # todo
|
221
221
|
'untilDays': 1,
|
222
|
+
'symbolRequired': True,
|
222
223
|
},
|
223
224
|
'fetchOrder': None, # todo
|
224
225
|
'fetchOpenOrders': {
|
@@ -226,6 +227,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
226
227
|
'limit': 100,
|
227
228
|
'trigger': False,
|
228
229
|
'trailing': False,
|
230
|
+
'symbolRequired': True,
|
229
231
|
},
|
230
232
|
'fetchOrders': None, # todo
|
231
233
|
'fetchClosedOrders': {
|
@@ -236,6 +238,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
236
238
|
'untilDays': 1,
|
237
239
|
'trigger': False,
|
238
240
|
'trailing': False,
|
241
|
+
'symbolRequired': False,
|
239
242
|
},
|
240
243
|
'fetchOHLCV': {
|
241
244
|
'limit': 500,
|
ccxt/async_support/paradex.py
CHANGED
@@ -312,17 +312,20 @@ class paradex(Exchange, ImplicitAPI):
|
|
312
312
|
'limit': 100, # todo
|
313
313
|
'daysBack': 100000, # todo
|
314
314
|
'untilDays': 100000, # todo
|
315
|
+
'symbolRequired': False,
|
315
316
|
},
|
316
317
|
'fetchOrder': {
|
317
318
|
'marginMode': False,
|
318
319
|
'trigger': False,
|
319
320
|
'trailing': False,
|
321
|
+
'symbolRequired': False,
|
320
322
|
},
|
321
323
|
'fetchOpenOrders': {
|
322
324
|
'marginMode': False,
|
323
325
|
'limit': 100, # todo
|
324
326
|
'trigger': False,
|
325
327
|
'trailing': False,
|
328
|
+
'symbolRequired': False,
|
326
329
|
},
|
327
330
|
'fetchOrders': {
|
328
331
|
'marginMode': False,
|
@@ -331,6 +334,7 @@ class paradex(Exchange, ImplicitAPI):
|
|
331
334
|
'untilDays': 100000, # todo
|
332
335
|
'trigger': False,
|
333
336
|
'trailing': False,
|
337
|
+
'symbolRequired': False,
|
334
338
|
},
|
335
339
|
'fetchClosedOrders': None, # todo
|
336
340
|
'fetchOHLCV': {
|
@@ -1022,16 +1026,18 @@ class paradex(Exchange, ImplicitAPI):
|
|
1022
1026
|
async def prepare_paradex_domain(self, l1=False):
|
1023
1027
|
systemConfig = await self.get_system_config()
|
1024
1028
|
if l1 is True:
|
1025
|
-
|
1029
|
+
l1D = {
|
1026
1030
|
'name': 'Paradex',
|
1027
1031
|
'chainId': systemConfig['l1_chain_id'],
|
1028
1032
|
'version': '1',
|
1029
1033
|
}
|
1030
|
-
|
1034
|
+
return l1D
|
1035
|
+
domain = {
|
1031
1036
|
'name': 'Paradex',
|
1032
1037
|
'chainId': systemConfig['starknet_chain_id'],
|
1033
1038
|
'version': 1,
|
1034
1039
|
}
|
1040
|
+
return domain
|
1035
1041
|
|
1036
1042
|
async def retrieve_account(self):
|
1037
1043
|
cachedAccount: dict = self.safe_dict(self.options, 'paradexAccount')
|
ccxt/async_support/phemex.py
CHANGED
@@ -342,17 +342,20 @@ class phemex(Exchange, ImplicitAPI):
|
|
342
342
|
'limit': 200,
|
343
343
|
'daysBack': 100000,
|
344
344
|
'untilDays': 2, # todo implement
|
345
|
+
'symbolRequired': False,
|
345
346
|
},
|
346
347
|
'fetchOrder': {
|
347
348
|
'marginMode': False,
|
348
349
|
'trigger': False,
|
349
350
|
'trailing': False,
|
351
|
+
'symbolRequired': True,
|
350
352
|
},
|
351
353
|
'fetchOpenOrders': {
|
352
354
|
'marginMode': False,
|
353
355
|
'limit': None,
|
354
356
|
'trigger': False,
|
355
357
|
'trailing': False,
|
358
|
+
'symbolRequired': True,
|
356
359
|
},
|
357
360
|
'fetchOrders': {
|
358
361
|
'marginMode': False,
|
@@ -361,6 +364,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
361
364
|
'untilDays': None,
|
362
365
|
'trigger': False,
|
363
366
|
'trailing': False,
|
367
|
+
'symbolRequired': True,
|
364
368
|
},
|
365
369
|
'fetchClosedOrders': {
|
366
370
|
'marginMode': False,
|
@@ -370,6 +374,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
370
374
|
'untilDays': 2,
|
371
375
|
'trigger': False,
|
372
376
|
'trailing': False,
|
377
|
+
'symbolRequired': False,
|
373
378
|
},
|
374
379
|
'fetchOHLCV': {
|
375
380
|
'limit': 1000,
|
@@ -1262,7 +1267,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
1262
1267
|
return self.to_en(price, market['priceScale'])
|
1263
1268
|
|
1264
1269
|
def from_en(self, en, scale):
|
1265
|
-
if en is None:
|
1270
|
+
if en is None or scale is None:
|
1266
1271
|
return None
|
1267
1272
|
precise = Precise(en)
|
1268
1273
|
precise.decimals = self.sum(precise.decimals, scale)
|
@@ -2167,8 +2172,9 @@ class phemex(Exchange, ImplicitAPI):
|
|
2167
2172
|
# }
|
2168
2173
|
# }
|
2169
2174
|
#
|
2170
|
-
|
2171
|
-
|
2175
|
+
if type == 'swap':
|
2176
|
+
return self.parse_swap_balance(response)
|
2177
|
+
return self.parse_spot_balance(response)
|
2172
2178
|
|
2173
2179
|
def parse_order_status(self, status: Str):
|
2174
2180
|
statuses: dict = {
|
@@ -2790,7 +2796,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
2790
2796
|
data = self.safe_dict(response, 'data', {})
|
2791
2797
|
return self.parse_order(data, market)
|
2792
2798
|
|
2793
|
-
async def edit_order(self, id: str, symbol: str, type: OrderType
|
2799
|
+
async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
|
2794
2800
|
"""
|
2795
2801
|
edit a trade order
|
2796
2802
|
|
ccxt/async_support/poloniex.py
CHANGED
@@ -317,17 +317,20 @@ class poloniex(Exchange, ImplicitAPI):
|
|
317
317
|
'limit': 1000,
|
318
318
|
'daysBack': 100000,
|
319
319
|
'untilDays': 100000,
|
320
|
+
'symbolRequired': False,
|
320
321
|
},
|
321
322
|
'fetchOrder': {
|
322
323
|
'marginMode': False,
|
323
324
|
'trigger': False,
|
324
325
|
'trailing': False,
|
326
|
+
'symbolRequired': False,
|
325
327
|
},
|
326
328
|
'fetchOpenOrders': {
|
327
329
|
'marginMode': False,
|
328
330
|
'limit': 2000,
|
329
331
|
'trigger': False,
|
330
332
|
'trailing': False,
|
333
|
+
'symbolRequired': False,
|
331
334
|
},
|
332
335
|
'fetchOrders': None,
|
333
336
|
'fetchClosedOrders': None, # todo implement
|
@@ -1777,7 +1780,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1777
1780
|
network = self.safe_string_upper(params, 'network') # self line allows the user to specify either ERC20 or ETH
|
1778
1781
|
network = self.safe_string(networks, network, network) # handle ERC20>ETH alias
|
1779
1782
|
if network is not None:
|
1780
|
-
request['currency']
|
1783
|
+
request['currency'] = request['currency'] + network # when network the currency need to be changed to currency+network https://docs.poloniex.com/#withdraw on MultiChain Currencies section
|
1781
1784
|
params = self.omit(params, 'network')
|
1782
1785
|
else:
|
1783
1786
|
if currency['id'] == 'USDT':
|
@@ -1823,7 +1826,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1823
1826
|
network = self.safe_string_upper(params, 'network') # self line allows the user to specify either ERC20 or ETH
|
1824
1827
|
network = self.safe_string(networks, network, network) # handle ERC20>ETH alias
|
1825
1828
|
if network is not None:
|
1826
|
-
request['currency']
|
1829
|
+
request['currency'] = request['currency'] + network # when network the currency need to be changed to currency+network https://docs.poloniex.com/#withdraw on MultiChain Currencies section
|
1827
1830
|
params = self.omit(params, 'network')
|
1828
1831
|
else:
|
1829
1832
|
if currency['id'] == 'USDT':
|
@@ -1928,7 +1931,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1928
1931
|
network = self.safe_string_upper(params, 'network') # self line allows the user to specify either ERC20 or ETH
|
1929
1932
|
network = self.safe_string(networks, network, network) # handle ERC20>ETH alias
|
1930
1933
|
if network is not None:
|
1931
|
-
request['currency']
|
1934
|
+
request['currency'] = request['currency'] + network # when network the currency need to be changed to currency+network https://docs.poloniex.com/#withdraw on MultiChain Currencies section
|
1932
1935
|
params = self.omit(params, 'network')
|
1933
1936
|
response = await self.privatePostWalletsWithdraw(self.extend(request, params))
|
1934
1937
|
#
|