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/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
|
#
|
@@ -226,17 +226,20 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
226
226
|
'limit': None,
|
227
227
|
'daysBack': 100000,
|
228
228
|
'untilDays': 7,
|
229
|
+
'symbolRequired': False,
|
229
230
|
},
|
230
231
|
'fetchOrder': {
|
231
232
|
'marginMode': False,
|
232
233
|
'trigger': False,
|
233
234
|
'trailing': False,
|
235
|
+
'symbolRequired': False,
|
234
236
|
},
|
235
237
|
'fetchOpenOrders': {
|
236
238
|
'marginMode': True,
|
237
239
|
'limit': None,
|
238
240
|
'trigger': False,
|
239
241
|
'trailing': False,
|
242
|
+
'symbolRequired': False,
|
240
243
|
},
|
241
244
|
'fetchOrders': None, # todo
|
242
245
|
'fetchClosedOrders': {
|
@@ -247,6 +250,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
247
250
|
'untilDays': 100000,
|
248
251
|
'trigger': False,
|
249
252
|
'trailing': False,
|
253
|
+
'symbolRequired': False,
|
250
254
|
},
|
251
255
|
'fetchOHLCV': {
|
252
256
|
'limit': 200, # todo implement
|
@@ -1445,7 +1449,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1445
1449
|
"""
|
1446
1450
|
return await self.fetch_orders_by_status('closed', symbol, since, limit, params)
|
1447
1451
|
|
1448
|
-
async def fetch_order(self, id: Str
|
1452
|
+
async def fetch_order(self, id: Str, symbol: Str = None, params={}):
|
1449
1453
|
"""
|
1450
1454
|
fetches information on an order made by the user
|
1451
1455
|
|
ccxt/async_support/probit.py
CHANGED
@@ -217,17 +217,20 @@ class probit(Exchange, ImplicitAPI):
|
|
217
217
|
'limit': 1000,
|
218
218
|
'daysBack': 100000, # todo
|
219
219
|
'untilDays': 100000, # todo
|
220
|
+
'symbolRequired': False,
|
220
221
|
},
|
221
222
|
'fetchOrder': {
|
222
223
|
'marginMode': False,
|
223
224
|
'trigger': False,
|
224
225
|
'trailing': False,
|
226
|
+
'symbolRequired': True,
|
225
227
|
},
|
226
228
|
'fetchOpenOrders': {
|
227
229
|
'marginMode': False,
|
228
230
|
'limit': None,
|
229
231
|
'trigger': False,
|
230
232
|
'trailing': False,
|
233
|
+
'symbolRequired': False,
|
231
234
|
},
|
232
235
|
'fetchOrders': None,
|
233
236
|
'fetchClosedOrders': {
|
@@ -238,6 +241,7 @@ class probit(Exchange, ImplicitAPI):
|
|
238
241
|
'untilDays': 90,
|
239
242
|
'trigger': False,
|
240
243
|
'trailing': False,
|
244
|
+
'symbolRequired': False,
|
241
245
|
},
|
242
246
|
'fetchOHLCV': {
|
243
247
|
'limit': 4000,
|
ccxt/async_support/timex.py
CHANGED
@@ -313,17 +313,20 @@ class timex(Exchange, ImplicitAPI):
|
|
313
313
|
'limit': 100, # todo
|
314
314
|
'daysBack': 100000, # todo
|
315
315
|
'untilDays': 100000, # todo
|
316
|
+
'symbolRequired': False,
|
316
317
|
},
|
317
318
|
'fetchOrder': {
|
318
319
|
'marginMode': False,
|
319
320
|
'trigger': False,
|
320
321
|
'trailing': False,
|
322
|
+
'symbolRequired': False,
|
321
323
|
},
|
322
324
|
'fetchOpenOrders': {
|
323
325
|
'marginMode': False,
|
324
326
|
'limit': 100, # todo
|
325
327
|
'trigger': False,
|
326
328
|
'trailing': False,
|
329
|
+
'symbolRequired': False,
|
327
330
|
},
|
328
331
|
'fetchOrders': None, # todo
|
329
332
|
'fetchClosedOrders': {
|
@@ -334,6 +337,7 @@ class timex(Exchange, ImplicitAPI):
|
|
334
337
|
'untilDays': 100000, # todo
|
335
338
|
'trigger': False,
|
336
339
|
'trailing': False,
|
340
|
+
'symbolRequired': False,
|
337
341
|
},
|
338
342
|
'fetchOHLCV': {
|
339
343
|
'limit': None,
|
ccxt/async_support/tokocrypto.py
CHANGED
@@ -650,17 +650,20 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
650
650
|
'limit': 1000,
|
651
651
|
'daysBack': 100000, # todo
|
652
652
|
'untilDays': 100000, # todo
|
653
|
+
'symbolRequired': True,
|
653
654
|
},
|
654
655
|
'fetchOrder': {
|
655
656
|
'marginMode': False,
|
656
657
|
'trigger': False,
|
657
658
|
'trailing': False,
|
659
|
+
'symbolRequired': False,
|
658
660
|
},
|
659
661
|
'fetchOpenOrders': {
|
660
662
|
'marginMode': False,
|
661
663
|
'limit': 1000,
|
662
664
|
'trigger': False,
|
663
665
|
'trailing': False,
|
666
|
+
'symbolRequired': True,
|
664
667
|
},
|
665
668
|
'fetchOrders': {
|
666
669
|
'marginMode': False,
|
@@ -669,6 +672,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
669
672
|
'untilDays': 100000,
|
670
673
|
'trigger': False,
|
671
674
|
'trailing': False,
|
675
|
+
'symbolRequired': True,
|
672
676
|
},
|
673
677
|
'fetchClosedOrders': {
|
674
678
|
'marginMode': False,
|
@@ -678,6 +682,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
678
682
|
'untilDays': 100000, # todo
|
679
683
|
'trigger': False,
|
680
684
|
'trailing': False,
|
685
|
+
'symbolRequired': True,
|
681
686
|
},
|
682
687
|
'fetchOHLCV': {
|
683
688
|
'limit': 1000,
|
ccxt/async_support/tradeogre.py
CHANGED
@@ -195,12 +195,14 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
195
195
|
'marginMode': False,
|
196
196
|
'trigger': False,
|
197
197
|
'trailing': False,
|
198
|
+
'symbolRequired': False,
|
198
199
|
},
|
199
200
|
'fetchOpenOrders': {
|
200
201
|
'marginMode': False,
|
201
202
|
'limit': None,
|
202
203
|
'trigger': False,
|
203
204
|
'trailing': False,
|
205
|
+
'symbolRequired': False,
|
204
206
|
},
|
205
207
|
'fetchOrders': None,
|
206
208
|
'fetchClosedOrders': None,
|
ccxt/async_support/upbit.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.upbit import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction
|
8
|
+
from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, OrderBooks, Trade, TradingFeeInterface, Transaction
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import AuthenticationError
|
@@ -202,12 +202,14 @@ class upbit(Exchange, ImplicitAPI):
|
|
202
202
|
'marginMode': False,
|
203
203
|
'trigger': False,
|
204
204
|
'trailing': False,
|
205
|
+
'symbolRequired': False,
|
205
206
|
},
|
206
207
|
'fetchOpenOrders': {
|
207
208
|
'marginMode': True,
|
208
209
|
'limit': 100,
|
209
210
|
'trigger': False,
|
210
211
|
'trailing': False,
|
212
|
+
'symbolRequired': False,
|
211
213
|
},
|
212
214
|
'fetchOrders': None, # todo
|
213
215
|
'fetchClosedOrders': {
|
@@ -218,6 +220,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
218
220
|
'untilDays': 7,
|
219
221
|
'trigger': False,
|
220
222
|
'trailing': False,
|
223
|
+
'symbolRequired': False,
|
221
224
|
},
|
222
225
|
'fetchOHLCV': {
|
223
226
|
'limit': 200,
|
@@ -588,7 +591,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
588
591
|
#
|
589
592
|
return self.parse_balance(response)
|
590
593
|
|
591
|
-
async def fetch_order_books(self, symbols: Strings = None, limit: Int = None, params={}):
|
594
|
+
async def fetch_order_books(self, symbols: Strings = None, limit: Int = None, params={}) -> OrderBooks:
|
592
595
|
"""
|
593
596
|
|
594
597
|
https://docs.upbit.com/reference/%ED%98%B8%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
|
ccxt/async_support/vertex.py
CHANGED
@@ -361,17 +361,20 @@ class vertex(Exchange, ImplicitAPI):
|
|
361
361
|
'limit': 500,
|
362
362
|
'daysBack': 100000, # todo
|
363
363
|
'untilDays': None,
|
364
|
+
'symbolRequired': False,
|
364
365
|
},
|
365
366
|
'fetchOrder': {
|
366
367
|
'marginMode': False,
|
367
368
|
'trigger': False,
|
368
369
|
'trailing': False,
|
370
|
+
'symbolRequired': True,
|
369
371
|
},
|
370
372
|
'fetchOpenOrders': {
|
371
373
|
'marginMode': False,
|
372
374
|
'limit': 500,
|
373
375
|
'trigger': True,
|
374
376
|
'trailing': False,
|
377
|
+
'symbolRequired': False,
|
375
378
|
},
|
376
379
|
'fetchOrders': None, # todo, only for trigger
|
377
380
|
'fetchClosedOrders': None, # todo through fetchOrders
|
@@ -2394,14 +2397,15 @@ class vertex(Exchange, ImplicitAPI):
|
|
2394
2397
|
'digests': ids,
|
2395
2398
|
'nonce': nonce,
|
2396
2399
|
}
|
2400
|
+
productIds = cancels['productIds']
|
2397
2401
|
marketIdNum = self.parse_to_numeric(marketId)
|
2398
2402
|
for i in range(0, len(ids)):
|
2399
|
-
|
2403
|
+
productIds.append(marketIdNum)
|
2400
2404
|
request = {
|
2401
2405
|
'cancel_orders': {
|
2402
2406
|
'tx': {
|
2403
2407
|
'sender': cancels['sender'],
|
2404
|
-
'productIds':
|
2408
|
+
'productIds': productIds,
|
2405
2409
|
'digests': cancels['digests'],
|
2406
2410
|
'nonce': self.number_to_string(cancels['nonce']),
|
2407
2411
|
},
|
@@ -389,17 +389,20 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
389
389
|
'limit': 100, # todo
|
390
390
|
'daysBack': 100000, # todo
|
391
391
|
'untilDays': 100000, # todo
|
392
|
+
'symbolRequired': False,
|
392
393
|
},
|
393
394
|
'fetchOrder': {
|
394
395
|
'marginMode': False,
|
395
396
|
'trigger': False,
|
396
397
|
'trailing': False,
|
398
|
+
'symbolRequired': False,
|
397
399
|
},
|
398
400
|
'fetchOpenOrders': {
|
399
401
|
'marginMode': False,
|
400
402
|
'limit': 100, # todo
|
401
403
|
'trigger': False,
|
402
404
|
'trailing': False,
|
405
|
+
'symbolRequired': False,
|
403
406
|
},
|
404
407
|
'fetchOrders': {
|
405
408
|
'marginMode': False,
|
@@ -408,6 +411,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
408
411
|
'untilDays': None,
|
409
412
|
'trigger': False,
|
410
413
|
'trailing': False,
|
414
|
+
'symbolRequired': True,
|
411
415
|
}, # todo
|
412
416
|
'fetchClosedOrders': {
|
413
417
|
'marginMode': False,
|
@@ -417,6 +421,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
417
421
|
'untilDays': 100000, # todo
|
418
422
|
'trigger': False,
|
419
423
|
'trailing': False,
|
424
|
+
'symbolRequired': False,
|
420
425
|
},
|
421
426
|
'fetchOHLCV': {
|
422
427
|
'limit': None, # todo
|
@@ -755,6 +760,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
755
760
|
raise AuthenticationError(self.id + ' apiKey must be a base58 encoded public key')
|
756
761
|
if len(hexSecretKeyBytes) != 64:
|
757
762
|
raise AuthenticationError(self.id + ' secret must be a base58 encoded private key')
|
763
|
+
return True
|
758
764
|
|
759
765
|
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|
760
766
|
query = self.omit(params, self.extract_params(path))
|
@@ -1008,6 +1014,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1008
1014
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
1009
1015
|
:param int [limit]: the maximum amount of candles to fetch
|
1010
1016
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1017
|
+
:param int [params.until]: timestamp in ms of the latest candle to fetch
|
1011
1018
|
:returns int[][]: A list of candles ordered, open, high, low, close, volume
|
1012
1019
|
"""
|
1013
1020
|
await self.load_markets()
|
@@ -1018,19 +1025,29 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1018
1025
|
'interval': self.safe_string(self.timeframes, timeframe, timeframe),
|
1019
1026
|
}
|
1020
1027
|
allowedCandles = self.safe_integer(self.options, 'allowedCandles', 1440)
|
1028
|
+
until = self.safe_integer(params, 'until')
|
1029
|
+
untilIsDefined = until is not None
|
1021
1030
|
if limit is None:
|
1022
1031
|
limit = allowedCandles
|
1023
1032
|
limit = min(allowedCandles, limit)
|
1024
1033
|
duration = self.parse_timeframe(timeframe) * 1000
|
1025
1034
|
if since is None:
|
1026
|
-
|
1035
|
+
now = self.milliseconds()
|
1036
|
+
timeEnd = until if untilIsDefined else now
|
1037
|
+
durationRoundedTimestamp = self.parse_to_int(timeEnd / duration) * duration
|
1027
1038
|
delta = (limit - 1) * duration
|
1028
1039
|
timeStart = durationRoundedTimestamp - delta
|
1029
1040
|
request['timeStart'] = str(timeStart)
|
1041
|
+
if untilIsDefined:
|
1042
|
+
request['timeEnd'] = str(until)
|
1030
1043
|
else:
|
1031
1044
|
request['timeStart'] = str(since)
|
1032
|
-
|
1033
|
-
|
1045
|
+
if untilIsDefined:
|
1046
|
+
request['timeEnd'] = str(until)
|
1047
|
+
else:
|
1048
|
+
timeEnd = self.sum(since, duration * limit)
|
1049
|
+
request['timeEnd'] = str(timeEnd)
|
1050
|
+
params = self.omit(params, 'until')
|
1034
1051
|
response = await self.publicGetCandlesBaseIdQuoteId(self.extend(request, params))
|
1035
1052
|
#
|
1036
1053
|
# {
|
ccxt/async_support/wazirx.py
CHANGED
@@ -250,6 +250,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
250
250
|
'limit': None,
|
251
251
|
'trigger': False,
|
252
252
|
'trailing': False,
|
253
|
+
'symbolRequired': True,
|
253
254
|
},
|
254
255
|
'fetchOrders': {
|
255
256
|
'marginMode': False,
|
@@ -258,6 +259,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
258
259
|
'untilDays': 100000, # todo
|
259
260
|
'trigger': False,
|
260
261
|
'trailing': False,
|
262
|
+
'symbolRequired': True,
|
261
263
|
},
|
262
264
|
'fetchClosedOrders': None,
|
263
265
|
'fetchOHLCV': {
|
ccxt/async_support/whitebit.py
CHANGED
@@ -322,6 +322,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
322
322
|
'limit': 100,
|
323
323
|
'daysBack': None,
|
324
324
|
'untilDays': None,
|
325
|
+
'symbolRequired': False,
|
325
326
|
},
|
326
327
|
'fetchOrder': None,
|
327
328
|
'fetchOpenOrders': {
|
@@ -329,6 +330,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
329
330
|
'limit': 100,
|
330
331
|
'trigger': False,
|
331
332
|
'trailing': False,
|
333
|
+
'symbolRequired': False,
|
332
334
|
},
|
333
335
|
'fetchOrders': None, # todo
|
334
336
|
'fetchClosedOrders': {
|
@@ -339,6 +341,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
339
341
|
'untilDays': None,
|
340
342
|
'trigger': False,
|
341
343
|
'trailing': False,
|
344
|
+
'symbolRequired': False,
|
342
345
|
},
|
343
346
|
'fetchOHLCV': {
|
344
347
|
'limit': 1440,
|
@@ -1314,11 +1317,9 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1314
1317
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1315
1318
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1316
1319
|
"""
|
1317
|
-
|
1318
|
-
'cost': cost,
|
1319
|
-
}
|
1320
|
+
params['cost'] = cost
|
1320
1321
|
# only buy side is supported
|
1321
|
-
return await self.create_order(symbol, 'market', side, 0, None,
|
1322
|
+
return await self.create_order(symbol, 'market', side, 0, None, params)
|
1322
1323
|
|
1323
1324
|
async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}) -> Order:
|
1324
1325
|
"""
|
ccxt/async_support/woo.py
CHANGED
@@ -358,17 +358,20 @@ class woo(Exchange, ImplicitAPI):
|
|
358
358
|
'limit': 500,
|
359
359
|
'daysBack': 90,
|
360
360
|
'untilDays': 10000,
|
361
|
+
'symbolRequired': False,
|
361
362
|
},
|
362
363
|
'fetchOrder': {
|
363
364
|
'marginMode': False,
|
364
365
|
'trigger': True,
|
365
366
|
'trailing': False,
|
367
|
+
'symbolRequired': False,
|
366
368
|
},
|
367
369
|
'fetchOpenOrders': {
|
368
370
|
'marginMode': False,
|
369
371
|
'limit': 500,
|
370
372
|
'trigger': True,
|
371
373
|
'trailing': True,
|
374
|
+
'symbolRequired': False,
|
372
375
|
},
|
373
376
|
'fetchOrders': {
|
374
377
|
'marginMode': False,
|
@@ -377,6 +380,7 @@ class woo(Exchange, ImplicitAPI):
|
|
377
380
|
'untilDays': 100000,
|
378
381
|
'trigger': True,
|
379
382
|
'trailing': True,
|
383
|
+
'symbolRequired': False,
|
380
384
|
},
|
381
385
|
'fetchClosedOrders': {
|
382
386
|
'marginMode': False,
|
@@ -386,6 +390,7 @@ class woo(Exchange, ImplicitAPI):
|
|
386
390
|
'untilDays': 100000,
|
387
391
|
'trigger': True,
|
388
392
|
'trailing': True,
|
393
|
+
'symbolRequired': False,
|
389
394
|
},
|
390
395
|
'fetchOHLCV': {
|
391
396
|
'limit': 1000,
|
@@ -1132,6 +1137,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1132
1137
|
'algoType': 'POSITIONAL_TP_SL',
|
1133
1138
|
'childOrders': [],
|
1134
1139
|
}
|
1140
|
+
childOrders = outterOrder['childOrders']
|
1135
1141
|
closeSide = 'SELL' if (orderSide == 'BUY') else 'BUY'
|
1136
1142
|
if stopLoss is not None:
|
1137
1143
|
stopLossPrice = self.safe_string(stopLoss, 'triggerPrice', stopLoss)
|
@@ -1142,7 +1148,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1142
1148
|
'type': 'CLOSE_POSITION',
|
1143
1149
|
'reduceOnly': True,
|
1144
1150
|
}
|
1145
|
-
|
1151
|
+
childOrders.append(stopLossOrder)
|
1146
1152
|
if takeProfit is not None:
|
1147
1153
|
takeProfitPrice = self.safe_string(takeProfit, 'triggerPrice', takeProfit)
|
1148
1154
|
takeProfitOrder: dict = {
|
@@ -1152,7 +1158,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1152
1158
|
'type': 'CLOSE_POSITION',
|
1153
1159
|
'reduceOnly': True,
|
1154
1160
|
}
|
1155
|
-
|
1161
|
+
childOrders.append(takeProfitOrder)
|
1156
1162
|
request['childOrders'] = [outterOrder]
|
1157
1163
|
params = self.omit(params, ['clOrdID', 'clientOrderId', 'client_order_id', 'postOnly', 'timeInForce', 'stopPrice', 'triggerPrice', 'stopLoss', 'takeProfit', 'trailingPercent', 'trailingAmount', 'trailingTriggerPrice'])
|
1158
1164
|
response = None
|
@@ -2150,7 +2156,9 @@ class woo(Exchange, ImplicitAPI):
|
|
2150
2156
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2151
2157
|
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
2152
2158
|
"""
|
2153
|
-
|
2159
|
+
currencyRows = await self.get_asset_history_rows(code, since, limit, params)
|
2160
|
+
currency = self.safe_value(currencyRows, 0)
|
2161
|
+
rows = self.safe_list(currencyRows, 1)
|
2154
2162
|
return self.parse_ledger(rows, currency, since, limit, params)
|
2155
2163
|
|
2156
2164
|
def parse_ledger_entry(self, item: dict, currency: Currency = None) -> LedgerEntry:
|
@@ -2250,7 +2258,9 @@ class woo(Exchange, ImplicitAPI):
|
|
2250
2258
|
request: dict = {
|
2251
2259
|
'type': 'BALANCE',
|
2252
2260
|
}
|
2253
|
-
|
2261
|
+
currencyRows = await self.get_asset_history_rows(code, since, limit, self.extend(request, params))
|
2262
|
+
currency = self.safe_value(currencyRows, 0)
|
2263
|
+
rows = self.safe_list(currencyRows, 1)
|
2254
2264
|
#
|
2255
2265
|
# {
|
2256
2266
|
# "rows":[],
|
@@ -3119,7 +3129,7 @@ class woo(Exchange, ImplicitAPI):
|
|
3119
3129
|
}
|
3120
3130
|
return await self.v1PrivatePostClientIsolatedMargin(self.extend(request, params))
|
3121
3131
|
|
3122
|
-
async def fetch_position(self, symbol: Str
|
3132
|
+
async def fetch_position(self, symbol: Str, params={}):
|
3123
3133
|
await self.load_markets()
|
3124
3134
|
market = self.market(symbol)
|
3125
3135
|
request: dict = {
|