ccxt 4.4.98__py2.py3-none-any.whl → 4.4.100__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 +3 -1
- ccxt/abstract/bingx.py +1 -0
- ccxt/abstract/bitget.py +6 -0
- ccxt/abstract/hibachi.py +26 -0
- ccxt/alpaca.py +1 -1
- ccxt/apex.py +1 -1
- ccxt/ascendex.py +1 -1
- ccxt/async_support/__init__.py +3 -1
- ccxt/async_support/alpaca.py +1 -1
- ccxt/async_support/apex.py +1 -1
- ccxt/async_support/ascendex.py +1 -1
- ccxt/async_support/base/exchange.py +44 -9
- ccxt/async_support/base/ws/client.py +3 -1
- ccxt/async_support/bigone.py +1 -1
- ccxt/async_support/binance.py +10 -8
- ccxt/async_support/bingx.py +33 -4
- ccxt/async_support/bitbank.py +1 -1
- ccxt/async_support/bitfinex.py +4 -1
- ccxt/async_support/bitflyer.py +1 -1
- ccxt/async_support/bitget.py +2040 -561
- ccxt/async_support/bithumb.py +1 -1
- ccxt/async_support/bitmart.py +2 -2
- ccxt/async_support/bitmex.py +3 -2
- ccxt/async_support/bitopro.py +1 -1
- ccxt/async_support/bitrue.py +2 -2
- ccxt/async_support/bitso.py +1 -1
- ccxt/async_support/bitstamp.py +1 -1
- ccxt/async_support/bittrade.py +1 -1
- ccxt/async_support/bitvavo.py +1 -1
- ccxt/async_support/blockchaincom.py +1 -1
- ccxt/async_support/blofin.py +1 -1
- ccxt/async_support/btcmarkets.py +1 -1
- ccxt/async_support/bybit.py +7 -3
- 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 +2 -2
- ccxt/async_support/coinex.py +67 -6
- ccxt/async_support/coinmate.py +1 -1
- ccxt/async_support/coinsph.py +1 -1
- ccxt/async_support/cryptocom.py +2 -2
- ccxt/async_support/defx.py +2 -2
- ccxt/async_support/delta.py +1 -1
- ccxt/async_support/deribit.py +1 -1
- ccxt/async_support/digifinex.py +2 -2
- ccxt/async_support/ellipx.py +1 -1
- ccxt/async_support/exmo.py +1 -1
- ccxt/async_support/foxbit.py +3 -3
- ccxt/async_support/gate.py +18 -4
- ccxt/async_support/gemini.py +1 -1
- ccxt/async_support/hashkey.py +2 -2
- ccxt/async_support/hibachi.py +2080 -0
- ccxt/async_support/hitbtc.py +2 -2
- ccxt/async_support/hollaex.py +1 -1
- ccxt/async_support/htx.py +4 -3
- ccxt/async_support/hyperliquid.py +71 -29
- ccxt/async_support/independentreserve.py +1 -1
- ccxt/async_support/indodax.py +1 -1
- ccxt/async_support/kraken.py +1 -1
- ccxt/async_support/krakenfutures.py +2 -1
- ccxt/async_support/kucoin.py +2 -2
- ccxt/async_support/kucoinfutures.py +2 -1
- ccxt/async_support/lbank.py +2 -2
- ccxt/async_support/mercado.py +1 -1
- ccxt/async_support/mexc.py +9 -2
- ccxt/async_support/modetrade.py +93 -2
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/novadax.py +35 -1
- ccxt/async_support/okcoin.py +1 -1
- ccxt/async_support/okx.py +2 -2
- ccxt/async_support/onetrading.py +33 -0
- ccxt/async_support/oxfun.py +1 -1
- ccxt/async_support/p2b.py +32 -0
- ccxt/async_support/paradex.py +2 -1
- ccxt/async_support/phemex.py +2 -2
- ccxt/async_support/poloniex.py +2 -2
- ccxt/async_support/probit.py +36 -1
- ccxt/async_support/tokocrypto.py +1 -1
- ccxt/async_support/upbit.py +1 -1
- ccxt/async_support/vertex.py +1 -1
- ccxt/async_support/wavesexchange.py +1 -1
- ccxt/async_support/whitebit.py +2 -2
- ccxt/async_support/woo.py +4 -4
- ccxt/async_support/woofipro.py +93 -2
- ccxt/async_support/xt.py +2 -2
- ccxt/async_support/yobit.py +1 -1
- ccxt/async_support/zaif.py +1 -1
- ccxt/async_support/zonda.py +1 -1
- ccxt/base/errors.py +0 -6
- ccxt/base/exchange.py +11 -9
- ccxt/base/types.py +1 -0
- ccxt/bigone.py +1 -1
- ccxt/binance.py +10 -8
- ccxt/bingx.py +33 -4
- ccxt/bitbank.py +1 -1
- ccxt/bitfinex.py +4 -1
- ccxt/bitflyer.py +1 -1
- ccxt/bitget.py +2040 -561
- ccxt/bithumb.py +1 -1
- ccxt/bitmart.py +2 -2
- ccxt/bitmex.py +3 -2
- ccxt/bitopro.py +1 -1
- ccxt/bitrue.py +2 -2
- ccxt/bitso.py +1 -1
- ccxt/bitstamp.py +1 -1
- ccxt/bittrade.py +1 -1
- ccxt/bitvavo.py +1 -1
- ccxt/blockchaincom.py +1 -1
- ccxt/blofin.py +1 -1
- ccxt/btcmarkets.py +1 -1
- ccxt/bybit.py +7 -3
- ccxt/coinbase.py +1 -1
- ccxt/coinbaseexchange.py +1 -1
- ccxt/coinbaseinternational.py +1 -1
- ccxt/coincatch.py +2 -2
- ccxt/coinex.py +67 -6
- ccxt/coinmate.py +1 -1
- ccxt/coinsph.py +1 -1
- ccxt/cryptocom.py +2 -2
- ccxt/defx.py +2 -2
- ccxt/delta.py +1 -1
- ccxt/deribit.py +1 -1
- ccxt/digifinex.py +2 -2
- ccxt/ellipx.py +1 -1
- ccxt/exmo.py +1 -1
- ccxt/foxbit.py +3 -3
- ccxt/gate.py +18 -4
- ccxt/gemini.py +1 -1
- ccxt/hashkey.py +2 -2
- ccxt/hibachi.py +2079 -0
- ccxt/hitbtc.py +2 -2
- ccxt/hollaex.py +1 -1
- ccxt/htx.py +4 -3
- ccxt/hyperliquid.py +71 -29
- ccxt/independentreserve.py +1 -1
- ccxt/indodax.py +1 -1
- ccxt/kraken.py +1 -1
- ccxt/krakenfutures.py +2 -1
- ccxt/kucoin.py +2 -2
- ccxt/kucoinfutures.py +2 -1
- ccxt/lbank.py +2 -2
- ccxt/mercado.py +1 -1
- ccxt/mexc.py +9 -2
- ccxt/modetrade.py +93 -2
- ccxt/ndax.py +1 -1
- ccxt/novadax.py +35 -1
- ccxt/okcoin.py +1 -1
- ccxt/okx.py +2 -2
- ccxt/onetrading.py +33 -0
- ccxt/oxfun.py +1 -1
- ccxt/p2b.py +32 -0
- ccxt/paradex.py +2 -1
- ccxt/phemex.py +2 -2
- ccxt/poloniex.py +2 -2
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +2 -2
- ccxt/pro/apex.py +2 -2
- ccxt/pro/ascendex.py +2 -2
- ccxt/pro/binance.py +4 -5
- ccxt/pro/bitget.py +3 -3
- ccxt/pro/bithumb.py +2 -2
- ccxt/pro/bitmart.py +2 -2
- ccxt/pro/bitmex.py +3 -3
- ccxt/pro/bitstamp.py +3 -3
- ccxt/pro/bittrade.py +2 -2
- ccxt/pro/bitvavo.py +5 -3
- ccxt/pro/bybit.py +5 -4
- ccxt/pro/cex.py +3 -2
- ccxt/pro/coinbaseexchange.py +4 -4
- ccxt/pro/coinbaseinternational.py +2 -2
- ccxt/pro/coincatch.py +1 -1
- ccxt/pro/coinex.py +1 -1
- ccxt/pro/coinone.py +2 -2
- ccxt/pro/cryptocom.py +2 -2
- ccxt/pro/derive.py +2 -2
- ccxt/pro/gate.py +3 -3
- ccxt/pro/hollaex.py +2 -2
- ccxt/pro/htx.py +3 -3
- ccxt/pro/hyperliquid.py +101 -14
- ccxt/pro/kraken.py +2 -2
- ccxt/pro/krakenfutures.py +4 -3
- ccxt/pro/kucoin.py +4 -3
- ccxt/pro/kucoinfutures.py +4 -3
- ccxt/pro/mexc.py +328 -139
- ccxt/pro/modetrade.py +2 -2
- ccxt/pro/okcoin.py +2 -2
- ccxt/pro/okx.py +7 -6
- ccxt/pro/onetrading.py +2 -2
- ccxt/pro/oxfun.py +1 -1
- ccxt/pro/p2b.py +2 -2
- ccxt/pro/paradex.py +2 -2
- ccxt/pro/poloniex.py +2 -2
- ccxt/pro/probit.py +2 -2
- ccxt/pro/vertex.py +2 -2
- ccxt/pro/whitebit.py +2 -2
- ccxt/pro/woo.py +2 -2
- ccxt/pro/woofipro.py +2 -2
- ccxt/probit.py +36 -1
- ccxt/protobuf/__init__.py +0 -0
- ccxt/protobuf/mexc/PrivateAccountV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PrivateDealsV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PrivateOrdersV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PublicAggreBookTickerV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PublicAggreDealsV3Api_pb2.py +39 -0
- ccxt/protobuf/mexc/PublicAggreDepthsV3Api_pb2.py +39 -0
- ccxt/protobuf/mexc/PublicBookTickerBatchV3Api_pb2.py +38 -0
- ccxt/protobuf/mexc/PublicBookTickerV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PublicDealsV3Api_pb2.py +39 -0
- ccxt/protobuf/mexc/PublicIncreaseDepthsBatchV3Api_pb2.py +38 -0
- ccxt/protobuf/mexc/PublicIncreaseDepthsV3Api_pb2.py +39 -0
- ccxt/protobuf/mexc/PublicLimitDepthsV3Api_pb2.py +39 -0
- ccxt/protobuf/mexc/PublicMiniTickerV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PublicMiniTickersV3Api_pb2.py +38 -0
- ccxt/protobuf/mexc/PublicSpotKlineV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PushDataV3ApiWrapper_pb2.py +52 -0
- ccxt/protobuf/mexc/__init__.py +0 -0
- ccxt/test/tests_async.py +1 -1
- ccxt/test/tests_sync.py +1 -1
- ccxt/tokocrypto.py +1 -1
- ccxt/upbit.py +1 -1
- ccxt/vertex.py +1 -1
- ccxt/wavesexchange.py +1 -1
- ccxt/whitebit.py +2 -2
- ccxt/woo.py +4 -4
- ccxt/woofipro.py +93 -2
- ccxt/xt.py +2 -2
- ccxt/yobit.py +1 -1
- ccxt/zaif.py +1 -1
- ccxt/zonda.py +1 -1
- {ccxt-4.4.98.dist-info → ccxt-4.4.100.dist-info}/METADATA +8 -7
- {ccxt-4.4.98.dist-info → ccxt-4.4.100.dist-info}/RECORD +234 -213
- {ccxt-4.4.98.dist-info → ccxt-4.4.100.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.98.dist-info → ccxt-4.4.100.dist-info}/WHEEL +0 -0
- {ccxt-4.4.98.dist-info → ccxt-4.4.100.dist-info}/top_level.txt +0 -0
ccxt/base/exchange.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.100'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -1862,6 +1862,8 @@ class Exchange(object):
|
|
1862
1862
|
signature = auth_data.signature
|
1863
1863
|
return signature
|
1864
1864
|
|
1865
|
+
def is_binary_message(self, message):
|
1866
|
+
return isinstance(message, bytes) or isinstance(message, bytearray)
|
1865
1867
|
|
1866
1868
|
# ########################################################################
|
1867
1869
|
# ########################################################################
|
@@ -2774,13 +2776,13 @@ class Exchange(object):
|
|
2774
2776
|
def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}):
|
2775
2777
|
raise NotSupported(self.id + ' transfer() is not supported yet')
|
2776
2778
|
|
2777
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2779
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}):
|
2778
2780
|
raise NotSupported(self.id + ' withdraw() is not supported yet')
|
2779
2781
|
|
2780
2782
|
def create_deposit_address(self, code: str, params={}):
|
2781
2783
|
raise NotSupported(self.id + ' createDepositAddress() is not supported yet')
|
2782
2784
|
|
2783
|
-
def set_leverage(self, leverage:
|
2785
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
2784
2786
|
raise NotSupported(self.id + ' setLeverage() is not supported yet')
|
2785
2787
|
|
2786
2788
|
def fetch_leverage(self, symbol: str, params={}):
|
@@ -2829,7 +2831,7 @@ class Exchange(object):
|
|
2829
2831
|
def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
2830
2832
|
raise NotSupported(self.id + ' fetchDepositAddressesByNetwork() is not supported yet')
|
2831
2833
|
|
2832
|
-
def fetch_open_interest_history(self, symbol: str, timeframe='1h', since: Int = None, limit: Int = None, params={}):
|
2834
|
+
def fetch_open_interest_history(self, symbol: str, timeframe: str = '1h', since: Int = None, limit: Int = None, params={}):
|
2833
2835
|
raise NotSupported(self.id + ' fetchOpenInterestHistory() is not supported yet')
|
2834
2836
|
|
2835
2837
|
def fetch_open_interest(self, symbol: str, params={}):
|
@@ -5073,7 +5075,7 @@ class Exchange(object):
|
|
5073
5075
|
def fetch_position_mode(self, symbol: Str = None, params={}):
|
5074
5076
|
raise NotSupported(self.id + ' fetchPositionMode() is not supported yet')
|
5075
5077
|
|
5076
|
-
def create_trailing_amount_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingAmount=None, trailingTriggerPrice=None, params={}):
|
5078
|
+
def create_trailing_amount_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingAmount: Num = None, trailingTriggerPrice: Num = None, params={}):
|
5077
5079
|
"""
|
5078
5080
|
create a trailing order by providing the symbol, type, side, amount, price and trailingAmount
|
5079
5081
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -5095,7 +5097,7 @@ class Exchange(object):
|
|
5095
5097
|
return self.create_order(symbol, type, side, amount, price, params)
|
5096
5098
|
raise NotSupported(self.id + ' createTrailingAmountOrder() is not supported yet')
|
5097
5099
|
|
5098
|
-
def create_trailing_amount_order_ws(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingAmount=None, trailingTriggerPrice=None, params={}):
|
5100
|
+
def create_trailing_amount_order_ws(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingAmount: Num = None, trailingTriggerPrice: Num = None, params={}):
|
5099
5101
|
"""
|
5100
5102
|
create a trailing order by providing the symbol, type, side, amount, price and trailingAmount
|
5101
5103
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -5117,7 +5119,7 @@ class Exchange(object):
|
|
5117
5119
|
return self.create_order_ws(symbol, type, side, amount, price, params)
|
5118
5120
|
raise NotSupported(self.id + ' createTrailingAmountOrderWs() is not supported yet')
|
5119
5121
|
|
5120
|
-
def create_trailing_percent_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingPercent=None, trailingTriggerPrice=None, params={}):
|
5122
|
+
def create_trailing_percent_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingPercent: Num = None, trailingTriggerPrice: Num = None, params={}):
|
5121
5123
|
"""
|
5122
5124
|
create a trailing order by providing the symbol, type, side, amount, price and trailingPercent
|
5123
5125
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -5139,7 +5141,7 @@ class Exchange(object):
|
|
5139
5141
|
return self.create_order(symbol, type, side, amount, price, params)
|
5140
5142
|
raise NotSupported(self.id + ' createTrailingPercentOrder() is not supported yet')
|
5141
5143
|
|
5142
|
-
def create_trailing_percent_order_ws(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingPercent=None, trailingTriggerPrice=None, params={}):
|
5144
|
+
def create_trailing_percent_order_ws(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingPercent: Num = None, trailingTriggerPrice: Num = None, params={}):
|
5143
5145
|
"""
|
5144
5146
|
create a trailing order by providing the symbol, type, side, amount, price and trailingPercent
|
5145
5147
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -6193,7 +6195,7 @@ class Exchange(object):
|
|
6193
6195
|
else:
|
6194
6196
|
raise NotSupported(self.id + ' fetchFundingInterval() is not supported yet')
|
6195
6197
|
|
6196
|
-
def fetch_mark_ohlcv(self, symbol, timeframe='1m', since: Int = None, limit: Int = None, params={}):
|
6198
|
+
def fetch_mark_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
|
6197
6199
|
"""
|
6198
6200
|
fetches historical mark price candlestick data containing the open, high, low, and close price of a market
|
6199
6201
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
ccxt/base/types.py
CHANGED
ccxt/bigone.py
CHANGED
@@ -2176,7 +2176,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
2176
2176
|
}
|
2177
2177
|
return self.safe_string(statuses, status, 'failed')
|
2178
2178
|
|
2179
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2179
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
2180
2180
|
"""
|
2181
2181
|
make a withdrawal
|
2182
2182
|
|
ccxt/binance.py
CHANGED
@@ -2731,12 +2731,13 @@ class binance(Exchange, ImplicitAPI):
|
|
2731
2731
|
return market
|
2732
2732
|
return markets[0]
|
2733
2733
|
elif (symbol.find('/') > -1) and (symbol.find(':') < 0):
|
2734
|
-
|
2735
|
-
|
2736
|
-
|
2737
|
-
|
2738
|
-
|
2739
|
-
|
2734
|
+
if (defaultType is not None) and (defaultType != 'spot'):
|
2735
|
+
# support legacy symbols
|
2736
|
+
base, quote = symbol.split('/')
|
2737
|
+
settle = base if (quote == 'USD') else quote
|
2738
|
+
futuresSymbol = symbol + ':' + settle
|
2739
|
+
if futuresSymbol in self.markets:
|
2740
|
+
return self.markets[futuresSymbol]
|
2740
2741
|
elif (symbol.find('-C') > -1) or (symbol.find('-P') > -1): # both exchange-id and unified symbols are supported self way regardless of the defaultType
|
2741
2742
|
return self.create_expired_option_market(symbol)
|
2742
2743
|
raise BadSymbol(self.id + ' does not have market symbol ' + symbol)
|
@@ -8842,7 +8843,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8842
8843
|
}
|
8843
8844
|
return result
|
8844
8845
|
|
8845
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
8846
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
8846
8847
|
"""
|
8847
8848
|
make a withdrawal
|
8848
8849
|
|
@@ -10550,7 +10551,7 @@ class binance(Exchange, ImplicitAPI):
|
|
10550
10551
|
raise NotSupported(self.id + ' fetchFundingHistory() supports linear and inverse contracts only')
|
10551
10552
|
return self.parse_incomes(response, market, since, limit)
|
10552
10553
|
|
10553
|
-
def set_leverage(self, leverage:
|
10554
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
10554
10555
|
"""
|
10555
10556
|
set the level of leverage for a market
|
10556
10557
|
|
@@ -12439,6 +12440,7 @@ class binance(Exchange, ImplicitAPI):
|
|
12439
12440
|
'contracts': self.safe_number(liquidation, 'executedQty'),
|
12440
12441
|
'contractSize': self.safe_number(market, 'contractSize'),
|
12441
12442
|
'price': self.safe_number(liquidation, 'avgPrice'),
|
12443
|
+
'side': self.safe_string_lower(liquidation, 'side'),
|
12442
12444
|
'baseValue': self.safe_number(liquidation, 'cumBase'),
|
12443
12445
|
'quoteValue': self.safe_number(liquidation, 'cumQuote'),
|
12444
12446
|
'timestamp': timestamp,
|
ccxt/bingx.py
CHANGED
@@ -118,6 +118,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
118
118
|
'urls': {
|
119
119
|
'logo': 'https://github-production-user-asset-6210df.s3.amazonaws.com/1294454/253675376-6983b72e-4999-4549-b177-33b374c195e3.jpg',
|
120
120
|
'api': {
|
121
|
+
'fund': 'https://open-api.{hostname}/openApi',
|
121
122
|
'spot': 'https://open-api.{hostname}/openApi',
|
122
123
|
'swap': 'https://open-api.{hostname}/openApi',
|
123
124
|
'contract': 'https://open-api.{hostname}/openApi',
|
@@ -154,6 +155,15 @@ class bingx(Exchange, ImplicitAPI):
|
|
154
155
|
'secret': True,
|
155
156
|
},
|
156
157
|
'api': {
|
158
|
+
'fund': {
|
159
|
+
'v1': {
|
160
|
+
'private': {
|
161
|
+
'get': {
|
162
|
+
'account/balance': 1,
|
163
|
+
},
|
164
|
+
},
|
165
|
+
},
|
166
|
+
},
|
157
167
|
'spot': {
|
158
168
|
'v1': {
|
159
169
|
'public': {
|
@@ -568,8 +578,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
568
578
|
'LTC': 'LTC',
|
569
579
|
},
|
570
580
|
'networks': {
|
571
|
-
'
|
581
|
+
'ARBITRUM': 'ARB',
|
572
582
|
'MATIC': 'POLYGON',
|
583
|
+
'ZKSYNC': 'ZKSYNCERA',
|
584
|
+
'AVAXC': 'AVAX-C',
|
585
|
+
'HBAR': 'HEDERA',
|
573
586
|
},
|
574
587
|
},
|
575
588
|
'features': {
|
@@ -2126,6 +2139,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2126
2139
|
|
2127
2140
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2128
2141
|
:param boolean [params.standard]: whether to fetch standard contract balances
|
2142
|
+
:param str [params.type]: the type of balance to fetch(spot, swap, funding) default is `spot`
|
2129
2143
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
2130
2144
|
"""
|
2131
2145
|
self.load_markets()
|
@@ -2155,6 +2169,21 @@ class bingx(Exchange, ImplicitAPI):
|
|
2155
2169
|
# ]
|
2156
2170
|
# }
|
2157
2171
|
#
|
2172
|
+
elif (marketType == 'funding') or (marketType == 'fund'):
|
2173
|
+
response = self.fundV1PrivateGetAccountBalance(marketTypeQuery)
|
2174
|
+
# {
|
2175
|
+
# code: '0',
|
2176
|
+
# timestamp: '1754906016631',
|
2177
|
+
# data: {
|
2178
|
+
# assets: [
|
2179
|
+
# {
|
2180
|
+
# asset: 'USDT',
|
2181
|
+
# free: '44.37692200000000237300',
|
2182
|
+
# locked: '0.00000000000000000000'
|
2183
|
+
# }
|
2184
|
+
# ]
|
2185
|
+
# }
|
2186
|
+
# }
|
2158
2187
|
elif marketType == 'spot':
|
2159
2188
|
response = self.spotV1PrivateGetAccountBalance(marketTypeQuery)
|
2160
2189
|
#
|
@@ -2303,7 +2332,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2303
2332
|
firstStandardOrInverse = self.safe_dict(standardAndInverseBalances, 0)
|
2304
2333
|
isStandardOrInverse = firstStandardOrInverse is not None
|
2305
2334
|
spotData = self.safe_dict(response, 'data', {})
|
2306
|
-
spotBalances = self.
|
2335
|
+
spotBalances = self.safe_list_2(spotData, 'balances', 'assets', [])
|
2307
2336
|
firstSpot = self.safe_dict(spotBalances, 0)
|
2308
2337
|
isSpot = firstSpot is not None
|
2309
2338
|
if isStandardOrInverse:
|
@@ -5315,7 +5344,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
5315
5344
|
'shortLeverage': self.safe_integer(leverage, 'shortLeverage'),
|
5316
5345
|
}
|
5317
5346
|
|
5318
|
-
def set_leverage(self, leverage:
|
5347
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
5319
5348
|
"""
|
5320
5349
|
set the level of leverage for a market
|
5321
5350
|
|
@@ -5562,7 +5591,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
5562
5591
|
depositWithdrawFees[code] = self.parse_deposit_withdraw_fee(entry)
|
5563
5592
|
return depositWithdrawFees
|
5564
5593
|
|
5565
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
5594
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
5566
5595
|
"""
|
5567
5596
|
make a withdrawal
|
5568
5597
|
|
ccxt/bitbank.py
CHANGED
@@ -937,7 +937,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
937
937
|
'tag': None,
|
938
938
|
}
|
939
939
|
|
940
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
940
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
941
941
|
"""
|
942
942
|
make a withdrawal
|
943
943
|
|
ccxt/bitfinex.py
CHANGED
@@ -2631,7 +2631,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
2631
2631
|
#
|
2632
2632
|
return self.parse_transactions(response, currency, since, limit)
|
2633
2633
|
|
2634
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2634
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
2635
2635
|
"""
|
2636
2636
|
make a withdrawal
|
2637
2637
|
|
@@ -3541,12 +3541,15 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
3541
3541
|
contractSize = self.safe_string(market, 'contractSize')
|
3542
3542
|
baseValue = Precise.string_mul(contracts, contractSize)
|
3543
3543
|
price = self.safe_string(entry, 11)
|
3544
|
+
sideFlag = self.safe_integer(entry, 8)
|
3545
|
+
side = 'buy' if (sideFlag == 1) else 'sell'
|
3544
3546
|
return self.safe_liquidation({
|
3545
3547
|
'info': entry,
|
3546
3548
|
'symbol': self.safe_symbol(marketId, market, None, 'contract'),
|
3547
3549
|
'contracts': self.parse_number(contracts),
|
3548
3550
|
'contractSize': self.parse_number(contractSize),
|
3549
3551
|
'price': self.parse_number(price),
|
3552
|
+
'side': side,
|
3550
3553
|
'baseValue': self.parse_number(baseValue),
|
3551
3554
|
'quoteValue': self.parse_number(Precise.string_mul(baseValue, price)),
|
3552
3555
|
'timestamp': timestamp,
|
ccxt/bitflyer.py
CHANGED
@@ -879,7 +879,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
879
879
|
# todo unify parsePosition/parsePositions
|
880
880
|
return response
|
881
881
|
|
882
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
882
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
883
883
|
"""
|
884
884
|
make a withdrawal
|
885
885
|
|