ccxt 4.2.84__py2.py3-none-any.whl → 4.2.85__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/ace.py +5 -5
- ccxt/ascendex.py +8 -8
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +5 -5
- ccxt/async_support/ascendex.py +8 -8
- ccxt/async_support/base/exchange.py +3 -27
- ccxt/async_support/bigone.py +12 -12
- ccxt/async_support/binance.py +20 -32
- ccxt/async_support/bingx.py +12 -9
- ccxt/async_support/bit2c.py +1 -1
- ccxt/async_support/bitbank.py +8 -8
- ccxt/async_support/bitbns.py +5 -5
- ccxt/async_support/bitfinex.py +1 -1
- ccxt/async_support/bitfinex2.py +1 -1
- ccxt/async_support/bitget.py +29 -24
- ccxt/async_support/bithumb.py +5 -5
- ccxt/async_support/bitmart.py +16 -16
- ccxt/async_support/bitopro.py +1 -1
- ccxt/async_support/bitrue.py +4 -4
- ccxt/async_support/bitso.py +5 -5
- ccxt/async_support/bitstamp.py +1 -1
- ccxt/async_support/bitteam.py +8 -8
- ccxt/async_support/bl3p.py +1 -1
- ccxt/async_support/btcturk.py +6 -6
- ccxt/async_support/bybit.py +30 -83
- ccxt/async_support/coincheck.py +4 -4
- ccxt/async_support/coinex.py +11 -11
- ccxt/async_support/coinlist.py +7 -7
- ccxt/async_support/coinmate.py +4 -4
- ccxt/async_support/coinmetro.py +3 -3
- ccxt/async_support/coinone.py +5 -5
- ccxt/async_support/coinspot.py +2 -2
- ccxt/async_support/cryptocom.py +17 -17
- ccxt/async_support/currencycom.py +1 -1
- ccxt/async_support/delta.py +0 -8
- ccxt/async_support/deribit.py +16 -80
- ccxt/async_support/digifinex.py +8 -8
- ccxt/async_support/exmo.py +8 -8
- ccxt/async_support/gate.py +0 -8
- ccxt/async_support/hitbtc.py +5 -4
- ccxt/async_support/hollaex.py +7 -7
- ccxt/async_support/htx.py +7 -7
- ccxt/async_support/huobijp.py +3 -3
- ccxt/async_support/idex.py +2 -2
- ccxt/async_support/independentreserve.py +2 -2
- ccxt/async_support/indodax.py +2 -2
- ccxt/async_support/kraken.py +8 -8
- ccxt/async_support/krakenfutures.py +6 -6
- ccxt/async_support/kucoin.py +4 -1
- ccxt/async_support/kucoinfutures.py +8 -8
- ccxt/async_support/kuna.py +16 -16
- ccxt/async_support/latoken.py +2 -2
- ccxt/async_support/lbank.py +10 -10
- ccxt/async_support/luno.py +4 -4
- ccxt/async_support/mercado.py +5 -5
- ccxt/async_support/mexc.py +6 -6
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/novadax.py +9 -9
- ccxt/async_support/oceanex.py +7 -7
- ccxt/async_support/okcoin.py +13 -13
- ccxt/async_support/okx.py +23 -31
- ccxt/async_support/onetrading.py +4 -4
- ccxt/async_support/p2b.py +7 -7
- ccxt/async_support/phemex.py +12 -12
- ccxt/async_support/poloniexfutures.py +5 -5
- ccxt/async_support/probit.py +11 -11
- ccxt/async_support/timex.py +7 -7
- ccxt/async_support/tokocrypto.py +9 -9
- ccxt/async_support/wavesexchange.py +3 -3
- ccxt/async_support/whitebit.py +5 -5
- ccxt/async_support/woo.py +1 -1
- ccxt/async_support/zaif.py +1 -1
- ccxt/async_support/zonda.py +7 -7
- ccxt/base/exchange.py +66 -23
- ccxt/bigone.py +12 -12
- ccxt/binance.py +20 -32
- ccxt/bingx.py +12 -9
- ccxt/bit2c.py +1 -1
- ccxt/bitbank.py +8 -8
- ccxt/bitbns.py +5 -5
- ccxt/bitfinex.py +1 -1
- ccxt/bitfinex2.py +1 -1
- ccxt/bitget.py +29 -24
- ccxt/bithumb.py +5 -5
- ccxt/bitmart.py +16 -16
- ccxt/bitopro.py +1 -1
- ccxt/bitrue.py +4 -4
- ccxt/bitso.py +5 -5
- ccxt/bitstamp.py +1 -1
- ccxt/bitteam.py +8 -8
- ccxt/bl3p.py +1 -1
- ccxt/btcturk.py +6 -6
- ccxt/bybit.py +30 -83
- ccxt/coincheck.py +4 -4
- ccxt/coinex.py +11 -11
- ccxt/coinlist.py +7 -7
- ccxt/coinmate.py +4 -4
- ccxt/coinmetro.py +3 -3
- ccxt/coinone.py +5 -5
- ccxt/coinspot.py +2 -2
- ccxt/cryptocom.py +17 -17
- ccxt/currencycom.py +1 -1
- ccxt/delta.py +0 -8
- ccxt/deribit.py +16 -80
- ccxt/digifinex.py +8 -8
- ccxt/exmo.py +8 -8
- ccxt/gate.py +0 -8
- ccxt/hitbtc.py +5 -4
- ccxt/hollaex.py +7 -7
- ccxt/htx.py +7 -7
- ccxt/huobijp.py +3 -3
- ccxt/idex.py +2 -2
- ccxt/independentreserve.py +2 -2
- ccxt/indodax.py +2 -2
- ccxt/kraken.py +8 -8
- ccxt/krakenfutures.py +6 -6
- ccxt/kucoin.py +4 -1
- ccxt/kucoinfutures.py +8 -8
- ccxt/kuna.py +16 -16
- ccxt/latoken.py +2 -2
- ccxt/lbank.py +10 -10
- ccxt/luno.py +4 -4
- ccxt/mercado.py +5 -5
- ccxt/mexc.py +6 -6
- ccxt/ndax.py +1 -1
- ccxt/novadax.py +9 -9
- ccxt/oceanex.py +7 -7
- ccxt/okcoin.py +13 -13
- ccxt/okx.py +23 -31
- ccxt/onetrading.py +4 -4
- ccxt/p2b.py +7 -7
- ccxt/phemex.py +12 -12
- ccxt/poloniexfutures.py +5 -5
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +150 -112
- ccxt/pro/kucoin.py +6 -7
- ccxt/pro/okx.py +12 -1
- ccxt/probit.py +11 -11
- ccxt/timex.py +7 -7
- ccxt/tokocrypto.py +9 -9
- ccxt/wavesexchange.py +3 -3
- ccxt/whitebit.py +5 -5
- ccxt/woo.py +1 -1
- ccxt/zaif.py +1 -1
- ccxt/zonda.py +7 -7
- {ccxt-4.2.84.dist-info → ccxt-4.2.85.dist-info}/METADATA +4 -4
- {ccxt-4.2.84.dist-info → ccxt-4.2.85.dist-info}/RECORD +150 -150
- {ccxt-4.2.84.dist-info → ccxt-4.2.85.dist-info}/WHEEL +0 -0
- {ccxt-4.2.84.dist-info → ccxt-4.2.85.dist-info}/top_level.txt +0 -0
ccxt/async_support/p2b.py
CHANGED
@@ -564,7 +564,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
564
564
|
# current_time: '1699255571.413828'
|
565
565
|
# }
|
566
566
|
#
|
567
|
-
result = self.
|
567
|
+
result = self.safe_list(response, 'result', [])
|
568
568
|
return self.parse_trades(result, market, since, limit)
|
569
569
|
|
570
570
|
def parse_trade(self, trade, market: Market = None):
|
@@ -676,7 +676,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
676
676
|
# current_time: '1699256375.030494'
|
677
677
|
# }
|
678
678
|
#
|
679
|
-
result = self.
|
679
|
+
result = self.safe_list(response, 'result', [])
|
680
680
|
return self.parse_ohlcvs(result, market, timeframe, since, limit)
|
681
681
|
|
682
682
|
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
@@ -805,7 +805,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
805
805
|
# }
|
806
806
|
# }
|
807
807
|
#
|
808
|
-
result = self.
|
808
|
+
result = self.safe_dict(response, 'result')
|
809
809
|
return self.parse_order(result, market)
|
810
810
|
|
811
811
|
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
@@ -848,7 +848,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
848
848
|
# }
|
849
849
|
# }
|
850
850
|
#
|
851
|
-
result = self.
|
851
|
+
result = self.safe_dict(response, 'result')
|
852
852
|
return self.parse_order(result)
|
853
853
|
|
854
854
|
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
@@ -899,7 +899,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
899
899
|
# ]
|
900
900
|
# }
|
901
901
|
#
|
902
|
-
result = self.
|
902
|
+
result = self.safe_list(response, 'result', [])
|
903
903
|
return self.parse_orders(result, market, since, limit)
|
904
904
|
|
905
905
|
async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
@@ -948,7 +948,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
948
948
|
# }
|
949
949
|
#
|
950
950
|
result = self.safe_value(response, 'result', {})
|
951
|
-
records = self.
|
951
|
+
records = self.safe_list(result, 'records', [])
|
952
952
|
return self.parse_trades(records, market, since, limit)
|
953
953
|
|
954
954
|
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
@@ -1015,7 +1015,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
1015
1015
|
# }
|
1016
1016
|
#
|
1017
1017
|
result = self.safe_value(response, 'result', {})
|
1018
|
-
deals = self.
|
1018
|
+
deals = self.safe_list(result, 'deals', [])
|
1019
1019
|
return self.parse_trades(deals, market, since, limit)
|
1020
1020
|
|
1021
1021
|
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
ccxt/async_support/phemex.py
CHANGED
@@ -1266,7 +1266,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
1266
1266
|
# }
|
1267
1267
|
#
|
1268
1268
|
data = self.safe_value(response, 'data', {})
|
1269
|
-
rows = self.
|
1269
|
+
rows = self.safe_list(data, 'rows', [])
|
1270
1270
|
return self.parse_ohlcvs(rows, market, timeframe, since, userLimit)
|
1271
1271
|
|
1272
1272
|
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
@@ -1422,7 +1422,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
1422
1422
|
# }
|
1423
1423
|
# }
|
1424
1424
|
#
|
1425
|
-
result = self.
|
1425
|
+
result = self.safe_dict(response, 'result', {})
|
1426
1426
|
return self.parse_ticker(result, market)
|
1427
1427
|
|
1428
1428
|
async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
@@ -1452,7 +1452,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
1452
1452
|
response = await self.v1GetMdTicker24hrAll(query)
|
1453
1453
|
else:
|
1454
1454
|
response = await self.v2GetMdV2Ticker24hrAll(query)
|
1455
|
-
result = self.
|
1455
|
+
result = self.safe_list(response, 'result', [])
|
1456
1456
|
return self.parse_tickers(result, symbols)
|
1457
1457
|
|
1458
1458
|
async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
@@ -2587,7 +2587,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
2587
2587
|
# }
|
2588
2588
|
# }
|
2589
2589
|
#
|
2590
|
-
data = self.
|
2590
|
+
data = self.safe_dict(response, 'data', {})
|
2591
2591
|
return self.parse_order(data, market)
|
2592
2592
|
|
2593
2593
|
async def edit_order(self, id: str, symbol: str, type: OrderType = None, side: OrderSide = None, amount: Num = None, price: Num = None, params={}):
|
@@ -2648,7 +2648,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
2648
2648
|
response = await self.privatePutOrdersReplace(self.extend(request, params))
|
2649
2649
|
else:
|
2650
2650
|
response = await self.privatePutSpotOrders(self.extend(request, params))
|
2651
|
-
data = self.
|
2651
|
+
data = self.safe_dict(response, 'data', {})
|
2652
2652
|
return self.parse_order(data, market)
|
2653
2653
|
|
2654
2654
|
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
@@ -2684,7 +2684,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
2684
2684
|
response = await self.privateDeleteOrdersCancel(self.extend(request, params))
|
2685
2685
|
else:
|
2686
2686
|
response = await self.privateDeleteSpotOrders(self.extend(request, params))
|
2687
|
-
data = self.
|
2687
|
+
data = self.safe_dict(response, 'data', {})
|
2688
2688
|
return self.parse_order(data, market)
|
2689
2689
|
|
2690
2690
|
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
@@ -2782,7 +2782,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
2782
2782
|
else:
|
2783
2783
|
response = await self.privateGetSpotOrders(self.extend(request, params))
|
2784
2784
|
data = self.safe_value(response, 'data', {})
|
2785
|
-
rows = self.
|
2785
|
+
rows = self.safe_list(data, 'rows', data)
|
2786
2786
|
return self.parse_orders(rows, market, since, limit)
|
2787
2787
|
|
2788
2788
|
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
@@ -2821,7 +2821,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
2821
2821
|
if isinstance(data, list):
|
2822
2822
|
return self.parse_orders(data, market, since, limit)
|
2823
2823
|
else:
|
2824
|
-
rows = self.
|
2824
|
+
rows = self.safe_list(data, 'rows', [])
|
2825
2825
|
return self.parse_orders(rows, market, since, limit)
|
2826
2826
|
|
2827
2827
|
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
@@ -2898,7 +2898,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
2898
2898
|
if isinstance(data, list):
|
2899
2899
|
return self.parse_orders(data, market, since, limit)
|
2900
2900
|
else:
|
2901
|
-
rows = self.
|
2901
|
+
rows = self.safe_list(data, 'rows', [])
|
2902
2902
|
return self.parse_orders(rows, market, since, limit)
|
2903
2903
|
|
2904
2904
|
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
@@ -3942,7 +3942,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
3942
3942
|
#
|
3943
3943
|
#
|
3944
3944
|
data = self.safe_value(response, 'data', {})
|
3945
|
-
riskLimits = self.
|
3945
|
+
riskLimits = self.safe_list(data, 'riskLimits')
|
3946
3946
|
return self.parse_leverage_tiers(riskLimits, symbols, 'symbol')
|
3947
3947
|
|
3948
3948
|
def parse_market_leverage_tiers(self, info, market: Market = None):
|
@@ -4173,7 +4173,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
4173
4173
|
# }
|
4174
4174
|
#
|
4175
4175
|
data = self.safe_value(response, 'data', {})
|
4176
|
-
transfers = self.
|
4176
|
+
transfers = self.safe_list(data, 'rows', [])
|
4177
4177
|
return self.parse_transfers(transfers, currency, since, limit)
|
4178
4178
|
|
4179
4179
|
def parse_transfer(self, transfer, currency: Currency = None):
|
@@ -4375,7 +4375,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
4375
4375
|
# }
|
4376
4376
|
# }
|
4377
4377
|
#
|
4378
|
-
data = self.
|
4378
|
+
data = self.safe_dict(response, 'data', {})
|
4379
4379
|
return self.parse_transaction(data, currency)
|
4380
4380
|
|
4381
4381
|
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
@@ -665,7 +665,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
665
665
|
# },
|
666
666
|
# }
|
667
667
|
#
|
668
|
-
trades = self.
|
668
|
+
trades = self.safe_list(response, 'data', [])
|
669
669
|
return self.parse_trades(trades, market, since, limit)
|
670
670
|
|
671
671
|
async def fetch_time(self, params={}):
|
@@ -729,7 +729,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
729
729
|
# ]
|
730
730
|
# }
|
731
731
|
#
|
732
|
-
data = self.
|
732
|
+
data = self.safe_list(response, 'data', [])
|
733
733
|
return self.parse_ohlcvs(data, market, timeframe, since, limit)
|
734
734
|
|
735
735
|
def parse_balance(self, response) -> Balances:
|
@@ -970,7 +970,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
970
970
|
# ]
|
971
971
|
# }
|
972
972
|
#
|
973
|
-
data = self.
|
973
|
+
data = self.safe_list(response, 'data')
|
974
974
|
return self.parse_positions(data, symbols)
|
975
975
|
|
976
976
|
def parse_position(self, position, market: Market = None):
|
@@ -1389,7 +1389,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1389
1389
|
# }
|
1390
1390
|
#
|
1391
1391
|
market = self.market(symbol) if (symbol is not None) else None
|
1392
|
-
responseData = self.
|
1392
|
+
responseData = self.safe_dict(response, 'data')
|
1393
1393
|
return self.parse_order(responseData, market)
|
1394
1394
|
|
1395
1395
|
def parse_order(self, order, market: Market = None) -> Order:
|
@@ -1616,7 +1616,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1616
1616
|
# }
|
1617
1617
|
#
|
1618
1618
|
data = self.safe_value(response, 'data', {})
|
1619
|
-
trades = self.
|
1619
|
+
trades = self.safe_list(data, 'items', [])
|
1620
1620
|
return self.parse_trades(trades, market, since, limit)
|
1621
1621
|
|
1622
1622
|
async def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
|
ccxt/async_support/probit.py
CHANGED
@@ -616,7 +616,7 @@ class probit(Exchange, ImplicitAPI):
|
|
616
616
|
# ]
|
617
617
|
# }
|
618
618
|
#
|
619
|
-
data = self.
|
619
|
+
data = self.safe_list(response, 'data', [])
|
620
620
|
return self.parse_tickers(data, symbols)
|
621
621
|
|
622
622
|
async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
@@ -744,7 +744,7 @@ class probit(Exchange, ImplicitAPI):
|
|
744
744
|
# ]
|
745
745
|
# }
|
746
746
|
#
|
747
|
-
data = self.
|
747
|
+
data = self.safe_list(response, 'data', [])
|
748
748
|
return self.parse_trades(data, market, since, limit)
|
749
749
|
|
750
750
|
async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
@@ -793,7 +793,7 @@ class probit(Exchange, ImplicitAPI):
|
|
793
793
|
# ]
|
794
794
|
# }
|
795
795
|
#
|
796
|
-
data = self.
|
796
|
+
data = self.safe_list(response, 'data', [])
|
797
797
|
return self.parse_trades(data, market, since, limit)
|
798
798
|
|
799
799
|
def parse_trade(self, trade, market: Market = None) -> Trade:
|
@@ -963,7 +963,7 @@ class probit(Exchange, ImplicitAPI):
|
|
963
963
|
# ]
|
964
964
|
# }
|
965
965
|
#
|
966
|
-
data = self.
|
966
|
+
data = self.safe_list(response, 'data', [])
|
967
967
|
return self.parse_ohlcvs(data, market, timeframe, since, limit)
|
968
968
|
|
969
969
|
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
@@ -1007,7 +1007,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1007
1007
|
market = self.market(symbol)
|
1008
1008
|
request['market_id'] = market['id']
|
1009
1009
|
response = await self.privateGetOpenOrder(self.extend(request, params))
|
1010
|
-
data = self.
|
1010
|
+
data = self.safe_list(response, 'data')
|
1011
1011
|
return self.parse_orders(data, market, since, limit)
|
1012
1012
|
|
1013
1013
|
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
@@ -1035,7 +1035,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1035
1035
|
if limit:
|
1036
1036
|
request['limit'] = limit
|
1037
1037
|
response = await self.privateGetOrderHistory(self.extend(request, params))
|
1038
|
-
data = self.
|
1038
|
+
data = self.safe_list(response, 'data')
|
1039
1039
|
return self.parse_orders(data, market, since, limit)
|
1040
1040
|
|
1041
1041
|
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
@@ -1061,7 +1061,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1061
1061
|
query = self.omit(params, ['clientOrderId', 'client_order_id'])
|
1062
1062
|
response = await self.privateGetOrder(self.extend(request, query))
|
1063
1063
|
data = self.safe_value(response, 'data', [])
|
1064
|
-
order = self.
|
1064
|
+
order = self.safe_dict(data, 0)
|
1065
1065
|
return self.parse_order(order, market)
|
1066
1066
|
|
1067
1067
|
def parse_order_status(self, status):
|
@@ -1242,7 +1242,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1242
1242
|
'order_id': id,
|
1243
1243
|
}
|
1244
1244
|
response = await self.privatePostCancelOrder(self.extend(request, params))
|
1245
|
-
data = self.
|
1245
|
+
data = self.safe_dict(response, 'data')
|
1246
1246
|
return self.parse_order(data)
|
1247
1247
|
|
1248
1248
|
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
@@ -1328,7 +1328,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1328
1328
|
currencyIds.append(currency['id'])
|
1329
1329
|
request['currency_id'] = ','.join(codes)
|
1330
1330
|
response = await self.privateGetDepositAddress(self.extend(request, params))
|
1331
|
-
data = self.
|
1331
|
+
data = self.safe_list(response, 'data', [])
|
1332
1332
|
return self.parse_deposit_addresses(data, codes)
|
1333
1333
|
|
1334
1334
|
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
@@ -1371,7 +1371,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1371
1371
|
request['platform_id'] = network
|
1372
1372
|
params = self.omit(params, 'network')
|
1373
1373
|
response = await self.privatePostWithdrawal(self.extend(request, params))
|
1374
|
-
data = self.
|
1374
|
+
data = self.safe_dict(response, 'data')
|
1375
1375
|
return self.parse_transaction(data, currency)
|
1376
1376
|
|
1377
1377
|
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
@@ -1605,7 +1605,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1605
1605
|
# ]
|
1606
1606
|
# }
|
1607
1607
|
#
|
1608
|
-
data = self.
|
1608
|
+
data = self.safe_list(response, 'data')
|
1609
1609
|
return self.parse_deposit_withdraw_fees(data, codes, 'id')
|
1610
1610
|
|
1611
1611
|
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
ccxt/async_support/timex.py
CHANGED
@@ -541,7 +541,7 @@ class timex(Exchange, ImplicitAPI):
|
|
541
541
|
# }
|
542
542
|
# ]
|
543
543
|
#
|
544
|
-
ticker = self.
|
544
|
+
ticker = self.safe_dict(response, 0)
|
545
545
|
return self.parse_ticker(ticker, market)
|
546
546
|
|
547
547
|
async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
@@ -779,7 +779,7 @@ class timex(Exchange, ImplicitAPI):
|
|
779
779
|
# }
|
780
780
|
#
|
781
781
|
orders = self.safe_value(response, 'orders', [])
|
782
|
-
order = self.
|
782
|
+
order = self.safe_dict(orders, 0, {})
|
783
783
|
return self.parse_order(order, market)
|
784
784
|
|
785
785
|
async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
|
@@ -827,7 +827,7 @@ class timex(Exchange, ImplicitAPI):
|
|
827
827
|
})
|
828
828
|
orders = self.safe_value(response, 'changedOrders', [])
|
829
829
|
firstOrder = self.safe_value(orders, 0, {})
|
830
|
-
order = self.
|
830
|
+
order = self.safe_dict(firstOrder, 'newOrder', {})
|
831
831
|
return self.parse_order(order, market)
|
832
832
|
|
833
833
|
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
@@ -929,7 +929,7 @@ class timex(Exchange, ImplicitAPI):
|
|
929
929
|
# }
|
930
930
|
#
|
931
931
|
order = self.safe_value(response, 'order', {})
|
932
|
-
trades = self.
|
932
|
+
trades = self.safe_list(response, 'trades', [])
|
933
933
|
return self.parse_order(self.extend(order, {'trades': trades}))
|
934
934
|
|
935
935
|
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
@@ -980,7 +980,7 @@ class timex(Exchange, ImplicitAPI):
|
|
980
980
|
# ]
|
981
981
|
# }
|
982
982
|
#
|
983
|
-
orders = self.
|
983
|
+
orders = self.safe_list(response, 'orders', [])
|
984
984
|
return self.parse_orders(orders, market, since, limit)
|
985
985
|
|
986
986
|
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
@@ -1035,7 +1035,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1035
1035
|
# ]
|
1036
1036
|
# }
|
1037
1037
|
#
|
1038
|
-
orders = self.
|
1038
|
+
orders = self.safe_list(response, 'orders', [])
|
1039
1039
|
return self.parse_orders(orders, market, since, limit)
|
1040
1040
|
|
1041
1041
|
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
@@ -1093,7 +1093,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1093
1093
|
# ]
|
1094
1094
|
# }
|
1095
1095
|
#
|
1096
|
-
trades = self.
|
1096
|
+
trades = self.safe_list(response, 'trades', [])
|
1097
1097
|
return self.parse_trades(trades, market, since, limit)
|
1098
1098
|
|
1099
1099
|
def parse_trading_fee(self, fee, market: Market = None):
|
ccxt/async_support/tokocrypto.py
CHANGED
@@ -1203,7 +1203,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1203
1203
|
}
|
1204
1204
|
response = await self.binanceGetTicker24hr(self.extend(request, params))
|
1205
1205
|
if isinstance(response, list):
|
1206
|
-
firstTicker = self.
|
1206
|
+
firstTicker = self.safe_dict(response, 0, {})
|
1207
1207
|
return self.parse_ticker(firstTicker, market)
|
1208
1208
|
return self.parse_ticker(response, market)
|
1209
1209
|
|
@@ -1311,7 +1311,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1311
1311
|
# [1591478640000,"0.02500800","0.02501100","0.02500300","0.02500800","154.14200000",1591478699999,"3.85405839",97,"5.32300000","0.13312641","0"],
|
1312
1312
|
# ]
|
1313
1313
|
#
|
1314
|
-
data = self.
|
1314
|
+
data = self.safe_list(response, 'data', response)
|
1315
1315
|
return self.parse_ohlcvs(data, market, timeframe, since, limit)
|
1316
1316
|
|
1317
1317
|
async def fetch_balance(self, params={}) -> Balances:
|
@@ -1712,7 +1712,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1712
1712
|
# "timestamp": 1662710994975
|
1713
1713
|
# }
|
1714
1714
|
#
|
1715
|
-
rawOrder = self.
|
1715
|
+
rawOrder = self.safe_dict(response, 'data', {})
|
1716
1716
|
return self.parse_order(rawOrder, market)
|
1717
1717
|
|
1718
1718
|
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
@@ -1759,7 +1759,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1759
1759
|
#
|
1760
1760
|
data = self.safe_value(response, 'data', {})
|
1761
1761
|
list = self.safe_value(data, 'list', [])
|
1762
|
-
rawOrder = self.
|
1762
|
+
rawOrder = self.safe_dict(list, 0, {})
|
1763
1763
|
return self.parse_order(rawOrder)
|
1764
1764
|
|
1765
1765
|
async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
@@ -1825,7 +1825,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1825
1825
|
# }
|
1826
1826
|
#
|
1827
1827
|
data = self.safe_value(response, 'data', {})
|
1828
|
-
orders = self.
|
1828
|
+
orders = self.safe_list(data, 'list', [])
|
1829
1829
|
return self.parse_orders(orders, market, since, limit)
|
1830
1830
|
|
1831
1831
|
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
@@ -1894,7 +1894,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1894
1894
|
# "timestamp": 1662710683634
|
1895
1895
|
# }
|
1896
1896
|
#
|
1897
|
-
rawOrder = self.
|
1897
|
+
rawOrder = self.safe_dict(response, 'data', {})
|
1898
1898
|
return self.parse_order(rawOrder)
|
1899
1899
|
|
1900
1900
|
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
@@ -1949,7 +1949,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1949
1949
|
# }
|
1950
1950
|
#
|
1951
1951
|
data = self.safe_value(response, 'data', {})
|
1952
|
-
trades = self.
|
1952
|
+
trades = self.safe_list(data, 'list', [])
|
1953
1953
|
return self.parse_trades(trades, market, since, limit)
|
1954
1954
|
|
1955
1955
|
async def fetch_deposit_address(self, code: str, params={}):
|
@@ -2056,7 +2056,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2056
2056
|
# }
|
2057
2057
|
#
|
2058
2058
|
data = self.safe_value(response, 'data', {})
|
2059
|
-
deposits = self.
|
2059
|
+
deposits = self.safe_list(data, 'list', [])
|
2060
2060
|
return self.parse_transactions(deposits, currency, since, limit)
|
2061
2061
|
|
2062
2062
|
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
@@ -2108,7 +2108,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2108
2108
|
# }
|
2109
2109
|
#
|
2110
2110
|
data = self.safe_value(response, 'data', {})
|
2111
|
-
withdrawals = self.
|
2111
|
+
withdrawals = self.safe_list(data, 'list', [])
|
2112
2112
|
return self.parse_transactions(withdrawals, currency, since, limit)
|
2113
2113
|
|
2114
2114
|
def parse_transaction_status_by_type(self, status, type=None):
|
@@ -861,7 +861,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
861
861
|
#
|
862
862
|
data = self.safe_value(response, 'data', [])
|
863
863
|
ticker = self.safe_value(data, 0, {})
|
864
|
-
dataTicker = self.
|
864
|
+
dataTicker = self.safe_dict(ticker, 'data', {})
|
865
865
|
return self.parse_ticker(dataTicker, market)
|
866
866
|
|
867
867
|
async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
@@ -1386,11 +1386,11 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1386
1386
|
#
|
1387
1387
|
if isMarketOrder:
|
1388
1388
|
response = await self.matcherPostMatcherOrderbookMarket(body)
|
1389
|
-
value = self.
|
1389
|
+
value = self.safe_dict(response, 'message')
|
1390
1390
|
return self.parse_order(value, market)
|
1391
1391
|
else:
|
1392
1392
|
response = await self.matcherPostMatcherOrderbook(body)
|
1393
|
-
value = self.
|
1393
|
+
value = self.safe_dict(response, 'message')
|
1394
1394
|
return self.parse_order(value, market)
|
1395
1395
|
|
1396
1396
|
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
ccxt/async_support/whitebit.py
CHANGED
@@ -728,7 +728,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
728
728
|
# },
|
729
729
|
# }
|
730
730
|
#
|
731
|
-
ticker = self.
|
731
|
+
ticker = self.safe_dict(response, 'result', {})
|
732
732
|
return self.parse_ticker(ticker, market)
|
733
733
|
|
734
734
|
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
@@ -1069,7 +1069,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1069
1069
|
# ]
|
1070
1070
|
# }
|
1071
1071
|
#
|
1072
|
-
result = self.
|
1072
|
+
result = self.safe_list(response, 'result', [])
|
1073
1073
|
return self.parse_ohlcvs(result, market, timeframe, since, limit)
|
1074
1074
|
|
1075
1075
|
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
@@ -1523,7 +1523,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1523
1523
|
# "limit": 100
|
1524
1524
|
# }
|
1525
1525
|
#
|
1526
|
-
data = self.
|
1526
|
+
data = self.safe_list(response, 'records', [])
|
1527
1527
|
return self.parse_trades(data, market)
|
1528
1528
|
|
1529
1529
|
async def fetch_deposit_address(self, code: str, params={}):
|
@@ -1842,7 +1842,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1842
1842
|
# }
|
1843
1843
|
#
|
1844
1844
|
records = self.safe_value(response, 'records', [])
|
1845
|
-
first = self.
|
1845
|
+
first = self.safe_dict(records, 0, {})
|
1846
1846
|
return self.parse_transaction(first, currency)
|
1847
1847
|
|
1848
1848
|
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
@@ -1905,7 +1905,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1905
1905
|
# "total": 300 # total number of transactions, use self for calculating ‘limit’ and ‘offset'
|
1906
1906
|
# }
|
1907
1907
|
#
|
1908
|
-
records = self.
|
1908
|
+
records = self.safe_list(response, 'records', [])
|
1909
1909
|
return self.parse_transactions(records, currency, since, limit)
|
1910
1910
|
|
1911
1911
|
async def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
ccxt/async_support/woo.py
CHANGED
@@ -1258,7 +1258,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1258
1258
|
# ]
|
1259
1259
|
# }
|
1260
1260
|
#
|
1261
|
-
orders = self.
|
1261
|
+
orders = self.safe_dict(response, 'data', response)
|
1262
1262
|
return self.parse_order(orders, market)
|
1263
1263
|
|
1264
1264
|
async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
ccxt/async_support/zaif.py
CHANGED
@@ -600,7 +600,7 @@ class zaif(Exchange, ImplicitAPI):
|
|
600
600
|
# }
|
601
601
|
# }
|
602
602
|
#
|
603
|
-
returnData = self.
|
603
|
+
returnData = self.safe_dict(result, 'return')
|
604
604
|
return self.parse_transaction(returnData, currency)
|
605
605
|
|
606
606
|
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
ccxt/async_support/zonda.py
CHANGED
@@ -421,7 +421,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
421
421
|
await self.load_markets()
|
422
422
|
request = {}
|
423
423
|
response = await self.v1_01PrivateGetTradingOffer(self.extend(request, params))
|
424
|
-
items = self.
|
424
|
+
items = self.safe_list(response, 'items', [])
|
425
425
|
return self.parse_orders(items, None, since, limit, {'status': 'open'})
|
426
426
|
|
427
427
|
def parse_order(self, order, market: Market = None) -> Order:
|
@@ -788,7 +788,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
788
788
|
#
|
789
789
|
else:
|
790
790
|
raise BadRequest(self.id + ' fetchTickers params["method"] must be "v1_01PublicGetTradingTicker" or "v1_01PublicGetTradingStats"')
|
791
|
-
items = self.
|
791
|
+
items = self.safe_dict(response, 'items')
|
792
792
|
return self.parse_tickers(items, symbols)
|
793
793
|
|
794
794
|
async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
@@ -1200,7 +1200,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1200
1200
|
# ]
|
1201
1201
|
# }
|
1202
1202
|
#
|
1203
|
-
items = self.
|
1203
|
+
items = self.safe_list(response, 'items', [])
|
1204
1204
|
return self.parse_ohlcvs(items, market, timeframe, since, limit)
|
1205
1205
|
|
1206
1206
|
def parse_trade(self, trade, market: Market = None) -> Trade:
|
@@ -1298,7 +1298,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1298
1298
|
if limit is not None:
|
1299
1299
|
request['limit'] = limit # default - 10, max - 300
|
1300
1300
|
response = await self.v1_01PublicGetTradingTransactionsSymbol(self.extend(request, params))
|
1301
|
-
items = self.
|
1301
|
+
items = self.safe_list(response, 'items')
|
1302
1302
|
return self.parse_trades(items, market, since, limit)
|
1303
1303
|
|
1304
1304
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
@@ -1509,7 +1509,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1509
1509
|
# }
|
1510
1510
|
#
|
1511
1511
|
data = self.safe_value(response, 'data')
|
1512
|
-
first = self.
|
1512
|
+
first = self.safe_dict(data, 0)
|
1513
1513
|
return self.parse_deposit_address(first, currency)
|
1514
1514
|
|
1515
1515
|
async def fetch_deposit_addresses(self, codes: List[str] = None, params={}):
|
@@ -1535,7 +1535,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1535
1535
|
# ]
|
1536
1536
|
# }
|
1537
1537
|
#
|
1538
|
-
data = self.
|
1538
|
+
data = self.safe_list(response, 'data')
|
1539
1539
|
return self.parse_deposit_addresses(data, codes)
|
1540
1540
|
|
1541
1541
|
async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
@@ -1684,7 +1684,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1684
1684
|
# }
|
1685
1685
|
# }
|
1686
1686
|
#
|
1687
|
-
data = self.
|
1687
|
+
data = self.safe_dict(response, 'data')
|
1688
1688
|
return self.parse_transaction(data, currency)
|
1689
1689
|
|
1690
1690
|
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|