ccxt 4.4.33__py2.py3-none-any.whl → 4.4.34__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 +16 -0
- ccxt/abstract/bitbank.py +5 -0
- ccxt/abstract/bitfinex2.py +1 -0
- ccxt/abstract/ellipx.py +25 -0
- ccxt/alpaca.py +2 -0
- ccxt/async_support/__init__.py +3 -1
- ccxt/async_support/alpaca.py +2 -0
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +19 -15
- ccxt/async_support/bingx.py +155 -8
- ccxt/async_support/bitbank.py +5 -0
- ccxt/async_support/bitbns.py +2 -0
- ccxt/async_support/bitfinex2.py +1 -0
- ccxt/async_support/bitget.py +174 -40
- ccxt/async_support/bitmex.py +2 -0
- ccxt/async_support/bitopro.py +3 -0
- ccxt/async_support/bitrue.py +1 -0
- ccxt/async_support/btcmarkets.py +2 -0
- ccxt/async_support/bybit.py +13 -10
- ccxt/async_support/cex.py +13 -4
- ccxt/async_support/coinbase.py +3 -2
- ccxt/async_support/coinex.py +1 -0
- ccxt/async_support/coinone.py +7 -7
- ccxt/async_support/coinsph.py +7 -7
- ccxt/async_support/coinspot.py +39 -39
- ccxt/async_support/cryptocom.py +36 -34
- ccxt/async_support/ellipx.py +1828 -0
- ccxt/async_support/gate.py +1 -0
- ccxt/async_support/hyperliquid.py +2 -0
- ccxt/async_support/krakenfutures.py +3 -1
- ccxt/async_support/okcoin.py +2 -0
- ccxt/async_support/okx.py +14 -10
- ccxt/async_support/onetrading.py +20 -1
- ccxt/async_support/paradex.py +2 -0
- ccxt/async_support/phemex.py +16 -0
- ccxt/async_support/poloniex.py +3 -1
- ccxt/async_support/poloniexfutures.py +3 -1
- ccxt/async_support/vertex.py +2 -0
- ccxt/async_support/woo.py +69 -69
- ccxt/base/exchange.py +27 -7
- ccxt/binance.py +19 -15
- ccxt/bingx.py +155 -8
- ccxt/bitbank.py +5 -0
- ccxt/bitbns.py +2 -0
- ccxt/bitfinex2.py +1 -0
- ccxt/bitget.py +174 -40
- ccxt/bitmex.py +2 -0
- ccxt/bitopro.py +3 -0
- ccxt/bitrue.py +1 -0
- ccxt/btcmarkets.py +2 -0
- ccxt/bybit.py +13 -10
- ccxt/cex.py +13 -4
- ccxt/coinbase.py +3 -2
- ccxt/coinex.py +1 -0
- ccxt/coinone.py +7 -7
- ccxt/coinsph.py +7 -7
- ccxt/coinspot.py +39 -39
- ccxt/cryptocom.py +36 -34
- ccxt/ellipx.py +1828 -0
- ccxt/gate.py +1 -0
- ccxt/hyperliquid.py +2 -0
- ccxt/krakenfutures.py +3 -1
- ccxt/okcoin.py +2 -0
- ccxt/okx.py +14 -10
- ccxt/onetrading.py +20 -1
- ccxt/paradex.py +2 -0
- ccxt/phemex.py +16 -0
- ccxt/poloniex.py +3 -1
- ccxt/poloniexfutures.py +3 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/idex.py +15 -0
- ccxt/pro/probit.py +4 -2
- ccxt/pro/woo.py +15 -15
- ccxt/test/tests_helpers.py +0 -2
- ccxt/vertex.py +2 -0
- ccxt/woo.py +69 -69
- {ccxt-4.4.33.dist-info → ccxt-4.4.34.dist-info}/METADATA +9 -8
- {ccxt-4.4.33.dist-info → ccxt-4.4.34.dist-info}/RECORD +82 -79
- {ccxt-4.4.33.dist-info → ccxt-4.4.34.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.33.dist-info → ccxt-4.4.34.dist-info}/WHEEL +0 -0
- {ccxt-4.4.33.dist-info → ccxt-4.4.34.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.34'
|
26
26
|
|
27
27
|
# ----------------------------------------------------------------------------
|
28
28
|
|
@@ -138,6 +138,7 @@ from ccxt.currencycom import currencycom # noqa: F4
|
|
138
138
|
from ccxt.delta import delta # noqa: F401
|
139
139
|
from ccxt.deribit import deribit # noqa: F401
|
140
140
|
from ccxt.digifinex import digifinex # noqa: F401
|
141
|
+
from ccxt.ellipx import ellipx # noqa: F401
|
141
142
|
from ccxt.exmo import exmo # noqa: F401
|
142
143
|
from ccxt.fmfwio import fmfwio # noqa: F401
|
143
144
|
from ccxt.gate import gate # noqa: F401
|
@@ -249,6 +250,7 @@ exchanges = [
|
|
249
250
|
'delta',
|
250
251
|
'deribit',
|
251
252
|
'digifinex',
|
253
|
+
'ellipx',
|
252
254
|
'exmo',
|
253
255
|
'fmfwio',
|
254
256
|
'gate',
|
ccxt/abstract/bingx.py
CHANGED
@@ -32,14 +32,28 @@ class ImplicitAPI:
|
|
32
32
|
spot_v3_private_post_post_asset_transfer = spotV3PrivatePostPostAssetTransfer = Entry('post/asset/transfer', ['spot', 'v3', 'private'], 'POST', {'cost': 5})
|
33
33
|
swap_v1_public_get_ticker_price = swapV1PublicGetTickerPrice = Entry('ticker/price', ['swap', 'v1', 'public'], 'GET', {'cost': 1})
|
34
34
|
swap_v1_public_get_market_historicaltrades = swapV1PublicGetMarketHistoricalTrades = Entry('market/historicalTrades', ['swap', 'v1', 'public'], 'GET', {'cost': 1})
|
35
|
+
swap_v1_public_get_market_markpriceklines = swapV1PublicGetMarketMarkPriceKlines = Entry('market/markPriceKlines', ['swap', 'v1', 'public'], 'GET', {'cost': 1})
|
36
|
+
swap_v1_public_get_trade_multiassetsrules = swapV1PublicGetTradeMultiAssetsRules = Entry('trade/multiAssetsRules', ['swap', 'v1', 'public'], 'GET', {'cost': 1})
|
35
37
|
swap_v1_private_get_positionside_dual = swapV1PrivateGetPositionSideDual = Entry('positionSide/dual', ['swap', 'v1', 'private'], 'GET', {'cost': 5})
|
36
38
|
swap_v1_private_get_market_markpriceklines = swapV1PrivateGetMarketMarkPriceKlines = Entry('market/markPriceKlines', ['swap', 'v1', 'private'], 'GET', {'cost': 1})
|
37
39
|
swap_v1_private_get_trade_batchcancelreplace = swapV1PrivateGetTradeBatchCancelReplace = Entry('trade/batchCancelReplace', ['swap', 'v1', 'private'], 'GET', {'cost': 5})
|
38
40
|
swap_v1_private_get_trade_fullorder = swapV1PrivateGetTradeFullOrder = Entry('trade/fullOrder', ['swap', 'v1', 'private'], 'GET', {'cost': 2})
|
41
|
+
swap_v1_private_get_maintmarginratio = swapV1PrivateGetMaintMarginRatio = Entry('maintMarginRatio', ['swap', 'v1', 'private'], 'GET', {'cost': 2})
|
42
|
+
swap_v1_private_get_trade_positionhistory = swapV1PrivateGetTradePositionHistory = Entry('trade/positionHistory', ['swap', 'v1', 'private'], 'GET', {'cost': 2})
|
39
43
|
swap_v1_private_get_positionmargin_history = swapV1PrivateGetPositionMarginHistory = Entry('positionMargin/history', ['swap', 'v1', 'private'], 'GET', {'cost': 2})
|
44
|
+
swap_v1_private_get_twap_openorders = swapV1PrivateGetTwapOpenOrders = Entry('twap/openOrders', ['swap', 'v1', 'private'], 'GET', {'cost': 5})
|
45
|
+
swap_v1_private_get_twap_historyorders = swapV1PrivateGetTwapHistoryOrders = Entry('twap/historyOrders', ['swap', 'v1', 'private'], 'GET', {'cost': 5})
|
46
|
+
swap_v1_private_get_twap_orderdetail = swapV1PrivateGetTwapOrderDetail = Entry('twap/orderDetail', ['swap', 'v1', 'private'], 'GET', {'cost': 5})
|
47
|
+
swap_v1_private_get_trade_assetmode = swapV1PrivateGetTradeAssetMode = Entry('trade/assetMode', ['swap', 'v1', 'private'], 'GET', {'cost': 5})
|
48
|
+
swap_v1_private_get_user_marginassets = swapV1PrivateGetUserMarginAssets = Entry('user/marginAssets', ['swap', 'v1', 'private'], 'GET', {'cost': 5})
|
40
49
|
swap_v1_private_post_trade_cancelreplace = swapV1PrivatePostTradeCancelReplace = Entry('trade/cancelReplace', ['swap', 'v1', 'private'], 'POST', {'cost': 2})
|
41
50
|
swap_v1_private_post_positionside_dual = swapV1PrivatePostPositionSideDual = Entry('positionSide/dual', ['swap', 'v1', 'private'], 'POST', {'cost': 5})
|
51
|
+
swap_v1_private_post_trade_batchcancelreplace = swapV1PrivatePostTradeBatchCancelReplace = Entry('trade/batchCancelReplace', ['swap', 'v1', 'private'], 'POST', {'cost': 5})
|
42
52
|
swap_v1_private_post_trade_closeposition = swapV1PrivatePostTradeClosePosition = Entry('trade/closePosition', ['swap', 'v1', 'private'], 'POST', {'cost': 2})
|
53
|
+
swap_v1_private_post_trade_getvst = swapV1PrivatePostTradeGetVst = Entry('trade/getVst', ['swap', 'v1', 'private'], 'POST', {'cost': 5})
|
54
|
+
swap_v1_private_post_twap_order = swapV1PrivatePostTwapOrder = Entry('twap/order', ['swap', 'v1', 'private'], 'POST', {'cost': 5})
|
55
|
+
swap_v1_private_post_twap_cancelorder = swapV1PrivatePostTwapCancelOrder = Entry('twap/cancelOrder', ['swap', 'v1', 'private'], 'POST', {'cost': 5})
|
56
|
+
swap_v1_private_post_trade_assetmode = swapV1PrivatePostTradeAssetMode = Entry('trade/assetMode', ['swap', 'v1', 'private'], 'POST', {'cost': 5})
|
43
57
|
swap_v2_public_get_server_time = swapV2PublicGetServerTime = Entry('server/time', ['swap', 'v2', 'public'], 'GET', {'cost': 1})
|
44
58
|
swap_v2_public_get_quote_contracts = swapV2PublicGetQuoteContracts = Entry('quote/contracts', ['swap', 'v2', 'public'], 'GET', {'cost': 1})
|
45
59
|
swap_v2_public_get_quote_price = swapV2PublicGetQuotePrice = Entry('quote/price', ['swap', 'v2', 'public'], 'GET', {'cost': 1})
|
@@ -62,6 +76,7 @@ class ImplicitAPI:
|
|
62
76
|
swap_v2_private_get_trade_forceorders = swapV2PrivateGetTradeForceOrders = Entry('trade/forceOrders', ['swap', 'v2', 'private'], 'GET', {'cost': 1})
|
63
77
|
swap_v2_private_get_trade_allorders = swapV2PrivateGetTradeAllOrders = Entry('trade/allOrders', ['swap', 'v2', 'private'], 'GET', {'cost': 2})
|
64
78
|
swap_v2_private_get_trade_allfillorders = swapV2PrivateGetTradeAllFillOrders = Entry('trade/allFillOrders', ['swap', 'v2', 'private'], 'GET', {'cost': 2})
|
79
|
+
swap_v2_private_get_trade_fillhistory = swapV2PrivateGetTradeFillHistory = Entry('trade/fillHistory', ['swap', 'v2', 'private'], 'GET', {'cost': 2})
|
65
80
|
swap_v2_private_get_user_income_export = swapV2PrivateGetUserIncomeExport = Entry('user/income/export', ['swap', 'v2', 'private'], 'GET', {'cost': 2})
|
66
81
|
swap_v2_private_get_user_commissionrate = swapV2PrivateGetUserCommissionRate = Entry('user/commissionRate', ['swap', 'v2', 'private'], 'GET', {'cost': 2})
|
67
82
|
swap_v2_private_get_quote_bookticker = swapV2PrivateGetQuoteBookTicker = Entry('quote/bookTicker', ['swap', 'v2', 'private'], 'GET', {'cost': 1})
|
@@ -95,6 +110,7 @@ class ImplicitAPI:
|
|
95
110
|
cswap_v1_private_get_user_balance = cswapV1PrivateGetUserBalance = Entry('user/balance', ['cswap', 'v1', 'private'], 'GET', {'cost': 2})
|
96
111
|
cswap_v1_private_post_trade_order = cswapV1PrivatePostTradeOrder = Entry('trade/order', ['cswap', 'v1', 'private'], 'POST', {'cost': 2})
|
97
112
|
cswap_v1_private_post_trade_leverage = cswapV1PrivatePostTradeLeverage = Entry('trade/leverage', ['cswap', 'v1', 'private'], 'POST', {'cost': 2})
|
113
|
+
cswap_v1_private_post_trade_allopenorders = cswapV1PrivatePostTradeAllOpenOrders = Entry('trade/allOpenOrders', ['cswap', 'v1', 'private'], 'POST', {'cost': 2})
|
98
114
|
cswap_v1_private_post_trade_closeallpositions = cswapV1PrivatePostTradeCloseAllPositions = Entry('trade/closeAllPositions', ['cswap', 'v1', 'private'], 'POST', {'cost': 2})
|
99
115
|
cswap_v1_private_post_trade_margintype = cswapV1PrivatePostTradeMarginType = Entry('trade/marginType', ['cswap', 'v1', 'private'], 'POST', {'cost': 2})
|
100
116
|
cswap_v1_private_post_trade_positionmargin = cswapV1PrivatePostTradePositionMargin = Entry('trade/positionMargin', ['cswap', 'v1', 'private'], 'POST', {'cost': 2})
|
ccxt/abstract/bitbank.py
CHANGED
@@ -13,8 +13,11 @@ class ImplicitAPI:
|
|
13
13
|
private_get_user_assets = privateGetUserAssets = Entry('user/assets', 'private', 'GET', {})
|
14
14
|
private_get_user_spot_order = privateGetUserSpotOrder = Entry('user/spot/order', 'private', 'GET', {})
|
15
15
|
private_get_user_spot_active_orders = privateGetUserSpotActiveOrders = Entry('user/spot/active_orders', 'private', 'GET', {})
|
16
|
+
private_get_user_margin_positions = privateGetUserMarginPositions = Entry('user/margin/positions', 'private', 'GET', {})
|
16
17
|
private_get_user_spot_trade_history = privateGetUserSpotTradeHistory = Entry('user/spot/trade_history', 'private', 'GET', {})
|
17
18
|
private_get_user_deposit_history = privateGetUserDepositHistory = Entry('user/deposit_history', 'private', 'GET', {})
|
19
|
+
private_get_user_unconfirmed_deposits = privateGetUserUnconfirmedDeposits = Entry('user/unconfirmed_deposits', 'private', 'GET', {})
|
20
|
+
private_get_user_deposit_originators = privateGetUserDepositOriginators = Entry('user/deposit_originators', 'private', 'GET', {})
|
18
21
|
private_get_user_withdrawal_account = privateGetUserWithdrawalAccount = Entry('user/withdrawal_account', 'private', 'GET', {})
|
19
22
|
private_get_user_withdrawal_history = privateGetUserWithdrawalHistory = Entry('user/withdrawal_history', 'private', 'GET', {})
|
20
23
|
private_get_spot_status = privateGetSpotStatus = Entry('spot/status', 'private', 'GET', {})
|
@@ -23,5 +26,7 @@ class ImplicitAPI:
|
|
23
26
|
private_post_user_spot_cancel_order = privatePostUserSpotCancelOrder = Entry('user/spot/cancel_order', 'private', 'POST', {})
|
24
27
|
private_post_user_spot_cancel_orders = privatePostUserSpotCancelOrders = Entry('user/spot/cancel_orders', 'private', 'POST', {})
|
25
28
|
private_post_user_spot_orders_info = privatePostUserSpotOrdersInfo = Entry('user/spot/orders_info', 'private', 'POST', {})
|
29
|
+
private_post_user_confirm_deposits = privatePostUserConfirmDeposits = Entry('user/confirm_deposits', 'private', 'POST', {})
|
30
|
+
private_post_user_confirm_deposits_all = privatePostUserConfirmDepositsAll = Entry('user/confirm_deposits_all', 'private', 'POST', {})
|
26
31
|
private_post_user_request_withdrawal = privatePostUserRequestWithdrawal = Entry('user/request_withdrawal', 'private', 'POST', {})
|
27
32
|
markets_get_spot_pairs = marketsGetSpotPairs = Entry('spot/pairs', 'markets', 'GET', {})
|
ccxt/abstract/bitfinex2.py
CHANGED
@@ -63,6 +63,7 @@ class ImplicitAPI:
|
|
63
63
|
public_get_pulse_hist = publicGetPulseHist = Entry('pulse/hist', 'public', 'GET', {'cost': 2.7})
|
64
64
|
public_get_pulse_profile_nickname = publicGetPulseProfileNickname = Entry('pulse/profile/{nickname}', 'public', 'GET', {'cost': 2.7})
|
65
65
|
public_get_funding_stats_symbol_hist = publicGetFundingStatsSymbolHist = Entry('funding/stats/{symbol}/hist', 'public', 'GET', {'cost': 10})
|
66
|
+
public_get_ext_vasps = publicGetExtVasps = Entry('ext/vasps', 'public', 'GET', {'cost': 1})
|
66
67
|
public_post_calc_trade_avg = publicPostCalcTradeAvg = Entry('calc/trade/avg', 'public', 'POST', {'cost': 2.7})
|
67
68
|
public_post_calc_fx = publicPostCalcFx = Entry('calc/fx', 'public', 'POST', {'cost': 2.7})
|
68
69
|
private_post_auth_r_wallets = privatePostAuthRWallets = Entry('auth/r/wallets', 'private', 'POST', {'cost': 2.7})
|
ccxt/abstract/ellipx.py
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
from ccxt.base.types import Entry
|
2
|
+
|
3
|
+
|
4
|
+
class ImplicitAPI:
|
5
|
+
_rest_get_market = _restGetMarket = Entry('Market', '_rest', 'GET', {'cost': 1})
|
6
|
+
_rest_get_market_currencypair = _restGetMarketCurrencyPair = Entry('Market/{currencyPair}', '_rest', 'GET', {'cost': 1})
|
7
|
+
_rest_get_crypto_token_info = _restGetCryptoTokenInfo = Entry('Crypto/Token/Info', '_rest', 'GET', {'cost': 1})
|
8
|
+
public_get_market_currencypair_getdepth = publicGetMarketCurrencyPairGetDepth = Entry('Market/{currencyPair}:getDepth', 'public', 'GET', {'cost': 1})
|
9
|
+
public_get_market_currencypair_ticker = publicGetMarketCurrencyPairTicker = Entry('Market/{currencyPair}:ticker', 'public', 'GET', {'cost': 1})
|
10
|
+
public_get_market_currencypair_gettrades = publicGetMarketCurrencyPairGetTrades = Entry('Market/{currencyPair}:getTrades', 'public', 'GET', {'cost': 1})
|
11
|
+
public_get_market_currencypair_getgraph = publicGetMarketCurrencyPairGetGraph = Entry('Market/{currencyPair}:getGraph', 'public', 'GET', {'cost': 1})
|
12
|
+
public_get_cmc_summary = publicGetCMCSummary = Entry('CMC:summary', 'public', 'GET', {'cost': 1})
|
13
|
+
public_get_cmc_currencypair_ticker = publicGetCMCCurrencyPairTicker = Entry('CMC/{currencyPair}:ticker', 'public', 'GET', {'cost': 1})
|
14
|
+
private_get_user_wallet = privateGetUserWallet = Entry('User/Wallet', 'private', 'GET', {'cost': 1})
|
15
|
+
private_get_market_currencypair_order = privateGetMarketCurrencyPairOrder = Entry('Market/{currencyPair}/Order', 'private', 'GET', {'cost': 1})
|
16
|
+
private_get_market_order_orderuuid = privateGetMarketOrderOrderUuid = Entry('Market/Order/{orderUuid}', 'private', 'GET', {'cost': 1})
|
17
|
+
private_get_market_currencypair_trade = privateGetMarketCurrencyPairTrade = Entry('Market/{currencyPair}/Trade', 'private', 'GET', {'cost': 1})
|
18
|
+
private_get_market_tradefee_query = privateGetMarketTradeFeeQuery = Entry('Market/TradeFee:query', 'private', 'GET', {'cost': 1})
|
19
|
+
private_get_unit_currency = privateGetUnitCurrency = Entry('Unit/{currency}', 'private', 'GET', {'cost': 1})
|
20
|
+
private_get_crypto_token_currency = privateGetCryptoTokenCurrency = Entry('Crypto/Token/{currency}', 'private', 'GET', {'cost': 1})
|
21
|
+
private_get_crypto_token_currency_chains = privateGetCryptoTokenCurrencyChains = Entry('Crypto/Token/{currency}:chains', 'private', 'GET', {'cost': 1})
|
22
|
+
private_post_market_currencypair_order = privatePostMarketCurrencyPairOrder = Entry('Market/{currencyPair}/Order', 'private', 'POST', {'cost': 1})
|
23
|
+
private_post_crypto_address_fetch = privatePostCryptoAddressFetch = Entry('Crypto/Address:fetch', 'private', 'POST', {'cost': 1})
|
24
|
+
private_post_crypto_disbursement_withdraw = privatePostCryptoDisbursementWithdraw = Entry('Crypto/Disbursement:withdraw', 'private', 'POST', {'cost': 1})
|
25
|
+
private_delete_market_order_orderuuid = privateDeleteMarketOrderOrderUuid = Entry('Market/Order/{orderUuid}', 'private', 'DELETE', {'cost': 1})
|
ccxt/alpaca.py
CHANGED
ccxt/async_support/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.34'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -118,6 +118,7 @@ from ccxt.async_support.currencycom import currencycom
|
|
118
118
|
from ccxt.async_support.delta import delta # noqa: F401
|
119
119
|
from ccxt.async_support.deribit import deribit # noqa: F401
|
120
120
|
from ccxt.async_support.digifinex import digifinex # noqa: F401
|
121
|
+
from ccxt.async_support.ellipx import ellipx # noqa: F401
|
121
122
|
from ccxt.async_support.exmo import exmo # noqa: F401
|
122
123
|
from ccxt.async_support.fmfwio import fmfwio # noqa: F401
|
123
124
|
from ccxt.async_support.gate import gate # noqa: F401
|
@@ -229,6 +230,7 @@ exchanges = [
|
|
229
230
|
'delta',
|
230
231
|
'deribit',
|
231
232
|
'digifinex',
|
233
|
+
'ellipx',
|
232
234
|
'exmo',
|
233
235
|
'fmfwio',
|
234
236
|
'gate',
|
ccxt/async_support/alpaca.py
CHANGED
ccxt/async_support/binance.py
CHANGED
@@ -1584,13 +1584,13 @@ class binance(Exchange, ImplicitAPI):
|
|
1584
1584
|
'spot': {
|
1585
1585
|
'sandbox': True,
|
1586
1586
|
'createOrder': {
|
1587
|
+
'marginMode': True,
|
1587
1588
|
'triggerPrice': True,
|
1588
1589
|
'triggerPriceType': None,
|
1589
1590
|
'triggerDirection': False,
|
1590
1591
|
'stopLossPrice': True,
|
1591
1592
|
'takeProfitPrice': True,
|
1592
1593
|
'attachedStopLossTakeProfit': None, # not supported
|
1593
|
-
'marginMode': True,
|
1594
1594
|
'timeInForce': {
|
1595
1595
|
'GTC': True,
|
1596
1596
|
'IOC': True,
|
@@ -1608,6 +1608,7 @@ class binance(Exchange, ImplicitAPI):
|
|
1608
1608
|
},
|
1609
1609
|
'createOrders': None,
|
1610
1610
|
'fetchMyTrades': {
|
1611
|
+
'marginMode': False,
|
1611
1612
|
'limit': 1000,
|
1612
1613
|
'daysBack': None,
|
1613
1614
|
'untilDays': 1, # days between start-end
|
@@ -1618,25 +1619,25 @@ class binance(Exchange, ImplicitAPI):
|
|
1618
1619
|
'trailing': False,
|
1619
1620
|
},
|
1620
1621
|
'fetchOpenOrders': {
|
1621
|
-
'limit': None,
|
1622
1622
|
'marginMode': True,
|
1623
|
+
'limit': None,
|
1623
1624
|
'trigger': False,
|
1624
1625
|
'trailing': False,
|
1625
1626
|
},
|
1626
1627
|
'fetchOrders': {
|
1628
|
+
'marginMode': True,
|
1627
1629
|
'limit': 1000,
|
1628
1630
|
'daysBack': None,
|
1629
1631
|
'untilDays': 10000,
|
1630
|
-
'marginMode': True,
|
1631
1632
|
'trigger': False,
|
1632
1633
|
'trailing': False,
|
1633
1634
|
},
|
1634
1635
|
'fetchClosedOrders': {
|
1636
|
+
'marginMode': True,
|
1635
1637
|
'limit': 1000,
|
1636
1638
|
'daysBackClosed': None,
|
1637
1639
|
'daysBackCanceled': None,
|
1638
1640
|
'untilDays': 10000,
|
1639
|
-
'marginMode': True,
|
1640
1641
|
'trigger': False,
|
1641
1642
|
'trailing': False,
|
1642
1643
|
},
|
@@ -1647,6 +1648,7 @@ class binance(Exchange, ImplicitAPI):
|
|
1647
1648
|
'default': {
|
1648
1649
|
'sandbox': True,
|
1649
1650
|
'createOrder': {
|
1651
|
+
'marginMode': False,
|
1650
1652
|
'triggerPrice': True,
|
1651
1653
|
'triggerPriceType': {
|
1652
1654
|
'mark': True,
|
@@ -1656,7 +1658,6 @@ class binance(Exchange, ImplicitAPI):
|
|
1656
1658
|
'stopLossPrice': True,
|
1657
1659
|
'takeProfitPrice': True,
|
1658
1660
|
'attachedStopLossTakeProfit': None, # not supported
|
1659
|
-
'marginMode': False,
|
1660
1661
|
'timeInForce': {
|
1661
1662
|
'GTC': True,
|
1662
1663
|
'IOC': True,
|
@@ -1677,6 +1678,7 @@ class binance(Exchange, ImplicitAPI):
|
|
1677
1678
|
'max': 5,
|
1678
1679
|
},
|
1679
1680
|
'fetchMyTrades': {
|
1681
|
+
'marginMode': False,
|
1680
1682
|
'daysBack': None,
|
1681
1683
|
'limit': 1000,
|
1682
1684
|
'untilDays': 7,
|
@@ -1687,25 +1689,25 @@ class binance(Exchange, ImplicitAPI):
|
|
1687
1689
|
'trailing': False,
|
1688
1690
|
},
|
1689
1691
|
'fetchOpenOrders': {
|
1690
|
-
'limit': 500,
|
1691
1692
|
'marginMode': True,
|
1693
|
+
'limit': 500,
|
1692
1694
|
'trigger': False,
|
1693
1695
|
'trailing': False,
|
1694
1696
|
},
|
1695
1697
|
'fetchOrders': {
|
1698
|
+
'marginMode': True,
|
1696
1699
|
'limit': 1000,
|
1697
1700
|
'daysBack': 90,
|
1698
1701
|
'untilDays': 7,
|
1699
|
-
'marginMode': True,
|
1700
1702
|
'trigger': False,
|
1701
1703
|
'trailing': False,
|
1702
1704
|
},
|
1703
1705
|
'fetchClosedOrders': {
|
1706
|
+
'marginMode': True,
|
1704
1707
|
'limit': 1000,
|
1705
1708
|
'daysBackClosed': 90,
|
1706
1709
|
'daysBackCanceled': 3,
|
1707
1710
|
'untilDays': 7,
|
1708
|
-
'marginMode': True,
|
1709
1711
|
'trigger': False,
|
1710
1712
|
'trailing': False,
|
1711
1713
|
},
|
@@ -2132,7 +2134,8 @@ class binance(Exchange, ImplicitAPI):
|
|
2132
2134
|
'-4140': BadRequest, # Invalid symbol status for opening position
|
2133
2135
|
'-4141': OperationRejected, # Symbol is closed
|
2134
2136
|
'-4144': BadSymbol, # Invalid pair
|
2135
|
-
'-4164': InvalidOrder, # {"code":-4164,"msg":"Order's notional must be no smaller than 20(unless you choose reduce only)."}
|
2137
|
+
'-4164': InvalidOrder, # {"code":-4164,"msg":"Order's notional must be no smaller than 20(unless you choose reduce only)."},
|
2138
|
+
'-4136': InvalidOrder, # {"code":-4136,"msg":"Target strategy invalid for orderType TRAILING_STOP_MARKET,closePosition True"}
|
2136
2139
|
'-4165': BadRequest, # Invalid time interval
|
2137
2140
|
'-4167': BadRequest, # Unable to adjust to Multi-Assets mode with symbols of USDⓈ-M Futures under isolated-margin mode.
|
2138
2141
|
'-4168': BadRequest, # Unable to adjust to isolated-margin mode under the Multi-Assets mode.
|
@@ -6111,6 +6114,7 @@ class binance(Exchange, ImplicitAPI):
|
|
6111
6114
|
typeRequest = 'strategyType' if isPortfolioMarginConditional else 'type'
|
6112
6115
|
request[typeRequest] = uppercaseType
|
6113
6116
|
# additional required fields depending on the order type
|
6117
|
+
closePosition = self.safe_bool(params, 'closePosition', False)
|
6114
6118
|
timeInForceIsRequired = False
|
6115
6119
|
priceIsRequired = False
|
6116
6120
|
stopPriceIsRequired = False
|
@@ -6176,12 +6180,12 @@ class binance(Exchange, ImplicitAPI):
|
|
6176
6180
|
stopPriceIsRequired = True
|
6177
6181
|
priceIsRequired = True
|
6178
6182
|
elif (uppercaseType == 'STOP_MARKET') or (uppercaseType == 'TAKE_PROFIT_MARKET'):
|
6179
|
-
|
6180
|
-
if closePosition is None:
|
6183
|
+
if not closePosition:
|
6181
6184
|
quantityIsRequired = True
|
6182
6185
|
stopPriceIsRequired = True
|
6183
6186
|
elif uppercaseType == 'TRAILING_STOP_MARKET':
|
6184
|
-
|
6187
|
+
if not closePosition:
|
6188
|
+
quantityIsRequired = True
|
6185
6189
|
if trailingPercent is None:
|
6186
6190
|
raise InvalidOrder(self.id + ' createOrder() requires a trailingPercent param for a ' + type + ' order')
|
6187
6191
|
if quantityIsRequired:
|
@@ -11130,11 +11134,11 @@ class binance(Exchange, ImplicitAPI):
|
|
11130
11134
|
def get_exceptions_by_url(self, url: str, exactOrBroad: str):
|
11131
11135
|
marketType = None
|
11132
11136
|
hostname = self.hostname if (self.hostname is not None) else 'binance.com'
|
11133
|
-
if url.startswith('https://api.' + hostname + '/'):
|
11137
|
+
if url.startswith('https://api.' + hostname + '/') or url.startswith('https://testnet.binance.vision'):
|
11134
11138
|
marketType = 'spot'
|
11135
|
-
elif url.startswith('https://dapi.' + hostname + '/'):
|
11139
|
+
elif url.startswith('https://dapi.' + hostname + '/') or url.startswith('https://testnet.binancefuture.com/dapi'):
|
11136
11140
|
marketType = 'inverse'
|
11137
|
-
elif url.startswith('https://fapi.' + hostname + '/'):
|
11141
|
+
elif url.startswith('https://fapi.' + hostname + '/') or url.startswith('https://testnet.binancefuture.com/fapi'):
|
11138
11142
|
marketType = 'linear'
|
11139
11143
|
elif url.startswith('https://eapi.' + hostname + '/'):
|
11140
11144
|
marketType = 'option'
|
ccxt/async_support/bingx.py
CHANGED
@@ -59,6 +59,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
59
59
|
'createOrders': True,
|
60
60
|
'createOrderWithTakeProfitAndStopLoss': True,
|
61
61
|
'createStopLossOrder': True,
|
62
|
+
'createStopOrder': True,
|
62
63
|
'createTakeProfitOrder': True,
|
63
64
|
'createTrailingAmountOrder': True,
|
64
65
|
'createTrailingPercentOrder': True,
|
@@ -212,6 +213,8 @@ class bingx(Exchange, ImplicitAPI):
|
|
212
213
|
'get': {
|
213
214
|
'ticker/price': 1,
|
214
215
|
'market/historicalTrades': 1,
|
216
|
+
'market/markPriceKlines': 1,
|
217
|
+
'trade/multiAssetsRules': 1,
|
215
218
|
},
|
216
219
|
},
|
217
220
|
'private': {
|
@@ -220,12 +223,24 @@ class bingx(Exchange, ImplicitAPI):
|
|
220
223
|
'market/markPriceKlines': 1,
|
221
224
|
'trade/batchCancelReplace': 5,
|
222
225
|
'trade/fullOrder': 2,
|
226
|
+
'maintMarginRatio': 2,
|
227
|
+
'trade/positionHistory': 2,
|
223
228
|
'positionMargin/history': 2,
|
229
|
+
'twap/openOrders': 5,
|
230
|
+
'twap/historyOrders': 5,
|
231
|
+
'twap/orderDetail': 5,
|
232
|
+
'trade/assetMode': 5,
|
233
|
+
'user/marginAssets': 5,
|
224
234
|
},
|
225
235
|
'post': {
|
226
236
|
'trade/cancelReplace': 2,
|
227
237
|
'positionSide/dual': 5,
|
238
|
+
'trade/batchCancelReplace': 5,
|
228
239
|
'trade/closePosition': 2,
|
240
|
+
'trade/getVst': 5,
|
241
|
+
'twap/order': 5,
|
242
|
+
'twap/cancelOrder': 5,
|
243
|
+
'trade/assetMode': 5,
|
229
244
|
},
|
230
245
|
},
|
231
246
|
},
|
@@ -258,6 +273,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
258
273
|
'trade/forceOrders': 1,
|
259
274
|
'trade/allOrders': 2,
|
260
275
|
'trade/allFillOrders': 2,
|
276
|
+
'trade/fillHistory': 2,
|
261
277
|
'user/income/export': 2,
|
262
278
|
'user/commissionRate': 2,
|
263
279
|
'quote/bookTicker': 1,
|
@@ -315,12 +331,13 @@ class bingx(Exchange, ImplicitAPI):
|
|
315
331
|
'post': {
|
316
332
|
'trade/order': 2,
|
317
333
|
'trade/leverage': 2,
|
334
|
+
'trade/allOpenOrders': 2,
|
318
335
|
'trade/closeAllPositions': 2,
|
319
336
|
'trade/marginType': 2,
|
320
337
|
'trade/positionMargin': 2,
|
321
338
|
},
|
322
339
|
'delete': {
|
323
|
-
'trade/allOpenOrders': 2,
|
340
|
+
'trade/allOpenOrders': 2, # post method in doc
|
324
341
|
'trade/cancelOrder': 2,
|
325
342
|
},
|
326
343
|
},
|
@@ -513,6 +530,136 @@ class bingx(Exchange, ImplicitAPI):
|
|
513
530
|
'MATIC': 'POLYGON',
|
514
531
|
},
|
515
532
|
},
|
533
|
+
'features': {
|
534
|
+
'defaultForLinear': {
|
535
|
+
'sandbox': True,
|
536
|
+
'createOrder': {
|
537
|
+
'marginMode': False,
|
538
|
+
'triggerPrice': True,
|
539
|
+
'triggerPriceType': {
|
540
|
+
'last': True,
|
541
|
+
'mark': True,
|
542
|
+
'index': True,
|
543
|
+
},
|
544
|
+
'triggerDirection': False,
|
545
|
+
'stopLossPrice': True,
|
546
|
+
'takeProfitPrice': True,
|
547
|
+
'attachedStopLossTakeProfit': {
|
548
|
+
'triggerPriceType': {
|
549
|
+
'last': True,
|
550
|
+
'mark': True,
|
551
|
+
'index': True,
|
552
|
+
},
|
553
|
+
'limitPrice': True,
|
554
|
+
},
|
555
|
+
'timeInForce': {
|
556
|
+
'GTC': True,
|
557
|
+
'IOC': True,
|
558
|
+
'FOK': True,
|
559
|
+
'PO': True,
|
560
|
+
'GTD': False,
|
561
|
+
},
|
562
|
+
'hedged': True,
|
563
|
+
'trailing': True,
|
564
|
+
},
|
565
|
+
'createOrders': {
|
566
|
+
'max': 5,
|
567
|
+
},
|
568
|
+
'fetchMyTrades': {
|
569
|
+
'marginMode': False,
|
570
|
+
'limit': 512, # 512 days for 'allFillOrders', 1000 days for 'fillOrders'
|
571
|
+
'daysBack': 30, # 30 for 'allFillOrders', 7 for 'fillHistory'
|
572
|
+
'untilDays': 30, # 30 for 'allFillOrders', 7 for 'fillHistory'
|
573
|
+
},
|
574
|
+
'fetchOrder': {
|
575
|
+
'marginMode': False,
|
576
|
+
'trigger': False,
|
577
|
+
'trailing': False,
|
578
|
+
},
|
579
|
+
'fetchOpenOrders': {
|
580
|
+
'marginMode': False,
|
581
|
+
'limit': None,
|
582
|
+
'trigger': False,
|
583
|
+
'trailing': False,
|
584
|
+
},
|
585
|
+
'fetchOrders': {
|
586
|
+
'marginMode': False,
|
587
|
+
'limit': 1000,
|
588
|
+
'daysBack': 20000, # since epoch
|
589
|
+
'untilDays': 7,
|
590
|
+
'trigger': False,
|
591
|
+
'trailing': False,
|
592
|
+
},
|
593
|
+
'fetchClosedOrders': {
|
594
|
+
'marginMode': False,
|
595
|
+
'limit': 1000,
|
596
|
+
'daysBackClosed': None,
|
597
|
+
'daysBackCanceled': None,
|
598
|
+
'untilDays': 7,
|
599
|
+
'trigger': False,
|
600
|
+
'trailing': False,
|
601
|
+
},
|
602
|
+
'fetchOHLCV': {
|
603
|
+
'limit': 1440,
|
604
|
+
},
|
605
|
+
},
|
606
|
+
'defaultForInverse': {
|
607
|
+
'extends': 'defaultForLinear',
|
608
|
+
'fetchMyTrades': {
|
609
|
+
'limit': 1000,
|
610
|
+
'daysBack': None,
|
611
|
+
'untilDays': None,
|
612
|
+
},
|
613
|
+
'fetchOHLCV': {
|
614
|
+
'limit': 1440,
|
615
|
+
},
|
616
|
+
'fetchOrders': None,
|
617
|
+
'fetchClosedOrders': {
|
618
|
+
'marginMode': False,
|
619
|
+
'limit': 1000,
|
620
|
+
'daysBackClosed': None,
|
621
|
+
'daysBackCanceled': None,
|
622
|
+
'untilDays': 7,
|
623
|
+
'trigger': False,
|
624
|
+
'trailing': False,
|
625
|
+
},
|
626
|
+
},
|
627
|
+
#
|
628
|
+
'spot': {
|
629
|
+
'extends': 'defaultForLinear',
|
630
|
+
'createOrder': {
|
631
|
+
'triggerPriceType': None,
|
632
|
+
'attachedStopLossTakeProfit': None,
|
633
|
+
'trailing': False,
|
634
|
+
},
|
635
|
+
'fetchMyTrades': {
|
636
|
+
'limit': 1000,
|
637
|
+
'daysBack': 1,
|
638
|
+
'untilDays': 1,
|
639
|
+
},
|
640
|
+
'fetchOrders': None,
|
641
|
+
'fetchClosedOrders': {
|
642
|
+
'limit': 100,
|
643
|
+
'untilDays': None,
|
644
|
+
},
|
645
|
+
},
|
646
|
+
'swap': {
|
647
|
+
'linear': {
|
648
|
+
'extends': 'defaultForLinear',
|
649
|
+
},
|
650
|
+
'inverse': {
|
651
|
+
'extends': 'defaultForInverse',
|
652
|
+
},
|
653
|
+
},
|
654
|
+
'future': {
|
655
|
+
'linear': {
|
656
|
+
'extends': 'defaultForLinear',
|
657
|
+
},
|
658
|
+
'inverse': {
|
659
|
+
'extends': 'defaultForInverse',
|
660
|
+
},
|
661
|
+
},
|
662
|
+
},
|
516
663
|
})
|
517
664
|
|
518
665
|
async def fetch_time(self, params={}):
|
@@ -3765,7 +3912,8 @@ class bingx(Exchange, ImplicitAPI):
|
|
3765
3912
|
"""
|
3766
3913
|
fetches information on multiple orders made by the user
|
3767
3914
|
|
3768
|
-
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#
|
3915
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#All%20Orders
|
3916
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history(returns less fields than above)
|
3769
3917
|
|
3770
3918
|
:param str symbol: unified market symbol of the market orders were made in
|
3771
3919
|
:param int [since]: the earliest time in ms to fetch orders for
|
@@ -3789,11 +3937,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
3789
3937
|
request['limit'] = limit
|
3790
3938
|
if since is not None:
|
3791
3939
|
request['startTime'] = since
|
3792
|
-
|
3793
|
-
endTime = self.safe_integer(params, 'endTime', until) # exchange-specific in milliseconds
|
3794
|
-
params = self.omit(params, ['endTime', 'until'])
|
3795
|
-
if endTime is not None:
|
3796
|
-
request['endTime'] = endTime
|
3940
|
+
request, params = self.handle_until_option('endTime', request, params)
|
3797
3941
|
response = await self.swapV1PrivateGetTradeFullOrder(self.extend(request, params))
|
3798
3942
|
#
|
3799
3943
|
# {
|
@@ -4072,6 +4216,8 @@ class bingx(Exchange, ImplicitAPI):
|
|
4072
4216
|
if standard:
|
4073
4217
|
response = await self.contractV1PrivateGetAllOrders(self.extend(request, params))
|
4074
4218
|
elif type == 'spot':
|
4219
|
+
if limit is not None:
|
4220
|
+
request['limit'] = limit
|
4075
4221
|
response = await self.spotV1PrivateGetTradeHistoryOrders(self.extend(request, params))
|
4076
4222
|
#
|
4077
4223
|
# {
|
@@ -4862,6 +5008,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
4862
5008
|
|
4863
5009
|
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20transaction%20details
|
4864
5010
|
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20historical%20transaction%20orders
|
5011
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20historical%20transaction%20details
|
4865
5012
|
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order%20Trade%20Detail
|
4866
5013
|
|
4867
5014
|
:param str [symbol]: unified market symbol
|
@@ -4921,7 +5068,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
4921
5068
|
startTimeReq = 'startTime' if market['spot'] else 'startTs'
|
4922
5069
|
request[startTimeReq] = since
|
4923
5070
|
elif market['swap']:
|
4924
|
-
request['startTs'] = now -
|
5071
|
+
request['startTs'] = now - 30 * 24 * 60 * 60 * 1000 # 30 days for swap
|
4925
5072
|
until = self.safe_integer(params, 'until')
|
4926
5073
|
params = self.omit(params, 'until')
|
4927
5074
|
if until is not None:
|
ccxt/async_support/bitbank.py
CHANGED
@@ -128,8 +128,11 @@ class bitbank(Exchange, ImplicitAPI):
|
|
128
128
|
'user/assets',
|
129
129
|
'user/spot/order',
|
130
130
|
'user/spot/active_orders',
|
131
|
+
'user/margin/positions',
|
131
132
|
'user/spot/trade_history',
|
132
133
|
'user/deposit_history',
|
134
|
+
'user/unconfirmed_deposits',
|
135
|
+
'user/deposit_originators',
|
133
136
|
'user/withdrawal_account',
|
134
137
|
'user/withdrawal_history',
|
135
138
|
'spot/status',
|
@@ -140,6 +143,8 @@ class bitbank(Exchange, ImplicitAPI):
|
|
140
143
|
'user/spot/cancel_order',
|
141
144
|
'user/spot/cancel_orders',
|
142
145
|
'user/spot/orders_info',
|
146
|
+
'user/confirm_deposits',
|
147
|
+
'user/confirm_deposits_all',
|
143
148
|
'user/request_withdrawal',
|
144
149
|
],
|
145
150
|
},
|
ccxt/async_support/bitbns.py
CHANGED
@@ -39,6 +39,8 @@ class bitbns(Exchange, ImplicitAPI):
|
|
39
39
|
'cancelAllOrders': False,
|
40
40
|
'cancelOrder': True,
|
41
41
|
'createOrder': True,
|
42
|
+
'createStopOrder': True,
|
43
|
+
'createTriggerOrder': True,
|
42
44
|
'fetchBalance': True,
|
43
45
|
'fetchDepositAddress': True,
|
44
46
|
'fetchDepositAddresses': False,
|
ccxt/async_support/bitfinex2.py
CHANGED