ccxt 4.4.27__py2.py3-none-any.whl → 4.4.29__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 +7 -0
- ccxt/abstract/binancecoinm.py +7 -0
- ccxt/abstract/binanceus.py +7 -0
- ccxt/abstract/binanceusdm.py +7 -0
- ccxt/abstract/bybit.py +0 -13
- ccxt/alpaca.py +45 -41
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/alpaca.py +45 -41
- ccxt/async_support/base/exchange.py +4 -1
- ccxt/async_support/bigone.py +1 -1
- ccxt/async_support/binance.py +8 -1
- ccxt/async_support/bingx.py +1 -1
- ccxt/async_support/bitbank.py +1 -1
- ccxt/async_support/bitfinex.py +1 -1
- ccxt/async_support/bitfinex2.py +1 -1
- ccxt/async_support/bitflyer.py +1 -1
- ccxt/async_support/bitget.py +96 -8
- ccxt/async_support/bithumb.py +1 -1
- ccxt/async_support/bitmart.py +1 -1
- ccxt/async_support/bitmex.py +1 -1
- ccxt/async_support/bitopro.py +22 -22
- ccxt/async_support/bitrue.py +29 -29
- ccxt/async_support/bitso.py +1 -1
- ccxt/async_support/bitstamp.py +1 -1
- ccxt/async_support/bitvavo.py +4 -1
- ccxt/async_support/blockchaincom.py +1 -1
- ccxt/async_support/btcmarkets.py +1 -1
- ccxt/async_support/bybit.py +50 -585
- ccxt/async_support/coinbase.py +1 -1
- ccxt/async_support/coinbaseexchange.py +1 -1
- ccxt/async_support/coinbaseinternational.py +1 -1
- ccxt/async_support/coincatch.py +25 -5
- ccxt/async_support/coinex.py +1 -1
- ccxt/async_support/coinlist.py +1 -1
- ccxt/async_support/coinmate.py +1 -1
- ccxt/async_support/coinsph.py +1 -1
- ccxt/async_support/cryptocom.py +1 -1
- ccxt/async_support/deribit.py +1 -1
- ccxt/async_support/digifinex.py +1 -1
- ccxt/async_support/exmo.py +1 -1
- ccxt/async_support/gate.py +1 -1
- ccxt/async_support/gemini.py +1 -1
- ccxt/async_support/hashkey.py +1 -1
- ccxt/async_support/hitbtc.py +1 -1
- ccxt/async_support/hollaex.py +1 -1
- ccxt/async_support/htx.py +1 -1
- ccxt/async_support/huobijp.py +1 -1
- ccxt/async_support/idex.py +1 -1
- ccxt/async_support/independentreserve.py +1 -1
- ccxt/async_support/indodax.py +1 -1
- ccxt/async_support/kraken.py +44 -36
- ccxt/async_support/kucoin.py +1 -1
- ccxt/async_support/kuna.py +1 -1
- ccxt/async_support/lbank.py +6 -1
- ccxt/async_support/lykke.py +1 -1
- ccxt/async_support/mercado.py +1 -1
- ccxt/async_support/mexc.py +1 -1
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/novadax.py +1 -1
- ccxt/async_support/okcoin.py +1 -1
- ccxt/async_support/okx.py +1 -1
- ccxt/async_support/onetrading.py +1 -1
- ccxt/async_support/oxfun.py +1 -1
- ccxt/async_support/phemex.py +1 -1
- ccxt/async_support/poloniex.py +1 -1
- ccxt/async_support/probit.py +1 -1
- ccxt/async_support/tokocrypto.py +1 -1
- ccxt/async_support/upbit.py +1 -1
- ccxt/async_support/vertex.py +52 -8
- ccxt/async_support/wavesexchange.py +2 -1
- ccxt/async_support/whitebit.py +1 -1
- ccxt/async_support/woo.py +1 -1
- ccxt/async_support/woofipro.py +1 -1
- ccxt/async_support/xt.py +1 -1
- ccxt/async_support/yobit.py +2 -2
- ccxt/async_support/zaif.py +1 -1
- ccxt/async_support/zonda.py +1 -1
- ccxt/base/exchange.py +4 -1
- ccxt/bigone.py +1 -1
- ccxt/binance.py +8 -1
- ccxt/bingx.py +1 -1
- ccxt/bitbank.py +1 -1
- ccxt/bitfinex.py +1 -1
- ccxt/bitfinex2.py +1 -1
- ccxt/bitflyer.py +1 -1
- ccxt/bitget.py +96 -8
- ccxt/bithumb.py +1 -1
- ccxt/bitmart.py +1 -1
- ccxt/bitmex.py +1 -1
- ccxt/bitopro.py +22 -22
- ccxt/bitrue.py +29 -29
- ccxt/bitso.py +1 -1
- ccxt/bitstamp.py +1 -1
- ccxt/bitvavo.py +4 -1
- ccxt/blockchaincom.py +1 -1
- ccxt/btcmarkets.py +1 -1
- ccxt/bybit.py +50 -585
- ccxt/coinbase.py +1 -1
- ccxt/coinbaseexchange.py +1 -1
- ccxt/coinbaseinternational.py +1 -1
- ccxt/coincatch.py +25 -5
- ccxt/coinex.py +1 -1
- ccxt/coinlist.py +1 -1
- ccxt/coinmate.py +1 -1
- ccxt/coinsph.py +1 -1
- ccxt/cryptocom.py +1 -1
- ccxt/deribit.py +1 -1
- ccxt/digifinex.py +1 -1
- ccxt/exmo.py +1 -1
- ccxt/gate.py +1 -1
- ccxt/gemini.py +1 -1
- ccxt/hashkey.py +1 -1
- ccxt/hitbtc.py +1 -1
- ccxt/hollaex.py +1 -1
- ccxt/htx.py +1 -1
- ccxt/huobijp.py +1 -1
- ccxt/idex.py +1 -1
- ccxt/independentreserve.py +1 -1
- ccxt/indodax.py +1 -1
- ccxt/kraken.py +44 -36
- ccxt/kucoin.py +1 -1
- ccxt/kuna.py +1 -1
- ccxt/lbank.py +6 -1
- ccxt/lykke.py +1 -1
- ccxt/mercado.py +1 -1
- ccxt/mexc.py +1 -1
- ccxt/ndax.py +1 -1
- ccxt/novadax.py +1 -1
- ccxt/okcoin.py +1 -1
- ccxt/okx.py +1 -1
- ccxt/onetrading.py +1 -1
- ccxt/oxfun.py +1 -1
- ccxt/phemex.py +1 -1
- ccxt/poloniex.py +1 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +4 -5
- ccxt/pro/bitvavo.py +2 -1
- ccxt/pro/mexc.py +187 -30
- ccxt/probit.py +1 -1
- ccxt/tokocrypto.py +1 -1
- ccxt/upbit.py +1 -1
- ccxt/vertex.py +52 -8
- ccxt/wavesexchange.py +2 -1
- ccxt/whitebit.py +1 -1
- ccxt/woo.py +1 -1
- ccxt/woofipro.py +1 -1
- ccxt/xt.py +1 -1
- ccxt/yobit.py +2 -2
- ccxt/zaif.py +1 -1
- ccxt/zonda.py +1 -1
- {ccxt-4.4.27.dist-info → ccxt-4.4.29.dist-info}/METADATA +4 -4
- {ccxt-4.4.27.dist-info → ccxt-4.4.29.dist-info}/RECORD +156 -156
- {ccxt-4.4.27.dist-info → ccxt-4.4.29.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.27.dist-info → ccxt-4.4.29.dist-info}/WHEEL +0 -0
- {ccxt-4.4.27.dist-info → ccxt-4.4.29.dist-info}/top_level.txt +0 -0
ccxt/async_support/coinbase.py
CHANGED
@@ -3705,7 +3705,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
3705
3705
|
tickers = self.safe_list(response, 'pricebooks', [])
|
3706
3706
|
return self.parse_tickers(tickers, symbols)
|
3707
3707
|
|
3708
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
3708
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
3709
3709
|
"""
|
3710
3710
|
make a withdrawal
|
3711
3711
|
:see: https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-transactions#send-money
|
@@ -1284,7 +1284,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
|
|
1284
1284
|
async def fetch_payment_methods(self, params={}):
|
1285
1285
|
return await self.privateGetPaymentMethods(params)
|
1286
1286
|
|
1287
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1287
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1288
1288
|
"""
|
1289
1289
|
make a withdrawal
|
1290
1290
|
:see: https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawpaymentmethod
|
@@ -1997,7 +1997,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
1997
1997
|
trades = self.safe_list(response, 'results', [])
|
1998
1998
|
return self.parse_trades(trades, market, since, limit)
|
1999
1999
|
|
2000
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2000
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2001
2001
|
"""
|
2002
2002
|
make a withdrawal
|
2003
2003
|
:see: https://docs.cloud.coinbase.com/intx/reference/withdraw
|
ccxt/async_support/coincatch.py
CHANGED
@@ -1954,7 +1954,7 @@ class coincatch(Exchange, ImplicitAPI):
|
|
1954
1954
|
data = self.safe_list(response, 'data', [])
|
1955
1955
|
return self.parse_transactions(data, currency, since, limit)
|
1956
1956
|
|
1957
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1957
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1958
1958
|
"""
|
1959
1959
|
make a withdrawal
|
1960
1960
|
:see: https://coincatch.github.io/github.io/en/spot/#withdraw
|
@@ -1983,13 +1983,23 @@ class coincatch(Exchange, ImplicitAPI):
|
|
1983
1983
|
if networkCode is not None:
|
1984
1984
|
request['chain'] = self.network_code_to_id(networkCode)
|
1985
1985
|
response = await self.privatePostApiSpotV1WalletWithdrawalV2(self.extend(request, params))
|
1986
|
-
# todo add after withdrawal
|
1987
1986
|
#
|
1988
|
-
|
1987
|
+
# {
|
1988
|
+
# "code": "00000",
|
1989
|
+
# "msg": "success",
|
1990
|
+
# "data": {
|
1991
|
+
# "orderId":888291686266343424",
|
1992
|
+
# "clientOrderId":"123"
|
1993
|
+
# }
|
1994
|
+
# }
|
1995
|
+
#
|
1996
|
+
data = self.safe_dict(response, 'data', {})
|
1997
|
+
return self.parse_transaction(data, currency)
|
1989
1998
|
|
1990
1999
|
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1991
2000
|
#
|
1992
2001
|
# fetchDeposits
|
2002
|
+
#
|
1993
2003
|
# {
|
1994
2004
|
# "id": "1213046466852196352",
|
1995
2005
|
# "txId": "824246b030cd84d56400661303547f43a1d9fef66cf968628dd5112f362053ff",
|
@@ -2009,7 +2019,17 @@ class coincatch(Exchange, ImplicitAPI):
|
|
2009
2019
|
# "uTime": "1724938746015"
|
2010
2020
|
# }
|
2011
2021
|
#
|
2012
|
-
|
2022
|
+
# withdraw
|
2023
|
+
#
|
2024
|
+
# {
|
2025
|
+
# "code": "00000",
|
2026
|
+
# "msg": "success",
|
2027
|
+
# "data": {
|
2028
|
+
# "orderId":888291686266343424",
|
2029
|
+
# "clientOrderId":"123"
|
2030
|
+
# }
|
2031
|
+
# }
|
2032
|
+
#
|
2013
2033
|
status = self.safe_string(transaction, 'status')
|
2014
2034
|
if status == 'success':
|
2015
2035
|
status = 'ok'
|
@@ -2033,7 +2053,7 @@ class coincatch(Exchange, ImplicitAPI):
|
|
2033
2053
|
}
|
2034
2054
|
return {
|
2035
2055
|
'info': transaction,
|
2036
|
-
'id': id,
|
2056
|
+
'id': self.safe_string_2(transaction, 'id', 'orderId'),
|
2037
2057
|
'txid': txid,
|
2038
2058
|
'timestamp': timestamp,
|
2039
2059
|
'datetime': self.iso8601(timestamp),
|
ccxt/async_support/coinex.py
CHANGED
@@ -4425,7 +4425,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
4425
4425
|
result = self.parse_funding_rates(data, market)
|
4426
4426
|
return self.filter_by_array(result, 'symbol', symbols)
|
4427
4427
|
|
4428
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
4428
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
4429
4429
|
"""
|
4430
4430
|
make a withdrawal
|
4431
4431
|
:see: https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/withdrawal
|
ccxt/async_support/coinlist.py
CHANGED
@@ -1886,7 +1886,7 @@ class coinlist(Exchange, ImplicitAPI):
|
|
1886
1886
|
# coinlist returns both internal transfers and blockchain transactions
|
1887
1887
|
return self.parse_transactions(response, currency, since, limit)
|
1888
1888
|
|
1889
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1889
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1890
1890
|
"""
|
1891
1891
|
request a withdrawal from CoinList wallet.(Disabled by default. Contact CoinList to apply for an exception.)
|
1892
1892
|
:see: https://trade-docs.coinlist.co/?javascript--nodejs#request-withdrawal-from-wallet
|
ccxt/async_support/coinmate.py
CHANGED
@@ -587,7 +587,7 @@ class coinmate(Exchange, ImplicitAPI):
|
|
587
587
|
},
|
588
588
|
}
|
589
589
|
|
590
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
590
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
591
591
|
"""
|
592
592
|
make a withdrawal
|
593
593
|
:see: https://coinmate.docs.apiary.io/#reference/bitcoin-withdrawal-and-deposit/withdraw-bitcoins/post
|
ccxt/async_support/coinsph.py
CHANGED
@@ -1501,7 +1501,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1501
1501
|
'tierBased': None,
|
1502
1502
|
}
|
1503
1503
|
|
1504
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1504
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1505
1505
|
"""
|
1506
1506
|
make a withdrawal to coins_ph account
|
1507
1507
|
:see: https://coins-docs.github.io/rest-api/#withdrawuser_data
|
ccxt/async_support/cryptocom.py
CHANGED
@@ -1556,7 +1556,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
1556
1556
|
address = addressString
|
1557
1557
|
return [address, tag]
|
1558
1558
|
|
1559
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1559
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1560
1560
|
"""
|
1561
1561
|
make a withdrawal
|
1562
1562
|
:see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-withdrawal
|
ccxt/async_support/deribit.py
CHANGED
@@ -2768,7 +2768,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2768
2768
|
}
|
2769
2769
|
return self.safe_string(statuses, status, status)
|
2770
2770
|
|
2771
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2771
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2772
2772
|
"""
|
2773
2773
|
make a withdrawal
|
2774
2774
|
:see: https://docs.deribit.com/#private-withdraw
|
ccxt/async_support/digifinex.py
CHANGED
@@ -2786,7 +2786,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
2786
2786
|
#
|
2787
2787
|
return self.parse_transfer(response, currency)
|
2788
2788
|
|
2789
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2789
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2790
2790
|
"""
|
2791
2791
|
make a withdrawal
|
2792
2792
|
:param str code: unified currency code
|
ccxt/async_support/exmo.py
CHANGED
@@ -1988,7 +1988,7 @@ class exmo(Exchange, ImplicitAPI):
|
|
1988
1988
|
return self.markets[symbols[0]]
|
1989
1989
|
return None
|
1990
1990
|
|
1991
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1991
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1992
1992
|
"""
|
1993
1993
|
make a withdrawal
|
1994
1994
|
:see: https://documenter.getpostman.com/view/10287440/SzYXWKPi#3ab9c34d-ad58-4f87-9c57-2e2ea88a8325
|
ccxt/async_support/gate.py
CHANGED
@@ -3528,7 +3528,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3528
3528
|
response = await self.privateWalletGetWithdrawals(self.extend(request, params))
|
3529
3529
|
return self.parse_transactions(response, currency)
|
3530
3530
|
|
3531
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
3531
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
3532
3532
|
"""
|
3533
3533
|
make a withdrawal
|
3534
3534
|
:see: https://www.gate.io/docs/developers/apiv4/en/#withdraw
|
ccxt/async_support/gemini.py
CHANGED
@@ -1527,7 +1527,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1527
1527
|
response = await self.privatePostV1Mytrades(self.extend(request, params))
|
1528
1528
|
return self.parse_trades(response, market, since, limit)
|
1529
1529
|
|
1530
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1530
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1531
1531
|
"""
|
1532
1532
|
make a withdrawal
|
1533
1533
|
:see: https://docs.gemini.com/rest-api/#withdraw-crypto-funds
|
ccxt/async_support/hashkey.py
CHANGED
@@ -1874,7 +1874,7 @@ class hashkey(Exchange, ImplicitAPI):
|
|
1874
1874
|
#
|
1875
1875
|
return self.parse_transactions(response, currency, since, limit, {'type': 'withdrawal'})
|
1876
1876
|
|
1877
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1877
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1878
1878
|
"""
|
1879
1879
|
make a withdrawal
|
1880
1880
|
:see: https://hashkeyglobal-apidoc.readme.io/reference/withdraw
|
ccxt/async_support/hitbtc.py
CHANGED
@@ -2491,7 +2491,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
2491
2491
|
'info': response,
|
2492
2492
|
}
|
2493
2493
|
|
2494
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2494
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2495
2495
|
"""
|
2496
2496
|
make a withdrawal
|
2497
2497
|
:see: https://api.hitbtc.com/#withdraw-crypto
|
ccxt/async_support/hollaex.py
CHANGED
@@ -1611,7 +1611,7 @@ class hollaex(Exchange, ImplicitAPI):
|
|
1611
1611
|
'fee': fee,
|
1612
1612
|
}
|
1613
1613
|
|
1614
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1614
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1615
1615
|
"""
|
1616
1616
|
make a withdrawal
|
1617
1617
|
:see: https://apidocs.hollaex.com/#withdrawal
|
ccxt/async_support/htx.py
CHANGED
@@ -6118,7 +6118,7 @@ class htx(Exchange, ImplicitAPI):
|
|
6118
6118
|
}
|
6119
6119
|
return self.safe_string(statuses, status, status)
|
6120
6120
|
|
6121
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
6121
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
6122
6122
|
"""
|
6123
6123
|
:see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec4cc41-7773-11ed-9966-0242ac110003
|
6124
6124
|
make a withdrawal
|
ccxt/async_support/huobijp.py
CHANGED
@@ -1745,7 +1745,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1745
1745
|
}
|
1746
1746
|
return self.safe_string(statuses, status, status)
|
1747
1747
|
|
1748
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1748
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1749
1749
|
"""
|
1750
1750
|
make a withdrawal
|
1751
1751
|
:param str code: unified currency code
|
ccxt/async_support/idex.py
CHANGED
@@ -1292,7 +1292,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1292
1292
|
response = await self.privatePostOrders(request)
|
1293
1293
|
return self.parse_order(response, market)
|
1294
1294
|
|
1295
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1295
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1296
1296
|
"""
|
1297
1297
|
make a withdrawal
|
1298
1298
|
:see: https://api-docs-v3.idex.io/#withdraw-funds
|
@@ -756,7 +756,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
756
756
|
'tag': self.safe_string(depositAddress, 'Tag'),
|
757
757
|
}
|
758
758
|
|
759
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
759
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
760
760
|
"""
|
761
761
|
make a withdrawal
|
762
762
|
:see: https://www.independentreserve.com/features/api#WithdrawDigitalCurrency
|
ccxt/async_support/indodax.py
CHANGED
@@ -1018,7 +1018,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
1018
1018
|
transactions = self.array_concat(withdraws, deposits)
|
1019
1019
|
return self.parse_transactions(transactions, currency, since, limit)
|
1020
1020
|
|
1021
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1021
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1022
1022
|
"""
|
1023
1023
|
make a withdrawal
|
1024
1024
|
:see: https://github.com/btcid/indodax-official-api-docs/blob/master/Private-RestAPI.md#withdraw-coin-endpoints
|
ccxt/async_support/kraken.py
CHANGED
@@ -1436,7 +1436,7 @@ class kraken(Exchange, ImplicitAPI):
|
|
1436
1436
|
# {
|
1437
1437
|
# "error": [],
|
1438
1438
|
# "result": {
|
1439
|
-
# "descr": {order: 'buy 0.02100000 ETHUSDT @ limit 330.00'},
|
1439
|
+
# "descr": {order: 'buy 0.02100000 ETHUSDT @ limit 330.00'}, # see more examples in "parseOrder"
|
1440
1440
|
# "txid": ['OEKVV2-IH52O-TPL6GZ']
|
1441
1441
|
# }
|
1442
1442
|
# }
|
@@ -1496,9 +1496,10 @@ class kraken(Exchange, ImplicitAPI):
|
|
1496
1496
|
|
1497
1497
|
def parse_order_type(self, status):
|
1498
1498
|
statuses: dict = {
|
1499
|
+
# we dont add "space" delimited orders here(eg. stop loss) because they need separate parsing
|
1499
1500
|
'take-profit': 'market',
|
1500
|
-
'stop-loss-limit': 'limit',
|
1501
1501
|
'stop-loss': 'market',
|
1502
|
+
'stop-loss-limit': 'limit',
|
1502
1503
|
'take-profit-limit': 'limit',
|
1503
1504
|
'trailing-stop-limit': 'limit',
|
1504
1505
|
}
|
@@ -1506,30 +1507,19 @@ class kraken(Exchange, ImplicitAPI):
|
|
1506
1507
|
|
1507
1508
|
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1508
1509
|
#
|
1509
|
-
# createOrder
|
1510
|
+
# createOrder
|
1510
1511
|
#
|
1511
1512
|
# {
|
1512
|
-
# "descr": {
|
1513
|
+
# "descr": {
|
1514
|
+
# "order": "buy 0.02100000 ETHUSDT @ limit 330.00" # limit orders
|
1515
|
+
# "buy 0.12345678 ETHUSDT @ market" # market order
|
1516
|
+
# "sell 0.28002676 ETHUSDT @ stop loss 0.0123 -> limit 0.0.1222" # stop order
|
1517
|
+
# "sell 0.00100000 ETHUSDT @ stop loss 2677.00 -> limit 2577.00 with 5:1 leverage"
|
1518
|
+
# "buy 0.10000000 LTCUSDT @ take profit 75.00000 -> limit 74.00000"
|
1519
|
+
# "sell 10.00000000 XRPEUR @ trailing stop +50.0000%" # trailing stop
|
1520
|
+
# },
|
1513
1521
|
# "txid": ['OEKVV2-IH52O-TPL6GZ']
|
1514
1522
|
# }
|
1515
|
-
# {
|
1516
|
-
# "txid": ["TX_ID_HERE"],
|
1517
|
-
# "descr": {"order":"buy 0.12345678 ETHEUR @ market"},
|
1518
|
-
# }
|
1519
|
-
#
|
1520
|
-
#
|
1521
|
-
# createOrder for stop orders
|
1522
|
-
#
|
1523
|
-
# {
|
1524
|
-
# "txid":["OSILNC-VQI5Q-775ZDQ"],
|
1525
|
-
# "descr":{"order":"sell 167.28002676 ADAXBT @ stop loss 0.00003280 -> limit 0.00003212"}
|
1526
|
-
# }
|
1527
|
-
#
|
1528
|
-
#
|
1529
|
-
# {
|
1530
|
-
# "txid":["OVHMJV-BZW2V-6NZFWF"],
|
1531
|
-
# "descr":{"order":"sell 0.00100000 ETHUSD @ stop loss 2677.00 -> limit 2577.00 with 5:1 leverage"}
|
1532
|
-
# }
|
1533
1523
|
#
|
1534
1524
|
# editOrder
|
1535
1525
|
#
|
@@ -1607,24 +1597,29 @@ class kraken(Exchange, ImplicitAPI):
|
|
1607
1597
|
else:
|
1608
1598
|
orderDescription = self.safe_string(order, 'descr')
|
1609
1599
|
side = None
|
1610
|
-
|
1600
|
+
rawType = None
|
1611
1601
|
marketId = None
|
1612
1602
|
price = None
|
1613
1603
|
amount = None
|
1614
|
-
|
1604
|
+
triggerPrice = None
|
1615
1605
|
if orderDescription is not None:
|
1616
1606
|
parts = orderDescription.split(' ')
|
1617
1607
|
side = self.safe_string(parts, 0)
|
1618
1608
|
amount = self.safe_string(parts, 1)
|
1619
1609
|
marketId = self.safe_string(parts, 2)
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1610
|
+
part4 = self.safe_string(parts, 4)
|
1611
|
+
part5 = self.safe_string(parts, 5)
|
1612
|
+
if part4 == 'limit' or part4 == 'market':
|
1613
|
+
rawType = part4 # eg, limit, market
|
1614
|
+
else:
|
1615
|
+
rawType = part4 + ' ' + part5 # eg. stop loss, take profit, trailing stop
|
1616
|
+
if rawType == 'stop loss' or rawType == 'take profit':
|
1617
|
+
triggerPrice = self.safe_string(parts, 6)
|
1623
1618
|
price = self.safe_string(parts, 9)
|
1624
|
-
elif
|
1619
|
+
elif rawType == 'limit':
|
1625
1620
|
price = self.safe_string(parts, 5)
|
1626
1621
|
side = self.safe_string(description, 'type', side)
|
1627
|
-
|
1622
|
+
rawType = self.safe_string(description, 'ordertype', rawType) # orderType has dash, e.g. trailing-stop
|
1628
1623
|
marketId = self.safe_string(description, 'pair', marketId)
|
1629
1624
|
foundMarket = self.find_market_by_altname_or_id(marketId)
|
1630
1625
|
symbol = None
|
@@ -1676,15 +1671,28 @@ class kraken(Exchange, ImplicitAPI):
|
|
1676
1671
|
trades.append(self.safe_trade({'id': rawTrade, 'orderId': id, 'symbol': symbol, 'info': {}}))
|
1677
1672
|
else:
|
1678
1673
|
trades.append(rawTrade)
|
1679
|
-
|
1674
|
+
# in #24192 PR, self field is not something consistent/actual
|
1675
|
+
# triggerPrice = self.omit_zero(self.safe_string(order, 'stopprice', triggerPrice))
|
1680
1676
|
stopLossPrice = None
|
1681
1677
|
takeProfitPrice = None
|
1682
|
-
|
1678
|
+
# the dashed strings are not provided from fields(eg. fetch order)
|
1679
|
+
# while spaced strings from "order" sentence(when other fields not available)
|
1680
|
+
if rawType.startswith('take-profit'):
|
1683
1681
|
takeProfitPrice = self.safe_string(description, 'price')
|
1684
1682
|
price = self.omit_zero(self.safe_string(description, 'price2'))
|
1685
|
-
elif
|
1683
|
+
elif rawType.startswith('stop-loss'):
|
1686
1684
|
stopLossPrice = self.safe_string(description, 'price')
|
1687
1685
|
price = self.omit_zero(self.safe_string(description, 'price2'))
|
1686
|
+
elif rawType == 'take profit':
|
1687
|
+
takeProfitPrice = triggerPrice
|
1688
|
+
elif rawType == 'stop loss':
|
1689
|
+
stopLossPrice = triggerPrice
|
1690
|
+
finalType = self.parse_order_type(rawType)
|
1691
|
+
# unlike from endpoints which provide eg: "take-profit-limit"
|
1692
|
+
# for "space-delimited" orders we dont have market/limit suffixes, their format is
|
1693
|
+
# eg: `stop loss > limit 123`, so we need to parse them manually
|
1694
|
+
if self.in_array(finalType, ['stop loss', 'take profit']):
|
1695
|
+
finalType = 'market' if (price is None) else 'limit'
|
1688
1696
|
return self.safe_order({
|
1689
1697
|
'id': id,
|
1690
1698
|
'clientOrderId': clientOrderId,
|
@@ -1694,13 +1702,13 @@ class kraken(Exchange, ImplicitAPI):
|
|
1694
1702
|
'lastTradeTimestamp': None,
|
1695
1703
|
'status': status,
|
1696
1704
|
'symbol': symbol,
|
1697
|
-
'type':
|
1705
|
+
'type': finalType,
|
1698
1706
|
'timeInForce': None,
|
1699
1707
|
'postOnly': isPostOnly,
|
1700
1708
|
'side': side,
|
1701
1709
|
'price': price,
|
1702
|
-
'stopPrice':
|
1703
|
-
'triggerPrice':
|
1710
|
+
'stopPrice': triggerPrice,
|
1711
|
+
'triggerPrice': triggerPrice,
|
1704
1712
|
'takeProfitPrice': takeProfitPrice,
|
1705
1713
|
'stopLossPrice': stopLossPrice,
|
1706
1714
|
'cost': None,
|
@@ -2698,7 +2706,7 @@ class kraken(Exchange, ImplicitAPI):
|
|
2698
2706
|
'tag': tag,
|
2699
2707
|
}
|
2700
2708
|
|
2701
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2709
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2702
2710
|
"""
|
2703
2711
|
make a withdrawal
|
2704
2712
|
:see: https://docs.kraken.com/rest/#tag/Funding/operation/withdrawFunds
|
ccxt/async_support/kucoin.py
CHANGED
@@ -3258,7 +3258,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3258
3258
|
'tierBased': True,
|
3259
3259
|
}
|
3260
3260
|
|
3261
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
3261
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
3262
3262
|
"""
|
3263
3263
|
make a withdrawal
|
3264
3264
|
:see: https://www.kucoin.com/docs/rest/funding/withdrawals/apply-withdraw-v3-
|
ccxt/async_support/kuna.py
CHANGED
@@ -1333,7 +1333,7 @@ class kuna(Exchange, ImplicitAPI):
|
|
1333
1333
|
data = self.safe_list(response, 'data')
|
1334
1334
|
return self.parse_trades(data, market, since, limit)
|
1335
1335
|
|
1336
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1336
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1337
1337
|
"""
|
1338
1338
|
make a withdrawal
|
1339
1339
|
:see: https://docs.kuna.io/docs/create-a-withdraw
|
ccxt/async_support/lbank.py
CHANGED
@@ -1155,6 +1155,11 @@ class lbank(Exchange, ImplicitAPI):
|
|
1155
1155
|
indexPrice = self.safe_number(ticker, 'underlyingPrice')
|
1156
1156
|
fundingRate = self.safe_number(ticker, 'fundingRate')
|
1157
1157
|
fundingTime = self.safe_integer(ticker, 'nextFeeTime')
|
1158
|
+
positionFeeTime = self.safe_integer(ticker, 'positionFeeTime')
|
1159
|
+
intervalString = None
|
1160
|
+
if positionFeeTime is not None:
|
1161
|
+
interval = self.parse_to_int(positionFeeTime / 60 / 60)
|
1162
|
+
intervalString = interval + 'h'
|
1158
1163
|
return {
|
1159
1164
|
'info': ticker,
|
1160
1165
|
'symbol': symbol,
|
@@ -1171,7 +1176,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
1171
1176
|
'previousFundingRate': None,
|
1172
1177
|
'previousFundingTimestamp': None,
|
1173
1178
|
'previousFundingDatetime': None,
|
1174
|
-
'interval':
|
1179
|
+
'interval': intervalString,
|
1175
1180
|
}
|
1176
1181
|
|
1177
1182
|
async def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
|
ccxt/async_support/lykke.py
CHANGED
@@ -1207,7 +1207,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
1207
1207
|
currency = self.currency(code)
|
1208
1208
|
return self.parse_transactions(payload, currency, since, limit)
|
1209
1209
|
|
1210
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1210
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1211
1211
|
"""
|
1212
1212
|
make a withdrawal
|
1213
1213
|
:see: https://lykkecity.github.io/Trading-API/#withdrawal
|
ccxt/async_support/mercado.py
CHANGED
@@ -601,7 +601,7 @@ class mercado(Exchange, ImplicitAPI):
|
|
601
601
|
order = self.safe_dict(responseData, 'order')
|
602
602
|
return self.parse_order(order, market)
|
603
603
|
|
604
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
604
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
605
605
|
"""
|
606
606
|
make a withdrawal
|
607
607
|
:param str code: unified currency code
|
ccxt/async_support/mexc.py
CHANGED
@@ -4976,7 +4976,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
4976
4976
|
}
|
4977
4977
|
return self.safe_string(statuses, status, status)
|
4978
4978
|
|
4979
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
4979
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
4980
4980
|
"""
|
4981
4981
|
make a withdrawal
|
4982
4982
|
:see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw-new
|
ccxt/async_support/ndax.py
CHANGED
@@ -2229,7 +2229,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
2229
2229
|
'network': None,
|
2230
2230
|
}
|
2231
2231
|
|
2232
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2232
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2233
2233
|
"""
|
2234
2234
|
make a withdrawal
|
2235
2235
|
:param str code: unified currency code
|
ccxt/async_support/novadax.py
CHANGED
@@ -1157,7 +1157,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1157
1157
|
}
|
1158
1158
|
return self.safe_string(statuses, status, 'failed')
|
1159
1159
|
|
1160
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1160
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1161
1161
|
"""
|
1162
1162
|
make a withdrawal
|
1163
1163
|
:see: https://doc.novadax.com/en-US/#send-cryptocurrencies
|
ccxt/async_support/okcoin.py
CHANGED
@@ -2307,7 +2307,7 @@ class okcoin(Exchange, ImplicitAPI):
|
|
2307
2307
|
}
|
2308
2308
|
return self.safe_string(statuses, status, status)
|
2309
2309
|
|
2310
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2310
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2311
2311
|
"""
|
2312
2312
|
:see: https://www.okcoin.com/docs-v5/en/#rest-api-funding-withdrawal
|
2313
2313
|
make a withdrawal
|
ccxt/async_support/okx.py
CHANGED
@@ -4644,7 +4644,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4644
4644
|
first = self.safe_string(keys, 0)
|
4645
4645
|
return self.safe_dict(response, first)
|
4646
4646
|
|
4647
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
4647
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
4648
4648
|
"""
|
4649
4649
|
make a withdrawal
|
4650
4650
|
:see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-withdrawal
|
ccxt/async_support/onetrading.py
CHANGED
@@ -1183,7 +1183,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1183
1183
|
withdrawalHistory = self.safe_list(response, 'withdrawal_history', [])
|
1184
1184
|
return self.parse_transactions(withdrawalHistory, currency, since, limit, {'type': 'withdrawal'})
|
1185
1185
|
|
1186
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1186
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1187
1187
|
"""
|
1188
1188
|
make a withdrawal
|
1189
1189
|
:param str code: unified currency code
|
ccxt/async_support/oxfun.py
CHANGED
@@ -1967,7 +1967,7 @@ class oxfun(Exchange, ImplicitAPI):
|
|
1967
1967
|
}
|
1968
1968
|
return self.safe_string(statuses, status, status)
|
1969
1969
|
|
1970
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1970
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1971
1971
|
"""
|
1972
1972
|
make a withdrawal
|
1973
1973
|
:see: https://docs.ox.fun/?json#post-v3-withdrawal
|
ccxt/async_support/phemex.py
CHANGED
@@ -4431,7 +4431,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
4431
4431
|
sorted = self.sort_by(result, 'timestamp')
|
4432
4432
|
return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
|
4433
4433
|
|
4434
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
4434
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
4435
4435
|
"""
|
4436
4436
|
make a withdrawal
|
4437
4437
|
:see: https://phemex-docs.github.io/#create-withdraw-request
|
ccxt/async_support/poloniex.py
CHANGED
@@ -1799,7 +1799,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1799
1799
|
'status': None,
|
1800
1800
|
}
|
1801
1801
|
|
1802
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1802
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1803
1803
|
"""
|
1804
1804
|
make a withdrawal
|
1805
1805
|
:see: https://api-docs.poloniex.com/spot/api/private/wallet#withdraw-currency
|
ccxt/async_support/probit.py
CHANGED
@@ -1319,7 +1319,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1319
1319
|
data = self.safe_list(response, 'data', [])
|
1320
1320
|
return self.parse_deposit_addresses(data, codes)
|
1321
1321
|
|
1322
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1322
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1323
1323
|
"""
|
1324
1324
|
:see: https://docs-en.probit.com/reference/withdrawal
|
1325
1325
|
make a withdrawal
|
ccxt/async_support/tokocrypto.py
CHANGED
@@ -2235,7 +2235,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2235
2235
|
'fee': fee,
|
2236
2236
|
}
|
2237
2237
|
|
2238
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2238
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2239
2239
|
"""
|
2240
2240
|
:see: https://www.tokocrypto.com/apidocs/#withdraw-signed
|
2241
2241
|
make a withdrawal
|
ccxt/async_support/upbit.py
CHANGED
@@ -1815,7 +1815,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1815
1815
|
raise AddressPending(self.id + ' is generating ' + code + ' deposit address, call fetchDepositAddress or createDepositAddress one more time later to retrieve the generated address')
|
1816
1816
|
return self.parse_deposit_address(response)
|
1817
1817
|
|
1818
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1818
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1819
1819
|
"""
|
1820
1820
|
:see: https://docs.upbit.com/reference/디지털자산-출금하기
|
1821
1821
|
:see: https://docs.upbit.com/reference/%EC%9B%90%ED%99%94-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0
|