ccxt 4.4.28__py2.py3-none-any.whl → 4.4.30__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/alpaca.py +1 -0
- ccxt/abstract/binance.py +9 -0
- ccxt/abstract/binancecoinm.py +9 -0
- ccxt/abstract/binanceus.py +9 -0
- ccxt/abstract/binanceusdm.py +9 -0
- ccxt/abstract/bybit.py +0 -13
- ccxt/alpaca.py +53 -8
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/alpaca.py +53 -8
- ccxt/async_support/base/exchange.py +4 -1
- ccxt/async_support/bigone.py +1 -1
- ccxt/async_support/binance.py +10 -1
- ccxt/async_support/bingx.py +1 -1
- ccxt/async_support/bitbank.py +1 -1
- ccxt/async_support/bitbns.py +12 -12
- ccxt/async_support/bitfinex.py +10 -10
- 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 +54 -54
- 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 +8 -4
- 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/hyperliquid.py +110 -5
- 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 +1 -1
- 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 +1 -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 +10 -1
- ccxt/bingx.py +1 -1
- ccxt/bitbank.py +1 -1
- ccxt/bitbns.py +12 -12
- ccxt/bitfinex.py +10 -10
- ccxt/bitfinex2.py +1 -1
- ccxt/bitflyer.py +1 -1
- ccxt/bitget.py +96 -8
- ccxt/bithumb.py +1 -1
- ccxt/bitmart.py +54 -54
- 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 +8 -4
- 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/hyperliquid.py +110 -5
- ccxt/idex.py +1 -1
- ccxt/independentreserve.py +1 -1
- ccxt/indodax.py +1 -1
- ccxt/kraken.py +1 -1
- 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/bitvavo.py +2 -1
- ccxt/pro/blofin.py +2 -1
- ccxt/pro/mexc.py +187 -30
- ccxt/probit.py +1 -1
- ccxt/test/tests_helpers.py +2 -2
- ccxt/tokocrypto.py +1 -1
- ccxt/upbit.py +1 -1
- ccxt/vertex.py +52 -8
- ccxt/wavesexchange.py +1 -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.28.dist-info → ccxt-4.4.30.dist-info}/METADATA +4 -4
- {ccxt-4.4.28.dist-info → ccxt-4.4.30.dist-info}/RECORD +162 -162
- {ccxt-4.4.28.dist-info → ccxt-4.4.30.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.28.dist-info → ccxt-4.4.30.dist-info}/WHEEL +0 -0
- {ccxt-4.4.28.dist-info → ccxt-4.4.30.dist-info}/top_level.txt +0 -0
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
|
ccxt/async_support/vertex.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.vertex import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Currencies, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees
|
8
|
+
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees, Transaction
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import AuthenticationError
|
@@ -2735,7 +2735,7 @@ class vertex(Exchange, ImplicitAPI):
|
|
2735
2735
|
#
|
2736
2736
|
return self.safe_dict(response, 'data', {})
|
2737
2737
|
|
2738
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
2738
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2739
2739
|
"""
|
2740
2740
|
make a withdrawal
|
2741
2741
|
:see: https://docs.vertexprotocol.com/developer-resources/api/withdrawing-on-chain
|
@@ -2773,13 +2773,57 @@ class vertex(Exchange, ImplicitAPI):
|
|
2773
2773
|
}
|
2774
2774
|
response = await self.v1GatewayPostExecute(self.extend(request, params))
|
2775
2775
|
#
|
2776
|
-
#
|
2777
|
-
#
|
2778
|
-
#
|
2779
|
-
#
|
2780
|
-
#
|
2776
|
+
# {
|
2777
|
+
# "status": "success",
|
2778
|
+
# "signature": {signature},
|
2779
|
+
# "request_type": "execute_withdraw_collateral"
|
2780
|
+
# }
|
2781
2781
|
#
|
2782
|
-
|
2782
|
+
transaction = self.parse_transaction(response, currency)
|
2783
|
+
return self.extend(transaction, {
|
2784
|
+
'amount': amount,
|
2785
|
+
'address': address,
|
2786
|
+
})
|
2787
|
+
|
2788
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
2789
|
+
#
|
2790
|
+
# {
|
2791
|
+
# "status": "success",
|
2792
|
+
# "signature": {signature},
|
2793
|
+
# "request_type": "execute_withdraw_collateral"
|
2794
|
+
# }
|
2795
|
+
#
|
2796
|
+
code = None
|
2797
|
+
if currency is not None:
|
2798
|
+
code = currency['code']
|
2799
|
+
return {
|
2800
|
+
'info': transaction,
|
2801
|
+
'id': None,
|
2802
|
+
'txid': None,
|
2803
|
+
'timestamp': None,
|
2804
|
+
'datetime': None,
|
2805
|
+
'addressFrom': None,
|
2806
|
+
'address': None,
|
2807
|
+
'addressTo': None,
|
2808
|
+
'tagFrom': None,
|
2809
|
+
'tag': None,
|
2810
|
+
'tagTo': None,
|
2811
|
+
'type': 'withdrawal',
|
2812
|
+
'amount': None,
|
2813
|
+
'currency': code,
|
2814
|
+
'status': self.parse_transaction_status(self.safe_string(transaction, 'status')),
|
2815
|
+
'updated': None,
|
2816
|
+
'network': None,
|
2817
|
+
'comment': None,
|
2818
|
+
'internal': None,
|
2819
|
+
'fee': None,
|
2820
|
+
}
|
2821
|
+
|
2822
|
+
def parse_transaction_status(self, status: Str):
|
2823
|
+
statuses: dict = {
|
2824
|
+
'success': 'ok',
|
2825
|
+
}
|
2826
|
+
return self.safe_string(statuses, status, status)
|
2783
2827
|
|
2784
2828
|
def handle_public_address(self, methodName: str, params: dict):
|
2785
2829
|
userAux = None
|
@@ -2291,7 +2291,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
2291
2291
|
raise ExchangeError(self.id + ' ' + body)
|
2292
2292
|
return None
|
2293
2293
|
|
2294
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2294
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2295
2295
|
"""
|
2296
2296
|
make a withdrawal
|
2297
2297
|
:param str code: unified currency code
|
ccxt/async_support/whitebit.py
CHANGED
@@ -1896,7 +1896,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1896
1896
|
'status': None,
|
1897
1897
|
}
|
1898
1898
|
|
1899
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1899
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1900
1900
|
"""
|
1901
1901
|
make a withdrawal
|
1902
1902
|
:see: https://docs.whitebit.com/private/http-main-v4/#create-withdraw-request
|
ccxt/async_support/woo.py
CHANGED
@@ -2293,7 +2293,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2293
2293
|
}
|
2294
2294
|
return self.safe_string(statuses, status, status)
|
2295
2295
|
|
2296
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2296
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2297
2297
|
"""
|
2298
2298
|
make a withdrawal
|
2299
2299
|
:see: https://docs.woo.org/#token-withdraw
|
ccxt/async_support/woofipro.py
CHANGED
@@ -2184,7 +2184,7 @@ class woofipro(Exchange, ImplicitAPI):
|
|
2184
2184
|
def sign_message(self, message, privateKey):
|
2185
2185
|
return self.sign_hash(self.hash_message(message), privateKey[-64:])
|
2186
2186
|
|
2187
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2187
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2188
2188
|
"""
|
2189
2189
|
make a withdrawal
|
2190
2190
|
:see: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/create-withdraw-request
|
ccxt/async_support/xt.py
CHANGED
@@ -3588,7 +3588,7 @@ class xt(Exchange, ImplicitAPI):
|
|
3588
3588
|
withdrawals = self.safe_value(data, 'items', [])
|
3589
3589
|
return self.parse_transactions(withdrawals, currency, since, limit, params)
|
3590
3590
|
|
3591
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
3591
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
3592
3592
|
"""
|
3593
3593
|
make a withdrawal
|
3594
3594
|
:see: https://doc.xt.com/#deposit_withdrawalwithdraw
|
ccxt/async_support/yobit.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.yobit import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Balances, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees
|
10
|
+
from ccxt.base.types import Balances, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -1186,7 +1186,7 @@ class yobit(Exchange, ImplicitAPI):
|
|
1186
1186
|
'tag': None,
|
1187
1187
|
}
|
1188
1188
|
|
1189
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1189
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1190
1190
|
"""
|
1191
1191
|
:see: https://yobit.net/en/api
|
1192
1192
|
make a withdrawal
|
ccxt/async_support/zaif.py
CHANGED
@@ -585,7 +585,7 @@ class zaif(Exchange, ImplicitAPI):
|
|
585
585
|
response = await self.privatePostTradeHistory(self.extend(request, params))
|
586
586
|
return self.parse_orders(response['return'], market, since, limit)
|
587
587
|
|
588
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
588
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
589
589
|
"""
|
590
590
|
:see: https://zaif-api-document.readthedocs.io/ja/latest/TradingAPI.html#id41
|
591
591
|
make a withdrawal
|
ccxt/async_support/zonda.py
CHANGED
@@ -1689,7 +1689,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1689
1689
|
}
|
1690
1690
|
return self.safe_string(statuses, status, status)
|
1691
1691
|
|
1692
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1692
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1693
1693
|
"""
|
1694
1694
|
:see: https://docs.zondacrypto.exchange/reference/crypto-withdrawal-1
|
1695
1695
|
make a withdrawal
|
ccxt/base/exchange.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.30'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -2480,6 +2480,9 @@ class Exchange(object):
|
|
2480
2480
|
def fetch_order_book(self, symbol: str, limit: Int = None, params={}):
|
2481
2481
|
raise NotSupported(self.id + ' fetchOrderBook() is not supported yet')
|
2482
2482
|
|
2483
|
+
def fetch_order_book_ws(self, symbol: str, limit: Int = None, params={}):
|
2484
|
+
raise NotSupported(self.id + ' fetchOrderBookWs() is not supported yet')
|
2485
|
+
|
2483
2486
|
def fetch_margin_mode(self, symbol: str, params={}):
|
2484
2487
|
if self.has['fetchMarginModes']:
|
2485
2488
|
marginModes = self.fetch_margin_modes([symbol], params)
|
ccxt/bigone.py
CHANGED
@@ -2018,7 +2018,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
2018
2018
|
}
|
2019
2019
|
return self.safe_string(statuses, status, 'failed')
|
2020
2020
|
|
2021
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2021
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2022
2022
|
"""
|
2023
2023
|
make a withdrawal
|
2024
2024
|
:see: https://open.big.one/docs/spot_withdrawal.html#create-withdrawal-of-user
|
ccxt/binance.py
CHANGED
@@ -416,6 +416,12 @@ class binance(Exchange, ImplicitAPI):
|
|
416
416
|
'eth-staking/wbeth/history/wrapHistory': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
|
417
417
|
'eth-staking/wbeth/history/unwrapHistory': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
|
418
418
|
'eth-staking/eth/history/wbethRewardsHistory': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
|
419
|
+
'sol-staking/sol/history/stakingHistory': 15,
|
420
|
+
'sol-staking/sol/history/redemptionHistory': 15,
|
421
|
+
'sol-staking/sol/history/bnsolRewardsHistory': 15,
|
422
|
+
'sol-staking/sol/history/rateHistory': 15,
|
423
|
+
'sol-staking/account': 15,
|
424
|
+
'sol-staking/sol/quota': 15,
|
419
425
|
# mining endpoints
|
420
426
|
'mining/pub/algoList': 0.1,
|
421
427
|
'mining/pub/coinList': 0.1,
|
@@ -627,6 +633,8 @@ class binance(Exchange, ImplicitAPI):
|
|
627
633
|
'eth-staking/eth/stake': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
|
628
634
|
'eth-staking/eth/redeem': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
|
629
635
|
'eth-staking/wbeth/wrap': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
|
636
|
+
'sol-staking/sol/stake': 15,
|
637
|
+
'sol-staking/sol/redeem': 15,
|
630
638
|
# mining endpoints
|
631
639
|
'mining/hash-transfer/config': 0.5, # Weight(IP): 5 => cost = 0.1 * 5 = 0.5
|
632
640
|
'mining/hash-transfer/config/cancel': 0.5, # Weight(IP): 5 => cost = 0.1 * 5 = 0.5
|
@@ -661,6 +669,7 @@ class binance(Exchange, ImplicitAPI):
|
|
661
669
|
'simple-earn/locked/redeem': 0.1,
|
662
670
|
'simple-earn/flexible/setAutoSubscribe': 15,
|
663
671
|
'simple-earn/locked/setAutoSubscribe': 15,
|
672
|
+
'simple-earn/locked/setRedeemOption': 5,
|
664
673
|
# convert
|
665
674
|
'dci/product/subscribe': 0.1,
|
666
675
|
'dci/product/auto_compound/edit': 0.1,
|
@@ -8480,7 +8489,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8480
8489
|
}
|
8481
8490
|
return result
|
8482
8491
|
|
8483
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
8492
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
8484
8493
|
"""
|
8485
8494
|
make a withdrawal
|
8486
8495
|
:see: https://developers.binance.com/docs/wallet/capital/withdraw
|
ccxt/bingx.py
CHANGED
@@ -4977,7 +4977,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
4977
4977
|
coins = self.safe_list(response, 'data')
|
4978
4978
|
return self.parse_deposit_withdraw_fees(coins, codes, 'coin')
|
4979
4979
|
|
4980
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
4980
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
4981
4981
|
"""
|
4982
4982
|
make a withdrawal
|
4983
4983
|
:see: https://bingx-api.github.io/docs/#/en-us/spot/wallet-api.html#Withdraw
|
ccxt/bitbank.py
CHANGED
@@ -814,7 +814,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
814
814
|
'tag': None,
|
815
815
|
}
|
816
816
|
|
817
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
817
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
818
818
|
"""
|
819
819
|
make a withdrawal
|
820
820
|
:see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#new-withdrawal-request
|
ccxt/bitbns.py
CHANGED
@@ -226,11 +226,11 @@ class bitbns(Exchange, ImplicitAPI):
|
|
226
226
|
quoteId = self.safe_string(market, 'quote')
|
227
227
|
base = self.safe_currency_code(baseId)
|
228
228
|
quote = self.safe_currency_code(quoteId)
|
229
|
-
marketPrecision = self.
|
230
|
-
marketLimits = self.
|
231
|
-
amountLimits = self.
|
232
|
-
priceLimits = self.
|
233
|
-
costLimits = self.
|
229
|
+
marketPrecision = self.safe_dict(market, 'precision', {})
|
230
|
+
marketLimits = self.safe_dict(market, 'limits', {})
|
231
|
+
amountLimits = self.safe_dict(marketLimits, 'amount', {})
|
232
|
+
priceLimits = self.safe_dict(marketLimits, 'price', {})
|
233
|
+
costLimits = self.safe_dict(marketLimits, 'cost', {})
|
234
234
|
usdt = (quoteId == 'USDT')
|
235
235
|
# INR markets don't need a _INR prefix
|
236
236
|
uppercaseId = (baseId + '_' + quoteId) if usdt else baseId
|
@@ -430,7 +430,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
430
430
|
'timestamp': timestamp,
|
431
431
|
'datetime': self.iso8601(timestamp),
|
432
432
|
}
|
433
|
-
data = self.
|
433
|
+
data = self.safe_dict(response, 'data', {})
|
434
434
|
keys = list(data.keys())
|
435
435
|
for i in range(0, len(keys)):
|
436
436
|
key = keys[i]
|
@@ -637,7 +637,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
637
637
|
raise ArgumentsRequired(self.id + ' cancelOrder() requires a symbol argument')
|
638
638
|
self.load_markets()
|
639
639
|
market = self.market(symbol)
|
640
|
-
isTrigger = self.
|
640
|
+
isTrigger = self.safe_bool_2(params, 'trigger', 'stop')
|
641
641
|
params = self.omit(params, ['trigger', 'stop'])
|
642
642
|
request: dict = {
|
643
643
|
'entry_id': id,
|
@@ -668,7 +668,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
668
668
|
'symbol': market['id'],
|
669
669
|
'entry_id': id,
|
670
670
|
}
|
671
|
-
trigger = self.
|
671
|
+
trigger = self.safe_bool_2(params, 'trigger', 'stop')
|
672
672
|
if trigger:
|
673
673
|
raise BadRequest(self.id + ' fetchOrder cannot fetch stop orders')
|
674
674
|
response = self.v1PostOrderStatusSymbol(self.extend(request, params))
|
@@ -697,7 +697,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
697
697
|
# "code":200
|
698
698
|
# }
|
699
699
|
#
|
700
|
-
data = self.
|
700
|
+
data = self.safe_list(response, 'data', [])
|
701
701
|
first = self.safe_dict(data, 0)
|
702
702
|
return self.parse_order(first, market)
|
703
703
|
|
@@ -717,7 +717,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
717
717
|
raise ArgumentsRequired(self.id + ' fetchOpenOrders() requires a symbol argument')
|
718
718
|
self.load_markets()
|
719
719
|
market = self.market(symbol)
|
720
|
-
isTrigger = self.
|
720
|
+
isTrigger = self.safe_bool_2(params, 'trigger', 'stop')
|
721
721
|
params = self.omit(params, ['trigger', 'stop'])
|
722
722
|
quoteSide = 'usdtListOpen' if (market['quoteId'] == 'USDT') else 'listOpen'
|
723
723
|
request: dict = {
|
@@ -1000,7 +1000,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
1000
1000
|
'6': 'ok', # Completed
|
1001
1001
|
},
|
1002
1002
|
}
|
1003
|
-
statuses = self.
|
1003
|
+
statuses = self.safe_dict(statusesByType, type, {})
|
1004
1004
|
return self.safe_string(statuses, status, status)
|
1005
1005
|
|
1006
1006
|
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
@@ -1090,7 +1090,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
1090
1090
|
# "error":null
|
1091
1091
|
# }
|
1092
1092
|
#
|
1093
|
-
data = self.
|
1093
|
+
data = self.safe_dict(response, 'data', {})
|
1094
1094
|
address = self.safe_string(data, 'token')
|
1095
1095
|
tag = self.safe_string(data, 'tag')
|
1096
1096
|
self.check_address(address)
|
ccxt/bitfinex.py
CHANGED
@@ -434,7 +434,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
434
434
|
# }
|
435
435
|
# }
|
436
436
|
#
|
437
|
-
fees = self.
|
437
|
+
fees = self.safe_dict(response, 'withdraw', {})
|
438
438
|
ids = list(fees.keys())
|
439
439
|
for i in range(0, len(ids)):
|
440
440
|
id = ids[i]
|
@@ -535,7 +535,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
535
535
|
# }
|
536
536
|
#
|
537
537
|
result: dict = {}
|
538
|
-
fiat = self.
|
538
|
+
fiat = self.safe_dict(self.options, 'fiat', {})
|
539
539
|
makerFee = self.safe_number(response, 'maker_fee')
|
540
540
|
takerFee = self.safe_number(response, 'taker_fee')
|
541
541
|
makerFee2Fiat = self.safe_number(response, 'maker_fee_2fiat')
|
@@ -624,7 +624,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
624
624
|
'settleId': None,
|
625
625
|
'type': type,
|
626
626
|
'spot': (type == 'spot'),
|
627
|
-
'margin': self.
|
627
|
+
'margin': self.safe_bool(market, 'margin'),
|
628
628
|
'swap': (type == 'swap'),
|
629
629
|
'future': False,
|
630
630
|
'option': False,
|
@@ -691,7 +691,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
691
691
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
692
692
|
"""
|
693
693
|
self.load_markets()
|
694
|
-
accountsByType = self.
|
694
|
+
accountsByType = self.safe_dict(self.options, 'accountsByType', {})
|
695
695
|
requestedType = self.safe_string(params, 'type', 'exchange')
|
696
696
|
accountType = self.safe_string(accountsByType, requestedType, requestedType)
|
697
697
|
if accountType is None:
|
@@ -749,7 +749,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
749
749
|
# transferring between derivatives wallet and regular wallet is not documented in their API
|
750
750
|
# however we support it in CCXT(from just looking at web inspector)
|
751
751
|
self.load_markets()
|
752
|
-
accountsByType = self.
|
752
|
+
accountsByType = self.safe_dict(self.options, 'accountsByType', {})
|
753
753
|
fromId = self.safe_string(accountsByType, fromAccount, fromAccount)
|
754
754
|
toId = self.safe_string(accountsByType, toAccount, toAccount)
|
755
755
|
currency = self.currency(code)
|
@@ -1190,8 +1190,8 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1190
1190
|
# }
|
1191
1191
|
#
|
1192
1192
|
side = self.safe_string(order, 'side')
|
1193
|
-
open = self.
|
1194
|
-
canceled = self.
|
1193
|
+
open = self.safe_bool(order, 'is_live')
|
1194
|
+
canceled = self.safe_bool(order, 'is_cancelled')
|
1195
1195
|
status = None
|
1196
1196
|
if open:
|
1197
1197
|
status = 'open'
|
@@ -1528,7 +1528,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1528
1528
|
}
|
1529
1529
|
return self.safe_string(statuses, status, status)
|
1530
1530
|
|
1531
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1531
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1532
1532
|
"""
|
1533
1533
|
make a withdrawal
|
1534
1534
|
:see: https://docs.bitfinex.com/v1/reference/rest-auth-withdrawal
|
@@ -1563,7 +1563,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1563
1563
|
# }
|
1564
1564
|
# ]
|
1565
1565
|
#
|
1566
|
-
response = self.
|
1566
|
+
response = self.safe_dict(responses, 0, {})
|
1567
1567
|
id = self.safe_integer(response, 'withdrawal_id')
|
1568
1568
|
message = self.safe_string(response, 'message')
|
1569
1569
|
errorMessage = self.find_broadly_matched_key(self.exceptions['broad'], message)
|
@@ -1646,7 +1646,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1646
1646
|
else:
|
1647
1647
|
# json response with error, i.e:
|
1648
1648
|
# [{"status":"error","message":"Momentary balance check. Please wait few seconds and try the transfer again."}]
|
1649
|
-
responseObject = self.
|
1649
|
+
responseObject = self.safe_dict(response, 0, {})
|
1650
1650
|
status = self.safe_string(responseObject, 'status', '')
|
1651
1651
|
if status == 'error':
|
1652
1652
|
throwError = True
|
ccxt/bitfinex2.py
CHANGED
@@ -2458,7 +2458,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2458
2458
|
#
|
2459
2459
|
return self.parse_transactions(response, currency, since, limit)
|
2460
2460
|
|
2461
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2461
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2462
2462
|
"""
|
2463
2463
|
make a withdrawal
|
2464
2464
|
:see: https://docs.bitfinex.com/reference/rest-auth-withdraw
|
ccxt/bitflyer.py
CHANGED
@@ -775,7 +775,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
775
775
|
# todo unify parsePosition/parsePositions
|
776
776
|
return response
|
777
777
|
|
778
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
778
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
779
779
|
"""
|
780
780
|
make a withdrawal
|
781
781
|
:see: https://lightning.bitflyer.com/docs?lang=en#withdrawing-funds
|
ccxt/bitget.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.bitget import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, BorrowInterest, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, FundingHistory, Int, IsolatedBorrowRate, LedgerEntry, Leverage, LeverageTier, Liquidation, LongShortRatio, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
10
|
+
from ccxt.base.types import Balances, BorrowInterest, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, FundingHistory, Int, IsolatedBorrowRate, LedgerEntry, Leverage, LeverageTier, Liquidation, LongShortRatio, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -105,7 +105,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
105
105
|
'fetchFundingIntervals': False,
|
106
106
|
'fetchFundingRate': True,
|
107
107
|
'fetchFundingRateHistory': True,
|
108
|
-
'fetchFundingRates':
|
108
|
+
'fetchFundingRates': True,
|
109
109
|
'fetchIndexOHLCV': True,
|
110
110
|
'fetchIsolatedBorrowRate': True,
|
111
111
|
'fetchIsolatedBorrowRates': False,
|
@@ -2142,7 +2142,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2142
2142
|
rawTransactions = self.safe_list(response, 'data', [])
|
2143
2143
|
return self.parse_transactions(rawTransactions, currency, since, limit)
|
2144
2144
|
|
2145
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2145
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2146
2146
|
"""
|
2147
2147
|
make a withdrawal
|
2148
2148
|
:see: https://www.bitget.com/api-doc/spot/account/Wallet-Withdrawal
|
@@ -6350,6 +6350,66 @@ class bitget(Exchange, ImplicitAPI):
|
|
6350
6350
|
data = self.safe_value(response, 'data', [])
|
6351
6351
|
return self.parse_funding_rate(data[0], market)
|
6352
6352
|
|
6353
|
+
def fetch_funding_rates(self, symbols: Strings = None, params={}) -> FundingRates:
|
6354
|
+
"""
|
6355
|
+
fetch the current funding rates for all markets
|
6356
|
+
:see: https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker
|
6357
|
+
:param str[] [symbols]: list of unified market symbols
|
6358
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
6359
|
+
:param str [params.subType]: *contract only* 'linear', 'inverse'
|
6360
|
+
:param str [params.productType]: *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
6361
|
+
:returns dict: a dictionary of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rates-structure>`, indexed by market symbols
|
6362
|
+
"""
|
6363
|
+
self.load_markets()
|
6364
|
+
market = None
|
6365
|
+
if symbols is not None:
|
6366
|
+
symbol = self.safe_value(symbols, 0)
|
6367
|
+
sandboxMode = self.safe_bool(self.options, 'sandboxMode', False)
|
6368
|
+
if sandboxMode:
|
6369
|
+
sandboxSymbol = self.convert_symbol_for_sandbox(symbol)
|
6370
|
+
market = self.market(sandboxSymbol)
|
6371
|
+
else:
|
6372
|
+
market = self.market(symbol)
|
6373
|
+
request: dict = {}
|
6374
|
+
productType = None
|
6375
|
+
productType, params = self.handle_product_type_and_params(market, params)
|
6376
|
+
request['productType'] = productType
|
6377
|
+
response = self.publicMixGetV2MixMarketTickers(self.extend(request, params))
|
6378
|
+
# {
|
6379
|
+
# "code": "00000",
|
6380
|
+
# "msg": "success",
|
6381
|
+
# "requestTime": 1700533773477,
|
6382
|
+
# "data": [
|
6383
|
+
# {
|
6384
|
+
# "symbol": "BTCUSD",
|
6385
|
+
# "lastPr": "29904.5",
|
6386
|
+
# "askPr": "29904.5",
|
6387
|
+
# "bidPr": "29903.5",
|
6388
|
+
# "bidSz": "0.5091",
|
6389
|
+
# "askSz": "2.2694",
|
6390
|
+
# "high24h": "0",
|
6391
|
+
# "low24h": "0",
|
6392
|
+
# "ts": "1695794271400",
|
6393
|
+
# "change24h": "0",
|
6394
|
+
# "baseVolume": "0",
|
6395
|
+
# "quoteVolume": "0",
|
6396
|
+
# "usdtVolume": "0",
|
6397
|
+
# "openUtc": "0",
|
6398
|
+
# "changeUtc24h": "0",
|
6399
|
+
# "indexPrice": "29132.353333",
|
6400
|
+
# "fundingRate": "-0.0007",
|
6401
|
+
# "holdingAmount": "125.6844",
|
6402
|
+
# "deliveryStartTime": null,
|
6403
|
+
# "deliveryTime": null,
|
6404
|
+
# "deliveryStatus": "delivery_normal",
|
6405
|
+
# "open24h": "0",
|
6406
|
+
# "markPrice": "12345"
|
6407
|
+
# },
|
6408
|
+
# ]
|
6409
|
+
# }
|
6410
|
+
data = self.safe_list(response, 'data', [])
|
6411
|
+
return self.parse_funding_rates(data, market)
|
6412
|
+
|
6353
6413
|
def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
|
6354
6414
|
#
|
6355
6415
|
# fetchFundingRate
|
@@ -6366,23 +6426,51 @@ class bitget(Exchange, ImplicitAPI):
|
|
6366
6426
|
# "nextFundingTime": "1727942400000",
|
6367
6427
|
# "ratePeriod": "8"
|
6368
6428
|
# }
|
6369
|
-
#
|
6429
|
+
# fetchFundingRates
|
6430
|
+
# {
|
6431
|
+
# "symbol": "BTCUSD",
|
6432
|
+
# "lastPr": "29904.5",
|
6433
|
+
# "askPr": "29904.5",
|
6434
|
+
# "bidPr": "29903.5",
|
6435
|
+
# "bidSz": "0.5091",
|
6436
|
+
# "askSz": "2.2694",
|
6437
|
+
# "high24h": "0",
|
6438
|
+
# "low24h": "0",
|
6439
|
+
# "ts": "1695794271400",
|
6440
|
+
# "change24h": "0",
|
6441
|
+
# "baseVolume": "0",
|
6442
|
+
# "quoteVolume": "0",
|
6443
|
+
# "usdtVolume": "0",
|
6444
|
+
# "openUtc": "0",
|
6445
|
+
# "changeUtc24h": "0",
|
6446
|
+
# "indexPrice": "29132.353333",
|
6447
|
+
# "fundingRate": "-0.0007",
|
6448
|
+
# "holdingAmount": "125.6844",
|
6449
|
+
# "deliveryStartTime": null,
|
6450
|
+
# "deliveryTime": null,
|
6451
|
+
# "deliveryStatus": "delivery_normal",
|
6452
|
+
# "open24h": "0",
|
6453
|
+
# "markPrice": "12345"
|
6454
|
+
# }
|
6370
6455
|
marketId = self.safe_string(contract, 'symbol')
|
6371
6456
|
symbol = self.safe_symbol(marketId, market, None, 'swap')
|
6372
6457
|
fundingTimestamp = self.safe_integer(contract, 'nextFundingTime')
|
6373
6458
|
interval = self.safe_string(contract, 'ratePeriod')
|
6459
|
+
timestamp = self.safe_integer(contract, 'ts')
|
6460
|
+
markPrice = self.safe_number(contract, 'markPrice')
|
6461
|
+
indexPrice = self.safe_number(contract, 'indexPrice')
|
6374
6462
|
intervalString = None
|
6375
6463
|
if interval is not None:
|
6376
6464
|
intervalString = interval + 'h'
|
6377
6465
|
return {
|
6378
6466
|
'info': contract,
|
6379
6467
|
'symbol': symbol,
|
6380
|
-
'markPrice':
|
6381
|
-
'indexPrice':
|
6468
|
+
'markPrice': markPrice,
|
6469
|
+
'indexPrice': indexPrice,
|
6382
6470
|
'interestRate': None,
|
6383
6471
|
'estimatedSettlePrice': None,
|
6384
|
-
'timestamp':
|
6385
|
-
'datetime':
|
6472
|
+
'timestamp': timestamp,
|
6473
|
+
'datetime': self.iso8601(timestamp),
|
6386
6474
|
'fundingRate': self.safe_number(contract, 'fundingRate'),
|
6387
6475
|
'fundingTimestamp': fundingTimestamp,
|
6388
6476
|
'fundingDatetime': self.iso8601(fundingTimestamp),
|
ccxt/bithumb.py
CHANGED
@@ -982,7 +982,7 @@ class bithumb(Exchange, ImplicitAPI):
|
|
982
982
|
}
|
983
983
|
return self.cancel_order(order['id'], order['symbol'], self.extend(request, params))
|
984
984
|
|
985
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
985
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
986
986
|
"""
|
987
987
|
make a withdrawal
|
988
988
|
:see: https://apidocs.bithumb.com/v1.2.0/reference/%EC%BD%94%EC%9D%B8-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0-%EA%B0%9C%EC%9D%B8
|