ccxt 4.3.29__py2.py3-none-any.whl → 4.3.31__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 +2 -0
- ccxt/abstract/binancecoinm.py +2 -0
- ccxt/abstract/binanceus.py +2 -0
- ccxt/abstract/binanceusdm.py +2 -0
- ccxt/ace.py +14 -14
- ccxt/alpaca.py +16 -16
- ccxt/ascendex.py +46 -46
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +14 -14
- ccxt/async_support/alpaca.py +16 -16
- ccxt/async_support/ascendex.py +46 -46
- ccxt/async_support/base/exchange.py +23 -23
- ccxt/async_support/base/ws/aiohttp_client.py +1 -0
- ccxt/async_support/base/ws/future.py +27 -29
- ccxt/async_support/bigone.py +32 -32
- ccxt/async_support/binance.py +105 -96
- ccxt/async_support/bingx.py +22 -22
- ccxt/async_support/bit2c.py +13 -13
- ccxt/async_support/bitbank.py +19 -19
- ccxt/async_support/bitbns.py +17 -17
- ccxt/async_support/bitfinex.py +24 -24
- ccxt/async_support/bitfinex2.py +142 -109
- ccxt/async_support/bitflyer.py +23 -23
- ccxt/async_support/bitget.py +76 -76
- ccxt/async_support/bithumb.py +20 -20
- ccxt/async_support/bitmart.py +55 -55
- ccxt/async_support/bitmex.py +41 -41
- ccxt/async_support/bitopro.py +30 -30
- ccxt/async_support/bitrue.py +37 -37
- ccxt/async_support/bitso.py +30 -30
- ccxt/async_support/bitstamp.py +31 -31
- ccxt/async_support/bitteam.py +26 -26
- ccxt/async_support/bitvavo.py +27 -27
- ccxt/async_support/bl3p.py +8 -8
- ccxt/async_support/blockchaincom.py +24 -24
- ccxt/async_support/blofin.py +37 -37
- ccxt/async_support/btcalpha.py +19 -19
- ccxt/async_support/btcbox.py +11 -11
- ccxt/async_support/btcmarkets.py +22 -22
- ccxt/async_support/btcturk.py +13 -13
- ccxt/async_support/bybit.py +96 -96
- ccxt/async_support/cex.py +21 -21
- ccxt/async_support/coinbase.py +53 -53
- ccxt/async_support/coinbaseexchange.py +29 -29
- ccxt/async_support/coinbaseinternational.py +32 -32
- ccxt/async_support/coincheck.py +14 -14
- ccxt/async_support/coinex.py +424 -448
- ccxt/async_support/coinlist.py +35 -35
- ccxt/async_support/coinmate.py +22 -22
- ccxt/async_support/coinmetro.py +22 -22
- ccxt/async_support/coinone.py +18 -18
- ccxt/async_support/coinsph.py +32 -32
- ccxt/async_support/coinspot.py +8 -8
- ccxt/async_support/cryptocom.py +43 -43
- ccxt/async_support/currencycom.py +33 -33
- ccxt/async_support/delta.py +35 -35
- ccxt/async_support/deribit.py +54 -54
- ccxt/async_support/digifinex.py +56 -56
- ccxt/async_support/exmo.py +34 -34
- ccxt/async_support/gate.py +60 -60
- ccxt/async_support/gemini.py +24 -24
- ccxt/async_support/hitbtc.py +51 -51
- ccxt/async_support/hollaex.py +29 -29
- ccxt/async_support/htx.py +73 -73
- ccxt/async_support/huobijp.py +30 -30
- ccxt/async_support/hyperliquid.py +58 -58
- ccxt/async_support/idex.py +33 -33
- ccxt/async_support/independentreserve.py +12 -12
- ccxt/async_support/indodax.py +21 -21
- ccxt/async_support/kraken.py +46 -51
- ccxt/async_support/krakenfutures.py +29 -29
- ccxt/async_support/kucoin.py +51 -51
- ccxt/async_support/kucoinfutures.py +33 -33
- ccxt/async_support/kuna.py +27 -27
- ccxt/async_support/latoken.py +27 -27
- ccxt/async_support/lbank.py +35 -35
- ccxt/async_support/luno.py +19 -19
- ccxt/async_support/lykke.py +20 -20
- ccxt/async_support/mercado.py +17 -17
- ccxt/async_support/mexc.py +64 -64
- ccxt/async_support/ndax.py +38 -38
- ccxt/async_support/novadax.py +26 -26
- ccxt/async_support/oceanex.py +21 -21
- ccxt/async_support/okcoin.py +35 -35
- ccxt/async_support/okx.py +85 -85
- ccxt/async_support/onetrading.py +32 -32
- ccxt/async_support/p2b.py +14 -14
- ccxt/async_support/paymium.py +12 -12
- ccxt/async_support/phemex.py +50 -50
- ccxt/async_support/poloniex.py +35 -35
- ccxt/async_support/poloniexfutures.py +25 -21
- ccxt/async_support/probit.py +30 -30
- ccxt/async_support/timex.py +22 -22
- ccxt/async_support/tokocrypto.py +26 -26
- ccxt/async_support/tradeogre.py +12 -12
- ccxt/async_support/upbit.py +28 -28
- ccxt/async_support/wavesexchange.py +33 -33
- ccxt/async_support/wazirx.py +21 -21
- ccxt/async_support/whitebit.py +80 -40
- ccxt/async_support/woo.py +51 -51
- ccxt/async_support/woofipro.py +46 -46
- ccxt/async_support/yobit.py +20 -20
- ccxt/async_support/zaif.py +12 -12
- ccxt/async_support/zonda.py +22 -22
- ccxt/base/exchange.py +39 -35
- ccxt/base/types.py +13 -0
- ccxt/bigone.py +32 -32
- ccxt/binance.py +105 -96
- ccxt/bingx.py +22 -22
- ccxt/bit2c.py +13 -13
- ccxt/bitbank.py +19 -19
- ccxt/bitbns.py +17 -17
- ccxt/bitfinex.py +24 -24
- ccxt/bitfinex2.py +142 -109
- ccxt/bitflyer.py +23 -23
- ccxt/bitget.py +76 -76
- ccxt/bithumb.py +20 -20
- ccxt/bitmart.py +55 -55
- ccxt/bitmex.py +41 -41
- ccxt/bitopro.py +30 -30
- ccxt/bitrue.py +37 -37
- ccxt/bitso.py +30 -30
- ccxt/bitstamp.py +31 -31
- ccxt/bitteam.py +26 -26
- ccxt/bitvavo.py +27 -27
- ccxt/bl3p.py +8 -8
- ccxt/blockchaincom.py +24 -24
- ccxt/blofin.py +37 -37
- ccxt/btcalpha.py +19 -19
- ccxt/btcbox.py +11 -11
- ccxt/btcmarkets.py +22 -22
- ccxt/btcturk.py +13 -13
- ccxt/bybit.py +96 -96
- ccxt/cex.py +21 -21
- ccxt/coinbase.py +53 -53
- ccxt/coinbaseexchange.py +29 -29
- ccxt/coinbaseinternational.py +32 -32
- ccxt/coincheck.py +14 -14
- ccxt/coinex.py +424 -448
- ccxt/coinlist.py +35 -35
- ccxt/coinmate.py +22 -22
- ccxt/coinmetro.py +22 -22
- ccxt/coinone.py +18 -18
- ccxt/coinsph.py +32 -32
- ccxt/coinspot.py +8 -8
- ccxt/cryptocom.py +43 -43
- ccxt/currencycom.py +33 -33
- ccxt/delta.py +35 -35
- ccxt/deribit.py +54 -54
- ccxt/digifinex.py +56 -56
- ccxt/exmo.py +34 -34
- ccxt/gate.py +60 -60
- ccxt/gemini.py +24 -24
- ccxt/hitbtc.py +51 -51
- ccxt/hollaex.py +29 -29
- ccxt/htx.py +73 -73
- ccxt/huobijp.py +30 -30
- ccxt/hyperliquid.py +58 -58
- ccxt/idex.py +33 -33
- ccxt/independentreserve.py +12 -12
- ccxt/indodax.py +21 -21
- ccxt/kraken.py +46 -51
- ccxt/krakenfutures.py +29 -29
- ccxt/kucoin.py +51 -51
- ccxt/kucoinfutures.py +33 -33
- ccxt/kuna.py +27 -27
- ccxt/latoken.py +27 -27
- ccxt/lbank.py +35 -35
- ccxt/luno.py +19 -19
- ccxt/lykke.py +20 -20
- ccxt/mercado.py +17 -17
- ccxt/mexc.py +64 -64
- ccxt/ndax.py +38 -38
- ccxt/novadax.py +26 -26
- ccxt/oceanex.py +21 -21
- ccxt/okcoin.py +35 -35
- ccxt/okx.py +85 -85
- ccxt/onetrading.py +32 -32
- ccxt/p2b.py +14 -14
- ccxt/paymium.py +12 -12
- ccxt/phemex.py +50 -50
- ccxt/poloniex.py +35 -35
- ccxt/poloniexfutures.py +25 -21
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +8 -8
- ccxt/pro/ascendex.py +4 -4
- ccxt/pro/binance.py +56 -56
- ccxt/pro/bingx.py +5 -5
- ccxt/pro/bitfinex.py +6 -6
- ccxt/pro/bitfinex2.py +10 -10
- ccxt/pro/bitget.py +17 -17
- ccxt/pro/bithumb.py +6 -6
- ccxt/pro/bitmart.py +8 -8
- ccxt/pro/bitmex.py +16 -16
- ccxt/pro/bitopro.py +4 -4
- ccxt/pro/bitrue.py +8 -8
- ccxt/pro/bitstamp.py +5 -5
- ccxt/pro/bitvavo.py +14 -14
- ccxt/pro/blockchaincom.py +7 -7
- ccxt/pro/bybit.py +12 -12
- ccxt/pro/cex.py +19 -19
- ccxt/pro/coinbase.py +2 -2
- ccxt/pro/coinbaseexchange.py +10 -10
- ccxt/pro/coinbaseinternational.py +4 -4
- ccxt/pro/coincheck.py +2 -2
- ccxt/pro/coinex.py +15 -15
- ccxt/pro/coinone.py +4 -4
- ccxt/pro/cryptocom.py +11 -11
- ccxt/pro/currencycom.py +4 -4
- ccxt/pro/deribit.py +9 -9
- ccxt/pro/exmo.py +9 -9
- ccxt/pro/gate.py +12 -12
- ccxt/pro/gemini.py +11 -11
- ccxt/pro/hitbtc.py +13 -13
- ccxt/pro/hollaex.py +6 -6
- ccxt/pro/htx.py +15 -15
- ccxt/pro/huobijp.py +16 -16
- ccxt/pro/hyperliquid.py +9 -9
- ccxt/pro/idex.py +12 -12
- ccxt/pro/independentreserve.py +2 -2
- ccxt/pro/kraken.py +14 -14
- ccxt/pro/krakenfutures.py +12 -12
- ccxt/pro/kucoin.py +12 -12
- ccxt/pro/kucoinfutures.py +16 -16
- ccxt/pro/lbank.py +12 -12
- ccxt/pro/luno.py +4 -4
- ccxt/pro/mexc.py +14 -14
- ccxt/pro/ndax.py +12 -12
- ccxt/pro/okcoin.py +6 -6
- ccxt/pro/okx.py +30 -30
- ccxt/pro/onetrading.py +13 -13
- ccxt/pro/p2b.py +2 -2
- ccxt/pro/phemex.py +9 -9
- ccxt/pro/poloniex.py +9 -9
- ccxt/pro/poloniexfutures.py +10 -10
- ccxt/pro/probit.py +8 -8
- ccxt/pro/upbit.py +1 -1
- ccxt/pro/wazirx.py +10 -10
- ccxt/pro/whitebit.py +8 -8
- ccxt/pro/woo.py +14 -14
- ccxt/pro/woofipro.py +14 -14
- ccxt/probit.py +30 -30
- ccxt/test/base/test_shared_methods.py +1 -0
- ccxt/timex.py +22 -22
- ccxt/tokocrypto.py +26 -26
- ccxt/tradeogre.py +12 -12
- ccxt/upbit.py +28 -28
- ccxt/wavesexchange.py +33 -33
- ccxt/wazirx.py +21 -21
- ccxt/whitebit.py +80 -40
- ccxt/woo.py +51 -51
- ccxt/woofipro.py +46 -46
- ccxt/yobit.py +20 -20
- ccxt/zaif.py +12 -12
- ccxt/zonda.py +22 -22
- {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/METADATA +4 -4
- {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/RECORD +260 -260
- {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/WHEEL +0 -0
- {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/top_level.txt +0 -0
ccxt/onetrading.py
CHANGED
@@ -343,7 +343,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
343
343
|
# }
|
344
344
|
# ]
|
345
345
|
#
|
346
|
-
result = {}
|
346
|
+
result: dict = {}
|
347
347
|
for i in range(0, len(response)):
|
348
348
|
currency = response[i]
|
349
349
|
id = self.safe_string(currency, 'code')
|
@@ -485,7 +485,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
485
485
|
feeTiers = self.safe_value(first, 'fee_tiers')
|
486
486
|
tiers = self.parse_fee_tiers(feeTiers)
|
487
487
|
firstTier = self.safe_value(feeTiers, 0, {})
|
488
|
-
result = {}
|
488
|
+
result: dict = {}
|
489
489
|
for i in range(0, len(self.symbols)):
|
490
490
|
symbol = self.symbols[i]
|
491
491
|
result[symbol] = {
|
@@ -529,7 +529,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
529
529
|
makerFee = Precise.string_div(makerFee, '100')
|
530
530
|
takerFee = Precise.string_div(takerFee, '100')
|
531
531
|
feeTiers = self.safe_value(response, 'fee_tiers')
|
532
|
-
result = {}
|
532
|
+
result: dict = {}
|
533
533
|
tiers = self.parse_fee_tiers(feeTiers)
|
534
534
|
for i in range(0, len(self.symbols)):
|
535
535
|
symbol = self.symbols[i]
|
@@ -622,7 +622,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
622
622
|
"""
|
623
623
|
self.load_markets()
|
624
624
|
market = self.market(symbol)
|
625
|
-
request = {
|
625
|
+
request: dict = {
|
626
626
|
'instrument_code': market['id'],
|
627
627
|
}
|
628
628
|
response = self.publicGetMarketTickerInstrumentCode(self.extend(request, params))
|
@@ -676,7 +676,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
676
676
|
# }
|
677
677
|
# ]
|
678
678
|
#
|
679
|
-
result = {}
|
679
|
+
result: dict = {}
|
680
680
|
for i in range(0, len(response)):
|
681
681
|
ticker = self.parse_ticker(response[i])
|
682
682
|
symbol = ticker['symbol']
|
@@ -693,7 +693,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
693
693
|
"""
|
694
694
|
self.load_markets()
|
695
695
|
market = self.market(symbol)
|
696
|
-
request = {
|
696
|
+
request: dict = {
|
697
697
|
'instrument_code': market['id'],
|
698
698
|
# level 1 means only the best bid and ask
|
699
699
|
# level 2 is a compiled order book up to market precision
|
@@ -781,7 +781,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
781
781
|
granularity = self.safe_value(ohlcv, 'granularity')
|
782
782
|
unit = self.safe_string(granularity, 'unit')
|
783
783
|
period = self.safe_string(granularity, 'period')
|
784
|
-
units = {
|
784
|
+
units: dict = {
|
785
785
|
'MINUTES': 'm',
|
786
786
|
'HOURS': 'h',
|
787
787
|
'DAYS': 'd',
|
@@ -823,7 +823,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
823
823
|
duration = durationInSeconds * 1000
|
824
824
|
if limit is None:
|
825
825
|
limit = 1500
|
826
|
-
request = {
|
826
|
+
request: dict = {
|
827
827
|
'instrument_code': market['id'],
|
828
828
|
# 'from': self.iso8601(since),
|
829
829
|
# 'to': self.iso8601(self.milliseconds()),
|
@@ -847,7 +847,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
847
847
|
#
|
848
848
|
return self.parse_ohlcvs(response, market, timeframe, since, limit)
|
849
849
|
|
850
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
850
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
851
851
|
#
|
852
852
|
# fetchTrades(public)
|
853
853
|
#
|
@@ -937,7 +937,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
937
937
|
"""
|
938
938
|
self.load_markets()
|
939
939
|
market = self.market(symbol)
|
940
|
-
request = {
|
940
|
+
request: dict = {
|
941
941
|
'instrument_code': market['id'],
|
942
942
|
# 'from': self.iso8601(since),
|
943
943
|
# 'to': self.iso8601(self.milliseconds()),
|
@@ -966,7 +966,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
966
966
|
|
967
967
|
def parse_balance(self, response) -> Balances:
|
968
968
|
balances = self.safe_value(response, 'balances', [])
|
969
|
-
result = {'info': response}
|
969
|
+
result: dict = {'info': response}
|
970
970
|
for i in range(0, len(balances)):
|
971
971
|
balance = balances[i]
|
972
972
|
currencyId = self.safe_string(balance, 'currency_code')
|
@@ -1027,7 +1027,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1027
1027
|
"""
|
1028
1028
|
self.load_markets()
|
1029
1029
|
currency = self.currency(code)
|
1030
|
-
request = {
|
1030
|
+
request: dict = {
|
1031
1031
|
'currency': currency['id'],
|
1032
1032
|
}
|
1033
1033
|
response = self.privatePostAccountDepositCrypto(self.extend(request, params))
|
@@ -1050,7 +1050,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1050
1050
|
"""
|
1051
1051
|
self.load_markets()
|
1052
1052
|
currency = self.currency(code)
|
1053
|
-
request = {
|
1053
|
+
request: dict = {
|
1054
1054
|
'currency_code': currency['id'],
|
1055
1055
|
}
|
1056
1056
|
response = self.privateGetAccountDepositCryptoCurrencyCode(self.extend(request, params))
|
@@ -1075,7 +1075,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1075
1075
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
1076
1076
|
"""
|
1077
1077
|
self.load_markets()
|
1078
|
-
request = {
|
1078
|
+
request: dict = {
|
1079
1079
|
# 'cursor': 'string', # pointer specifying the position from which the next pages should be returned
|
1080
1080
|
}
|
1081
1081
|
currency = None
|
@@ -1133,7 +1133,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1133
1133
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
1134
1134
|
"""
|
1135
1135
|
self.load_markets()
|
1136
|
-
request = {
|
1136
|
+
request: dict = {
|
1137
1137
|
# 'cursor': 'string', # pointer specifying the position from which the next pages should be returned
|
1138
1138
|
}
|
1139
1139
|
currency = None
|
@@ -1196,7 +1196,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1196
1196
|
self.check_address(address)
|
1197
1197
|
self.load_markets()
|
1198
1198
|
currency = self.currency(code)
|
1199
|
-
request = {
|
1199
|
+
request: dict = {
|
1200
1200
|
'currency': code,
|
1201
1201
|
'amount': self.currency_to_precision(code, amount),
|
1202
1202
|
# 'payout_account_id': '66756a10-3e86-48f4-9678-b634c4b135b2', # fiat only
|
@@ -1213,7 +1213,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1213
1213
|
if payoutAccountId is None:
|
1214
1214
|
raise ArgumentsRequired(self.id + ' withdraw() requires a payout_account_id param for fiat ' + code + ' withdrawals')
|
1215
1215
|
else:
|
1216
|
-
recipient = {'address': address}
|
1216
|
+
recipient: dict = {'address': address}
|
1217
1217
|
if tag is not None:
|
1218
1218
|
recipient['destination_tag'] = tag
|
1219
1219
|
request['recipient'] = recipient
|
@@ -1237,7 +1237,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1237
1237
|
#
|
1238
1238
|
return self.parse_transaction(response, currency)
|
1239
1239
|
|
1240
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1240
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
1241
1241
|
#
|
1242
1242
|
# fetchDeposits, fetchWithdrawals
|
1243
1243
|
#
|
@@ -1314,8 +1314,8 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1314
1314
|
'fee': fee,
|
1315
1315
|
}
|
1316
1316
|
|
1317
|
-
def parse_order_status(self, status):
|
1318
|
-
statuses = {
|
1317
|
+
def parse_order_status(self, status: Str):
|
1318
|
+
statuses: dict = {
|
1319
1319
|
'FILLED': 'open',
|
1320
1320
|
'FILLED_FULLY': 'closed',
|
1321
1321
|
'FILLED_CLOSED': 'canceled',
|
@@ -1328,7 +1328,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1328
1328
|
}
|
1329
1329
|
return self.safe_string(statuses, status, status)
|
1330
1330
|
|
1331
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1331
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1332
1332
|
#
|
1333
1333
|
# createOrder
|
1334
1334
|
#
|
@@ -1437,8 +1437,8 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1437
1437
|
'trades': rawTrades,
|
1438
1438
|
}, market)
|
1439
1439
|
|
1440
|
-
def parse_time_in_force(self, timeInForce):
|
1441
|
-
timeInForces = {
|
1440
|
+
def parse_time_in_force(self, timeInForce: Str):
|
1441
|
+
timeInForces: dict = {
|
1442
1442
|
'GOOD_TILL_CANCELLED': 'GTC',
|
1443
1443
|
'GOOD_TILL_TIME': 'GTT',
|
1444
1444
|
'IMMEDIATE_OR_CANCELLED': 'IOC',
|
@@ -1462,7 +1462,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1462
1462
|
self.load_markets()
|
1463
1463
|
market = self.market(symbol)
|
1464
1464
|
uppercaseType = type.upper()
|
1465
|
-
request = {
|
1465
|
+
request: dict = {
|
1466
1466
|
'instrument_code': market['id'],
|
1467
1467
|
'type': uppercaseType, # LIMIT, MARKET, STOP
|
1468
1468
|
'side': side.upper(), # or SELL
|
@@ -1522,7 +1522,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1522
1522
|
clientOrderId = self.safe_string_2(params, 'clientOrderId', 'client_id')
|
1523
1523
|
params = self.omit(params, ['clientOrderId', 'client_id'])
|
1524
1524
|
method = 'privateDeleteAccountOrdersOrderId'
|
1525
|
-
request = {}
|
1525
|
+
request: dict = {}
|
1526
1526
|
if clientOrderId is not None:
|
1527
1527
|
method = 'privateDeleteAccountOrdersClientClientId'
|
1528
1528
|
request['client_id'] = clientOrderId
|
@@ -1542,7 +1542,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1542
1542
|
:returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1543
1543
|
"""
|
1544
1544
|
self.load_markets()
|
1545
|
-
request = {}
|
1545
|
+
request: dict = {}
|
1546
1546
|
if symbol is not None:
|
1547
1547
|
market = self.market(symbol)
|
1548
1548
|
request['instrument_code'] = market['id']
|
@@ -1563,7 +1563,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1563
1563
|
:returns dict: an list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1564
1564
|
"""
|
1565
1565
|
self.load_markets()
|
1566
|
-
request = {
|
1566
|
+
request: dict = {
|
1567
1567
|
'ids': ','.join(ids),
|
1568
1568
|
}
|
1569
1569
|
response = self.privateDeleteAccountOrders(self.extend(request, params))
|
@@ -1582,7 +1582,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1582
1582
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1583
1583
|
"""
|
1584
1584
|
self.load_markets()
|
1585
|
-
request = {
|
1585
|
+
request: dict = {
|
1586
1586
|
'order_id': id,
|
1587
1587
|
}
|
1588
1588
|
response = self.privateGetAccountOrdersOrderId(self.extend(request, params))
|
@@ -1639,7 +1639,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1639
1639
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1640
1640
|
"""
|
1641
1641
|
self.load_markets()
|
1642
|
-
request = {
|
1642
|
+
request: dict = {
|
1643
1643
|
# 'from': self.iso8601(since),
|
1644
1644
|
# 'to': self.iso8601(self.milliseconds()), # max range is 100 days
|
1645
1645
|
# 'instrument_code': market['id'],
|
@@ -1752,7 +1752,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1752
1752
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1753
1753
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1754
1754
|
"""
|
1755
|
-
request = {
|
1755
|
+
request: dict = {
|
1756
1756
|
'with_cancelled_and_rejected': True, # default is False, orders which have been cancelled by the user before being filled or rejected by the system, additionally, all inactive filled orders which would return with "with_just_filled_inactive"
|
1757
1757
|
}
|
1758
1758
|
return self.fetch_open_orders(symbol, since, limit, self.extend(request, params))
|
@@ -1768,7 +1768,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1768
1768
|
:returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
|
1769
1769
|
"""
|
1770
1770
|
self.load_markets()
|
1771
|
-
request = {
|
1771
|
+
request: dict = {
|
1772
1772
|
'order_id': id,
|
1773
1773
|
# 'max_page_size': 100,
|
1774
1774
|
# 'cursor': 'string', # pointer specifying the position from which the next pages should be returned
|
@@ -1822,7 +1822,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1822
1822
|
:returns Trade[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
|
1823
1823
|
"""
|
1824
1824
|
self.load_markets()
|
1825
|
-
request = {
|
1825
|
+
request: dict = {
|
1826
1826
|
# 'from': self.iso8601(since),
|
1827
1827
|
# 'to': self.iso8601(self.milliseconds()), # max range is 100 days
|
1828
1828
|
# 'instrument_code': market['id'],
|
ccxt/p2b.py
CHANGED
@@ -386,7 +386,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
386
386
|
"""
|
387
387
|
self.load_markets()
|
388
388
|
market = self.market(symbol)
|
389
|
-
request = {
|
389
|
+
request: dict = {
|
390
390
|
'market': market['id'],
|
391
391
|
}
|
392
392
|
response = self.publicGetTicker(self.extend(request, params))
|
@@ -490,7 +490,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
490
490
|
"""
|
491
491
|
self.load_markets()
|
492
492
|
market = self.market(symbol)
|
493
|
-
request = {
|
493
|
+
request: dict = {
|
494
494
|
'market': market['id'],
|
495
495
|
}
|
496
496
|
if limit is not None:
|
@@ -541,7 +541,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
541
541
|
if lastId is None:
|
542
542
|
raise ArgumentsRequired(self.id + ' fetchTrades() requires an extra parameter params["lastId"]')
|
543
543
|
market = self.market(symbol)
|
544
|
-
request = {
|
544
|
+
request: dict = {
|
545
545
|
'market': market['id'],
|
546
546
|
'lastId': lastId,
|
547
547
|
}
|
@@ -570,7 +570,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
570
570
|
result = self.safe_list(response, 'result', [])
|
571
571
|
return self.parse_trades(result, market, since, limit)
|
572
572
|
|
573
|
-
def parse_trade(self, trade, market: Market = None):
|
573
|
+
def parse_trade(self, trade: dict, market: Market = None):
|
574
574
|
#
|
575
575
|
# fetchTrades
|
576
576
|
#
|
@@ -650,7 +650,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
650
650
|
"""
|
651
651
|
self.load_markets()
|
652
652
|
market = self.market(symbol)
|
653
|
-
request = {
|
653
|
+
request: dict = {
|
654
654
|
'market': market['id'],
|
655
655
|
'interval': timeframe,
|
656
656
|
}
|
@@ -746,7 +746,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
746
746
|
# }
|
747
747
|
# }
|
748
748
|
#
|
749
|
-
result = {
|
749
|
+
result: dict = {
|
750
750
|
'info': response,
|
751
751
|
}
|
752
752
|
keys = list(response.keys())
|
@@ -756,7 +756,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
756
756
|
code = self.safe_currency_code(currencyId)
|
757
757
|
used = self.safe_string(balance, 'freeze')
|
758
758
|
available = self.safe_string(balance, 'available')
|
759
|
-
account = {
|
759
|
+
account: dict = {
|
760
760
|
'free': available,
|
761
761
|
'used': used,
|
762
762
|
}
|
@@ -779,7 +779,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
779
779
|
if type == 'market':
|
780
780
|
raise BadRequest(self.id + ' createOrder() can only accept orders with type "limit"')
|
781
781
|
market = self.market(symbol)
|
782
|
-
request = {
|
782
|
+
request: dict = {
|
783
783
|
'market': market['id'],
|
784
784
|
'side': side,
|
785
785
|
'amount': self.amount_to_precision(symbol, amount),
|
@@ -824,7 +824,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
824
824
|
raise ArgumentsRequired(self.id + ' cancelOrder() requires a symbol argument')
|
825
825
|
self.load_markets()
|
826
826
|
market = self.market(symbol)
|
827
|
-
request = {
|
827
|
+
request: dict = {
|
828
828
|
'market': market['id'],
|
829
829
|
'orderId': id,
|
830
830
|
}
|
@@ -871,7 +871,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
871
871
|
raise ArgumentsRequired(self.id + ' fetchOpenOrders() requires the symbol argument')
|
872
872
|
self.load_markets()
|
873
873
|
market = self.market(symbol)
|
874
|
-
request = {
|
874
|
+
request: dict = {
|
875
875
|
'market': market['id'],
|
876
876
|
}
|
877
877
|
if limit is not None:
|
@@ -921,7 +921,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
921
921
|
"""
|
922
922
|
self.load_markets()
|
923
923
|
market = self.safe_market(symbol)
|
924
|
-
request = {
|
924
|
+
request: dict = {
|
925
925
|
'orderId': id,
|
926
926
|
}
|
927
927
|
if limit is not None:
|
@@ -983,7 +983,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
983
983
|
if (until - since) > 86400000:
|
984
984
|
raise BadRequest(self.id + ' fetchMyTrades() the time between since and params["until"] cannot be greater than 24 hours')
|
985
985
|
market = self.market(symbol)
|
986
|
-
request = {
|
986
|
+
request: dict = {
|
987
987
|
'market': market['id'],
|
988
988
|
'startTime': self.parse_to_int(since / 1000),
|
989
989
|
'endTime': self.parse_to_int(until / 1000),
|
@@ -1050,7 +1050,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
1050
1050
|
since = until - 86400000
|
1051
1051
|
if (until - since) > 86400000:
|
1052
1052
|
raise BadRequest(self.id + ' fetchClosedOrders() the time between since and params["until"] cannot be greater than 24 hours')
|
1053
|
-
request = {
|
1053
|
+
request: dict = {
|
1054
1054
|
'startTime': self.parse_to_int(since / 1000),
|
1055
1055
|
'endTime': self.parse_to_int(until / 1000),
|
1056
1056
|
}
|
@@ -1095,7 +1095,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
1095
1095
|
orders = self.array_concat(orders, parsedOrders)
|
1096
1096
|
return orders
|
1097
1097
|
|
1098
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1098
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1099
1099
|
#
|
1100
1100
|
# cancelOrder, fetchOpenOrders, createOrder
|
1101
1101
|
#
|
ccxt/paymium.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.paymium import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Num, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
@@ -115,7 +115,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
115
115
|
})
|
116
116
|
|
117
117
|
def parse_balance(self, response) -> Balances:
|
118
|
-
result = {'info': response}
|
118
|
+
result: dict = {'info': response}
|
119
119
|
currencies = list(self.currencies.keys())
|
120
120
|
for i in range(0, len(currencies)):
|
121
121
|
code = currencies[i]
|
@@ -152,7 +152,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
152
152
|
"""
|
153
153
|
self.load_markets()
|
154
154
|
market = self.market(symbol)
|
155
|
-
request = {
|
155
|
+
request: dict = {
|
156
156
|
'currency': market['id'],
|
157
157
|
}
|
158
158
|
response = self.publicGetDataCurrencyDepth(self.extend(request, params))
|
@@ -216,7 +216,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
216
216
|
"""
|
217
217
|
self.load_markets()
|
218
218
|
market = self.market(symbol)
|
219
|
-
request = {
|
219
|
+
request: dict = {
|
220
220
|
'currency': market['id'],
|
221
221
|
}
|
222
222
|
ticker = self.publicGetDataCurrencyTicker(self.extend(request, params))
|
@@ -240,7 +240,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
240
240
|
#
|
241
241
|
return self.parse_ticker(ticker, market)
|
242
242
|
|
243
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
243
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
244
244
|
timestamp = self.safe_timestamp(trade, 'created_at_int')
|
245
245
|
id = self.safe_string(trade, 'uuid')
|
246
246
|
market = self.safe_market(None, market)
|
@@ -276,7 +276,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
276
276
|
"""
|
277
277
|
self.load_markets()
|
278
278
|
market = self.market(symbol)
|
279
|
-
request = {
|
279
|
+
request: dict = {
|
280
280
|
'currency': market['id'],
|
281
281
|
}
|
282
282
|
response = self.publicGetDataCurrencyTrades(self.extend(request, params))
|
@@ -311,7 +311,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
311
311
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
312
312
|
"""
|
313
313
|
self.load_markets()
|
314
|
-
request = {
|
314
|
+
request: dict = {
|
315
315
|
'address': code,
|
316
316
|
}
|
317
317
|
response = self.privateGetUserAddressesAddress(self.extend(request, params))
|
@@ -325,7 +325,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
325
325
|
#
|
326
326
|
return self.parse_deposit_address(response)
|
327
327
|
|
328
|
-
def fetch_deposit_addresses(self, codes:
|
328
|
+
def fetch_deposit_addresses(self, codes: Strings = None, params={}):
|
329
329
|
"""
|
330
330
|
fetch deposit addresses for multiple currencies and chain types
|
331
331
|
:see: https://paymium.github.io/api-documentation/#tag/User/paths/~1user~1addresses/get
|
@@ -380,7 +380,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
380
380
|
"""
|
381
381
|
self.load_markets()
|
382
382
|
market = self.market(symbol)
|
383
|
-
request = {
|
383
|
+
request: dict = {
|
384
384
|
'type': self.capitalize(type) + 'Order',
|
385
385
|
'currency': market['id'],
|
386
386
|
'direction': side,
|
@@ -404,7 +404,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
404
404
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
405
405
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
406
406
|
"""
|
407
|
-
request = {
|
407
|
+
request: dict = {
|
408
408
|
'uuid': id,
|
409
409
|
}
|
410
410
|
return self.privateDeleteUserOrdersUuidCancel(self.extend(request, params))
|
@@ -426,7 +426,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
426
426
|
raise ExchangeError(self.id + ' transfer() only allows transfers to an email address')
|
427
427
|
if code != 'BTC' and code != 'EUR':
|
428
428
|
raise ExchangeError(self.id + ' transfer() only allows BTC or EUR')
|
429
|
-
request = {
|
429
|
+
request: dict = {
|
430
430
|
'currency': currency['id'],
|
431
431
|
'amount': self.currency_to_precision(code, amount),
|
432
432
|
'email': toAccount,
|
@@ -519,7 +519,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
519
519
|
}
|
520
520
|
|
521
521
|
def parse_transfer_status(self, status: Str) -> Str:
|
522
|
-
statuses = {
|
522
|
+
statuses: dict = {
|
523
523
|
'executed': 'ok',
|
524
524
|
# what are the other statuses?
|
525
525
|
}
|