ccxt 4.2.31__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/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 +16 -15
- 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 +6 -6
- ccxt/async_support/bitflyer.py +5 -5
- ccxt/async_support/bitforex.py +1 -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 +6 -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 +4 -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 +10 -10
- 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 +42 -4
- ccxt/async_support/krakenfutures.py +5 -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 +2 -2
- 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 +11 -10
- 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 +1 -1
- ccxt/async_support/probit.py +5 -5
- ccxt/async_support/timex.py +1 -1
- 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 +5 -5
- 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 +67 -40
- ccxt/base/types.py +10 -0
- ccxt/bigone.py +25 -5
- ccxt/binance.py +16 -15
- 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 +6 -6
- ccxt/bitflyer.py +5 -5
- ccxt/bitforex.py +1 -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 +6 -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 +4 -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 +10 -10
- ccxt/huobijp.py +4 -4
- ccxt/idex.py +2 -2
- ccxt/independentreserve.py +2 -2
- ccxt/indodax.py +2 -2
- ccxt/kraken.py +42 -4
- ccxt/krakenfutures.py +5 -5
- ccxt/kucoin.py +8 -8
- ccxt/kucoinfutures.py +4 -4
- ccxt/kuna.py +2 -2
- ccxt/latoken.py +3 -3
- ccxt/lbank.py +2 -2
- 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 +11 -10
- 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 +1 -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 +1 -1
- ccxt/tokocrypto.py +4 -4
- ccxt/upbit.py +2 -2
- ccxt/wavesexchange.py +4 -3
- ccxt/wazirx.py +1 -1
- ccxt/whitebit.py +5 -5
- ccxt/woo.py +6 -6
- ccxt/yobit.py +41 -2
- ccxt/zaif.py +2 -2
- ccxt/zonda.py +4 -4
- {ccxt-4.2.31.dist-info → ccxt-4.2.34.dist-info}/METADATA +9 -8
- ccxt-4.2.34.dist-info/RECORD +438 -0
- ccxt-4.2.31.dist-info/RECORD +0 -438
- {ccxt-4.2.31.dist-info → ccxt-4.2.34.dist-info}/WHEEL +0 -0
- {ccxt-4.2.31.dist-info → ccxt-4.2.34.dist-info}/top_level.txt +0 -0
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
|
@@ -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
|
ccxt/base/exchange.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.2.
|
7
|
+
__version__ = '4.2.34'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -1980,6 +1980,8 @@ class Exchange(object):
|
|
1980
1980
|
if first is not None and last is not None:
|
1981
1981
|
ascending = first <= last # True if array is sorted in ascending order based on 'timestamp'
|
1982
1982
|
if fromStart:
|
1983
|
+
if limit > arrayLength:
|
1984
|
+
limit = arrayLength
|
1983
1985
|
array = self.arraySlice(array, 0, limit) if ascending else self.arraySlice(array, -limit)
|
1984
1986
|
else:
|
1985
1987
|
array = self.arraySlice(array, -limit) if ascending else self.arraySlice(array, 0, limit)
|
@@ -2171,18 +2173,30 @@ class Exchange(object):
|
|
2171
2173
|
def fetch_funding_rates(self, symbols: List[str] = None, params={}):
|
2172
2174
|
raise NotSupported(self.id + ' fetchFundingRates() is not supported yet')
|
2173
2175
|
|
2174
|
-
def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
2176
|
+
def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}):
|
2175
2177
|
raise NotSupported(self.id + ' transfer() is not supported yet')
|
2176
2178
|
|
2177
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
2179
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2178
2180
|
raise NotSupported(self.id + ' withdraw() is not supported yet')
|
2179
2181
|
|
2180
2182
|
def create_deposit_address(self, code: str, params={}):
|
2181
2183
|
raise NotSupported(self.id + ' createDepositAddress() is not supported yet')
|
2182
2184
|
|
2183
|
-
def set_leverage(self, leverage, symbol: str = None, params={}):
|
2185
|
+
def set_leverage(self, leverage: Int, symbol: str = None, params={}):
|
2184
2186
|
raise NotSupported(self.id + ' setLeverage() is not supported yet')
|
2185
2187
|
|
2188
|
+
def fetch_open_interest_history(self, symbol: str, timeframe='1h', since: Int = None, limit: Int = None, params={}):
|
2189
|
+
raise NotSupported(self.id + ' fetchOpenInterestHistory() is not supported yet')
|
2190
|
+
|
2191
|
+
def fetch_open_interest(self, symbol: str, params={}):
|
2192
|
+
raise NotSupported(self.id + ' fetchOpenInterest() is not supported yet')
|
2193
|
+
|
2194
|
+
def sign_in(self, params={}):
|
2195
|
+
raise NotSupported(self.id + ' signIn() is not supported yet')
|
2196
|
+
|
2197
|
+
def fetch_payment_methods(self, params={}):
|
2198
|
+
raise NotSupported(self.id + ' fetchPaymentMethods() is not supported yet')
|
2199
|
+
|
2186
2200
|
def parse_to_int(self, number):
|
2187
2201
|
# Solve Common intmisuse ex: int((since / str(1000)))
|
2188
2202
|
# using a number which is not valid in ts
|
@@ -2979,10 +2993,10 @@ class Exchange(object):
|
|
2979
2993
|
def repay_isolated_margin(self, symbol: str, code: str, amount, params={}):
|
2980
2994
|
raise NotSupported(self.id + ' repayIsolatedMargin is not support yet')
|
2981
2995
|
|
2982
|
-
def borrow_cross_margin(self, code: str, amount, params={}):
|
2996
|
+
def borrow_cross_margin(self, code: str, amount: float, params={}):
|
2983
2997
|
raise NotSupported(self.id + ' borrowCrossMargin is not support yet')
|
2984
2998
|
|
2985
|
-
def borrow_isolated_margin(self, symbol: str, code: str, amount, params={}):
|
2999
|
+
def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
|
2986
3000
|
raise NotSupported(self.id + ' borrowIsolatedMargin is not support yet')
|
2987
3001
|
|
2988
3002
|
def borrow_margin(self, code: str, amount, symbol: Str = None, params={}):
|
@@ -3506,16 +3520,16 @@ class Exchange(object):
|
|
3506
3520
|
result = self.convert_trading_view_to_ohlcv(ohlcvs)
|
3507
3521
|
return self.parse_ohlcvs(result, market, timeframe, since, limit)
|
3508
3522
|
|
3509
|
-
def edit_limit_buy_order(self, id, symbol, amount, price=None, params={}):
|
3523
|
+
def edit_limit_buy_order(self, id, symbol, amount: float, price: float = None, params={}):
|
3510
3524
|
return self.edit_limit_order(id, symbol, 'buy', amount, price, params)
|
3511
3525
|
|
3512
|
-
def edit_limit_sell_order(self, id, symbol, amount, price=None, params={}):
|
3526
|
+
def edit_limit_sell_order(self, id, symbol, amount: float, price: float = None, params={}):
|
3513
3527
|
return self.edit_limit_order(id, symbol, 'sell', amount, price, params)
|
3514
3528
|
|
3515
|
-
def edit_limit_order(self, id, symbol, side, amount, price=None, params={}):
|
3529
|
+
def edit_limit_order(self, id, symbol, side, amount: float, price: float = None, params={}):
|
3516
3530
|
return self.edit_order(id, symbol, 'limit', side, amount, price, params)
|
3517
3531
|
|
3518
|
-
def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
3532
|
+
def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float = None, price: float = None, params={}):
|
3519
3533
|
self.cancelOrder(id, symbol)
|
3520
3534
|
return self.create_order(symbol, type, side, amount, price, params)
|
3521
3535
|
|
@@ -3556,6 +3570,15 @@ class Exchange(object):
|
|
3556
3570
|
def fetch_bids_asks(self, symbols: List[str] = None, params={}):
|
3557
3571
|
raise NotSupported(self.id + ' fetchBidsAsks() is not supported yet')
|
3558
3572
|
|
3573
|
+
def fetch_borrow_interest(self, code: str = None, symbol: str = None, since: Int = None, limit: Int = None, params={}):
|
3574
|
+
raise NotSupported(self.id + ' fetchBorrowInterest() is not supported yet')
|
3575
|
+
|
3576
|
+
def fetch_ledger(self, code: str = None, since: Int = None, limit: Int = None, params={}):
|
3577
|
+
raise NotSupported(self.id + ' fetchLedger() is not supported yet')
|
3578
|
+
|
3579
|
+
def fetch_ledger_entry(self, id: str, code: str = None, params={}):
|
3580
|
+
raise NotSupported(self.id + ' fetchLedgerEntry() is not supported yet')
|
3581
|
+
|
3559
3582
|
def parse_bid_ask(self, bidask, priceKey: IndexType = 0, amountKey: IndexType = 1, countOrIdKey: IndexType = 2):
|
3560
3583
|
price = self.safe_number(bidask, priceKey)
|
3561
3584
|
amount = self.safe_number(bidask, amountKey)
|
@@ -3805,6 +3828,8 @@ class Exchange(object):
|
|
3805
3828
|
return self.handle_option_and_params(params, methodName, 'marginMode', defaultValue)
|
3806
3829
|
|
3807
3830
|
def throw_exactly_matched_exception(self, exact, string, message):
|
3831
|
+
if string is None:
|
3832
|
+
return
|
3808
3833
|
if string in exact:
|
3809
3834
|
raise exact[string](message)
|
3810
3835
|
|
@@ -3872,7 +3897,7 @@ class Exchange(object):
|
|
3872
3897
|
def fetch_unified_order(self, order, params={}):
|
3873
3898
|
return self.fetch_order(self.safe_value(order, 'id'), self.safe_value(order, 'symbol'), params)
|
3874
3899
|
|
3875
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
3900
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
3876
3901
|
raise NotSupported(self.id + ' createOrder() is not supported yet')
|
3877
3902
|
|
3878
3903
|
def create_trailing_amount_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, trailingAmount=None, trailingTriggerPrice=None, params={}):
|
@@ -3919,7 +3944,7 @@ class Exchange(object):
|
|
3919
3944
|
return self.create_order(symbol, type, side, amount, price, params)
|
3920
3945
|
raise NotSupported(self.id + ' createTrailingPercentOrder() is not supported yet')
|
3921
3946
|
|
3922
|
-
def create_market_order_with_cost(self, symbol: str, side: OrderSide, cost, params={}):
|
3947
|
+
def create_market_order_with_cost(self, symbol: str, side: OrderSide, cost: float, params={}):
|
3923
3948
|
"""
|
3924
3949
|
create a market order by providing the symbol, side and cost
|
3925
3950
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -3932,7 +3957,7 @@ class Exchange(object):
|
|
3932
3957
|
return self.create_order(symbol, 'market', side, cost, 1, params)
|
3933
3958
|
raise NotSupported(self.id + ' createMarketOrderWithCost() is not supported yet')
|
3934
3959
|
|
3935
|
-
def create_market_buy_order_with_cost(self, symbol: str, cost, params={}):
|
3960
|
+
def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
|
3936
3961
|
"""
|
3937
3962
|
create a market buy order by providing the symbol and cost
|
3938
3963
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -3944,7 +3969,7 @@ class Exchange(object):
|
|
3944
3969
|
return self.create_order(symbol, 'market', 'buy', cost, 1, params)
|
3945
3970
|
raise NotSupported(self.id + ' createMarketBuyOrderWithCost() is not supported yet')
|
3946
3971
|
|
3947
|
-
def create_market_sell_order_with_cost(self, symbol: str, cost, params={}):
|
3972
|
+
def create_market_sell_order_with_cost(self, symbol: str, cost: float, params={}):
|
3948
3973
|
"""
|
3949
3974
|
create a market sell order by providing the symbol and cost
|
3950
3975
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -3975,7 +4000,7 @@ class Exchange(object):
|
|
3975
4000
|
return self.create_order(symbol, type, side, amount, price, params)
|
3976
4001
|
raise NotSupported(self.id + ' createTriggerOrder() is not supported yet')
|
3977
4002
|
|
3978
|
-
def create_stop_loss_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, stopLossPrice=None, params={}):
|
4003
|
+
def create_stop_loss_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, stopLossPrice: float = None, params={}):
|
3979
4004
|
"""
|
3980
4005
|
create a trigger stop loss order(type 2)
|
3981
4006
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -3994,7 +4019,7 @@ class Exchange(object):
|
|
3994
4019
|
return self.create_order(symbol, type, side, amount, price, params)
|
3995
4020
|
raise NotSupported(self.id + ' createStopLossOrder() is not supported yet')
|
3996
4021
|
|
3997
|
-
def create_take_profit_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, takeProfitPrice=None, params={}):
|
4022
|
+
def create_take_profit_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, takeProfitPrice: float = None, params={}):
|
3998
4023
|
"""
|
3999
4024
|
create a trigger take profit order(type 2)
|
4000
4025
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -4013,7 +4038,7 @@ class Exchange(object):
|
|
4013
4038
|
return self.create_order(symbol, type, side, amount, price, params)
|
4014
4039
|
raise NotSupported(self.id + ' createTakeProfitOrder() is not supported yet')
|
4015
4040
|
|
4016
|
-
def create_order_with_take_profit_and_stop_loss(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, takeProfit=None, stopLoss=None, params={}):
|
4041
|
+
def create_order_with_take_profit_and_stop_loss(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, takeProfit: float = None, stopLoss: float = None, params={}):
|
4017
4042
|
"""
|
4018
4043
|
create an order with a stop loss or take profit attached(type 3)
|
4019
4044
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -4167,21 +4192,18 @@ class Exchange(object):
|
|
4167
4192
|
"""
|
4168
4193
|
raise NotSupported(self.id + ' fetchDepositsWithdrawals() is not supported yet')
|
4169
4194
|
|
4170
|
-
def fetch_deposits(self,
|
4195
|
+
def fetch_deposits(self, symbol: str = None, since: Int = None, limit: Int = None, params={}):
|
4171
4196
|
raise NotSupported(self.id + ' fetchDeposits() is not supported yet')
|
4172
4197
|
|
4198
|
+
def fetch_withdrawals(self, symbol: str = None, since: Int = None, limit: Int = None, params={}):
|
4199
|
+
raise NotSupported(self.id + ' fetchWithdrawals() is not supported yet')
|
4200
|
+
|
4173
4201
|
def fetch_deposits_ws(self, code: str = None, since: Int = None, limit: Int = None, params={}):
|
4174
4202
|
raise NotSupported(self.id + ' fetchDepositsWs() is not supported yet')
|
4175
4203
|
|
4176
|
-
def fetch_withdrawals(self, code: str = None, since: Int = None, limit: Int = None, params={}):
|
4177
|
-
raise NotSupported(self.id + ' fetchWithdrawals() is not supported yet')
|
4178
|
-
|
4179
4204
|
def fetch_withdrawals_ws(self, code: str = None, since: Int = None, limit: Int = None, params={}):
|
4180
4205
|
raise NotSupported(self.id + ' fetchWithdrawalsWs() is not supported yet')
|
4181
4206
|
|
4182
|
-
def fetch_open_interest(self, symbol: str, params={}):
|
4183
|
-
raise NotSupported(self.id + ' fetchOpenInterest() is not supported yet')
|
4184
|
-
|
4185
4207
|
def fetch_funding_rate_history(self, symbol: str = None, since: Int = None, limit: Int = None, params={}):
|
4186
4208
|
raise NotSupported(self.id + ' fetchFundingRateHistory() is not supported yet')
|
4187
4209
|
|
@@ -4254,7 +4276,7 @@ class Exchange(object):
|
|
4254
4276
|
raise NotSupported(self.id + ' createExpiredOptionMarket() is not supported yet')
|
4255
4277
|
|
4256
4278
|
def handle_withdraw_tag_and_params(self, tag, params):
|
4257
|
-
if isinstance(tag, dict):
|
4279
|
+
if (tag is not None) and (isinstance(tag, dict)):
|
4258
4280
|
params = self.extend(tag, params)
|
4259
4281
|
tag = None
|
4260
4282
|
if tag is None:
|
@@ -4263,22 +4285,22 @@ class Exchange(object):
|
|
4263
4285
|
params = self.omit(params, 'tag')
|
4264
4286
|
return [tag, params]
|
4265
4287
|
|
4266
|
-
def create_limit_order(self, symbol: str, side: OrderSide, amount, price, params={}):
|
4288
|
+
def create_limit_order(self, symbol: str, side: OrderSide, amount: float, price: float, params={}):
|
4267
4289
|
return self.create_order(symbol, 'limit', side, amount, price, params)
|
4268
4290
|
|
4269
|
-
def create_market_order(self, symbol: str, side: OrderSide, amount, price=None, params={}):
|
4291
|
+
def create_market_order(self, symbol: str, side: OrderSide, amount: float, price: float = None, params={}):
|
4270
4292
|
return self.create_order(symbol, 'market', side, amount, price, params)
|
4271
4293
|
|
4272
|
-
def create_limit_buy_order(self, symbol: str, amount, price, params={}):
|
4294
|
+
def create_limit_buy_order(self, symbol: str, amount: float, price: float, params={}):
|
4273
4295
|
return self.create_order(symbol, 'limit', 'buy', amount, price, params)
|
4274
4296
|
|
4275
|
-
def create_limit_sell_order(self, symbol: str, amount, price, params={}):
|
4297
|
+
def create_limit_sell_order(self, symbol: str, amount: float, price: float, params={}):
|
4276
4298
|
return self.create_order(symbol, 'limit', 'sell', amount, price, params)
|
4277
4299
|
|
4278
|
-
def create_market_buy_order(self, symbol: str, amount, params={}):
|
4300
|
+
def create_market_buy_order(self, symbol: str, amount: float, params={}):
|
4279
4301
|
return self.create_order(symbol, 'market', 'buy', amount, None, params)
|
4280
4302
|
|
4281
|
-
def create_market_sell_order(self, symbol: str, amount, params={}):
|
4303
|
+
def create_market_sell_order(self, symbol: str, amount: float, params={}):
|
4282
4304
|
return self.create_order(symbol, 'market', 'sell', amount, None, params)
|
4283
4305
|
|
4284
4306
|
def cost_to_precision(self, symbol: str, cost):
|
@@ -4372,19 +4394,19 @@ class Exchange(object):
|
|
4372
4394
|
else:
|
4373
4395
|
raise NotSupported(self.id + ' fetchMarketLeverageTiers() is not supported yet')
|
4374
4396
|
|
4375
|
-
def create_post_only_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price, params={}):
|
4397
|
+
def create_post_only_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
4376
4398
|
if not self.has['createPostOnlyOrder']:
|
4377
4399
|
raise NotSupported(self.id + 'createPostOnlyOrder() is not supported yet')
|
4378
4400
|
query = self.extend(params, {'postOnly': True})
|
4379
4401
|
return self.create_order(symbol, type, side, amount, price, query)
|
4380
4402
|
|
4381
|
-
def create_reduce_only_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price, params={}):
|
4403
|
+
def create_reduce_only_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
4382
4404
|
if not self.has['createReduceOnlyOrder']:
|
4383
4405
|
raise NotSupported(self.id + 'createReduceOnlyOrder() is not supported yet')
|
4384
4406
|
query = self.extend(params, {'reduceOnly': True})
|
4385
4407
|
return self.create_order(symbol, type, side, amount, price, query)
|
4386
4408
|
|
4387
|
-
def create_stop_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, stopPrice=None, params={}):
|
4409
|
+
def create_stop_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, stopPrice: float = None, params={}):
|
4388
4410
|
if not self.has['createStopOrder']:
|
4389
4411
|
raise NotSupported(self.id + ' createStopOrder() is not supported yet')
|
4390
4412
|
if stopPrice is None:
|
@@ -4392,13 +4414,13 @@ class Exchange(object):
|
|
4392
4414
|
query = self.extend(params, {'stopPrice': stopPrice})
|
4393
4415
|
return self.create_order(symbol, type, side, amount, price, query)
|
4394
4416
|
|
4395
|
-
def create_stop_limit_order(self, symbol: str, side: OrderSide, amount, price, stopPrice, params={}):
|
4417
|
+
def create_stop_limit_order(self, symbol: str, side: OrderSide, amount: float, price: float, stopPrice: float, params={}):
|
4396
4418
|
if not self.has['createStopLimitOrder']:
|
4397
4419
|
raise NotSupported(self.id + ' createStopLimitOrder() is not supported yet')
|
4398
4420
|
query = self.extend(params, {'stopPrice': stopPrice})
|
4399
4421
|
return self.create_order(symbol, 'limit', side, amount, price, query)
|
4400
4422
|
|
4401
|
-
def create_stop_market_order(self, symbol: str, side: OrderSide, amount, stopPrice, params={}):
|
4423
|
+
def create_stop_market_order(self, symbol: str, side: OrderSide, amount: float, stopPrice: float, params={}):
|
4402
4424
|
if not self.has['createStopMarketOrder']:
|
4403
4425
|
raise NotSupported(self.id + ' createStopMarketOrder() is not supported yet')
|
4404
4426
|
query = self.extend(params, {'stopPrice': stopPrice})
|
@@ -4914,7 +4936,8 @@ class Exchange(object):
|
|
4914
4936
|
response = getattr(self, method)(symbol, None, maxEntriesPerRequest, params)
|
4915
4937
|
responseLength = len(response)
|
4916
4938
|
if self.verbose:
|
4917
|
-
|
4939
|
+
backwardMessage = 'Dynamic pagination call ' + calls + ' method ' + method + ' response length ' + responseLength + ' timestamp ' + paginationTimestamp
|
4940
|
+
self.log(backwardMessage)
|
4918
4941
|
if responseLength == 0:
|
4919
4942
|
break
|
4920
4943
|
errors = 0
|
@@ -4928,7 +4951,8 @@ class Exchange(object):
|
|
4928
4951
|
response = getattr(self, method)(symbol, paginationTimestamp, maxEntriesPerRequest, params)
|
4929
4952
|
responseLength = len(response)
|
4930
4953
|
if self.verbose:
|
4931
|
-
|
4954
|
+
forwardMessage = 'Dynamic pagination call ' + calls + ' method ' + method + ' response length ' + responseLength + ' timestamp ' + paginationTimestamp
|
4955
|
+
self.log(forwardMessage)
|
4932
4956
|
if responseLength == 0:
|
4933
4957
|
break
|
4934
4958
|
errors = 0
|
@@ -4960,6 +4984,7 @@ class Exchange(object):
|
|
4960
4984
|
errors += 1
|
4961
4985
|
if errors > maxRetries:
|
4962
4986
|
raise e
|
4987
|
+
return None
|
4963
4988
|
|
4964
4989
|
def fetch_paginated_call_deterministic(self, method: str, symbol: str = None, since: Int = None, limit: Int = None, timeframe: str = None, params={}, maxEntriesPerRequest=None):
|
4965
4990
|
maxCalls = None
|
@@ -5014,7 +5039,8 @@ class Exchange(object):
|
|
5014
5039
|
errors = 0
|
5015
5040
|
responseLength = len(response)
|
5016
5041
|
if self.verbose:
|
5017
|
-
|
5042
|
+
cursorMessage = 'Cursor pagination call ' + i + 1 + ' method ' + method + ' response length ' + responseLength + ' cursor ' + cursorValue
|
5043
|
+
self.log(cursorMessage)
|
5018
5044
|
if responseLength == 0:
|
5019
5045
|
break
|
5020
5046
|
result = self.array_concat(result, response)
|
@@ -5050,7 +5076,8 @@ class Exchange(object):
|
|
5050
5076
|
errors = 0
|
5051
5077
|
responseLength = len(response)
|
5052
5078
|
if self.verbose:
|
5053
|
-
|
5079
|
+
incrementalMessage = 'Incremental pagination call ' + i + 1 + ' method ' + method + ' response length ' + responseLength
|
5080
|
+
self.log(incrementalMessage)
|
5054
5081
|
if responseLength == 0:
|
5055
5082
|
break
|
5056
5083
|
result = self.array_concat(result, response)
|
ccxt/base/types.py
CHANGED
@@ -210,6 +210,16 @@ class Transaction(TypedDict):
|
|
210
210
|
comment: Str
|
211
211
|
internal: Bool
|
212
212
|
|
213
|
+
class TransferEntry(TypedDict):
|
214
|
+
info: Dict[str, any]
|
215
|
+
id: Str
|
216
|
+
timestamp: Int
|
217
|
+
datetime: Str
|
218
|
+
currency: Str
|
219
|
+
amount: Num
|
220
|
+
fromAccount: Str
|
221
|
+
toAccount: Str
|
222
|
+
status: Str
|
213
223
|
|
214
224
|
class Ticker(TypedDict):
|
215
225
|
info: Dict[str, Any]
|