ccxt 4.2.30__py2.py3-none-any.whl → 4.2.34__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.
Potentially problematic release.
This version of ccxt might be problematic. Click here for more details.
- ccxt/__init__.py +1 -1
- ccxt/abstract/coinbase.py +10 -0
- ccxt/abstract/okx.py +12 -1
- ccxt/ace.py +4 -3
- ccxt/alpaca.py +1 -1
- ccxt/ascendex.py +6 -6
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +4 -3
- ccxt/async_support/alpaca.py +1 -1
- ccxt/async_support/ascendex.py +6 -6
- ccxt/async_support/base/exchange.py +62 -39
- ccxt/async_support/bigone.py +25 -5
- ccxt/async_support/binance.py +17 -16
- ccxt/async_support/bingx.py +10 -9
- ccxt/async_support/bit2c.py +13 -1
- ccxt/async_support/bitbank.py +2 -2
- ccxt/async_support/bitbns.py +1 -1
- ccxt/async_support/bitfinex.py +5 -5
- ccxt/async_support/bitfinex2.py +386 -40
- ccxt/async_support/bitflyer.py +5 -5
- ccxt/async_support/bitforex.py +4 -1
- ccxt/async_support/bitget.py +11 -11
- ccxt/async_support/bithumb.py +2 -2
- ccxt/async_support/bitmart.py +9 -9
- ccxt/async_support/bitmex.py +3 -3
- ccxt/async_support/bitopro.py +2 -2
- ccxt/async_support/bitrue.py +8 -8
- ccxt/async_support/bitso.py +4 -4
- ccxt/async_support/bitstamp.py +2 -2
- ccxt/async_support/bitteam.py +1 -1
- ccxt/async_support/bitvavo.py +3 -3
- ccxt/async_support/bl3p.py +1 -1
- ccxt/async_support/blockchaincom.py +3 -3
- ccxt/async_support/btcalpha.py +1 -1
- ccxt/async_support/btcbox.py +1 -1
- ccxt/async_support/btcmarkets.py +2 -2
- ccxt/async_support/btcturk.py +1 -1
- ccxt/async_support/bybit.py +9 -9
- ccxt/async_support/cex.py +1 -1
- ccxt/async_support/coinbase.py +16 -6
- ccxt/async_support/coinbasepro.py +2 -2
- ccxt/async_support/coincheck.py +1 -1
- ccxt/async_support/coinex.py +9 -9
- ccxt/async_support/coinlist.py +4 -4
- ccxt/async_support/coinmate.py +2 -2
- ccxt/async_support/coinmetro.py +2 -2
- ccxt/async_support/coinone.py +1 -1
- ccxt/async_support/coinsph.py +2 -2
- ccxt/async_support/coinspot.py +1 -1
- ccxt/async_support/cryptocom.py +14 -14
- ccxt/async_support/currencycom.py +1 -1
- ccxt/async_support/delta.py +2 -2
- ccxt/async_support/deribit.py +5 -4
- ccxt/async_support/digifinex.py +6 -6
- ccxt/async_support/exmo.py +2 -2
- ccxt/async_support/gate.py +41 -37
- ccxt/async_support/gemini.py +2 -2
- ccxt/async_support/hitbtc.py +5 -5
- ccxt/async_support/hollaex.py +2 -2
- ccxt/async_support/htx.py +11 -11
- ccxt/async_support/huobijp.py +4 -4
- 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 +45 -5
- ccxt/async_support/krakenfutures.py +8 -5
- ccxt/async_support/kucoin.py +8 -8
- ccxt/async_support/kucoinfutures.py +4 -4
- ccxt/async_support/kuna.py +2 -2
- ccxt/async_support/latoken.py +3 -3
- ccxt/async_support/lbank.py +5 -4
- ccxt/async_support/luno.py +1 -1
- ccxt/async_support/lykke.py +2 -2
- ccxt/async_support/mercado.py +2 -2
- ccxt/async_support/mexc.py +7 -6
- ccxt/async_support/ndax.py +2 -2
- ccxt/async_support/novadax.py +4 -4
- ccxt/async_support/oceanex.py +1 -1
- ccxt/async_support/okcoin.py +5 -5
- ccxt/async_support/okx.py +26 -12
- ccxt/async_support/onetrading.py +2 -2
- ccxt/async_support/p2b.py +1 -1
- ccxt/async_support/paymium.py +3 -3
- ccxt/async_support/phemex.py +13 -13
- ccxt/async_support/poloniex.py +4 -4
- ccxt/async_support/poloniexfutures.py +4 -1
- ccxt/async_support/probit.py +5 -5
- ccxt/async_support/timex.py +2 -2
- ccxt/async_support/tokocrypto.py +4 -4
- ccxt/async_support/upbit.py +2 -2
- ccxt/async_support/wavesexchange.py +4 -3
- ccxt/async_support/wazirx.py +1 -1
- ccxt/async_support/whitebit.py +6 -6
- ccxt/async_support/woo.py +6 -6
- ccxt/async_support/yobit.py +41 -2
- ccxt/async_support/zaif.py +2 -2
- ccxt/async_support/zonda.py +4 -4
- ccxt/base/exchange.py +77 -44
- ccxt/base/types.py +10 -0
- ccxt/bigone.py +25 -5
- ccxt/binance.py +17 -16
- ccxt/bingx.py +10 -9
- ccxt/bit2c.py +13 -1
- ccxt/bitbank.py +2 -2
- ccxt/bitbns.py +1 -1
- ccxt/bitfinex.py +5 -5
- ccxt/bitfinex2.py +386 -40
- ccxt/bitflyer.py +5 -5
- ccxt/bitforex.py +4 -1
- ccxt/bitget.py +11 -11
- ccxt/bithumb.py +2 -2
- ccxt/bitmart.py +9 -9
- ccxt/bitmex.py +3 -3
- ccxt/bitopro.py +2 -2
- ccxt/bitrue.py +8 -8
- ccxt/bitso.py +4 -4
- ccxt/bitstamp.py +2 -2
- ccxt/bitteam.py +1 -1
- ccxt/bitvavo.py +3 -3
- ccxt/bl3p.py +1 -1
- ccxt/blockchaincom.py +3 -3
- ccxt/btcalpha.py +1 -1
- ccxt/btcbox.py +1 -1
- ccxt/btcmarkets.py +2 -2
- ccxt/btcturk.py +1 -1
- ccxt/bybit.py +9 -9
- ccxt/cex.py +1 -1
- ccxt/coinbase.py +16 -6
- ccxt/coinbasepro.py +2 -2
- ccxt/coincheck.py +1 -1
- ccxt/coinex.py +9 -9
- ccxt/coinlist.py +4 -4
- ccxt/coinmate.py +2 -2
- ccxt/coinmetro.py +2 -2
- ccxt/coinone.py +1 -1
- ccxt/coinsph.py +2 -2
- ccxt/coinspot.py +1 -1
- ccxt/cryptocom.py +14 -14
- ccxt/currencycom.py +1 -1
- ccxt/delta.py +2 -2
- ccxt/deribit.py +5 -4
- ccxt/digifinex.py +6 -6
- ccxt/exmo.py +2 -2
- ccxt/gate.py +41 -37
- ccxt/gemini.py +2 -2
- ccxt/hitbtc.py +5 -5
- ccxt/hollaex.py +2 -2
- ccxt/htx.py +11 -11
- ccxt/huobijp.py +4 -4
- ccxt/idex.py +2 -2
- ccxt/independentreserve.py +2 -2
- ccxt/indodax.py +2 -2
- ccxt/kraken.py +45 -5
- ccxt/krakenfutures.py +8 -5
- ccxt/kucoin.py +8 -8
- ccxt/kucoinfutures.py +4 -4
- ccxt/kuna.py +2 -2
- ccxt/latoken.py +3 -3
- ccxt/lbank.py +5 -4
- ccxt/luno.py +1 -1
- ccxt/lykke.py +2 -2
- ccxt/mercado.py +2 -2
- ccxt/mexc.py +7 -6
- ccxt/ndax.py +2 -2
- ccxt/novadax.py +4 -4
- ccxt/oceanex.py +1 -1
- ccxt/okcoin.py +5 -5
- ccxt/okx.py +26 -12
- ccxt/onetrading.py +2 -2
- ccxt/p2b.py +1 -1
- ccxt/paymium.py +3 -3
- ccxt/phemex.py +13 -13
- ccxt/poloniex.py +4 -4
- ccxt/poloniexfutures.py +4 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +8 -4
- ccxt/pro/ascendex.py +1 -2
- ccxt/pro/binance.py +14 -10
- ccxt/pro/bingx.py +1 -1
- ccxt/pro/bitfinex.py +21 -22
- ccxt/pro/bitfinex2.py +13 -15
- ccxt/pro/bitget.py +3 -1
- ccxt/pro/bitmart.py +3 -7
- ccxt/pro/bitmex.py +4 -6
- ccxt/pro/bitopro.py +2 -4
- ccxt/pro/bitrue.py +1 -1
- ccxt/pro/bitstamp.py +2 -3
- ccxt/pro/bitvavo.py +10 -5
- ccxt/pro/blockchaincom.py +22 -22
- ccxt/pro/bybit.py +5 -5
- ccxt/pro/cex.py +7 -7
- ccxt/pro/coinbase.py +3 -2
- ccxt/pro/coinbasepro.py +1 -1
- ccxt/pro/coinex.py +15 -13
- ccxt/pro/currencycom.py +5 -6
- ccxt/pro/deribit.py +4 -4
- ccxt/pro/exmo.py +15 -13
- ccxt/pro/gate.py +1 -1
- ccxt/pro/gemini.py +4 -2
- ccxt/pro/hitbtc.py +10 -9
- ccxt/pro/hollaex.py +2 -2
- ccxt/pro/htx.py +6 -6
- ccxt/pro/huobijp.py +3 -4
- ccxt/pro/idex.py +1 -1
- ccxt/pro/independentreserve.py +14 -13
- ccxt/pro/kraken.py +10 -14
- ccxt/pro/krakenfutures.py +10 -6
- ccxt/pro/kucoin.py +10 -10
- ccxt/pro/kucoinfutures.py +11 -10
- ccxt/pro/lbank.py +10 -10
- ccxt/pro/luno.py +12 -14
- ccxt/pro/mexc.py +3 -2
- ccxt/pro/ndax.py +7 -11
- ccxt/pro/okcoin.py +7 -10
- ccxt/pro/okx.py +6 -9
- ccxt/pro/onetrading.py +16 -15
- ccxt/pro/p2b.py +5 -3
- ccxt/pro/phemex.py +16 -11
- ccxt/pro/poloniex.py +6 -4
- ccxt/pro/poloniexfutures.py +13 -9
- ccxt/pro/probit.py +15 -12
- ccxt/pro/upbit.py +8 -8
- ccxt/pro/wazirx.py +6 -3
- ccxt/pro/woo.py +9 -7
- ccxt/probit.py +5 -5
- ccxt/test/base/test_order_book.py +7 -7
- ccxt/test/base/test_shared_methods.py +1 -1
- ccxt/test/test_async.py +86 -36
- ccxt/test/test_sync.py +86 -36
- ccxt/timex.py +2 -2
- ccxt/tokocrypto.py +4 -4
- ccxt/upbit.py +2 -2
- ccxt/wavesexchange.py +4 -3
- ccxt/wazirx.py +1 -1
- ccxt/whitebit.py +6 -6
- ccxt/woo.py +6 -6
- ccxt/yobit.py +41 -2
- ccxt/zaif.py +2 -2
- ccxt/zonda.py +4 -4
- {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/METADATA +10 -10
- ccxt-4.2.34.dist-info/RECORD +438 -0
- ccxt-4.2.30.dist-info/RECORD +0 -438
- {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/WHEEL +0 -0
- {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/top_level.txt +0 -0
ccxt/async_support/phemex.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.phemex import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import numbers
|
10
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Num, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Num, Str, Strings, Ticker, Tickers, Trade, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import PermissionDenied
|
@@ -1123,7 +1123,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
1123
1123
|
return orderbook
|
1124
1124
|
|
1125
1125
|
def to_en(self, n, scale):
|
1126
|
-
stringN =
|
1126
|
+
stringN = self.number_to_string(n)
|
1127
1127
|
precise = Precise(stringN)
|
1128
1128
|
precise.decimals = precise.decimals - scale
|
1129
1129
|
precise.reduce()
|
@@ -2341,7 +2341,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
2341
2341
|
return self.parse_swap_order(order, market)
|
2342
2342
|
return self.parse_spot_order(order, market)
|
2343
2343
|
|
2344
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
2344
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
2345
2345
|
"""
|
2346
2346
|
create a trade order
|
2347
2347
|
:see: https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#place-order
|
@@ -2427,10 +2427,10 @@ class phemex(Exchange, ImplicitAPI):
|
|
2427
2427
|
elif cost is None:
|
2428
2428
|
raise ArgumentsRequired(self.id + ' createOrder() ' + qtyType + ' requires a price argument or a cost parameter')
|
2429
2429
|
cost = amount if (cost is None) else cost
|
2430
|
-
costString =
|
2430
|
+
costString = self.number_to_string(cost)
|
2431
2431
|
request['quoteQtyEv'] = self.to_ev(costString, market)
|
2432
2432
|
else:
|
2433
|
-
amountString =
|
2433
|
+
amountString = self.number_to_string(amount)
|
2434
2434
|
request['baseQtyEv'] = self.to_ev(amountString, market)
|
2435
2435
|
elif market['swap']:
|
2436
2436
|
posSide = self.safe_string_lower(params, 'posSide')
|
@@ -2443,7 +2443,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
2443
2443
|
if market['settle'] == 'USDT':
|
2444
2444
|
request['orderQtyRq'] = amount
|
2445
2445
|
else:
|
2446
|
-
request['orderQty'] =
|
2446
|
+
request['orderQty'] = self.parse_to_int(amount)
|
2447
2447
|
if stopPrice is not None:
|
2448
2448
|
triggerType = self.safe_string(params, 'triggerType', 'ByMarkPrice')
|
2449
2449
|
request['triggerType'] = triggerType
|
@@ -4013,7 +4013,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
4013
4013
|
url = self.implode_hostname(self.urls['api'][api]) + url
|
4014
4014
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
4015
4015
|
|
4016
|
-
async def set_leverage(self, leverage, symbol: Str = None, params={}):
|
4016
|
+
async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|
4017
4017
|
"""
|
4018
4018
|
set the level of leverage for a market
|
4019
4019
|
:see: https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#set-leverage
|
@@ -4044,17 +4044,17 @@ class phemex(Exchange, ImplicitAPI):
|
|
4044
4044
|
if not isHedged and longLeverageRr is None and shortLeverageRr is None:
|
4045
4045
|
request['leverageRr'] = leverage
|
4046
4046
|
else:
|
4047
|
-
|
4048
|
-
|
4049
|
-
request['longLeverageRr'] =
|
4050
|
-
request['shortLeverageRr'] =
|
4047
|
+
longVar = longLeverageRr if (longLeverageRr is not None) else leverage
|
4048
|
+
shortVar = shortLeverageRr if (shortLeverageRr is not None) else leverage
|
4049
|
+
request['longLeverageRr'] = longVar
|
4050
|
+
request['shortLeverageRr'] = shortVar
|
4051
4051
|
response = await self.privatePutGPositionsLeverage(self.extend(request, params))
|
4052
4052
|
else:
|
4053
4053
|
request['leverage'] = leverage
|
4054
4054
|
response = await self.privatePutPositionsLeverage(self.extend(request, params))
|
4055
4055
|
return response
|
4056
4056
|
|
4057
|
-
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
4057
|
+
async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
4058
4058
|
"""
|
4059
4059
|
transfer currency internally between wallets on the same account
|
4060
4060
|
:param str code: unified currency code
|
@@ -4311,7 +4311,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
4311
4311
|
sorted = self.sort_by(result, 'timestamp')
|
4312
4312
|
return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
|
4313
4313
|
|
4314
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
4314
|
+
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
4315
4315
|
"""
|
4316
4316
|
make a withdrawal
|
4317
4317
|
:see: https://phemex-docs.github.io/#create-withdraw-request
|
ccxt/async_support/poloniex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.poloniex import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -1212,7 +1212,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1212
1212
|
extension = {'status': 'open'}
|
1213
1213
|
return self.parse_orders(response, market, since, limit, extension)
|
1214
1214
|
|
1215
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1215
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1216
1216
|
"""
|
1217
1217
|
create a trade order
|
1218
1218
|
:see: https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
|
@@ -1736,7 +1736,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1736
1736
|
'info': response,
|
1737
1737
|
}
|
1738
1738
|
|
1739
|
-
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
1739
|
+
async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
1740
1740
|
"""
|
1741
1741
|
transfer currency internally between wallets on the same account
|
1742
1742
|
:see: https://docs.poloniex.com/#authenticated-endpoints-accounts-accounts-transfer
|
@@ -1785,7 +1785,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1785
1785
|
'status': None,
|
1786
1786
|
}
|
1787
1787
|
|
1788
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1788
|
+
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1789
1789
|
"""
|
1790
1790
|
make a withdrawal
|
1791
1791
|
:see: https://docs.poloniex.com/#authenticated-endpoints-wallets-withdraw-currency
|
@@ -45,6 +45,9 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
45
45
|
'fetchBalance': True,
|
46
46
|
'fetchClosedOrders': True,
|
47
47
|
'fetchCurrencies': False,
|
48
|
+
'fetchDepositAddress': False,
|
49
|
+
'fetchDepositAddresses': False,
|
50
|
+
'fetchDepositAddressesByNetwork': False,
|
48
51
|
'fetchFundingRate': True,
|
49
52
|
'fetchFundingRateHistory': False,
|
50
53
|
'fetchL3OrderBook': True,
|
@@ -777,7 +780,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
777
780
|
#
|
778
781
|
return self.parse_balance(response)
|
779
782
|
|
780
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
783
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
781
784
|
"""
|
782
785
|
Create an order on the exchange
|
783
786
|
:see: https://futures-docs.poloniex.com/#place-an-order
|
ccxt/async_support/probit.py
CHANGED
@@ -433,8 +433,8 @@ class probit(Exchange, ImplicitAPI):
|
|
433
433
|
networkList = {}
|
434
434
|
for j in range(0, len(platformsByPriority)):
|
435
435
|
network = platformsByPriority[j]
|
436
|
-
|
437
|
-
networkCode = self.network_id_to_code(
|
436
|
+
idInner = self.safe_string(network, 'id')
|
437
|
+
networkCode = self.network_id_to_code(idInner)
|
438
438
|
currentDepositSuspended = self.safe_value(network, 'deposit_suspended')
|
439
439
|
currentWithdrawalSuspended = self.safe_value(network, 'withdrawal_suspended')
|
440
440
|
currentDeposit = not currentDepositSuspended
|
@@ -452,7 +452,7 @@ class probit(Exchange, ImplicitAPI):
|
|
452
452
|
networkFee = withdrawPlatform
|
453
453
|
break
|
454
454
|
networkList[networkCode] = {
|
455
|
-
'id':
|
455
|
+
'id': idInner,
|
456
456
|
'network': networkCode,
|
457
457
|
'active': currentActive,
|
458
458
|
'deposit': currentDeposit,
|
@@ -1138,7 +1138,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1138
1138
|
def cost_to_precision(self, symbol, cost):
|
1139
1139
|
return self.decimal_to_precision(cost, TRUNCATE, self.markets[symbol]['precision']['cost'], self.precisionMode)
|
1140
1140
|
|
1141
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1141
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1142
1142
|
"""
|
1143
1143
|
create a trade order
|
1144
1144
|
:see: https://docs-en.probit.com/reference/order-1
|
@@ -1331,7 +1331,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1331
1331
|
data = self.safe_value(response, 'data', [])
|
1332
1332
|
return self.parse_deposit_addresses(data, codes)
|
1333
1333
|
|
1334
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1334
|
+
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1335
1335
|
"""
|
1336
1336
|
:see: https://docs-en.probit.com/reference/withdrawal
|
1337
1337
|
make a withdrawal
|
ccxt/async_support/timex.py
CHANGED
@@ -109,7 +109,7 @@ class timex(Exchange, ImplicitAPI):
|
|
109
109
|
'rest': 'https://plasma-relay-backend.timex.io',
|
110
110
|
},
|
111
111
|
'www': 'https://timex.io',
|
112
|
-
'doc': 'https://
|
112
|
+
'doc': 'https://plasma-relay-backend.timex.io/swagger-ui/index.html',
|
113
113
|
'referral': 'https://timex.io/?refcode=1x27vNkTbP1uwkCck',
|
114
114
|
},
|
115
115
|
'api': {
|
@@ -686,7 +686,7 @@ class timex(Exchange, ImplicitAPI):
|
|
686
686
|
#
|
687
687
|
return self.parse_balance(response)
|
688
688
|
|
689
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
689
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
690
690
|
"""
|
691
691
|
create a trade order
|
692
692
|
:param str symbol: unified symbol of the market to create an order in
|
ccxt/async_support/tokocrypto.py
CHANGED
@@ -1335,9 +1335,9 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1335
1335
|
# "timestamp":1659666786943
|
1336
1336
|
# }
|
1337
1337
|
#
|
1338
|
-
return self.
|
1338
|
+
return self.parse_balance_custom(response, type, marginMode)
|
1339
1339
|
|
1340
|
-
def
|
1340
|
+
def parse_balance_custom(self, response, type=None, marginMode=None):
|
1341
1341
|
timestamp = self.safe_integer(response, 'updateTime')
|
1342
1342
|
result = {
|
1343
1343
|
'info': response,
|
@@ -1537,7 +1537,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1537
1537
|
}
|
1538
1538
|
return self.safe_string(statuses, status, status)
|
1539
1539
|
|
1540
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1540
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1541
1541
|
"""
|
1542
1542
|
create a trade order
|
1543
1543
|
:see: https://www.tokocrypto.com/apidocs/#new-order--signed
|
@@ -2217,7 +2217,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2217
2217
|
'fee': fee,
|
2218
2218
|
}
|
2219
2219
|
|
2220
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
2220
|
+
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2221
2221
|
"""
|
2222
2222
|
:see: https://www.tokocrypto.com/apidocs/#withdraw-signed
|
2223
2223
|
make a withdrawal
|
ccxt/async_support/upbit.py
CHANGED
@@ -984,7 +984,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
984
984
|
#
|
985
985
|
return self.parse_ohlcvs(response, market, timeframe, since, limit)
|
986
986
|
|
987
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
987
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
988
988
|
"""
|
989
989
|
create a trade order
|
990
990
|
:see: https://docs.upbit.com/reference/%EC%A3%BC%EB%AC%B8%ED%95%98%EA%B8%B0
|
@@ -1640,7 +1640,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1640
1640
|
raise AddressPending(self.id + ' is generating ' + code + ' deposit address, call fetchDepositAddress or createDepositAddress one more time later to retrieve the generated address')
|
1641
1641
|
return self.parse_deposit_address(response)
|
1642
1642
|
|
1643
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1643
|
+
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1644
1644
|
"""
|
1645
1645
|
:see: https://docs.upbit.com/reference/디지털자산-출금하기
|
1646
1646
|
:see: https://docs.upbit.com/reference/%EC%9B%90%ED%99%94-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0
|
@@ -1199,7 +1199,8 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1199
1199
|
# precise.decimals should be integer
|
1200
1200
|
precise.decimals = self.parse_to_int(Precise.string_sub(self.number_to_string(precise.decimals), self.number_to_string(scale)))
|
1201
1201
|
precise.reduce()
|
1202
|
-
|
1202
|
+
stringValue = str(precise)
|
1203
|
+
return stringValue
|
1203
1204
|
|
1204
1205
|
def currency_from_precision(self, currency, amount):
|
1205
1206
|
scale = self.currencies[currency]['precision']
|
@@ -1224,7 +1225,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1224
1225
|
return {'WAVES': 1}
|
1225
1226
|
return rates
|
1226
1227
|
|
1227
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1228
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1228
1229
|
"""
|
1229
1230
|
create a trade order
|
1230
1231
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -2289,7 +2290,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
2289
2290
|
raise ExchangeError(self.id + ' ' + body)
|
2290
2291
|
return None
|
2291
2292
|
|
2292
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
2293
|
+
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2293
2294
|
"""
|
2294
2295
|
make a withdrawal
|
2295
2296
|
:param str code: unified currency code
|
ccxt/async_support/wazirx.py
CHANGED
@@ -774,7 +774,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
774
774
|
response = await self.privateDeleteOrder(self.extend(request, params))
|
775
775
|
return self.parse_order(response)
|
776
776
|
|
777
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
777
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
778
778
|
"""
|
779
779
|
:see: https://docs.wazirx.com/#new-order-trade
|
780
780
|
create a trade order
|
ccxt/async_support/whitebit.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.whitebit import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, MarketType, Market, Order, OrderBook, OrderSide, OrderType, Str, Bool, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, MarketType, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Str, Bool, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -32,7 +32,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
32
32
|
'name': 'WhiteBit',
|
33
33
|
'version': 'v4',
|
34
34
|
'countries': ['EE'],
|
35
|
-
'rateLimit':
|
35
|
+
'rateLimit': 50,
|
36
36
|
'pro': True,
|
37
37
|
'has': {
|
38
38
|
'CORS': None,
|
@@ -1129,7 +1129,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1129
1129
|
#
|
1130
1130
|
return self.safe_integer(response, 'time')
|
1131
1131
|
|
1132
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1132
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1133
1133
|
"""
|
1134
1134
|
create a trade order
|
1135
1135
|
:see: https://docs.whitebit.com/private/http-trade-v4/#create-limit-order
|
@@ -1594,7 +1594,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1594
1594
|
'info': response,
|
1595
1595
|
}
|
1596
1596
|
|
1597
|
-
async def set_leverage(self, leverage, symbol: Str = None, params={}):
|
1597
|
+
async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|
1598
1598
|
"""
|
1599
1599
|
set the level of leverage for a market
|
1600
1600
|
:see: https://docs.whitebit.com/private/http-trade-v4/#change-collateral-account-leverage
|
@@ -1616,7 +1616,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1616
1616
|
# "leverage": 5
|
1617
1617
|
# }
|
1618
1618
|
|
1619
|
-
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
1619
|
+
async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
1620
1620
|
"""
|
1621
1621
|
transfer currency internally between wallets on the same account
|
1622
1622
|
:see: https://docs.whitebit.com/private/http-main-v4/#transfer-between-main-and-trade-balances
|
@@ -1661,7 +1661,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1661
1661
|
'status': None,
|
1662
1662
|
}
|
1663
1663
|
|
1664
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1664
|
+
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1665
1665
|
"""
|
1666
1666
|
make a withdrawal
|
1667
1667
|
:see: https://docs.whitebit.com/private/http-main-v4/#create-withdraw-request
|
ccxt/async_support/woo.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.woo import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, MarketType, Market, Order, OrderBook, OrderSide, OrderType, Num, Str, Bool, Strings, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, MarketType, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Num, Str, Bool, Strings, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -796,7 +796,7 @@ class woo(Exchange, ImplicitAPI):
|
|
796
796
|
params['trailingTriggerPrice'] = trailingTriggerPrice
|
797
797
|
return await self.create_order(symbol, type, side, amount, price, params)
|
798
798
|
|
799
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
799
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
800
800
|
"""
|
801
801
|
create a trade order
|
802
802
|
:see: https://docs.woo.org/#send-order
|
@@ -833,7 +833,7 @@ class woo(Exchange, ImplicitAPI):
|
|
833
833
|
stopLoss = self.safe_value(params, 'stopLoss')
|
834
834
|
takeProfit = self.safe_value(params, 'takeProfit')
|
835
835
|
algoType = self.safe_string(params, 'algoType')
|
836
|
-
trailingTriggerPrice = self.safe_string_2(params, 'trailingTriggerPrice', 'activatedPrice', price)
|
836
|
+
trailingTriggerPrice = self.safe_string_2(params, 'trailingTriggerPrice', 'activatedPrice', self.number_to_string(price))
|
837
837
|
trailingAmount = self.safe_string_2(params, 'trailingAmount', 'callbackValue')
|
838
838
|
trailingPercent = self.safe_string_2(params, 'trailingPercent', 'callbackRate')
|
839
839
|
isTrailingAmountOrder = trailingAmount is not None
|
@@ -1920,7 +1920,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1920
1920
|
}
|
1921
1921
|
return self.safe_string(statuses, status, status)
|
1922
1922
|
|
1923
|
-
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
1923
|
+
async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
1924
1924
|
"""
|
1925
1925
|
transfer currency internally between wallets on the same account
|
1926
1926
|
:param str code: unified currency code
|
@@ -2038,7 +2038,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2038
2038
|
}
|
2039
2039
|
return self.safe_string(statuses, status, status)
|
2040
2040
|
|
2041
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
2041
|
+
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2042
2042
|
"""
|
2043
2043
|
make a withdrawal
|
2044
2044
|
:param str code: unified currency code
|
@@ -2444,7 +2444,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2444
2444
|
'leverage': leverage,
|
2445
2445
|
}
|
2446
2446
|
|
2447
|
-
async def set_leverage(self, leverage, symbol: Str = None, params={}):
|
2447
|
+
async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|
2448
2448
|
await self.load_markets()
|
2449
2449
|
if (leverage < 1) or (leverage > 20):
|
2450
2450
|
raise BadRequest(self.id + ' leverage should be between 1 and 20')
|
ccxt/async_support/yobit.py
CHANGED
@@ -749,7 +749,7 @@ class yobit(Exchange, ImplicitAPI):
|
|
749
749
|
}
|
750
750
|
return result
|
751
751
|
|
752
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
752
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
753
753
|
"""
|
754
754
|
:see: https://yobit.net/en/api
|
755
755
|
create a trade order
|
@@ -1125,14 +1125,32 @@ class yobit(Exchange, ImplicitAPI):
|
|
1125
1125
|
address = self.safe_string(response['return'], 'address')
|
1126
1126
|
self.check_address(address)
|
1127
1127
|
return {
|
1128
|
+
'id': None,
|
1128
1129
|
'currency': code,
|
1129
1130
|
'address': address,
|
1130
1131
|
'tag': None,
|
1131
1132
|
'network': None,
|
1132
1133
|
'info': response,
|
1134
|
+
'txid': None,
|
1135
|
+
'type': None,
|
1136
|
+
'amount': None,
|
1137
|
+
'status': None,
|
1138
|
+
'timestamp': None,
|
1139
|
+
'datetime': None,
|
1140
|
+
'addressFrom': None,
|
1141
|
+
'addressTo': None,
|
1142
|
+
'tagFrom': None,
|
1143
|
+
'tagTo': None,
|
1144
|
+
'updated': None,
|
1145
|
+
'comment': None,
|
1146
|
+
'fee': {
|
1147
|
+
'currency': None,
|
1148
|
+
'cost': None,
|
1149
|
+
'rate': None,
|
1150
|
+
},
|
1133
1151
|
}
|
1134
1152
|
|
1135
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1153
|
+
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1136
1154
|
"""
|
1137
1155
|
:see: https://yobit.net/en/api
|
1138
1156
|
make a withdrawal
|
@@ -1159,6 +1177,27 @@ class yobit(Exchange, ImplicitAPI):
|
|
1159
1177
|
return {
|
1160
1178
|
'info': response,
|
1161
1179
|
'id': None,
|
1180
|
+
'txid': None,
|
1181
|
+
'type': None,
|
1182
|
+
'currency': None,
|
1183
|
+
'network': None,
|
1184
|
+
'amount': None,
|
1185
|
+
'status': None,
|
1186
|
+
'timestamp': None,
|
1187
|
+
'datetime': None,
|
1188
|
+
'address': None,
|
1189
|
+
'addressFrom': None,
|
1190
|
+
'addressTo': None,
|
1191
|
+
'tag': None,
|
1192
|
+
'tagFrom': None,
|
1193
|
+
'tagTo': None,
|
1194
|
+
'updated': None,
|
1195
|
+
'comment': None,
|
1196
|
+
'fee': {
|
1197
|
+
'currency': None,
|
1198
|
+
'cost': None,
|
1199
|
+
'rate': None,
|
1200
|
+
},
|
1162
1201
|
}
|
1163
1202
|
|
1164
1203
|
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|
ccxt/async_support/zaif.py
CHANGED
@@ -421,7 +421,7 @@ class zaif(Exchange, ImplicitAPI):
|
|
421
421
|
response = []
|
422
422
|
return self.parse_trades(response, market, since, limit)
|
423
423
|
|
424
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
424
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
425
425
|
"""
|
426
426
|
:see: https://zaif-api-document.readthedocs.io/ja/latest/MarginTradingAPI.html#id23
|
427
427
|
create a trade order
|
@@ -557,7 +557,7 @@ class zaif(Exchange, ImplicitAPI):
|
|
557
557
|
response = await self.privatePostTradeHistory(self.extend(request, params))
|
558
558
|
return self.parse_orders(response['return'], market, since, limit)
|
559
559
|
|
560
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
560
|
+
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
561
561
|
"""
|
562
562
|
:see: https://zaif-api-document.readthedocs.io/ja/latest/TradingAPI.html#id41
|
563
563
|
make a withdrawal
|
ccxt/async_support/zonda.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.zonda import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -1301,7 +1301,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1301
1301
|
items = self.safe_value(response, 'items')
|
1302
1302
|
return self.parse_trades(items, market, since, limit)
|
1303
1303
|
|
1304
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1304
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1305
1305
|
"""
|
1306
1306
|
create a trade order
|
1307
1307
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -1538,7 +1538,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1538
1538
|
data = self.safe_value(response, 'data')
|
1539
1539
|
return self.parse_deposit_addresses(data, codes)
|
1540
1540
|
|
1541
|
-
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
1541
|
+
async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
1542
1542
|
"""
|
1543
1543
|
:see: https://docs.zondacrypto.exchange/reference/internal-transfer
|
1544
1544
|
transfer currency internally between wallets on the same account
|
@@ -1647,7 +1647,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1647
1647
|
}
|
1648
1648
|
return self.safe_string(statuses, status, status)
|
1649
1649
|
|
1650
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1650
|
+
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1651
1651
|
"""
|
1652
1652
|
:see: https://docs.zondacrypto.exchange/reference/crypto-withdrawal-1
|
1653
1653
|
make a withdrawal
|