ccxt 4.1.95__py2.py3-none-any.whl → 4.1.97__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.
Potentially problematic release.
This version of ccxt might be problematic. Click here for more details.
- ccxt/__init__.py +2 -1
- ccxt/abstract/bingx.py +2 -0
- ccxt/abstract/kucoin.py +12 -0
- ccxt/abstract/kucoinfutures.py +12 -1
- ccxt/ace.py +1 -1
- ccxt/ascendex.py +1 -1
- ccxt/async_support/__init__.py +2 -1
- ccxt/async_support/ace.py +1 -1
- ccxt/async_support/ascendex.py +1 -1
- ccxt/async_support/base/exchange.py +29 -23
- ccxt/async_support/bigone.py +2 -2
- ccxt/async_support/binance.py +116 -114
- ccxt/async_support/bingx.py +46 -7
- ccxt/async_support/bit2c.py +2 -3
- ccxt/async_support/bitfinex.py +1 -1
- ccxt/async_support/bitfinex2.py +3 -4
- ccxt/async_support/bitflyer.py +2 -2
- ccxt/async_support/bitmart.py +2 -2
- ccxt/async_support/bitmex.py +2 -2
- ccxt/async_support/bitopro.py +1 -1
- ccxt/async_support/bitpanda.py +1 -1
- ccxt/async_support/bitvavo.py +1 -1
- ccxt/async_support/blockchaincom.py +1 -1
- ccxt/async_support/btcalpha.py +2 -2
- ccxt/async_support/btcbox.py +3 -4
- ccxt/async_support/btcmarkets.py +2 -2
- ccxt/async_support/btcturk.py +1 -1
- ccxt/async_support/bybit.py +2 -2
- ccxt/async_support/cex.py +1 -1
- ccxt/async_support/coinbase.py +11 -5
- ccxt/async_support/coinbasepro.py +2 -2
- ccxt/async_support/coinex.py +1 -1
- ccxt/async_support/coinlist.py +1 -1
- ccxt/async_support/cryptocom.py +2 -1
- ccxt/async_support/delta.py +24 -1
- ccxt/async_support/deribit.py +1 -1
- ccxt/async_support/digifinex.py +1 -1
- ccxt/async_support/gate.py +2 -2
- ccxt/async_support/hitbtc.py +1 -1
- ccxt/async_support/hollaex.py +2 -2
- ccxt/async_support/htx.py +1 -1
- ccxt/async_support/huobijp.py +2 -2
- ccxt/async_support/idex.py +1 -1
- ccxt/async_support/independentreserve.py +1 -1
- ccxt/async_support/kraken.py +45 -41
- ccxt/async_support/krakenfutures.py +46 -23
- ccxt/async_support/kucoin.py +68 -5
- ccxt/async_support/kucoinfutures.py +2 -2
- ccxt/async_support/kuna.py +1 -1
- ccxt/async_support/latoken.py +1 -1
- ccxt/async_support/luno.py +2 -2
- ccxt/async_support/lykke.py +1 -1
- ccxt/async_support/mexc.py +2 -2
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/novadax.py +2 -2
- ccxt/async_support/oceanex.py +1 -1
- ccxt/async_support/okcoin.py +1 -1
- ccxt/async_support/okx.py +1 -1
- ccxt/async_support/poloniexfutures.py +1 -1
- ccxt/async_support/probit.py +1 -1
- ccxt/async_support/timex.py +1 -1
- ccxt/async_support/tokocrypto.py +1 -1
- ccxt/async_support/upbit.py +1 -1
- ccxt/async_support/wavesexchange.py +1 -1
- ccxt/async_support/whitebit.py +1 -1
- ccxt/async_support/woo.py +1 -1
- ccxt/async_support/zaif.py +1 -1
- ccxt/base/errors.py +6 -0
- ccxt/base/exchange.py +10 -7
- ccxt/bigone.py +2 -2
- ccxt/binance.py +116 -114
- ccxt/bingx.py +46 -7
- ccxt/bit2c.py +2 -3
- ccxt/bitfinex.py +1 -1
- ccxt/bitfinex2.py +3 -4
- ccxt/bitflyer.py +2 -2
- ccxt/bitmart.py +2 -2
- ccxt/bitmex.py +2 -2
- ccxt/bitopro.py +1 -1
- ccxt/bitpanda.py +1 -1
- ccxt/bitvavo.py +1 -1
- ccxt/blockchaincom.py +1 -1
- ccxt/btcalpha.py +2 -2
- ccxt/btcbox.py +3 -4
- ccxt/btcmarkets.py +2 -2
- ccxt/btcturk.py +1 -1
- ccxt/bybit.py +2 -2
- ccxt/cex.py +1 -1
- ccxt/coinbase.py +11 -5
- ccxt/coinbasepro.py +2 -2
- ccxt/coinex.py +1 -1
- ccxt/coinlist.py +1 -1
- ccxt/cryptocom.py +2 -1
- ccxt/delta.py +24 -1
- ccxt/deribit.py +1 -1
- ccxt/digifinex.py +1 -1
- ccxt/gate.py +2 -2
- ccxt/hitbtc.py +1 -1
- ccxt/hollaex.py +2 -2
- ccxt/htx.py +1 -1
- ccxt/huobijp.py +2 -2
- ccxt/idex.py +1 -1
- ccxt/independentreserve.py +1 -1
- ccxt/kraken.py +45 -41
- ccxt/krakenfutures.py +46 -23
- ccxt/kucoin.py +68 -5
- ccxt/kucoinfutures.py +2 -2
- ccxt/kuna.py +1 -1
- ccxt/latoken.py +1 -1
- ccxt/luno.py +2 -2
- ccxt/lykke.py +1 -1
- ccxt/mexc.py +2 -2
- ccxt/ndax.py +1 -1
- ccxt/novadax.py +2 -2
- ccxt/oceanex.py +1 -1
- ccxt/okcoin.py +1 -1
- ccxt/okx.py +1 -1
- ccxt/poloniexfutures.py +1 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +1 -1
- ccxt/pro/ascendex.py +1 -1
- ccxt/pro/binance.py +5 -6
- ccxt/pro/bingx.py +6 -3
- ccxt/pro/bitfinex.py +3 -4
- ccxt/pro/bitfinex2.py +1 -1
- ccxt/pro/bitmex.py +1 -1
- ccxt/pro/bitpanda.py +1 -1
- ccxt/pro/blockchaincom.py +1 -1
- ccxt/pro/bybit.py +2 -2
- ccxt/pro/cex.py +1 -1
- ccxt/pro/coinbase.py +1 -1
- ccxt/pro/coinbasepro.py +1 -1
- ccxt/pro/cryptocom.py +1 -1
- ccxt/pro/deribit.py +1 -1
- ccxt/pro/gate.py +3 -3
- ccxt/pro/gemini.py +1 -1
- ccxt/pro/hitbtc.py +1 -1
- ccxt/pro/hollaex.py +1 -1
- ccxt/pro/htx.py +1 -1
- ccxt/pro/idex.py +1 -1
- ccxt/pro/kraken.py +3 -4
- ccxt/pro/krakenfutures.py +1 -1
- ccxt/pro/kucoinfutures.py +1 -1
- ccxt/pro/mexc.py +1 -1
- ccxt/pro/okcoin.py +1 -1
- ccxt/pro/okx.py +4 -4
- ccxt/pro/phemex.py +1 -1
- ccxt/pro/poloniexfutures.py +1 -1
- ccxt/pro/woo.py +2 -3
- ccxt/probit.py +1 -1
- ccxt/test/test_async.py +3 -1
- ccxt/test/test_sync.py +3 -1
- ccxt/timex.py +1 -1
- ccxt/tokocrypto.py +1 -1
- ccxt/upbit.py +1 -1
- ccxt/wavesexchange.py +1 -1
- ccxt/whitebit.py +1 -1
- ccxt/woo.py +1 -1
- ccxt/zaif.py +1 -1
- {ccxt-4.1.95.dist-info → ccxt-4.1.97.dist-info}/METADATA +4 -4
- {ccxt-4.1.95.dist-info → ccxt-4.1.97.dist-info}/RECORD +163 -163
- {ccxt-4.1.95.dist-info → ccxt-4.1.97.dist-info}/WHEEL +0 -0
- {ccxt-4.1.95.dist-info → ccxt-4.1.97.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
# ----------------------------------------------------------------------------
|
24
24
|
|
25
|
-
__version__ = '4.1.
|
25
|
+
__version__ = '4.1.97'
|
26
26
|
|
27
27
|
# ----------------------------------------------------------------------------
|
28
28
|
|
@@ -67,6 +67,7 @@ from ccxt.base.errors import OrderNotFillable # noqa: F4
|
|
67
67
|
from ccxt.base.errors import DuplicateOrderId # noqa: F401
|
68
68
|
from ccxt.base.errors import ContractUnavailable # noqa: F401
|
69
69
|
from ccxt.base.errors import NotSupported # noqa: F401
|
70
|
+
from ccxt.base.errors import ProxyError # noqa: F401
|
70
71
|
from ccxt.base.errors import OperationFailed # noqa: F401
|
71
72
|
from ccxt.base.errors import NetworkError # noqa: F401
|
72
73
|
from ccxt.base.errors import DDoSProtection # noqa: F401
|
ccxt/abstract/bingx.py
CHANGED
@@ -20,6 +20,8 @@ class ImplicitAPI:
|
|
20
20
|
spot_v3_private_get_capital_deposit_hisrec = spotV3PrivateGetCapitalDepositHisrec = Entry('capital/deposit/hisrec', ['spot', 'v3', 'private'], 'GET', {'cost': 3})
|
21
21
|
spot_v3_private_get_capital_withdraw_history = spotV3PrivateGetCapitalWithdrawHistory = Entry('capital/withdraw/history', ['spot', 'v3', 'private'], 'GET', {'cost': 3})
|
22
22
|
spot_v3_private_post_post_asset_transfer = spotV3PrivatePostPostAssetTransfer = Entry('post/asset/transfer', ['spot', 'v3', 'private'], 'POST', {'cost': 3})
|
23
|
+
swap_v1_private_get_positionside_dual = swapV1PrivateGetPositionSideDual = Entry('positionSide/dual', ['swap', 'v1', 'private'], 'GET', {'cost': 1})
|
24
|
+
swap_v1_private_post_positionside_dual = swapV1PrivatePostPositionSideDual = Entry('positionSide/dual', ['swap', 'v1', 'private'], 'POST', {'cost': 1})
|
23
25
|
swap_v2_public_get_server_time = swapV2PublicGetServerTime = Entry('server/time', ['swap', 'v2', 'public'], 'GET', {'cost': 3})
|
24
26
|
swap_v2_public_get_quote_contracts = swapV2PublicGetQuoteContracts = Entry('quote/contracts', ['swap', 'v2', 'public'], 'GET', {'cost': 1})
|
25
27
|
swap_v2_public_get_quote_price = swapV2PublicGetQuotePrice = Entry('quote/price', ['swap', 'v2', 'public'], 'GET', {'cost': 1})
|
ccxt/abstract/kucoin.py
CHANGED
@@ -63,12 +63,17 @@ class ImplicitAPI:
|
|
63
63
|
private_get_stop_order = privateGetStopOrder = Entry('stop-order', 'private', 'GET', {'cost': 8})
|
64
64
|
private_get_stop_order_orderid = privateGetStopOrderOrderId = Entry('stop-order/{orderId}', 'private', 'GET', {'cost': 3})
|
65
65
|
private_get_stop_order_queryorderbyclientoid = privateGetStopOrderQueryOrderByClientOid = Entry('stop-order/queryOrderByClientOid', 'private', 'GET', {'cost': 3})
|
66
|
+
private_get_oco_order_orderid = privateGetOcoOrderOrderId = Entry('oco/order/{orderId}', 'private', 'GET', {'cost': 2})
|
67
|
+
private_get_oco_order_details_orderid = privateGetOcoOrderDetailsOrderId = Entry('oco/order/details/{orderId}', 'private', 'GET', {'cost': 2})
|
68
|
+
private_get_oco_client_order_clientoid = privateGetOcoClientOrderClientOid = Entry('oco/client-order/{clientOid}', 'private', 'GET', {'cost': 2})
|
69
|
+
private_get_oco_orders = privateGetOcoOrders = Entry('oco/orders', 'private', 'GET', {'cost': 2})
|
66
70
|
private_get_hf_margin_orders_active = privateGetHfMarginOrdersActive = Entry('hf/margin/orders/active', 'private', 'GET', {'cost': 4})
|
67
71
|
private_get_hf_margin_orders_done = privateGetHfMarginOrdersDone = Entry('hf/margin/orders/done', 'private', 'GET', {'cost': 10})
|
68
72
|
private_get_hf_margin_orders_orderid = privateGetHfMarginOrdersOrderId = Entry('hf/margin/orders/{orderId}', 'private', 'GET', {'cost': 4})
|
69
73
|
private_get_hf_margin_orders_client_order_clientoid = privateGetHfMarginOrdersClientOrderClientOid = Entry('hf/margin/orders/client-order/{clientOid}', 'private', 'GET', {'cost': 5})
|
70
74
|
private_get_hf_margin_fills = privateGetHfMarginFills = Entry('hf/margin/fills', 'private', 'GET', {'cost': 5})
|
71
75
|
private_get_etf_info = privateGetEtfInfo = Entry('etf/info', 'private', 'GET', {'cost': 25})
|
76
|
+
private_get_margin_currencies = privateGetMarginCurrencies = Entry('margin/currencies', 'private', 'GET', {'cost': 20})
|
72
77
|
private_get_risk_limit_strategy = privateGetRiskLimitStrategy = Entry('risk/limit/strategy', 'private', 'GET', {'cost': 20})
|
73
78
|
private_get_isolated_symbols = privateGetIsolatedSymbols = Entry('isolated/symbols', 'private', 'GET', {'cost': 20})
|
74
79
|
private_get_isolated_account_symbol = privateGetIsolatedAccountSymbol = Entry('isolated/account/{symbol}', 'private', 'GET', {'cost': 50})
|
@@ -99,6 +104,7 @@ class ImplicitAPI:
|
|
99
104
|
private_post_orders_test = privatePostOrdersTest = Entry('orders/test', 'private', 'POST', {'cost': 2})
|
100
105
|
private_post_orders_multi = privatePostOrdersMulti = Entry('orders/multi', 'private', 'POST', {'cost': 3})
|
101
106
|
private_post_stop_order = privatePostStopOrder = Entry('stop-order', 'private', 'POST', {'cost': 2})
|
107
|
+
private_post_oco_order = privatePostOcoOrder = Entry('oco/order', 'private', 'POST', {'cost': 2})
|
102
108
|
private_post_hf_margin_order = privatePostHfMarginOrder = Entry('hf/margin/order', 'private', 'POST', {'cost': 5})
|
103
109
|
private_post_hf_margin_order_test = privatePostHfMarginOrderTest = Entry('hf/margin/order/test', 'private', 'POST', {'cost': 5})
|
104
110
|
private_post_margin_order = privatePostMarginOrder = Entry('margin/order', 'private', 'POST', {'cost': 5})
|
@@ -117,12 +123,16 @@ class ImplicitAPI:
|
|
117
123
|
private_delete_hf_orders_sync_client_order_clientoid = privateDeleteHfOrdersSyncClientOrderClientOid = Entry('hf/orders/sync/client-order/{clientOid}', 'private', 'DELETE', {'cost': 1})
|
118
124
|
private_delete_hf_orders_cancel_orderid = privateDeleteHfOrdersCancelOrderId = Entry('hf/orders/cancel/{orderId}', 'private', 'DELETE', {'cost': 2})
|
119
125
|
private_delete_hf_orders = privateDeleteHfOrders = Entry('hf/orders', 'private', 'DELETE', {'cost': 2})
|
126
|
+
private_delete_hf_orders_cancelall = privateDeleteHfOrdersCancelAll = Entry('hf/orders/cancelAll', 'private', 'DELETE', {'cost': 30})
|
120
127
|
private_delete_orders_orderid = privateDeleteOrdersOrderId = Entry('orders/{orderId}', 'private', 'DELETE', {'cost': 3})
|
121
128
|
private_delete_order_client_order_clientoid = privateDeleteOrderClientOrderClientOid = Entry('order/client-order/{clientOid}', 'private', 'DELETE', {'cost': 5})
|
122
129
|
private_delete_orders = privateDeleteOrders = Entry('orders', 'private', 'DELETE', {'cost': 20})
|
123
130
|
private_delete_stop_order_orderid = privateDeleteStopOrderOrderId = Entry('stop-order/{orderId}', 'private', 'DELETE', {'cost': 3})
|
124
131
|
private_delete_stop_order_cancelorderbyclientoid = privateDeleteStopOrderCancelOrderByClientOid = Entry('stop-order/cancelOrderByClientOid', 'private', 'DELETE', {'cost': 5})
|
125
132
|
private_delete_stop_order_cancel = privateDeleteStopOrderCancel = Entry('stop-order/cancel', 'private', 'DELETE', {'cost': 3})
|
133
|
+
private_delete_oco_order_orderid = privateDeleteOcoOrderOrderId = Entry('oco/order/{orderId}', 'private', 'DELETE', {'cost': 3})
|
134
|
+
private_delete_oco_client_order_clientoid = privateDeleteOcoClientOrderClientOid = Entry('oco/client-order/{clientOid}', 'private', 'DELETE', {'cost': 3})
|
135
|
+
private_delete_oco_orders = privateDeleteOcoOrders = Entry('oco/orders', 'private', 'DELETE', {'cost': 3})
|
126
136
|
private_delete_hf_margin_orders_orderid = privateDeleteHfMarginOrdersOrderId = Entry('hf/margin/orders/{orderId}', 'private', 'DELETE', {'cost': 5})
|
127
137
|
private_delete_hf_margin_orders_client_order_clientoid = privateDeleteHfMarginOrdersClientOrderClientOid = Entry('hf/margin/orders/client-order/{clientOid}', 'private', 'DELETE', {'cost': 5})
|
128
138
|
private_delete_hf_margin_orders = privateDeleteHfMarginOrders = Entry('hf/margin/orders', 'private', 'DELETE', {'cost': 10})
|
@@ -138,6 +148,7 @@ class ImplicitAPI:
|
|
138
148
|
futurespublic_get_index_query = futuresPublicGetIndexQuery = Entry('index/query', 'futuresPublic', 'GET', {'cost': 3})
|
139
149
|
futurespublic_get_mark_price_symbol_current = futuresPublicGetMarkPriceSymbolCurrent = Entry('mark-price/{symbol}/current', 'futuresPublic', 'GET', {'cost': 4.5})
|
140
150
|
futurespublic_get_premium_query = futuresPublicGetPremiumQuery = Entry('premium/query', 'futuresPublic', 'GET', {'cost': 4.5})
|
151
|
+
futurespublic_get_trade_statistics = futuresPublicGetTradeStatistics = Entry('trade-statistics', 'futuresPublic', 'GET', {'cost': 4.5})
|
141
152
|
futurespublic_get_funding_rate_symbol_current = futuresPublicGetFundingRateSymbolCurrent = Entry('funding-rate/{symbol}/current', 'futuresPublic', 'GET', {'cost': 3})
|
142
153
|
futurespublic_get_timestamp = futuresPublicGetTimestamp = Entry('timestamp', 'futuresPublic', 'GET', {'cost': 3})
|
143
154
|
futurespublic_get_status = futuresPublicGetStatus = Entry('status', 'futuresPublic', 'GET', {'cost': 6})
|
@@ -168,6 +179,7 @@ class ImplicitAPI:
|
|
168
179
|
futuresprivate_post_position_risk_limit_level_change = futuresPrivatePostPositionRiskLimitLevelChange = Entry('position/risk-limit-level/change', 'futuresPrivate', 'POST', {'cost': 6})
|
169
180
|
futuresprivate_post_bullet_private = futuresPrivatePostBulletPrivate = Entry('bullet-private', 'futuresPrivate', 'POST', {'cost': 15})
|
170
181
|
futuresprivate_delete_orders_orderid = futuresPrivateDeleteOrdersOrderId = Entry('orders/{orderId}', 'futuresPrivate', 'DELETE', {'cost': 1.5})
|
182
|
+
futuresprivate_delete_orders_client_order_clientoid = futuresPrivateDeleteOrdersClientOrderClientOid = Entry('orders/client-order/{clientOid}', 'futuresPrivate', 'DELETE', {'cost': 1.5})
|
171
183
|
futuresprivate_delete_orders = futuresPrivateDeleteOrders = Entry('orders', 'futuresPrivate', 'DELETE', {'cost': 45})
|
172
184
|
futuresprivate_delete_stoporders = futuresPrivateDeleteStopOrders = Entry('stopOrders', 'futuresPrivate', 'DELETE', {'cost': 22.5})
|
173
185
|
webexchange_get_currency_currency_chain_info = webExchangeGetCurrencyCurrencyChainInfo = Entry('currency/currency/chain-info', 'webExchange', 'GET', {'cost': 1})
|
ccxt/abstract/kucoinfutures.py
CHANGED
@@ -63,12 +63,17 @@ class ImplicitAPI:
|
|
63
63
|
private_get_stop_order = privateGetStopOrder = Entry('stop-order', 'private', 'GET', {'cost': 8})
|
64
64
|
private_get_stop_order_orderid = privateGetStopOrderOrderId = Entry('stop-order/{orderId}', 'private', 'GET', {'cost': 3})
|
65
65
|
private_get_stop_order_queryorderbyclientoid = privateGetStopOrderQueryOrderByClientOid = Entry('stop-order/queryOrderByClientOid', 'private', 'GET', {'cost': 3})
|
66
|
+
private_get_oco_order_orderid = privateGetOcoOrderOrderId = Entry('oco/order/{orderId}', 'private', 'GET', {'cost': 2})
|
67
|
+
private_get_oco_order_details_orderid = privateGetOcoOrderDetailsOrderId = Entry('oco/order/details/{orderId}', 'private', 'GET', {'cost': 2})
|
68
|
+
private_get_oco_client_order_clientoid = privateGetOcoClientOrderClientOid = Entry('oco/client-order/{clientOid}', 'private', 'GET', {'cost': 2})
|
69
|
+
private_get_oco_orders = privateGetOcoOrders = Entry('oco/orders', 'private', 'GET', {'cost': 2})
|
66
70
|
private_get_hf_margin_orders_active = privateGetHfMarginOrdersActive = Entry('hf/margin/orders/active', 'private', 'GET', {'cost': 4})
|
67
71
|
private_get_hf_margin_orders_done = privateGetHfMarginOrdersDone = Entry('hf/margin/orders/done', 'private', 'GET', {'cost': 10})
|
68
72
|
private_get_hf_margin_orders_orderid = privateGetHfMarginOrdersOrderId = Entry('hf/margin/orders/{orderId}', 'private', 'GET', {'cost': 4})
|
69
73
|
private_get_hf_margin_orders_client_order_clientoid = privateGetHfMarginOrdersClientOrderClientOid = Entry('hf/margin/orders/client-order/{clientOid}', 'private', 'GET', {'cost': 5})
|
70
74
|
private_get_hf_margin_fills = privateGetHfMarginFills = Entry('hf/margin/fills', 'private', 'GET', {'cost': 5})
|
71
75
|
private_get_etf_info = privateGetEtfInfo = Entry('etf/info', 'private', 'GET', {'cost': 25})
|
76
|
+
private_get_margin_currencies = privateGetMarginCurrencies = Entry('margin/currencies', 'private', 'GET', {'cost': 20})
|
72
77
|
private_get_risk_limit_strategy = privateGetRiskLimitStrategy = Entry('risk/limit/strategy', 'private', 'GET', {'cost': 20})
|
73
78
|
private_get_isolated_symbols = privateGetIsolatedSymbols = Entry('isolated/symbols', 'private', 'GET', {'cost': 20})
|
74
79
|
private_get_isolated_account_symbol = privateGetIsolatedAccountSymbol = Entry('isolated/account/{symbol}', 'private', 'GET', {'cost': 50})
|
@@ -99,6 +104,7 @@ class ImplicitAPI:
|
|
99
104
|
private_post_orders_test = privatePostOrdersTest = Entry('orders/test', 'private', 'POST', {'cost': 2})
|
100
105
|
private_post_orders_multi = privatePostOrdersMulti = Entry('orders/multi', 'private', 'POST', {'cost': 3})
|
101
106
|
private_post_stop_order = privatePostStopOrder = Entry('stop-order', 'private', 'POST', {'cost': 2})
|
107
|
+
private_post_oco_order = privatePostOcoOrder = Entry('oco/order', 'private', 'POST', {'cost': 2})
|
102
108
|
private_post_hf_margin_order = privatePostHfMarginOrder = Entry('hf/margin/order', 'private', 'POST', {'cost': 5})
|
103
109
|
private_post_hf_margin_order_test = privatePostHfMarginOrderTest = Entry('hf/margin/order/test', 'private', 'POST', {'cost': 5})
|
104
110
|
private_post_margin_order = privatePostMarginOrder = Entry('margin/order', 'private', 'POST', {'cost': 5})
|
@@ -117,12 +123,16 @@ class ImplicitAPI:
|
|
117
123
|
private_delete_hf_orders_sync_client_order_clientoid = privateDeleteHfOrdersSyncClientOrderClientOid = Entry('hf/orders/sync/client-order/{clientOid}', 'private', 'DELETE', {'cost': 1})
|
118
124
|
private_delete_hf_orders_cancel_orderid = privateDeleteHfOrdersCancelOrderId = Entry('hf/orders/cancel/{orderId}', 'private', 'DELETE', {'cost': 2})
|
119
125
|
private_delete_hf_orders = privateDeleteHfOrders = Entry('hf/orders', 'private', 'DELETE', {'cost': 2})
|
126
|
+
private_delete_hf_orders_cancelall = privateDeleteHfOrdersCancelAll = Entry('hf/orders/cancelAll', 'private', 'DELETE', {'cost': 30})
|
120
127
|
private_delete_orders_orderid = privateDeleteOrdersOrderId = Entry('orders/{orderId}', 'private', 'DELETE', {'cost': 3})
|
121
128
|
private_delete_order_client_order_clientoid = privateDeleteOrderClientOrderClientOid = Entry('order/client-order/{clientOid}', 'private', 'DELETE', {'cost': 5})
|
122
129
|
private_delete_orders = privateDeleteOrders = Entry('orders', 'private', 'DELETE', {'cost': 20})
|
123
130
|
private_delete_stop_order_orderid = privateDeleteStopOrderOrderId = Entry('stop-order/{orderId}', 'private', 'DELETE', {'cost': 3})
|
124
131
|
private_delete_stop_order_cancelorderbyclientoid = privateDeleteStopOrderCancelOrderByClientOid = Entry('stop-order/cancelOrderByClientOid', 'private', 'DELETE', {'cost': 5})
|
125
132
|
private_delete_stop_order_cancel = privateDeleteStopOrderCancel = Entry('stop-order/cancel', 'private', 'DELETE', {'cost': 3})
|
133
|
+
private_delete_oco_order_orderid = privateDeleteOcoOrderOrderId = Entry('oco/order/{orderId}', 'private', 'DELETE', {'cost': 3})
|
134
|
+
private_delete_oco_client_order_clientoid = privateDeleteOcoClientOrderClientOid = Entry('oco/client-order/{clientOid}', 'private', 'DELETE', {'cost': 3})
|
135
|
+
private_delete_oco_orders = privateDeleteOcoOrders = Entry('oco/orders', 'private', 'DELETE', {'cost': 3})
|
126
136
|
private_delete_hf_margin_orders_orderid = privateDeleteHfMarginOrdersOrderId = Entry('hf/margin/orders/{orderId}', 'private', 'DELETE', {'cost': 5})
|
127
137
|
private_delete_hf_margin_orders_client_order_clientoid = privateDeleteHfMarginOrdersClientOrderClientOid = Entry('hf/margin/orders/client-order/{clientOid}', 'private', 'DELETE', {'cost': 5})
|
128
138
|
private_delete_hf_margin_orders = privateDeleteHfMarginOrders = Entry('hf/margin/orders', 'private', 'DELETE', {'cost': 10})
|
@@ -138,6 +148,7 @@ class ImplicitAPI:
|
|
138
148
|
futurespublic_get_index_query = futuresPublicGetIndexQuery = Entry('index/query', 'futuresPublic', 'GET', {'cost': 1})
|
139
149
|
futurespublic_get_mark_price_symbol_current = futuresPublicGetMarkPriceSymbolCurrent = Entry('mark-price/{symbol}/current', 'futuresPublic', 'GET', {'cost': 1})
|
140
150
|
futurespublic_get_premium_query = futuresPublicGetPremiumQuery = Entry('premium/query', 'futuresPublic', 'GET', {'cost': 1})
|
151
|
+
futurespublic_get_trade_statistics = futuresPublicGetTradeStatistics = Entry('trade-statistics', 'futuresPublic', 'GET', {'cost': 4.5})
|
141
152
|
futurespublic_get_funding_rate_symbol_current = futuresPublicGetFundingRateSymbolCurrent = Entry('funding-rate/{symbol}/current', 'futuresPublic', 'GET', {'cost': 1})
|
142
153
|
futurespublic_get_timestamp = futuresPublicGetTimestamp = Entry('timestamp', 'futuresPublic', 'GET', {'cost': 1})
|
143
154
|
futurespublic_get_status = futuresPublicGetStatus = Entry('status', 'futuresPublic', 'GET', {'cost': 1})
|
@@ -181,11 +192,11 @@ class ImplicitAPI:
|
|
181
192
|
futuresprivate_post_sub_api_key = futuresPrivatePostSubApiKey = Entry('sub/api-key', 'futuresPrivate', 'POST', {'cost': 1})
|
182
193
|
futuresprivate_post_sub_api_key_update = futuresPrivatePostSubApiKeyUpdate = Entry('sub/api-key/update', 'futuresPrivate', 'POST', {'cost': 1})
|
183
194
|
futuresprivate_delete_orders_orderid = futuresPrivateDeleteOrdersOrderId = Entry('orders/{orderId}', 'futuresPrivate', 'DELETE', {'cost': 1})
|
195
|
+
futuresprivate_delete_orders_client_order_clientoid = futuresPrivateDeleteOrdersClientOrderClientOid = Entry('orders/client-order/{clientOid}', 'futuresPrivate', 'DELETE', {'cost': 1})
|
184
196
|
futuresprivate_delete_orders = futuresPrivateDeleteOrders = Entry('orders', 'futuresPrivate', 'DELETE', {'cost': 4.44})
|
185
197
|
futuresprivate_delete_stoporders = futuresPrivateDeleteStopOrders = Entry('stopOrders', 'futuresPrivate', 'DELETE', {'cost': 1})
|
186
198
|
futuresprivate_delete_withdrawals_withdrawalid = futuresPrivateDeleteWithdrawalsWithdrawalId = Entry('withdrawals/{withdrawalId}', 'futuresPrivate', 'DELETE', {'cost': 1})
|
187
199
|
futuresprivate_delete_cancel_transfer_out = futuresPrivateDeleteCancelTransferOut = Entry('cancel/transfer-out', 'futuresPrivate', 'DELETE', {'cost': 1})
|
188
200
|
futuresprivate_delete_sub_api_key = futuresPrivateDeleteSubApiKey = Entry('sub/api-key', 'futuresPrivate', 'DELETE', {'cost': 1})
|
189
|
-
futuresprivate_delete_orders_client_order_clientoid = futuresPrivateDeleteOrdersClientOrderClientOid = Entry('orders/client-order/{clientOid}', 'futuresPrivate', 'DELETE', {'cost': 1})
|
190
201
|
webexchange_get_currency_currency_chain_info = webExchangeGetCurrencyCurrencyChainInfo = Entry('currency/currency/chain-info', 'webExchange', 'GET', {'cost': 1})
|
191
202
|
webexchange_get_contract_symbol_funding_rates = webExchangeGetContractSymbolFundingRates = Entry('contract/{symbol}/funding-rates', 'webExchange', 'GET', {'cost': 1})
|
ccxt/ace.py
CHANGED
@@ -673,7 +673,7 @@ class ace(Exchange, ImplicitAPI):
|
|
673
673
|
:see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-list
|
674
674
|
:param str symbol: unified market symbol of the market orders were made in
|
675
675
|
:param int [since]: the earliest time in ms to fetch orders for
|
676
|
-
:param int [limit]: the maximum number of
|
676
|
+
:param int [limit]: the maximum number of order structures to retrieve
|
677
677
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
678
678
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
679
679
|
"""
|
ccxt/ascendex.py
CHANGED
@@ -1894,7 +1894,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1894
1894
|
:see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#list-current-history-orders
|
1895
1895
|
:param str symbol: unified market symbol of the market orders were made in
|
1896
1896
|
:param int [since]: the earliest time in ms to fetch orders for
|
1897
|
-
:param int [limit]: the maximum number of
|
1897
|
+
:param int [limit]: the maximum number of order structures to retrieve
|
1898
1898
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1899
1899
|
:param int [params.until]: the latest time in ms to fetch orders for
|
1900
1900
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.1.
|
7
|
+
__version__ = '4.1.97'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -46,6 +46,7 @@ from ccxt.base.errors import OrderNotFillable # noqa: F4
|
|
46
46
|
from ccxt.base.errors import DuplicateOrderId # noqa: F401
|
47
47
|
from ccxt.base.errors import ContractUnavailable # noqa: F401
|
48
48
|
from ccxt.base.errors import NotSupported # noqa: F401
|
49
|
+
from ccxt.base.errors import ProxyError # noqa: F401
|
49
50
|
from ccxt.base.errors import OperationFailed # noqa: F401
|
50
51
|
from ccxt.base.errors import NetworkError # noqa: F401
|
51
52
|
from ccxt.base.errors import DDoSProtection # noqa: F401
|
ccxt/async_support/ace.py
CHANGED
@@ -673,7 +673,7 @@ class ace(Exchange, ImplicitAPI):
|
|
673
673
|
:see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-list
|
674
674
|
:param str symbol: unified market symbol of the market orders were made in
|
675
675
|
:param int [since]: the earliest time in ms to fetch orders for
|
676
|
-
:param int [limit]: the maximum number of
|
676
|
+
:param int [limit]: the maximum number of order structures to retrieve
|
677
677
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
678
678
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
679
679
|
"""
|
ccxt/async_support/ascendex.py
CHANGED
@@ -1894,7 +1894,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1894
1894
|
:see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#list-current-history-orders
|
1895
1895
|
:param str symbol: unified market symbol of the market orders were made in
|
1896
1896
|
:param int [since]: the earliest time in ms to fetch orders for
|
1897
|
-
:param int [limit]: the maximum number of
|
1897
|
+
:param int [limit]: the maximum number of order structures to retrieve
|
1898
1898
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1899
1899
|
:param int [params.until]: the latest time in ms to fetch orders for
|
1900
1900
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# -----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
__version__ = '4.1.
|
5
|
+
__version__ = '4.1.97'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -89,7 +89,7 @@ class Exchange(BaseExchange):
|
|
89
89
|
return self.session
|
90
90
|
|
91
91
|
def __del__(self):
|
92
|
-
if self.session is not None:
|
92
|
+
if self.session is not None or self.socks_proxy_sessions is not None:
|
93
93
|
self.logger.warning(self.id + " requires to release all resources with an explicit call to the .close() coroutine. If you are using the exchange instance with async coroutines, add `await exchange.close()` to your code into a place when you're done with the exchange and don't need the exchange instance anymore (at the end of your async coroutine).")
|
94
94
|
|
95
95
|
if sys.version_info >= (3, 5):
|
@@ -107,11 +107,14 @@ class Exchange(BaseExchange):
|
|
107
107
|
else:
|
108
108
|
self.asyncio_loop = asyncio.get_event_loop()
|
109
109
|
self.throttle.loop = self.asyncio_loop
|
110
|
-
|
110
|
+
|
111
|
+
if self.ssl_context is None:
|
111
112
|
# Create our SSL context object with our CA cert file
|
112
|
-
|
113
|
+
self.ssl_context = ssl.create_default_context(cafile=self.cafile) if self.verify else self.verify
|
114
|
+
|
115
|
+
if self.own_session and self.session is None:
|
113
116
|
# Pass this SSL context to aiohttp and create a TCPConnector
|
114
|
-
connector = aiohttp.TCPConnector(ssl=
|
117
|
+
connector = aiohttp.TCPConnector(ssl=self.ssl_context, loop=self.asyncio_loop, enable_cleanup_closed=True)
|
115
118
|
self.session = aiohttp.ClientSession(loop=self.asyncio_loop, connector=connector, trust_env=self.aiohttp_trust_env)
|
116
119
|
|
117
120
|
async def close(self):
|
@@ -120,9 +123,13 @@ class Exchange(BaseExchange):
|
|
120
123
|
if self.own_session:
|
121
124
|
await self.session.close()
|
122
125
|
self.session = None
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
+
await self.close_proxy_sessions()
|
127
|
+
|
128
|
+
async def close_proxy_sessions(self):
|
129
|
+
if self.socks_proxy_sessions is not None:
|
130
|
+
for url in self.socks_proxy_sessions:
|
131
|
+
await self.socks_proxy_sessions[url].close()
|
132
|
+
self.socks_proxy_sessions = None
|
126
133
|
|
127
134
|
async def fetch(self, url, method='GET', headers=None, body=None):
|
128
135
|
"""Perform a HTTP request and return decoded JSON data"""
|
@@ -137,7 +144,7 @@ class Exchange(BaseExchange):
|
|
137
144
|
url = proxyUrl + url
|
138
145
|
# proxy agents
|
139
146
|
final_proxy = None # set default
|
140
|
-
|
147
|
+
proxy_session = None
|
141
148
|
httpProxy, httpsProxy, socksProxy = self.check_proxy_settings(url, method, headers, body)
|
142
149
|
if httpProxy:
|
143
150
|
final_proxy = httpProxy
|
@@ -147,17 +154,20 @@ class Exchange(BaseExchange):
|
|
147
154
|
if ProxyConnector is None:
|
148
155
|
raise NotSupported(self.id + ' - to use SOCKS proxy with ccxt, you need "aiohttp_socks" module that can be installed by "pip install aiohttp_socks"')
|
149
156
|
# Create our SSL context object with our CA cert file
|
150
|
-
context = ssl.create_default_context(cafile=self.cafile) if self.verify else self.verify
|
151
157
|
self.open() # ensure `asyncio_loop` is set
|
152
158
|
connector = ProxyConnector.from_url(
|
153
159
|
socksProxy,
|
154
160
|
# extra args copied from self.open()
|
155
|
-
ssl=
|
161
|
+
ssl=self.ssl_context,
|
156
162
|
loop=self.asyncio_loop,
|
157
163
|
enable_cleanup_closed=True
|
158
164
|
)
|
159
165
|
# override session
|
160
|
-
|
166
|
+
if (self.socks_proxy_sessions is None):
|
167
|
+
self.socks_proxy_sessions = {}
|
168
|
+
if (socksProxy not in self.socks_proxy_sessions):
|
169
|
+
self.socks_proxy_sessions[socksProxy] = aiohttp.ClientSession(loop=self.asyncio_loop, connector=connector, trust_env=self.aiohttp_trust_env)
|
170
|
+
proxy_session = self.socks_proxy_sessions[socksProxy]
|
161
171
|
# add aiohttp_proxy for python as exclusion
|
162
172
|
elif self.aiohttp_proxy:
|
163
173
|
final_proxy = self.aiohttp_proxy
|
@@ -178,7 +188,7 @@ class Exchange(BaseExchange):
|
|
178
188
|
request_body = body
|
179
189
|
encoded_body = body.encode() if body else None
|
180
190
|
self.open()
|
181
|
-
final_session =
|
191
|
+
final_session = proxy_session if proxy_session is not None else self.session
|
182
192
|
session_method = getattr(final_session, method.lower())
|
183
193
|
|
184
194
|
http_response = None
|
@@ -369,22 +379,18 @@ class Exchange(BaseExchange):
|
|
369
379
|
'asyncio_loop': self.asyncio_loop,
|
370
380
|
}, ws_options)
|
371
381
|
self.clients[url] = FastClient(url, on_message, on_error, on_close, on_connected, options)
|
372
|
-
|
382
|
+
self.clients[url].proxy = self.get_ws_proxy()
|
373
383
|
return self.clients[url]
|
374
384
|
|
375
|
-
def
|
376
|
-
final_proxy = None # set default
|
385
|
+
def get_ws_proxy(self):
|
377
386
|
httpProxy, httpsProxy, socksProxy = self.check_ws_proxy_settings()
|
378
387
|
if httpProxy:
|
379
|
-
|
388
|
+
return httpProxy
|
380
389
|
elif httpsProxy:
|
381
|
-
|
390
|
+
return httpsProxy
|
382
391
|
elif socksProxy:
|
383
|
-
|
384
|
-
|
385
|
-
self.clients[url].proxy = final_proxy
|
386
|
-
else:
|
387
|
-
self.clients[url].proxy = None
|
392
|
+
return socksProxy
|
393
|
+
return None
|
388
394
|
|
389
395
|
def delay(self, timeout, method, *args):
|
390
396
|
return self.asyncio_loop.call_later(timeout / 1000, self.spawn, method, *args)
|
ccxt/async_support/bigone.py
CHANGED
@@ -1289,7 +1289,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1289
1289
|
fetches information on multiple orders made by the user
|
1290
1290
|
:param str symbol: unified market symbol of the market orders were made in
|
1291
1291
|
:param int [since]: the earliest time in ms to fetch orders for
|
1292
|
-
:param int [limit]: the maximum number of
|
1292
|
+
:param int [limit]: the maximum number of order structures to retrieve
|
1293
1293
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1294
1294
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1295
1295
|
"""
|
@@ -1414,7 +1414,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1414
1414
|
fetches information on multiple closed orders made by the user
|
1415
1415
|
:param str symbol: unified market symbol of the market orders were made in
|
1416
1416
|
:param int [since]: the earliest time in ms to fetch orders for
|
1417
|
-
:param int [limit]: the maximum number of
|
1417
|
+
:param int [limit]: the maximum number of order structures to retrieve
|
1418
1418
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1419
1419
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1420
1420
|
"""
|