ccxt 4.2.29__py2.py3-none-any.whl → 4.2.31__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 -3
- ccxt/abstract/bybit.py +2 -2
- ccxt/abstract/coinbase.py +10 -0
- ccxt/abstract/okx.py +12 -1
- ccxt/ascendex.py +5 -5
- ccxt/async_support/__init__.py +3 -3
- ccxt/async_support/ascendex.py +5 -5
- ccxt/async_support/base/exchange.py +3 -3
- ccxt/async_support/bigone.py +2 -2
- ccxt/async_support/binance.py +892 -218
- ccxt/async_support/bingx.py +1 -1
- ccxt/async_support/bitfinex.py +1 -1
- ccxt/async_support/bitfinex2.py +421 -86
- ccxt/async_support/bitforex.py +3 -0
- ccxt/async_support/bitget.py +8 -4
- ccxt/async_support/bitmart.py +3 -3
- ccxt/async_support/bitmex.py +4 -4
- ccxt/async_support/bitrue.py +1 -1
- ccxt/async_support/bitso.py +1 -1
- ccxt/async_support/bitteam.py +2 -2
- ccxt/async_support/btcalpha.py +1 -1
- ccxt/async_support/bybit.py +3 -3
- ccxt/async_support/coinbase.py +20 -5
- ccxt/async_support/coincheck.py +1 -1
- ccxt/async_support/coinex.py +2 -2
- ccxt/async_support/coinlist.py +1 -1
- ccxt/async_support/coinmate.py +1 -1
- ccxt/async_support/coinmetro.py +2 -2
- ccxt/async_support/coinsph.py +1 -1
- ccxt/async_support/cryptocom.py +3 -3
- ccxt/async_support/deribit.py +1 -0
- ccxt/async_support/digifinex.py +6 -4
- ccxt/async_support/exmo.py +2 -2
- ccxt/async_support/gate.py +5 -5
- ccxt/async_support/gemini.py +3 -3
- ccxt/async_support/hitbtc.py +13 -17
- ccxt/async_support/hollaex.py +2 -2
- ccxt/async_support/htx.py +6 -6
- ccxt/async_support/huobijp.py +1 -1
- ccxt/async_support/kraken.py +3 -1
- ccxt/async_support/krakenfutures.py +4 -1
- ccxt/async_support/kucoin.py +17 -17
- ccxt/async_support/kucoinfutures.py +3 -3
- ccxt/async_support/lbank.py +4 -3
- ccxt/async_support/mexc.py +7 -7
- ccxt/async_support/novadax.py +1 -1
- ccxt/async_support/okcoin.py +2 -2
- ccxt/async_support/okx.py +22 -8
- ccxt/async_support/p2b.py +1 -0
- ccxt/async_support/phemex.py +3 -3
- ccxt/async_support/poloniexfutures.py +6 -3
- ccxt/async_support/probit.py +1 -1
- ccxt/async_support/timex.py +2 -2
- ccxt/async_support/tokocrypto.py +3 -3
- ccxt/async_support/wavesexchange.py +2 -2
- ccxt/async_support/whitebit.py +3 -3
- ccxt/async_support/woo.py +3 -3
- ccxt/async_support/yobit.py +1 -1
- ccxt/async_support/zaif.py +1 -1
- ccxt/async_support/zonda.py +3 -3
- ccxt/base/errors.py +13 -12
- ccxt/base/exchange.py +36 -26
- ccxt/bigone.py +2 -2
- ccxt/binance.py +892 -218
- ccxt/bingx.py +1 -1
- ccxt/bitfinex.py +1 -1
- ccxt/bitfinex2.py +421 -86
- ccxt/bitforex.py +3 -0
- ccxt/bitget.py +8 -4
- ccxt/bitmart.py +3 -3
- ccxt/bitmex.py +4 -4
- ccxt/bitrue.py +1 -1
- ccxt/bitso.py +1 -1
- ccxt/bitteam.py +2 -2
- ccxt/btcalpha.py +1 -1
- ccxt/bybit.py +3 -3
- ccxt/coinbase.py +20 -5
- ccxt/coincheck.py +1 -1
- ccxt/coinex.py +2 -2
- ccxt/coinlist.py +1 -1
- ccxt/coinmate.py +1 -1
- ccxt/coinmetro.py +2 -2
- ccxt/coinsph.py +1 -1
- ccxt/cryptocom.py +3 -3
- ccxt/deribit.py +1 -0
- ccxt/digifinex.py +6 -4
- ccxt/exmo.py +2 -2
- ccxt/gate.py +5 -5
- ccxt/gemini.py +3 -3
- ccxt/hitbtc.py +13 -17
- ccxt/hollaex.py +2 -2
- ccxt/htx.py +6 -6
- ccxt/huobijp.py +1 -1
- ccxt/kraken.py +3 -1
- ccxt/krakenfutures.py +4 -1
- ccxt/kucoin.py +17 -17
- ccxt/kucoinfutures.py +3 -3
- ccxt/lbank.py +4 -3
- ccxt/mexc.py +7 -7
- ccxt/novadax.py +1 -1
- ccxt/okcoin.py +2 -2
- ccxt/okx.py +22 -8
- ccxt/p2b.py +1 -0
- ccxt/phemex.py +3 -3
- ccxt/poloniexfutures.py +6 -3
- ccxt/pro/__init__.py +3 -1
- ccxt/pro/alpaca.py +1 -1
- ccxt/pro/binance.py +4 -4
- ccxt/pro/bitget.py +1 -1
- ccxt/pro/bitmart.py +1 -1
- ccxt/pro/bitmex.py +43 -7
- ccxt/pro/bitvavo.py +1 -1
- ccxt/pro/bybit.py +2 -2
- ccxt/pro/cex.py +2 -2
- ccxt/pro/independentreserve.py +1 -1
- ccxt/pro/okx.py +1 -1
- ccxt/pro/onetrading.py +2 -2
- ccxt/pro/p2b.py +407 -0
- ccxt/pro/probit.py +5 -5
- ccxt/pro/whitebit.py +1 -1
- ccxt/probit.py +1 -1
- ccxt/timex.py +2 -2
- ccxt/tokocrypto.py +3 -3
- ccxt/wavesexchange.py +2 -2
- ccxt/whitebit.py +3 -3
- ccxt/woo.py +3 -3
- ccxt/yobit.py +1 -1
- ccxt/zaif.py +1 -1
- ccxt/zonda.py +3 -3
- {ccxt-4.2.29.dist-info → ccxt-4.2.31.dist-info}/METADATA +6 -7
- {ccxt-4.2.29.dist-info → ccxt-4.2.31.dist-info}/RECORD +133 -132
- {ccxt-4.2.29.dist-info → ccxt-4.2.31.dist-info}/WHEEL +0 -0
- {ccxt-4.2.29.dist-info → ccxt-4.2.31.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
# ----------------------------------------------------------------------------
|
24
24
|
|
25
|
-
__version__ = '4.2.
|
25
|
+
__version__ = '4.2.31'
|
26
26
|
|
27
27
|
# ----------------------------------------------------------------------------
|
28
28
|
|
@@ -50,9 +50,9 @@ from ccxt.base.errors import AccountSuspended # noqa: F4
|
|
50
50
|
from ccxt.base.errors import ArgumentsRequired # noqa: F401
|
51
51
|
from ccxt.base.errors import BadRequest # noqa: F401
|
52
52
|
from ccxt.base.errors import BadSymbol # noqa: F401
|
53
|
-
from ccxt.base.errors import MarginModeAlreadySet # noqa: F401
|
54
|
-
from ccxt.base.errors import NoChange # noqa: F401
|
55
53
|
from ccxt.base.errors import OperationRejected # noqa: F401
|
54
|
+
from ccxt.base.errors import NoChange # noqa: F401
|
55
|
+
from ccxt.base.errors import MarginModeAlreadySet # noqa: F401
|
56
56
|
from ccxt.base.errors import BadResponse # noqa: F401
|
57
57
|
from ccxt.base.errors import NullResponse # noqa: F401
|
58
58
|
from ccxt.base.errors import InsufficientFunds # noqa: F401
|
ccxt/abstract/bybit.py
CHANGED
@@ -123,8 +123,6 @@ class ImplicitAPI:
|
|
123
123
|
private_get_v5_pre_upgrade_asset_settlement_record = privateGetV5PreUpgradeAssetSettlementRecord = Entry('v5/pre-upgrade/asset/settlement-record', 'private', 'GET', {'cost': 5})
|
124
124
|
private_get_v5_account_wallet_balance = privateGetV5AccountWalletBalance = Entry('v5/account/wallet-balance', 'private', 'GET', {'cost': 1})
|
125
125
|
private_get_v5_account_borrow_history = privateGetV5AccountBorrowHistory = Entry('v5/account/borrow-history', 'private', 'GET', {'cost': 1})
|
126
|
-
private_get_v5_account_set_collateral_switch = privateGetV5AccountSetCollateralSwitch = Entry('v5/account/set-collateral-switch', 'private', 'GET', {'cost': 5})
|
127
|
-
private_get_v5_account_set_collateral_switch_batch = privateGetV5AccountSetCollateralSwitchBatch = Entry('v5/account/set-collateral-switch-batch', 'private', 'GET', {'cost': 5})
|
128
126
|
private_get_v5_account_collateral_info = privateGetV5AccountCollateralInfo = Entry('v5/account/collateral-info', 'private', 'GET', {'cost': 1})
|
129
127
|
private_get_v5_asset_coin_greeks = privateGetV5AssetCoinGreeks = Entry('v5/asset/coin-greeks', 'private', 'GET', {'cost': 1})
|
130
128
|
private_get_v5_account_fee_rate = privateGetV5AccountFeeRate = Entry('v5/account/fee-rate', 'private', 'GET', {'cost': 10})
|
@@ -291,3 +289,5 @@ class ImplicitAPI:
|
|
291
289
|
private_post_v5_lending_purchase = privatePostV5LendingPurchase = Entry('v5/lending/purchase', 'private', 'POST', {'cost': 5})
|
292
290
|
private_post_v5_lending_redeem = privatePostV5LendingRedeem = Entry('v5/lending/redeem', 'private', 'POST', {'cost': 5})
|
293
291
|
private_post_v5_lending_redeem_cancel = privatePostV5LendingRedeemCancel = Entry('v5/lending/redeem-cancel', 'private', 'POST', {'cost': 5})
|
292
|
+
private_post_v5_account_set_collateral_switch = privatePostV5AccountSetCollateralSwitch = Entry('v5/account/set-collateral-switch', 'private', 'POST', {'cost': 5})
|
293
|
+
private_post_v5_account_set_collateral_switch_batch = privatePostV5AccountSetCollateralSwitchBatch = Entry('v5/account/set-collateral-switch-batch', 'private', 'POST', {'cost': 5})
|
ccxt/abstract/coinbase.py
CHANGED
@@ -62,6 +62,13 @@ class ImplicitAPI:
|
|
62
62
|
v3_private_get_brokerage_best_bid_ask = v3PrivateGetBrokerageBestBidAsk = Entry('brokerage/best_bid_ask', ['v3', 'private'], 'GET', {})
|
63
63
|
v3_private_get_brokerage_convert_trade_trade_id = v3PrivateGetBrokerageConvertTradeTradeId = Entry('brokerage/convert/trade/{trade_id}', ['v3', 'private'], 'GET', {})
|
64
64
|
v3_private_get_brokerage_time = v3PrivateGetBrokerageTime = Entry('brokerage/time', ['v3', 'private'], 'GET', {})
|
65
|
+
v3_private_get_brokerage_cfm_balance_summary = v3PrivateGetBrokerageCfmBalanceSummary = Entry('brokerage/cfm/balance_summary', ['v3', 'private'], 'GET', {})
|
66
|
+
v3_private_get_brokerage_cfm_positions = v3PrivateGetBrokerageCfmPositions = Entry('brokerage/cfm/positions', ['v3', 'private'], 'GET', {})
|
67
|
+
v3_private_get_brokerage_cfm_positions_product_id = v3PrivateGetBrokerageCfmPositionsProductId = Entry('brokerage/cfm/positions/{product_id}', ['v3', 'private'], 'GET', {})
|
68
|
+
v3_private_get_brokerage_cfm_sweeps = v3PrivateGetBrokerageCfmSweeps = Entry('brokerage/cfm/sweeps', ['v3', 'private'], 'GET', {})
|
69
|
+
v3_private_get_brokerage_intx_portfolio_portfolio_uuid = v3PrivateGetBrokerageIntxPortfolioPortfolioUuid = Entry('brokerage/intx/portfolio/{portfolio_uuid}', ['v3', 'private'], 'GET', {})
|
70
|
+
v3_private_get_brokerage_intx_positions_portfolio_uuid = v3PrivateGetBrokerageIntxPositionsPortfolioUuid = Entry('brokerage/intx/positions/{portfolio_uuid}', ['v3', 'private'], 'GET', {})
|
71
|
+
v3_private_get_brokerage_intx_positions_portfolio_uuid_symbol = v3PrivateGetBrokerageIntxPositionsPortfolioUuidSymbol = Entry('brokerage/intx/positions/{portfolio_uuid}/{symbol}', ['v3', 'private'], 'GET', {})
|
65
72
|
v3_private_post_brokerage_orders = v3PrivatePostBrokerageOrders = Entry('brokerage/orders', ['v3', 'private'], 'POST', {})
|
66
73
|
v3_private_post_brokerage_orders_batch_cancel = v3PrivatePostBrokerageOrdersBatchCancel = Entry('brokerage/orders/batch_cancel', ['v3', 'private'], 'POST', {})
|
67
74
|
v3_private_post_brokerage_orders_edit = v3PrivatePostBrokerageOrdersEdit = Entry('brokerage/orders/edit', ['v3', 'private'], 'POST', {})
|
@@ -70,5 +77,8 @@ class ImplicitAPI:
|
|
70
77
|
v3_private_post_brokerage_portfolios_move_funds = v3PrivatePostBrokeragePortfoliosMoveFunds = Entry('brokerage/portfolios/move_funds', ['v3', 'private'], 'POST', {})
|
71
78
|
v3_private_post_brokerage_convert_quote = v3PrivatePostBrokerageConvertQuote = Entry('brokerage/convert/quote', ['v3', 'private'], 'POST', {})
|
72
79
|
v3_private_post_brokerage_convert_trade_trade_id = v3PrivatePostBrokerageConvertTradeTradeId = Entry('brokerage/convert/trade/{trade_id}', ['v3', 'private'], 'POST', {})
|
80
|
+
v3_private_post_brokerage_cfm_sweeps_schedule = v3PrivatePostBrokerageCfmSweepsSchedule = Entry('brokerage/cfm/sweeps/schedule', ['v3', 'private'], 'POST', {})
|
81
|
+
v3_private_post_brokerage_intx_allocate = v3PrivatePostBrokerageIntxAllocate = Entry('brokerage/intx/allocate', ['v3', 'private'], 'POST', {})
|
73
82
|
v3_private_put_brokerage_portfolios_portfolio_uuid = v3PrivatePutBrokeragePortfoliosPortfolioUuid = Entry('brokerage/portfolios/{portfolio_uuid}', ['v3', 'private'], 'PUT', {})
|
74
83
|
v3_private_delete_brokerage_portfolios_portfolio_uuid = v3PrivateDeleteBrokeragePortfoliosPortfolioUuid = Entry('brokerage/portfolios/{portfolio_uuid}', ['v3', 'private'], 'DELETE', {})
|
84
|
+
v3_private_delete_brokerage_cfm_sweeps = v3PrivateDeleteBrokerageCfmSweeps = Entry('brokerage/cfm/sweeps', ['v3', 'private'], 'DELETE', {})
|
ccxt/abstract/okx.py
CHANGED
@@ -155,9 +155,11 @@ class ImplicitAPI:
|
|
155
155
|
private_get_tradingbot_grid_sub_orders = privateGetTradingBotGridSubOrders = Entry('tradingBot/grid/sub-orders', 'private', 'GET', {'cost': 1})
|
156
156
|
private_get_tradingbot_grid_positions = privateGetTradingBotGridPositions = Entry('tradingBot/grid/positions', 'private', 'GET', {'cost': 1})
|
157
157
|
private_get_tradingbot_grid_ai_param = privateGetTradingBotGridAiParam = Entry('tradingBot/grid/ai-param', 'private', 'GET', {'cost': 1})
|
158
|
-
|
158
|
+
private_get_tradingbot_signal_signals = privateGetTradingBotSignalSignals = Entry('tradingBot/signal/signals', 'private', 'GET', {'cost': 1})
|
159
159
|
private_get_tradingbot_signal_orders_algo_details = privateGetTradingBotSignalOrdersAlgoDetails = Entry('tradingBot/signal/orders-algo-details', 'private', 'GET', {'cost': 1})
|
160
|
+
private_get_tradingbot_signal_orders_algo_history = privateGetTradingBotSignalOrdersAlgoHistory = Entry('tradingBot/signal/orders-algo-history', 'private', 'GET', {'cost': 1})
|
160
161
|
private_get_tradingbot_signal_positions = privateGetTradingBotSignalPositions = Entry('tradingBot/signal/positions', 'private', 'GET', {'cost': 1})
|
162
|
+
private_get_tradingbot_signal_positions_history = privateGetTradingBotSignalPositionsHistory = Entry('tradingBot/signal/positions-history', 'private', 'GET', {'cost': 1})
|
161
163
|
private_get_tradingbot_signal_sub_orders = privateGetTradingBotSignalSubOrders = Entry('tradingBot/signal/sub-orders', 'private', 'GET', {'cost': 1})
|
162
164
|
private_get_tradingbot_signal_event_history = privateGetTradingBotSignalEventHistory = Entry('tradingBot/signal/event-history', 'private', 'GET', {'cost': 1})
|
163
165
|
private_get_tradingbot_recurring_orders_algo_pending = privateGetTradingBotRecurringOrdersAlgoPending = Entry('tradingBot/recurring/orders-algo-pending', 'private', 'GET', {'cost': 1})
|
@@ -263,6 +265,15 @@ class ImplicitAPI:
|
|
263
265
|
private_post_tradingbot_grid_compute_margin_balance = privatePostTradingBotGridComputeMarginBalance = Entry('tradingBot/grid/compute-margin-balance', 'private', 'POST', {'cost': 1})
|
264
266
|
private_post_tradingbot_grid_margin_balance = privatePostTradingBotGridMarginBalance = Entry('tradingBot/grid/margin-balance', 'private', 'POST', {'cost': 1})
|
265
267
|
private_post_tradingbot_grid_min_investment = privatePostTradingBotGridMinInvestment = Entry('tradingBot/grid/min-investment', 'private', 'POST', {'cost': 1})
|
268
|
+
private_post_tradingbot_signal_create_signal = privatePostTradingBotSignalCreateSignal = Entry('tradingBot/signal/create-signal', 'private', 'POST', {'cost': 1})
|
269
|
+
private_post_tradingbot_signal_order_algo = privatePostTradingBotSignalOrderAlgo = Entry('tradingBot/signal/order-algo', 'private', 'POST', {'cost': 1})
|
270
|
+
private_post_tradingbot_signal_stop_order_algo = privatePostTradingBotSignalStopOrderAlgo = Entry('tradingBot/signal/stop-order-algo', 'private', 'POST', {'cost': 1})
|
271
|
+
private_post_tradingbot_signal_margin_balance = privatePostTradingBotSignalMarginBalance = Entry('tradingBot/signal/margin-balance', 'private', 'POST', {'cost': 1})
|
272
|
+
private_post_tradingbot_signal_amendtpsl = privatePostTradingBotSignalAmendTPSL = Entry('tradingBot/signal/amendTPSL', 'private', 'POST', {'cost': 1})
|
273
|
+
private_post_tradingbot_signal_set_instruments = privatePostTradingBotSignalSetInstruments = Entry('tradingBot/signal/set-instruments', 'private', 'POST', {'cost': 1})
|
274
|
+
private_post_tradingbot_signal_close_position = privatePostTradingBotSignalClosePosition = Entry('tradingBot/signal/close-position', 'private', 'POST', {'cost': 1})
|
275
|
+
private_post_tradingbot_signal_sub_order = privatePostTradingBotSignalSubOrder = Entry('tradingBot/signal/sub-order', 'private', 'POST', {'cost': 1})
|
276
|
+
private_post_tradingbot_signal_cancel_sub_order = privatePostTradingBotSignalCancelSubOrder = Entry('tradingBot/signal/cancel-sub-order', 'private', 'POST', {'cost': 1})
|
266
277
|
private_post_tradingbot_recurring_order_algo = privatePostTradingBotRecurringOrderAlgo = Entry('tradingBot/recurring/order-algo', 'private', 'POST', {'cost': 1})
|
267
278
|
private_post_tradingbot_recurring_amend_order_algo = privatePostTradingBotRecurringAmendOrderAlgo = Entry('tradingBot/recurring/amend-order-algo', 'private', 'POST', {'cost': 1})
|
268
279
|
private_post_tradingbot_recurring_stop_order_algo = privatePostTradingBotRecurringStopOrderAlgo = Entry('tradingBot/recurring/stop-order-algo', 'private', 'POST', {'cost': 1})
|
ccxt/ascendex.py
CHANGED
@@ -622,7 +622,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
622
622
|
maxPrice = self.safe_number(priceFilter, 'maxPrice')
|
623
623
|
symbol = base + '/' + quote + ':' + settle
|
624
624
|
fee = self.safe_number(market, 'commissionReserveRate')
|
625
|
-
marginTradable = self.
|
625
|
+
marginTradable = self.safe_bool(market, 'marginTradable', False)
|
626
626
|
result.append({
|
627
627
|
'id': id,
|
628
628
|
'symbol': symbol,
|
@@ -806,7 +806,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
806
806
|
marginMode = None
|
807
807
|
marketType, params = self.handle_market_type_and_params('fetchBalance', None, params)
|
808
808
|
marginMode, params = self.handle_margin_mode_and_params('fetchBalance', params)
|
809
|
-
isMargin = self.
|
809
|
+
isMargin = self.safe_bool(params, 'margin', False)
|
810
810
|
isCross = marginMode == 'cross'
|
811
811
|
marketType = 'margin' if (isMargin or isCross) else marketType
|
812
812
|
params = self.omit(params, 'margin')
|
@@ -1142,7 +1142,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1142
1142
|
timestamp = self.safe_integer(trade, 'ts')
|
1143
1143
|
priceString = self.safe_string_2(trade, 'price', 'p')
|
1144
1144
|
amountString = self.safe_string(trade, 'q')
|
1145
|
-
buyerIsMaker = self.
|
1145
|
+
buyerIsMaker = self.safe_bool(trade, 'bm', False)
|
1146
1146
|
side = 'sell' if buyerIsMaker else 'buy'
|
1147
1147
|
market = self.safe_market(None, market)
|
1148
1148
|
return self.safe_trade({
|
@@ -1468,7 +1468,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1468
1468
|
isLimitOrder = ((type == 'limit') or (type == 'stop_limit'))
|
1469
1469
|
timeInForce = self.safe_string(params, 'timeInForce')
|
1470
1470
|
postOnly = self.is_post_only(isMarketOrder, False, params)
|
1471
|
-
reduceOnly = self.
|
1471
|
+
reduceOnly = self.safe_bool(params, 'reduceOnly', False)
|
1472
1472
|
stopPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
|
1473
1473
|
if isLimitOrder:
|
1474
1474
|
request['orderPrice'] = self.price_to_precision(symbol, price)
|
@@ -2992,7 +2992,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2992
2992
|
# {"code": "0"}
|
2993
2993
|
#
|
2994
2994
|
transferOptions = self.safe_value(self.options, 'transfer', {})
|
2995
|
-
fillResponseFromRequest = self.
|
2995
|
+
fillResponseFromRequest = self.safe_bool(transferOptions, 'fillResponseFromRequest', True)
|
2996
2996
|
transfer = self.parse_transfer(response, currency)
|
2997
2997
|
if fillResponseFromRequest:
|
2998
2998
|
transfer['fromAccount'] = fromAccount
|
ccxt/async_support/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.2.
|
7
|
+
__version__ = '4.2.31'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -29,9 +29,9 @@ from ccxt.base.errors import AccountSuspended # noqa: F4
|
|
29
29
|
from ccxt.base.errors import ArgumentsRequired # noqa: F401
|
30
30
|
from ccxt.base.errors import BadRequest # noqa: F401
|
31
31
|
from ccxt.base.errors import BadSymbol # noqa: F401
|
32
|
-
from ccxt.base.errors import MarginModeAlreadySet # noqa: F401
|
33
|
-
from ccxt.base.errors import NoChange # noqa: F401
|
34
32
|
from ccxt.base.errors import OperationRejected # noqa: F401
|
33
|
+
from ccxt.base.errors import NoChange # noqa: F401
|
34
|
+
from ccxt.base.errors import MarginModeAlreadySet # noqa: F401
|
35
35
|
from ccxt.base.errors import BadResponse # noqa: F401
|
36
36
|
from ccxt.base.errors import NullResponse # noqa: F401
|
37
37
|
from ccxt.base.errors import InsufficientFunds # noqa: F401
|
ccxt/async_support/ascendex.py
CHANGED
@@ -622,7 +622,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
622
622
|
maxPrice = self.safe_number(priceFilter, 'maxPrice')
|
623
623
|
symbol = base + '/' + quote + ':' + settle
|
624
624
|
fee = self.safe_number(market, 'commissionReserveRate')
|
625
|
-
marginTradable = self.
|
625
|
+
marginTradable = self.safe_bool(market, 'marginTradable', False)
|
626
626
|
result.append({
|
627
627
|
'id': id,
|
628
628
|
'symbol': symbol,
|
@@ -806,7 +806,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
806
806
|
marginMode = None
|
807
807
|
marketType, params = self.handle_market_type_and_params('fetchBalance', None, params)
|
808
808
|
marginMode, params = self.handle_margin_mode_and_params('fetchBalance', params)
|
809
|
-
isMargin = self.
|
809
|
+
isMargin = self.safe_bool(params, 'margin', False)
|
810
810
|
isCross = marginMode == 'cross'
|
811
811
|
marketType = 'margin' if (isMargin or isCross) else marketType
|
812
812
|
params = self.omit(params, 'margin')
|
@@ -1142,7 +1142,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1142
1142
|
timestamp = self.safe_integer(trade, 'ts')
|
1143
1143
|
priceString = self.safe_string_2(trade, 'price', 'p')
|
1144
1144
|
amountString = self.safe_string(trade, 'q')
|
1145
|
-
buyerIsMaker = self.
|
1145
|
+
buyerIsMaker = self.safe_bool(trade, 'bm', False)
|
1146
1146
|
side = 'sell' if buyerIsMaker else 'buy'
|
1147
1147
|
market = self.safe_market(None, market)
|
1148
1148
|
return self.safe_trade({
|
@@ -1468,7 +1468,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1468
1468
|
isLimitOrder = ((type == 'limit') or (type == 'stop_limit'))
|
1469
1469
|
timeInForce = self.safe_string(params, 'timeInForce')
|
1470
1470
|
postOnly = self.is_post_only(isMarketOrder, False, params)
|
1471
|
-
reduceOnly = self.
|
1471
|
+
reduceOnly = self.safe_bool(params, 'reduceOnly', False)
|
1472
1472
|
stopPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
|
1473
1473
|
if isLimitOrder:
|
1474
1474
|
request['orderPrice'] = self.price_to_precision(symbol, price)
|
@@ -2992,7 +2992,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2992
2992
|
# {"code": "0"}
|
2993
2993
|
#
|
2994
2994
|
transferOptions = self.safe_value(self.options, 'transfer', {})
|
2995
|
-
fillResponseFromRequest = self.
|
2995
|
+
fillResponseFromRequest = self.safe_bool(transferOptions, 'fillResponseFromRequest', True)
|
2996
2996
|
transfer = self.parse_transfer(response, currency)
|
2997
2997
|
if fillResponseFromRequest:
|
2998
2998
|
transfer['fromAccount'] = fromAccount
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# -----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
__version__ = '4.2.
|
5
|
+
__version__ = '4.2.31'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -690,10 +690,10 @@ class Exchange(BaseExchange):
|
|
690
690
|
async def fetch_web_endpoint(self, method, endpointMethod, returnAsJson, startRegex=None, endRegex=None):
|
691
691
|
errorMessage = ''
|
692
692
|
options = self.safe_value(self.options, method, {})
|
693
|
-
muteOnFailure = self.
|
693
|
+
muteOnFailure = self.safe_bool(options, 'webApiMuteFailure', True)
|
694
694
|
try:
|
695
695
|
# if it was not explicitly disabled, then don't fetch
|
696
|
-
if self.
|
696
|
+
if self.safe_bool(options, 'webApiEnable', True) is not True:
|
697
697
|
return None
|
698
698
|
maxRetries = self.safe_value(options, 'webApiRetries', 10)
|
699
699
|
response = None
|
ccxt/async_support/bigone.py
CHANGED
@@ -1407,7 +1407,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1407
1407
|
requestSide = 'BID' if isBuy else 'ASK'
|
1408
1408
|
uppercaseType = type.upper()
|
1409
1409
|
isLimit = uppercaseType == 'LIMIT'
|
1410
|
-
exchangeSpecificParam = self.
|
1410
|
+
exchangeSpecificParam = self.safe_bool(params, 'post_only', False)
|
1411
1411
|
postOnly = None
|
1412
1412
|
postOnly, params = self.handle_post_only((uppercaseType == 'MARKET'), exchangeSpecificParam, params)
|
1413
1413
|
triggerPrice = self.safe_string_n(params, ['triggerPrice', 'stopPrice', 'stop_price'])
|
@@ -1988,7 +1988,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1988
1988
|
#
|
1989
1989
|
transfer = self.parse_transfer(response, currency)
|
1990
1990
|
transferOptions = self.safe_value(self.options, 'transfer', {})
|
1991
|
-
fillResponseFromRequest = self.
|
1991
|
+
fillResponseFromRequest = self.safe_bool(transferOptions, 'fillResponseFromRequest', True)
|
1992
1992
|
if fillResponseFromRequest:
|
1993
1993
|
transfer['fromAccount'] = fromAccount
|
1994
1994
|
transfer['toAccount'] = toAccount
|