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/__init__.py
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
# ----------------------------------------------------------------------------
|
24
24
|
|
25
|
-
__version__ = '4.4.
|
25
|
+
__version__ = '4.4.100'
|
26
26
|
|
27
27
|
# ----------------------------------------------------------------------------
|
28
28
|
|
@@ -145,6 +145,7 @@ from ccxt.gate import gate # noqa: F4
|
|
145
145
|
from ccxt.gateio import gateio # noqa: F401
|
146
146
|
from ccxt.gemini import gemini # noqa: F401
|
147
147
|
from ccxt.hashkey import hashkey # noqa: F401
|
148
|
+
from ccxt.hibachi import hibachi # noqa: F401
|
148
149
|
from ccxt.hitbtc import hitbtc # noqa: F401
|
149
150
|
from ccxt.hollaex import hollaex # noqa: F401
|
150
151
|
from ccxt.htx import htx # noqa: F401
|
@@ -253,6 +254,7 @@ exchanges = [
|
|
253
254
|
'gateio',
|
254
255
|
'gemini',
|
255
256
|
'hashkey',
|
257
|
+
'hibachi',
|
256
258
|
'hitbtc',
|
257
259
|
'hollaex',
|
258
260
|
'htx',
|
ccxt/abstract/bingx.py
CHANGED
@@ -2,6 +2,7 @@ from ccxt.base.types import Entry
|
|
2
2
|
|
3
3
|
|
4
4
|
class ImplicitAPI:
|
5
|
+
fund_v1_private_get_account_balance = fundV1PrivateGetAccountBalance = Entry('account/balance', ['fund', 'v1', 'private'], 'GET', {'cost': 1})
|
5
6
|
spot_v1_public_get_server_time = spotV1PublicGetServerTime = Entry('server/time', ['spot', 'v1', 'public'], 'GET', {'cost': 1})
|
6
7
|
spot_v1_public_get_common_symbols = spotV1PublicGetCommonSymbols = Entry('common/symbols', ['spot', 'v1', 'public'], 'GET', {'cost': 1})
|
7
8
|
spot_v1_public_get_market_trades = spotV1PublicGetMarketTrades = Entry('market/trades', ['spot', 'v1', 'public'], 'GET', {'cost': 1})
|
ccxt/abstract/bitget.py
CHANGED
@@ -525,6 +525,7 @@ class ImplicitAPI:
|
|
525
525
|
private_common_get_v2_common_trade_rate = privateCommonGetV2CommonTradeRate = Entry('v2/common/trade-rate', ['private', 'common'], 'GET', {'cost': 2})
|
526
526
|
private_uta_get_v3_account_assets = privateUtaGetV3AccountAssets = Entry('v3/account/assets', ['private', 'uta'], 'GET', {'cost': 1})
|
527
527
|
private_uta_get_v3_account_settings = privateUtaGetV3AccountSettings = Entry('v3/account/settings', ['private', 'uta'], 'GET', {'cost': 1})
|
528
|
+
private_uta_get_v3_account_deposit_records = privateUtaGetV3AccountDepositRecords = Entry('v3/account/deposit-records', ['private', 'uta'], 'GET', {'cost': 2})
|
528
529
|
private_uta_get_v3_account_financial_records = privateUtaGetV3AccountFinancialRecords = Entry('v3/account/financial-records', ['private', 'uta'], 'GET', {'cost': 1})
|
529
530
|
private_uta_get_v3_account_repayable_coins = privateUtaGetV3AccountRepayableCoins = Entry('v3/account/repayable-coins', ['private', 'uta'], 'GET', {'cost': 2})
|
530
531
|
private_uta_get_v3_account_payment_coins = privateUtaGetV3AccountPaymentCoins = Entry('v3/account/payment-coins', ['private', 'uta'], 'GET', {'cost': 2})
|
@@ -543,7 +544,9 @@ class ImplicitAPI:
|
|
543
544
|
private_uta_get_v3_position_history_position = privateUtaGetV3PositionHistoryPosition = Entry('v3/position/history-position', ['private', 'uta'], 'GET', {'cost': 1})
|
544
545
|
private_uta_get_v3_trade_order_info = privateUtaGetV3TradeOrderInfo = Entry('v3/trade/order-info', ['private', 'uta'], 'GET', {'cost': 1})
|
545
546
|
private_uta_get_v3_trade_unfilled_orders = privateUtaGetV3TradeUnfilledOrders = Entry('v3/trade/unfilled-orders', ['private', 'uta'], 'GET', {'cost': 1})
|
547
|
+
private_uta_get_v3_trade_unfilled_strategy_orders = privateUtaGetV3TradeUnfilledStrategyOrders = Entry('v3/trade/unfilled-strategy-orders', ['private', 'uta'], 'GET', {'cost': 1})
|
546
548
|
private_uta_get_v3_trade_history_orders = privateUtaGetV3TradeHistoryOrders = Entry('v3/trade/history-orders', ['private', 'uta'], 'GET', {'cost': 1})
|
549
|
+
private_uta_get_v3_trade_history_strategy_orders = privateUtaGetV3TradeHistoryStrategyOrders = Entry('v3/trade/history-strategy-orders', ['private', 'uta'], 'GET', {'cost': 1})
|
547
550
|
private_uta_get_v3_trade_fills = privateUtaGetV3TradeFills = Entry('v3/trade/fills', ['private', 'uta'], 'GET', {'cost': 1})
|
548
551
|
private_uta_get_v3_user_sub_list = privateUtaGetV3UserSubList = Entry('v3/user/sub-list', ['private', 'uta'], 'GET', {'cost': 2})
|
549
552
|
private_uta_get_v3_user_sub_api_list = privateUtaGetV3UserSubApiList = Entry('v3/user/sub-api-list', ['private', 'uta'], 'GET', {'cost': 2})
|
@@ -555,8 +558,11 @@ class ImplicitAPI:
|
|
555
558
|
private_uta_post_v3_account_max_open_available = privateUtaPostV3AccountMaxOpenAvailable = Entry('v3/account/max-open-available', ['private', 'uta'], 'POST', {'cost': 4})
|
556
559
|
private_uta_post_v3_ins_loan_bind_uid = privateUtaPostV3InsLoanBindUid = Entry('v3/ins-loan/bind-uid', ['private', 'uta'], 'POST', {'cost': 6.6667})
|
557
560
|
private_uta_post_v3_trade_place_order = privateUtaPostV3TradePlaceOrder = Entry('v3/trade/place-order', ['private', 'uta'], 'POST', {'cost': 2})
|
561
|
+
private_uta_post_v3_trade_place_strategy_order = privateUtaPostV3TradePlaceStrategyOrder = Entry('v3/trade/place-strategy-order', ['private', 'uta'], 'POST', {'cost': 2})
|
558
562
|
private_uta_post_v3_trade_modify_order = privateUtaPostV3TradeModifyOrder = Entry('v3/trade/modify-order', ['private', 'uta'], 'POST', {'cost': 2})
|
563
|
+
private_uta_post_v3_trade_modify_strategy_order = privateUtaPostV3TradeModifyStrategyOrder = Entry('v3/trade/modify-strategy-order', ['private', 'uta'], 'POST', {'cost': 2})
|
559
564
|
private_uta_post_v3_trade_cancel_order = privateUtaPostV3TradeCancelOrder = Entry('v3/trade/cancel-order', ['private', 'uta'], 'POST', {'cost': 2})
|
565
|
+
private_uta_post_v3_trade_cancel_strategy_order = privateUtaPostV3TradeCancelStrategyOrder = Entry('v3/trade/cancel-strategy-order', ['private', 'uta'], 'POST', {'cost': 2})
|
560
566
|
private_uta_post_v3_trade_place_batch = privateUtaPostV3TradePlaceBatch = Entry('v3/trade/place-batch', ['private', 'uta'], 'POST', {'cost': 4})
|
561
567
|
private_uta_post_v3_trade_batch_modify_order = privateUtaPostV3TradeBatchModifyOrder = Entry('v3/trade/batch-modify-order', ['private', 'uta'], 'POST', {'cost': 2})
|
562
568
|
private_uta_post_v3_trade_cancel_batch = privateUtaPostV3TradeCancelBatch = Entry('v3/trade/cancel-batch', ['private', 'uta'], 'POST', {'cost': 4})
|
ccxt/abstract/hibachi.py
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
from ccxt.base.types import Entry
|
2
|
+
|
3
|
+
|
4
|
+
class ImplicitAPI:
|
5
|
+
public_get_market_exchange_info = publicGetMarketExchangeInfo = Entry('market/exchange-info', 'public', 'GET', {'cost': 1})
|
6
|
+
public_get_market_data_trades = publicGetMarketDataTrades = Entry('market/data/trades', 'public', 'GET', {'cost': 1})
|
7
|
+
public_get_market_data_prices = publicGetMarketDataPrices = Entry('market/data/prices', 'public', 'GET', {'cost': 1})
|
8
|
+
public_get_market_data_stats = publicGetMarketDataStats = Entry('market/data/stats', 'public', 'GET', {'cost': 1})
|
9
|
+
public_get_market_data_klines = publicGetMarketDataKlines = Entry('market/data/klines', 'public', 'GET', {'cost': 1})
|
10
|
+
public_get_market_data_orderbook = publicGetMarketDataOrderbook = Entry('market/data/orderbook', 'public', 'GET', {'cost': 1})
|
11
|
+
public_get_market_data_open_interest = publicGetMarketDataOpenInterest = Entry('market/data/open-interest', 'public', 'GET', {'cost': 1})
|
12
|
+
public_get_market_data_funding_rates = publicGetMarketDataFundingRates = Entry('market/data/funding-rates', 'public', 'GET', {'cost': 1})
|
13
|
+
public_get_exchange_utc_timestamp = publicGetExchangeUtcTimestamp = Entry('exchange/utc-timestamp', 'public', 'GET', {'cost': 1})
|
14
|
+
private_get_capital_deposit_info = privateGetCapitalDepositInfo = Entry('capital/deposit-info', 'private', 'GET', {'cost': 1})
|
15
|
+
private_get_capital_history = privateGetCapitalHistory = Entry('capital/history', 'private', 'GET', {'cost': 1})
|
16
|
+
private_get_trade_account_trading_history = privateGetTradeAccountTradingHistory = Entry('trade/account/trading_history', 'private', 'GET', {'cost': 1})
|
17
|
+
private_get_trade_account_info = privateGetTradeAccountInfo = Entry('trade/account/info', 'private', 'GET', {'cost': 1})
|
18
|
+
private_get_trade_order = privateGetTradeOrder = Entry('trade/order', 'private', 'GET', {'cost': 1})
|
19
|
+
private_get_trade_account_trades = privateGetTradeAccountTrades = Entry('trade/account/trades', 'private', 'GET', {'cost': 1})
|
20
|
+
private_get_trade_orders = privateGetTradeOrders = Entry('trade/orders', 'private', 'GET', {'cost': 1})
|
21
|
+
private_put_trade_order = privatePutTradeOrder = Entry('trade/order', 'private', 'PUT', {'cost': 1})
|
22
|
+
private_delete_trade_order = privateDeleteTradeOrder = Entry('trade/order', 'private', 'DELETE', {'cost': 1})
|
23
|
+
private_delete_trade_orders = privateDeleteTradeOrders = Entry('trade/orders', 'private', 'DELETE', {'cost': 1})
|
24
|
+
private_post_trade_order = privatePostTradeOrder = Entry('trade/order', 'private', 'POST', {'cost': 1})
|
25
|
+
private_post_trade_orders = privatePostTradeOrders = Entry('trade/orders', 'private', 'POST', {'cost': 1})
|
26
|
+
private_post_capital_withdraw = privatePostCapitalWithdraw = Entry('capital/withdraw', 'private', 'POST', {'cost': 1})
|
ccxt/alpaca.py
CHANGED
@@ -1567,7 +1567,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
1567
1567
|
'tag': None,
|
1568
1568
|
}
|
1569
1569
|
|
1570
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1570
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
1571
1571
|
"""
|
1572
1572
|
make a withdrawal
|
1573
1573
|
|
ccxt/apex.py
CHANGED
@@ -1735,7 +1735,7 @@ class apex(Exchange, ImplicitAPI):
|
|
1735
1735
|
'rate': self.safe_number(income, 'rate'),
|
1736
1736
|
}
|
1737
1737
|
|
1738
|
-
def set_leverage(self, leverage:
|
1738
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
1739
1739
|
"""
|
1740
1740
|
set the level of leverage for a market
|
1741
1741
|
|
ccxt/ascendex.py
CHANGED
@@ -2957,7 +2957,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2957
2957
|
"""
|
2958
2958
|
return self.modify_margin_helper(symbol, amount, 'add', params)
|
2959
2959
|
|
2960
|
-
def set_leverage(self, leverage:
|
2960
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
2961
2961
|
"""
|
2962
2962
|
set the level of leverage for a market
|
2963
2963
|
|
ccxt/async_support/__init__.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
|
|
@@ -125,6 +125,7 @@ from ccxt.async_support.gate import gate
|
|
125
125
|
from ccxt.async_support.gateio import gateio # noqa: F401
|
126
126
|
from ccxt.async_support.gemini import gemini # noqa: F401
|
127
127
|
from ccxt.async_support.hashkey import hashkey # noqa: F401
|
128
|
+
from ccxt.async_support.hibachi import hibachi # noqa: F401
|
128
129
|
from ccxt.async_support.hitbtc import hitbtc # noqa: F401
|
129
130
|
from ccxt.async_support.hollaex import hollaex # noqa: F401
|
130
131
|
from ccxt.async_support.htx import htx # noqa: F401
|
@@ -233,6 +234,7 @@ exchanges = [
|
|
233
234
|
'gateio',
|
234
235
|
'gemini',
|
235
236
|
'hashkey',
|
237
|
+
'hibachi',
|
236
238
|
'hitbtc',
|
237
239
|
'hollaex',
|
238
240
|
'htx',
|
ccxt/async_support/alpaca.py
CHANGED
@@ -1567,7 +1567,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
1567
1567
|
'tag': None,
|
1568
1568
|
}
|
1569
1569
|
|
1570
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1570
|
+
async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
1571
1571
|
"""
|
1572
1572
|
make a withdrawal
|
1573
1573
|
|
ccxt/async_support/apex.py
CHANGED
@@ -1735,7 +1735,7 @@ class apex(Exchange, ImplicitAPI):
|
|
1735
1735
|
'rate': self.safe_number(income, 'rate'),
|
1736
1736
|
}
|
1737
1737
|
|
1738
|
-
async def set_leverage(self, leverage:
|
1738
|
+
async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
1739
1739
|
"""
|
1740
1740
|
set the level of leverage for a market
|
1741
1741
|
|
ccxt/async_support/ascendex.py
CHANGED
@@ -2958,7 +2958,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2958
2958
|
"""
|
2959
2959
|
return await self.modify_margin_helper(symbol, amount, 'add', params)
|
2960
2960
|
|
2961
|
-
async def set_leverage(self, leverage:
|
2961
|
+
async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
2962
2962
|
"""
|
2963
2963
|
set the level of leverage for a market
|
2964
2964
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# -----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
__version__ = '4.4.
|
5
|
+
__version__ = '4.4.100'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -54,6 +54,15 @@ __all__ = [
|
|
54
54
|
]
|
55
55
|
|
56
56
|
# -----------------------------------------------------------------------------
|
57
|
+
# --- PROTO BUF IMPORTS
|
58
|
+
try:
|
59
|
+
from ccxt.protobuf.mexc import PushDataV3ApiWrapper_pb2
|
60
|
+
from google.protobuf.json_format import MessageToDict
|
61
|
+
except ImportError:
|
62
|
+
PushDataV3ApiWrapper_pb2 = None
|
63
|
+
MessageToDict = None
|
64
|
+
|
65
|
+
# -----------------------------------------------------------------------------
|
57
66
|
|
58
67
|
|
59
68
|
class Exchange(BaseExchange):
|
@@ -418,6 +427,7 @@ class Exchange(BaseExchange):
|
|
418
427
|
'verbose': self.verbose,
|
419
428
|
'throttle': Throttler(self.tokenBucket, self.asyncio_loop),
|
420
429
|
'asyncio_loop': self.asyncio_loop,
|
430
|
+
'decompressBinary': self.safe_bool(self.options, 'decompressBinary', True),
|
421
431
|
}, ws_options)
|
422
432
|
# we use aiohttp instead of fastClient now because of this
|
423
433
|
# https://github.com/ccxt/ccxt/pull/25995
|
@@ -573,6 +583,31 @@ class Exchange(BaseExchange):
|
|
573
583
|
return '0e-00'
|
574
584
|
return format(n, 'g')
|
575
585
|
|
586
|
+
def decode_proto_msg(self, data):
|
587
|
+
if not MessageToDict:
|
588
|
+
raise NotSupported(self.id + ' requires protobuf to decode messages, please install it with `pip install "protobuf==5.29.3"`')
|
589
|
+
message = PushDataV3ApiWrapper_pb2.PushDataV3ApiWrapper()
|
590
|
+
message.ParseFromString(data)
|
591
|
+
dict_msg = MessageToDict(message)
|
592
|
+
# {
|
593
|
+
# "channel":"spot@public.kline.v3.api.pb@BTCUSDT@Min1",
|
594
|
+
# "symbol":"BTCUSDT",
|
595
|
+
# "symbolId":"2fb942154ef44a4ab2ef98c8afb6a4a7",
|
596
|
+
# "createTime":"1754735110559",
|
597
|
+
# "publicSpotKline":{
|
598
|
+
# "interval":"Min1",
|
599
|
+
# "windowStart":"1754735100",
|
600
|
+
# "openingPrice":"117792.45",
|
601
|
+
# "closingPrice":"117805.32",
|
602
|
+
# "highestPrice":"117814.63",
|
603
|
+
# "lowestPrice":"117792.45",
|
604
|
+
# "volume":"0.13425465",
|
605
|
+
# "amount":"15815.77",
|
606
|
+
# "windowEnd":"1754735160"
|
607
|
+
# }
|
608
|
+
# }
|
609
|
+
return dict_msg
|
610
|
+
|
576
611
|
# ########################################################################
|
577
612
|
# ########################################################################
|
578
613
|
# ########################################################################
|
@@ -742,13 +777,13 @@ class Exchange(BaseExchange):
|
|
742
777
|
async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}):
|
743
778
|
raise NotSupported(self.id + ' transfer() is not supported yet')
|
744
779
|
|
745
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
780
|
+
async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}):
|
746
781
|
raise NotSupported(self.id + ' withdraw() is not supported yet')
|
747
782
|
|
748
783
|
async def create_deposit_address(self, code: str, params={}):
|
749
784
|
raise NotSupported(self.id + ' createDepositAddress() is not supported yet')
|
750
785
|
|
751
|
-
async def set_leverage(self, leverage:
|
786
|
+
async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
752
787
|
raise NotSupported(self.id + ' setLeverage() is not supported yet')
|
753
788
|
|
754
789
|
async def fetch_leverage(self, symbol: str, params={}):
|
@@ -797,7 +832,7 @@ class Exchange(BaseExchange):
|
|
797
832
|
async def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
798
833
|
raise NotSupported(self.id + ' fetchDepositAddressesByNetwork() is not supported yet')
|
799
834
|
|
800
|
-
async def fetch_open_interest_history(self, symbol: str, timeframe='1h', since: Int = None, limit: Int = None, params={}):
|
835
|
+
async def fetch_open_interest_history(self, symbol: str, timeframe: str = '1h', since: Int = None, limit: Int = None, params={}):
|
801
836
|
raise NotSupported(self.id + ' fetchOpenInterestHistory() is not supported yet')
|
802
837
|
|
803
838
|
async def fetch_open_interest(self, symbol: str, params={}):
|
@@ -1182,7 +1217,7 @@ class Exchange(BaseExchange):
|
|
1182
1217
|
async def fetch_position_mode(self, symbol: Str = None, params={}):
|
1183
1218
|
raise NotSupported(self.id + ' fetchPositionMode() is not supported yet')
|
1184
1219
|
|
1185
|
-
async def create_trailing_amount_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingAmount=None, trailingTriggerPrice=None, params={}):
|
1220
|
+
async def create_trailing_amount_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingAmount: Num = None, trailingTriggerPrice: Num = None, params={}):
|
1186
1221
|
"""
|
1187
1222
|
create a trailing order by providing the symbol, type, side, amount, price and trailingAmount
|
1188
1223
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -1204,7 +1239,7 @@ class Exchange(BaseExchange):
|
|
1204
1239
|
return await self.create_order(symbol, type, side, amount, price, params)
|
1205
1240
|
raise NotSupported(self.id + ' createTrailingAmountOrder() is not supported yet')
|
1206
1241
|
|
1207
|
-
async def create_trailing_amount_order_ws(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingAmount=None, trailingTriggerPrice=None, params={}):
|
1242
|
+
async 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={}):
|
1208
1243
|
"""
|
1209
1244
|
create a trailing order by providing the symbol, type, side, amount, price and trailingAmount
|
1210
1245
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -1226,7 +1261,7 @@ class Exchange(BaseExchange):
|
|
1226
1261
|
return await self.create_order_ws(symbol, type, side, amount, price, params)
|
1227
1262
|
raise NotSupported(self.id + ' createTrailingAmountOrderWs() is not supported yet')
|
1228
1263
|
|
1229
|
-
async def create_trailing_percent_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingPercent=None, trailingTriggerPrice=None, params={}):
|
1264
|
+
async def create_trailing_percent_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingPercent: Num = None, trailingTriggerPrice: Num = None, params={}):
|
1230
1265
|
"""
|
1231
1266
|
create a trailing order by providing the symbol, type, side, amount, price and trailingPercent
|
1232
1267
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -1248,7 +1283,7 @@ class Exchange(BaseExchange):
|
|
1248
1283
|
return await self.create_order(symbol, type, side, amount, price, params)
|
1249
1284
|
raise NotSupported(self.id + ' createTrailingPercentOrder() is not supported yet')
|
1250
1285
|
|
1251
|
-
async def create_trailing_percent_order_ws(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingPercent=None, trailingTriggerPrice=None, params={}):
|
1286
|
+
async 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={}):
|
1252
1287
|
"""
|
1253
1288
|
create a trailing order by providing the symbol, type, side, amount, price and trailingPercent
|
1254
1289
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -1815,7 +1850,7 @@ class Exchange(BaseExchange):
|
|
1815
1850
|
else:
|
1816
1851
|
raise NotSupported(self.id + ' fetchFundingInterval() is not supported yet')
|
1817
1852
|
|
1818
|
-
async def fetch_mark_ohlcv(self, symbol, timeframe='1m', since: Int = None, limit: Int = None, params={}):
|
1853
|
+
async def fetch_mark_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
|
1819
1854
|
"""
|
1820
1855
|
fetches historical mark price candlestick data containing the open, high, low, and close price of a market
|
1821
1856
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
@@ -50,6 +50,7 @@ class Client(object):
|
|
50
50
|
connecting = False
|
51
51
|
asyncio_loop: BaseEventLoop = None
|
52
52
|
ping_looper = None
|
53
|
+
decompressBinary = True # decompress binary messages by default
|
53
54
|
|
54
55
|
def __init__(self, url, on_message_callback, on_error_callback, on_close_callback, on_connected_callback, config={}):
|
55
56
|
defaults = {
|
@@ -218,7 +219,8 @@ class Client(object):
|
|
218
219
|
if self.verbose:
|
219
220
|
self.log(iso8601(milliseconds()), 'message', data)
|
220
221
|
if isinstance(data, bytes):
|
221
|
-
|
222
|
+
if self.decompressBinary:
|
223
|
+
data = data.decode()
|
222
224
|
# decoded = json.loads(data) if is_json_encoded_object(data) else data
|
223
225
|
decode = None
|
224
226
|
if is_json_encoded_object(data):
|
ccxt/async_support/bigone.py
CHANGED
@@ -2177,7 +2177,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
2177
2177
|
}
|
2178
2178
|
return self.safe_string(statuses, status, 'failed')
|
2179
2179
|
|
2180
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2180
|
+
async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
2181
2181
|
"""
|
2182
2182
|
make a withdrawal
|
2183
2183
|
|
ccxt/async_support/binance.py
CHANGED
@@ -2732,12 +2732,13 @@ class binance(Exchange, ImplicitAPI):
|
|
2732
2732
|
return market
|
2733
2733
|
return markets[0]
|
2734
2734
|
elif (symbol.find('/') > -1) and (symbol.find(':') < 0):
|
2735
|
-
|
2736
|
-
|
2737
|
-
|
2738
|
-
|
2739
|
-
|
2740
|
-
|
2735
|
+
if (defaultType is not None) and (defaultType != 'spot'):
|
2736
|
+
# support legacy symbols
|
2737
|
+
base, quote = symbol.split('/')
|
2738
|
+
settle = base if (quote == 'USD') else quote
|
2739
|
+
futuresSymbol = symbol + ':' + settle
|
2740
|
+
if futuresSymbol in self.markets:
|
2741
|
+
return self.markets[futuresSymbol]
|
2741
2742
|
elif (symbol.find('-C') > -1) or (symbol.find('-P') > -1): # both exchange-id and unified symbols are supported self way regardless of the defaultType
|
2742
2743
|
return self.create_expired_option_market(symbol)
|
2743
2744
|
raise BadSymbol(self.id + ' does not have market symbol ' + symbol)
|
@@ -8843,7 +8844,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8843
8844
|
}
|
8844
8845
|
return result
|
8845
8846
|
|
8846
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
8847
|
+
async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
8847
8848
|
"""
|
8848
8849
|
make a withdrawal
|
8849
8850
|
|
@@ -10551,7 +10552,7 @@ class binance(Exchange, ImplicitAPI):
|
|
10551
10552
|
raise NotSupported(self.id + ' fetchFundingHistory() supports linear and inverse contracts only')
|
10552
10553
|
return self.parse_incomes(response, market, since, limit)
|
10553
10554
|
|
10554
|
-
async def set_leverage(self, leverage:
|
10555
|
+
async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
10555
10556
|
"""
|
10556
10557
|
set the level of leverage for a market
|
10557
10558
|
|
@@ -12440,6 +12441,7 @@ class binance(Exchange, ImplicitAPI):
|
|
12440
12441
|
'contracts': self.safe_number(liquidation, 'executedQty'),
|
12441
12442
|
'contractSize': self.safe_number(market, 'contractSize'),
|
12442
12443
|
'price': self.safe_number(liquidation, 'avgPrice'),
|
12444
|
+
'side': self.safe_string_lower(liquidation, 'side'),
|
12443
12445
|
'baseValue': self.safe_number(liquidation, 'cumBase'),
|
12444
12446
|
'quoteValue': self.safe_number(liquidation, 'cumQuote'),
|
12445
12447
|
'timestamp': timestamp,
|
ccxt/async_support/bingx.py
CHANGED
@@ -119,6 +119,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
119
119
|
'urls': {
|
120
120
|
'logo': 'https://github-production-user-asset-6210df.s3.amazonaws.com/1294454/253675376-6983b72e-4999-4549-b177-33b374c195e3.jpg',
|
121
121
|
'api': {
|
122
|
+
'fund': 'https://open-api.{hostname}/openApi',
|
122
123
|
'spot': 'https://open-api.{hostname}/openApi',
|
123
124
|
'swap': 'https://open-api.{hostname}/openApi',
|
124
125
|
'contract': 'https://open-api.{hostname}/openApi',
|
@@ -155,6 +156,15 @@ class bingx(Exchange, ImplicitAPI):
|
|
155
156
|
'secret': True,
|
156
157
|
},
|
157
158
|
'api': {
|
159
|
+
'fund': {
|
160
|
+
'v1': {
|
161
|
+
'private': {
|
162
|
+
'get': {
|
163
|
+
'account/balance': 1,
|
164
|
+
},
|
165
|
+
},
|
166
|
+
},
|
167
|
+
},
|
158
168
|
'spot': {
|
159
169
|
'v1': {
|
160
170
|
'public': {
|
@@ -569,8 +579,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
569
579
|
'LTC': 'LTC',
|
570
580
|
},
|
571
581
|
'networks': {
|
572
|
-
'
|
582
|
+
'ARBITRUM': 'ARB',
|
573
583
|
'MATIC': 'POLYGON',
|
584
|
+
'ZKSYNC': 'ZKSYNCERA',
|
585
|
+
'AVAXC': 'AVAX-C',
|
586
|
+
'HBAR': 'HEDERA',
|
574
587
|
},
|
575
588
|
},
|
576
589
|
'features': {
|
@@ -2127,6 +2140,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2127
2140
|
|
2128
2141
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2129
2142
|
:param boolean [params.standard]: whether to fetch standard contract balances
|
2143
|
+
:param str [params.type]: the type of balance to fetch(spot, swap, funding) default is `spot`
|
2130
2144
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
2131
2145
|
"""
|
2132
2146
|
await self.load_markets()
|
@@ -2156,6 +2170,21 @@ class bingx(Exchange, ImplicitAPI):
|
|
2156
2170
|
# ]
|
2157
2171
|
# }
|
2158
2172
|
#
|
2173
|
+
elif (marketType == 'funding') or (marketType == 'fund'):
|
2174
|
+
response = await self.fundV1PrivateGetAccountBalance(marketTypeQuery)
|
2175
|
+
# {
|
2176
|
+
# code: '0',
|
2177
|
+
# timestamp: '1754906016631',
|
2178
|
+
# data: {
|
2179
|
+
# assets: [
|
2180
|
+
# {
|
2181
|
+
# asset: 'USDT',
|
2182
|
+
# free: '44.37692200000000237300',
|
2183
|
+
# locked: '0.00000000000000000000'
|
2184
|
+
# }
|
2185
|
+
# ]
|
2186
|
+
# }
|
2187
|
+
# }
|
2159
2188
|
elif marketType == 'spot':
|
2160
2189
|
response = await self.spotV1PrivateGetAccountBalance(marketTypeQuery)
|
2161
2190
|
#
|
@@ -2304,7 +2333,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2304
2333
|
firstStandardOrInverse = self.safe_dict(standardAndInverseBalances, 0)
|
2305
2334
|
isStandardOrInverse = firstStandardOrInverse is not None
|
2306
2335
|
spotData = self.safe_dict(response, 'data', {})
|
2307
|
-
spotBalances = self.
|
2336
|
+
spotBalances = self.safe_list_2(spotData, 'balances', 'assets', [])
|
2308
2337
|
firstSpot = self.safe_dict(spotBalances, 0)
|
2309
2338
|
isSpot = firstSpot is not None
|
2310
2339
|
if isStandardOrInverse:
|
@@ -5316,7 +5345,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
5316
5345
|
'shortLeverage': self.safe_integer(leverage, 'shortLeverage'),
|
5317
5346
|
}
|
5318
5347
|
|
5319
|
-
async def set_leverage(self, leverage:
|
5348
|
+
async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
5320
5349
|
"""
|
5321
5350
|
set the level of leverage for a market
|
5322
5351
|
|
@@ -5563,7 +5592,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
5563
5592
|
depositWithdrawFees[code] = self.parse_deposit_withdraw_fee(entry)
|
5564
5593
|
return depositWithdrawFees
|
5565
5594
|
|
5566
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
5595
|
+
async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
5567
5596
|
"""
|
5568
5597
|
make a withdrawal
|
5569
5598
|
|
ccxt/async_support/bitbank.py
CHANGED
@@ -937,7 +937,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
937
937
|
'tag': None,
|
938
938
|
}
|
939
939
|
|
940
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
940
|
+
async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
941
941
|
"""
|
942
942
|
make a withdrawal
|
943
943
|
|
ccxt/async_support/bitfinex.py
CHANGED
@@ -2632,7 +2632,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
2632
2632
|
#
|
2633
2633
|
return self.parse_transactions(response, currency, since, limit)
|
2634
2634
|
|
2635
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2635
|
+
async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
2636
2636
|
"""
|
2637
2637
|
make a withdrawal
|
2638
2638
|
|
@@ -3542,12 +3542,15 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
3542
3542
|
contractSize = self.safe_string(market, 'contractSize')
|
3543
3543
|
baseValue = Precise.string_mul(contracts, contractSize)
|
3544
3544
|
price = self.safe_string(entry, 11)
|
3545
|
+
sideFlag = self.safe_integer(entry, 8)
|
3546
|
+
side = 'buy' if (sideFlag == 1) else 'sell'
|
3545
3547
|
return self.safe_liquidation({
|
3546
3548
|
'info': entry,
|
3547
3549
|
'symbol': self.safe_symbol(marketId, market, None, 'contract'),
|
3548
3550
|
'contracts': self.parse_number(contracts),
|
3549
3551
|
'contractSize': self.parse_number(contractSize),
|
3550
3552
|
'price': self.parse_number(price),
|
3553
|
+
'side': side,
|
3551
3554
|
'baseValue': self.parse_number(baseValue),
|
3552
3555
|
'quoteValue': self.parse_number(Precise.string_mul(baseValue, price)),
|
3553
3556
|
'timestamp': timestamp,
|
ccxt/async_support/bitflyer.py
CHANGED
@@ -879,7 +879,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
879
879
|
# todo unify parsePosition/parsePositions
|
880
880
|
return response
|
881
881
|
|
882
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
882
|
+
async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
883
883
|
"""
|
884
884
|
make a withdrawal
|
885
885
|
|