ccxt 4.4.73__py2.py3-none-any.whl → 4.4.74__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 +1 -5
- ccxt/abstract/bitmart.py +2 -0
- ccxt/ace.py +3 -0
- ccxt/alpaca.py +3 -0
- ccxt/ascendex.py +6 -0
- ccxt/async_support/__init__.py +1 -5
- ccxt/async_support/ace.py +3 -0
- ccxt/async_support/alpaca.py +3 -0
- ccxt/async_support/ascendex.py +6 -0
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bequant.py +1 -0
- ccxt/async_support/binanceusdm.py +1 -1
- ccxt/async_support/bit2c.py +26 -0
- ccxt/async_support/bitbank.py +32 -0
- ccxt/async_support/bitbns.py +1 -1
- ccxt/async_support/bitflyer.py +1 -0
- ccxt/async_support/bithumb.py +34 -0
- ccxt/async_support/bitmart.py +70 -6
- ccxt/async_support/blofin.py +1 -1
- ccxt/async_support/bybit.py +10 -1
- ccxt/async_support/coinlist.py +81 -11
- ccxt/async_support/deribit.py +19 -0
- ccxt/async_support/gate.py +11 -7
- ccxt/async_support/hitbtc.py +7 -1
- ccxt/async_support/okx.py +4 -0
- ccxt/base/errors.py +0 -6
- ccxt/base/exchange.py +25 -7
- ccxt/bequant.py +1 -0
- ccxt/binanceusdm.py +1 -1
- ccxt/bit2c.py +26 -0
- ccxt/bitbank.py +32 -0
- ccxt/bitbns.py +1 -1
- ccxt/bitflyer.py +1 -0
- ccxt/bithumb.py +34 -0
- ccxt/bitmart.py +70 -6
- ccxt/blofin.py +1 -1
- ccxt/bybit.py +10 -1
- ccxt/coinlist.py +81 -11
- ccxt/deribit.py +19 -0
- ccxt/gate.py +11 -7
- ccxt/hitbtc.py +7 -1
- ccxt/okx.py +4 -0
- ccxt/pro/__init__.py +1 -5
- ccxt/pro/ascendex.py +1 -1
- ccxt/pro/bingx.py +9 -1
- ccxt/pro/bitget.py +9 -1
- ccxt/pro/bitmart.py +9 -1
- ccxt/pro/bitopro.py +5 -4
- {ccxt-4.4.73.dist-info → ccxt-4.4.74.dist-info}/METADATA +5 -5
- {ccxt-4.4.73.dist-info → ccxt-4.4.74.dist-info}/RECORD +53 -55
- ccxt/abstract/bitcoincom.py +0 -115
- ccxt/abstract/bitpanda.py +0 -23
- {ccxt-4.4.73.dist-info → ccxt-4.4.74.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.73.dist-info → ccxt-4.4.74.dist-info}/WHEEL +0 -0
- {ccxt-4.4.73.dist-info → ccxt-4.4.74.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.74'
|
26
26
|
|
27
27
|
# ----------------------------------------------------------------------------
|
28
28
|
|
@@ -96,7 +96,6 @@ from ccxt.bingx import bingx # noqa: F4
|
|
96
96
|
from ccxt.bit2c import bit2c # noqa: F401
|
97
97
|
from ccxt.bitbank import bitbank # noqa: F401
|
98
98
|
from ccxt.bitbns import bitbns # noqa: F401
|
99
|
-
from ccxt.bitcoincom import bitcoincom # noqa: F401
|
100
99
|
from ccxt.bitfinex import bitfinex # noqa: F401
|
101
100
|
from ccxt.bitflyer import bitflyer # noqa: F401
|
102
101
|
from ccxt.bitget import bitget # noqa: F401
|
@@ -104,7 +103,6 @@ from ccxt.bithumb import bithumb # noqa: F4
|
|
104
103
|
from ccxt.bitmart import bitmart # noqa: F401
|
105
104
|
from ccxt.bitmex import bitmex # noqa: F401
|
106
105
|
from ccxt.bitopro import bitopro # noqa: F401
|
107
|
-
from ccxt.bitpanda import bitpanda # noqa: F401
|
108
106
|
from ccxt.bitrue import bitrue # noqa: F401
|
109
107
|
from ccxt.bitso import bitso # noqa: F401
|
110
108
|
from ccxt.bitstamp import bitstamp # noqa: F401
|
@@ -207,7 +205,6 @@ exchanges = [
|
|
207
205
|
'bit2c',
|
208
206
|
'bitbank',
|
209
207
|
'bitbns',
|
210
|
-
'bitcoincom',
|
211
208
|
'bitfinex',
|
212
209
|
'bitflyer',
|
213
210
|
'bitget',
|
@@ -215,7 +212,6 @@ exchanges = [
|
|
215
212
|
'bitmart',
|
216
213
|
'bitmex',
|
217
214
|
'bitopro',
|
218
|
-
'bitpanda',
|
219
215
|
'bitrue',
|
220
216
|
'bitso',
|
221
217
|
'bitstamp',
|
ccxt/abstract/bitmart.py
CHANGED
@@ -68,6 +68,7 @@ class ImplicitAPI:
|
|
68
68
|
private_get_contract_private_affilate_rebate_list = privateGetContractPrivateAffilateRebateList = Entry('contract/private/affilate/rebate-list', 'private', 'GET', {'cost': 10})
|
69
69
|
private_get_contract_private_affilate_trade_list = privateGetContractPrivateAffilateTradeList = Entry('contract/private/affilate/trade-list', 'private', 'GET', {'cost': 10})
|
70
70
|
private_get_contract_private_transaction_history = privateGetContractPrivateTransactionHistory = Entry('contract/private/transaction-history', 'private', 'GET', {'cost': 10})
|
71
|
+
private_get_contract_private_get_position_mode = privateGetContractPrivateGetPositionMode = Entry('contract/private/get-position-mode', 'private', 'GET', {'cost': 1})
|
71
72
|
private_post_account_sub_account_main_v1_sub_to_main = privatePostAccountSubAccountMainV1SubToMain = Entry('account/sub-account/main/v1/sub-to-main', 'private', 'POST', {'cost': 30})
|
72
73
|
private_post_account_sub_account_sub_v1_sub_to_main = privatePostAccountSubAccountSubV1SubToMain = Entry('account/sub-account/sub/v1/sub-to-main', 'private', 'POST', {'cost': 30})
|
73
74
|
private_post_account_sub_account_main_v1_main_to_sub = privatePostAccountSubAccountMainV1MainToSub = Entry('account/sub-account/main/v1/main-to-sub', 'private', 'POST', {'cost': 30})
|
@@ -112,3 +113,4 @@ class ImplicitAPI:
|
|
112
113
|
private_post_contract_private_modify_tp_sl_order = privatePostContractPrivateModifyTpSlOrder = Entry('contract/private/modify-tp-sl-order', 'private', 'POST', {'cost': 2.5})
|
113
114
|
private_post_contract_private_submit_trail_order = privatePostContractPrivateSubmitTrailOrder = Entry('contract/private/submit-trail-order', 'private', 'POST', {'cost': 2.5})
|
114
115
|
private_post_contract_private_cancel_trail_order = privatePostContractPrivateCancelTrailOrder = Entry('contract/private/cancel-trail-order', 'private', 'POST', {'cost': 1.5})
|
116
|
+
private_post_contract_private_set_position_mode = privatePostContractPrivateSetPositionMode = Entry('contract/private/set-position-mode', 'private', 'POST', {'cost': 1})
|
ccxt/ace.py
CHANGED
@@ -92,6 +92,8 @@ class ace(Exchange, ImplicitAPI):
|
|
92
92
|
'fetchOpenInterestHistory': False,
|
93
93
|
'fetchOpenInterests': False,
|
94
94
|
'fetchOpenOrders': True,
|
95
|
+
'fetchOption': False,
|
96
|
+
'fetchOptionChain': False,
|
95
97
|
'fetchOrder': True,
|
96
98
|
'fetchOrderBook': True,
|
97
99
|
'fetchOrders': False,
|
@@ -115,6 +117,7 @@ class ace(Exchange, ImplicitAPI):
|
|
115
117
|
'fetchTransactions': False,
|
116
118
|
'fetchTransfer': False,
|
117
119
|
'fetchTransfers': False,
|
120
|
+
'fetchVolatilityHistory': False,
|
118
121
|
'fetchWithdrawal': False,
|
119
122
|
'fetchWithdrawals': False,
|
120
123
|
'reduceMargin': False,
|
ccxt/alpaca.py
CHANGED
@@ -125,6 +125,8 @@ class alpaca(Exchange, ImplicitAPI):
|
|
125
125
|
'fetchOpenInterests': False,
|
126
126
|
'fetchOpenOrder': False,
|
127
127
|
'fetchOpenOrders': True,
|
128
|
+
'fetchOption': False,
|
129
|
+
'fetchOptionChain': False,
|
128
130
|
'fetchOrder': True,
|
129
131
|
'fetchOrderBook': True,
|
130
132
|
'fetchOrders': True,
|
@@ -147,6 +149,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
147
149
|
'fetchTransactionFees': False,
|
148
150
|
'fetchTransactions': False,
|
149
151
|
'fetchTransfers': False,
|
152
|
+
'fetchVolatilityHistory': False,
|
150
153
|
'fetchWithdrawals': True,
|
151
154
|
'reduceMargin': False,
|
152
155
|
'repayCrossMargin': False,
|
ccxt/ascendex.py
CHANGED
@@ -67,6 +67,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
67
67
|
'fetchFundingRate': 'emulated',
|
68
68
|
'fetchFundingRateHistory': False,
|
69
69
|
'fetchFundingRates': True,
|
70
|
+
'fetchGreeks': False,
|
70
71
|
'fetchIndexOHLCV': False,
|
71
72
|
'fetchLeverage': 'emulated',
|
72
73
|
'fetchLeverages': True,
|
@@ -76,10 +77,13 @@ class ascendex(Exchange, ImplicitAPI):
|
|
76
77
|
'fetchMarketLeverageTiers': 'emulated',
|
77
78
|
'fetchMarkets': True,
|
78
79
|
'fetchMarkOHLCV': False,
|
80
|
+
'fetchMySettlementHistory': False,
|
79
81
|
'fetchOHLCV': True,
|
80
82
|
'fetchOpenInterest': False,
|
81
83
|
'fetchOpenInterestHistory': False,
|
82
84
|
'fetchOpenOrders': True,
|
85
|
+
'fetchOption': False,
|
86
|
+
'fetchOptionChain': False,
|
83
87
|
'fetchOrder': True,
|
84
88
|
'fetchOrderBook': True,
|
85
89
|
'fetchOrders': False,
|
@@ -88,6 +92,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
88
92
|
'fetchPositions': True,
|
89
93
|
'fetchPositionsRisk': False,
|
90
94
|
'fetchPremiumIndexOHLCV': False,
|
95
|
+
'fetchSettlementHistory': False,
|
91
96
|
'fetchTicker': True,
|
92
97
|
'fetchTickers': True,
|
93
98
|
'fetchTime': True,
|
@@ -99,6 +104,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
99
104
|
'fetchTransactions': 'emulated',
|
100
105
|
'fetchTransfer': False,
|
101
106
|
'fetchTransfers': False,
|
107
|
+
'fetchVolatilityHistory': False,
|
102
108
|
'fetchWithdrawal': False,
|
103
109
|
'fetchWithdrawals': True,
|
104
110
|
'reduceMargin': True,
|
ccxt/async_support/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.74'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -76,7 +76,6 @@ from ccxt.async_support.bingx import bingx
|
|
76
76
|
from ccxt.async_support.bit2c import bit2c # noqa: F401
|
77
77
|
from ccxt.async_support.bitbank import bitbank # noqa: F401
|
78
78
|
from ccxt.async_support.bitbns import bitbns # noqa: F401
|
79
|
-
from ccxt.async_support.bitcoincom import bitcoincom # noqa: F401
|
80
79
|
from ccxt.async_support.bitfinex import bitfinex # noqa: F401
|
81
80
|
from ccxt.async_support.bitflyer import bitflyer # noqa: F401
|
82
81
|
from ccxt.async_support.bitget import bitget # noqa: F401
|
@@ -84,7 +83,6 @@ from ccxt.async_support.bithumb import bithumb
|
|
84
83
|
from ccxt.async_support.bitmart import bitmart # noqa: F401
|
85
84
|
from ccxt.async_support.bitmex import bitmex # noqa: F401
|
86
85
|
from ccxt.async_support.bitopro import bitopro # noqa: F401
|
87
|
-
from ccxt.async_support.bitpanda import bitpanda # noqa: F401
|
88
86
|
from ccxt.async_support.bitrue import bitrue # noqa: F401
|
89
87
|
from ccxt.async_support.bitso import bitso # noqa: F401
|
90
88
|
from ccxt.async_support.bitstamp import bitstamp # noqa: F401
|
@@ -187,7 +185,6 @@ exchanges = [
|
|
187
185
|
'bit2c',
|
188
186
|
'bitbank',
|
189
187
|
'bitbns',
|
190
|
-
'bitcoincom',
|
191
188
|
'bitfinex',
|
192
189
|
'bitflyer',
|
193
190
|
'bitget',
|
@@ -195,7 +192,6 @@ exchanges = [
|
|
195
192
|
'bitmart',
|
196
193
|
'bitmex',
|
197
194
|
'bitopro',
|
198
|
-
'bitpanda',
|
199
195
|
'bitrue',
|
200
196
|
'bitso',
|
201
197
|
'bitstamp',
|
ccxt/async_support/ace.py
CHANGED
@@ -92,6 +92,8 @@ class ace(Exchange, ImplicitAPI):
|
|
92
92
|
'fetchOpenInterestHistory': False,
|
93
93
|
'fetchOpenInterests': False,
|
94
94
|
'fetchOpenOrders': True,
|
95
|
+
'fetchOption': False,
|
96
|
+
'fetchOptionChain': False,
|
95
97
|
'fetchOrder': True,
|
96
98
|
'fetchOrderBook': True,
|
97
99
|
'fetchOrders': False,
|
@@ -115,6 +117,7 @@ class ace(Exchange, ImplicitAPI):
|
|
115
117
|
'fetchTransactions': False,
|
116
118
|
'fetchTransfer': False,
|
117
119
|
'fetchTransfers': False,
|
120
|
+
'fetchVolatilityHistory': False,
|
118
121
|
'fetchWithdrawal': False,
|
119
122
|
'fetchWithdrawals': False,
|
120
123
|
'reduceMargin': False,
|
ccxt/async_support/alpaca.py
CHANGED
@@ -125,6 +125,8 @@ class alpaca(Exchange, ImplicitAPI):
|
|
125
125
|
'fetchOpenInterests': False,
|
126
126
|
'fetchOpenOrder': False,
|
127
127
|
'fetchOpenOrders': True,
|
128
|
+
'fetchOption': False,
|
129
|
+
'fetchOptionChain': False,
|
128
130
|
'fetchOrder': True,
|
129
131
|
'fetchOrderBook': True,
|
130
132
|
'fetchOrders': True,
|
@@ -147,6 +149,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
147
149
|
'fetchTransactionFees': False,
|
148
150
|
'fetchTransactions': False,
|
149
151
|
'fetchTransfers': False,
|
152
|
+
'fetchVolatilityHistory': False,
|
150
153
|
'fetchWithdrawals': True,
|
151
154
|
'reduceMargin': False,
|
152
155
|
'repayCrossMargin': False,
|
ccxt/async_support/ascendex.py
CHANGED
@@ -68,6 +68,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
68
68
|
'fetchFundingRate': 'emulated',
|
69
69
|
'fetchFundingRateHistory': False,
|
70
70
|
'fetchFundingRates': True,
|
71
|
+
'fetchGreeks': False,
|
71
72
|
'fetchIndexOHLCV': False,
|
72
73
|
'fetchLeverage': 'emulated',
|
73
74
|
'fetchLeverages': True,
|
@@ -77,10 +78,13 @@ class ascendex(Exchange, ImplicitAPI):
|
|
77
78
|
'fetchMarketLeverageTiers': 'emulated',
|
78
79
|
'fetchMarkets': True,
|
79
80
|
'fetchMarkOHLCV': False,
|
81
|
+
'fetchMySettlementHistory': False,
|
80
82
|
'fetchOHLCV': True,
|
81
83
|
'fetchOpenInterest': False,
|
82
84
|
'fetchOpenInterestHistory': False,
|
83
85
|
'fetchOpenOrders': True,
|
86
|
+
'fetchOption': False,
|
87
|
+
'fetchOptionChain': False,
|
84
88
|
'fetchOrder': True,
|
85
89
|
'fetchOrderBook': True,
|
86
90
|
'fetchOrders': False,
|
@@ -89,6 +93,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
89
93
|
'fetchPositions': True,
|
90
94
|
'fetchPositionsRisk': False,
|
91
95
|
'fetchPremiumIndexOHLCV': False,
|
96
|
+
'fetchSettlementHistory': False,
|
92
97
|
'fetchTicker': True,
|
93
98
|
'fetchTickers': True,
|
94
99
|
'fetchTime': True,
|
@@ -100,6 +105,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
100
105
|
'fetchTransactions': 'emulated',
|
101
106
|
'fetchTransfer': False,
|
102
107
|
'fetchTransfers': False,
|
108
|
+
'fetchVolatilityHistory': False,
|
103
109
|
'fetchWithdrawal': False,
|
104
110
|
'fetchWithdrawals': True,
|
105
111
|
'reduceMargin': True,
|
ccxt/async_support/bequant.py
CHANGED
@@ -36,7 +36,7 @@ class binanceusdm(binance, ImplicitAPI):
|
|
36
36
|
'fetchMarkets': ['linear'],
|
37
37
|
'defaultSubType': 'linear',
|
38
38
|
# https://www.binance.com/en/support/faq/360033162192
|
39
|
-
# tier amount, maintenance margin, initial margin
|
39
|
+
# tier amount, maintenance margin, initial margin,
|
40
40
|
'leverageBrackets': None,
|
41
41
|
'marginTypes': {},
|
42
42
|
'marginModes': {},
|
ccxt/async_support/bit2c.py
CHANGED
@@ -36,36 +36,61 @@ class bit2c(Exchange, ImplicitAPI):
|
|
36
36
|
'future': False,
|
37
37
|
'option': False,
|
38
38
|
'addMargin': False,
|
39
|
+
'borrowCrossMargin': False,
|
40
|
+
'borrowIsolatedMargin': False,
|
41
|
+
'borrowMargin': False,
|
39
42
|
'cancelAllOrders': False,
|
40
43
|
'cancelOrder': True,
|
41
44
|
'closeAllPositions': False,
|
42
45
|
'closePosition': False,
|
43
46
|
'createOrder': True,
|
47
|
+
'createOrderWithTakeProfitAndStopLoss': False,
|
48
|
+
'createOrderWithTakeProfitAndStopLossWs': False,
|
44
49
|
'createReduceOnlyOrder': False,
|
45
50
|
'fetchBalance': True,
|
51
|
+
'fetchBorrowInterest': False,
|
52
|
+
'fetchBorrowRate': False,
|
46
53
|
'fetchBorrowRateHistories': False,
|
47
54
|
'fetchBorrowRateHistory': False,
|
55
|
+
'fetchBorrowRates': False,
|
56
|
+
'fetchBorrowRatesPerSymbol': False,
|
48
57
|
'fetchCrossBorrowRate': False,
|
49
58
|
'fetchCrossBorrowRates': False,
|
50
59
|
'fetchDepositAddress': True,
|
51
60
|
'fetchDepositAddresses': False,
|
52
61
|
'fetchDepositAddressesByNetwork': False,
|
53
62
|
'fetchFundingHistory': False,
|
63
|
+
'fetchFundingInterval': False,
|
64
|
+
'fetchFundingIntervals': False,
|
54
65
|
'fetchFundingRate': False,
|
55
66
|
'fetchFundingRateHistory': False,
|
56
67
|
'fetchFundingRates': False,
|
68
|
+
'fetchGreeks': False,
|
57
69
|
'fetchIndexOHLCV': False,
|
58
70
|
'fetchIsolatedBorrowRate': False,
|
59
71
|
'fetchIsolatedBorrowRates': False,
|
72
|
+
'fetchIsolatedPositions': False,
|
60
73
|
'fetchLeverage': False,
|
74
|
+
'fetchLeverages': False,
|
61
75
|
'fetchLeverageTiers': False,
|
76
|
+
'fetchLiquidations': False,
|
77
|
+
'fetchLongShortRatio': False,
|
78
|
+
'fetchLongShortRatioHistory': False,
|
79
|
+
'fetchMarginAdjustmentHistory': False,
|
62
80
|
'fetchMarginMode': False,
|
81
|
+
'fetchMarginModes': False,
|
82
|
+
'fetchMarketLeverageTiers': False,
|
63
83
|
'fetchMarkOHLCV': False,
|
84
|
+
'fetchMarkPrices': False,
|
85
|
+
'fetchMyLiquidations': False,
|
86
|
+
'fetchMySettlementHistory': False,
|
64
87
|
'fetchMyTrades': True,
|
65
88
|
'fetchOpenInterest': False,
|
66
89
|
'fetchOpenInterestHistory': False,
|
67
90
|
'fetchOpenInterests': False,
|
68
91
|
'fetchOpenOrders': True,
|
92
|
+
'fetchOption': False,
|
93
|
+
'fetchOptionChain': False,
|
69
94
|
'fetchOrder': True,
|
70
95
|
'fetchOrderBook': True,
|
71
96
|
'fetchPosition': False,
|
@@ -84,6 +109,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
84
109
|
'fetchTransfer': False,
|
85
110
|
'fetchTransfers': False,
|
86
111
|
'fetchUnderlyingAssets': False,
|
112
|
+
'fetchVolatilityHistory': False,
|
87
113
|
'reduceMargin': False,
|
88
114
|
'repayCrossMargin': False,
|
89
115
|
'repayIsolatedMargin': False,
|
ccxt/async_support/bitbank.py
CHANGED
@@ -34,35 +34,62 @@ class bitbank(Exchange, ImplicitAPI):
|
|
34
34
|
'future': False,
|
35
35
|
'option': False,
|
36
36
|
'addMargin': False,
|
37
|
+
'borrowCrossMargin': False,
|
38
|
+
'borrowIsolatedMargin': False,
|
39
|
+
'borrowMargin': False,
|
37
40
|
'cancelAllOrders': False,
|
38
41
|
'cancelOrder': True,
|
39
42
|
'closeAllPositions': False,
|
40
43
|
'closePosition': False,
|
41
44
|
'createOrder': True,
|
45
|
+
'createOrderWithTakeProfitAndStopLoss': False,
|
46
|
+
'createOrderWithTakeProfitAndStopLossWs': False,
|
42
47
|
'createReduceOnlyOrder': False,
|
43
48
|
'fetchBalance': True,
|
49
|
+
'fetchBorrowInterest': False,
|
50
|
+
'fetchBorrowRate': False,
|
44
51
|
'fetchBorrowRateHistories': False,
|
45
52
|
'fetchBorrowRateHistory': False,
|
53
|
+
'fetchBorrowRates': False,
|
54
|
+
'fetchBorrowRatesPerSymbol': False,
|
46
55
|
'fetchCrossBorrowRate': False,
|
47
56
|
'fetchCrossBorrowRates': False,
|
48
57
|
'fetchDepositAddress': True,
|
49
58
|
'fetchDepositAddresses': False,
|
50
59
|
'fetchDepositAddressesByNetwork': False,
|
51
60
|
'fetchFundingHistory': False,
|
61
|
+
'fetchFundingInterval': False,
|
62
|
+
'fetchFundingIntervals': False,
|
52
63
|
'fetchFundingRate': False,
|
53
64
|
'fetchFundingRateHistory': False,
|
54
65
|
'fetchFundingRates': False,
|
66
|
+
'fetchGreeks': False,
|
55
67
|
'fetchIndexOHLCV': False,
|
56
68
|
'fetchIsolatedBorrowRate': False,
|
57
69
|
'fetchIsolatedBorrowRates': False,
|
70
|
+
'fetchIsolatedPositions': False,
|
58
71
|
'fetchLeverage': False,
|
72
|
+
'fetchLeverages': False,
|
59
73
|
'fetchLeverageTiers': False,
|
74
|
+
'fetchLiquidations': False,
|
75
|
+
'fetchLongShortRatio': False,
|
76
|
+
'fetchLongShortRatioHistory': False,
|
77
|
+
'fetchMarginAdjustmentHistory': False,
|
60
78
|
'fetchMarginMode': False,
|
79
|
+
'fetchMarginModes': False,
|
80
|
+
'fetchMarketLeverageTiers': False,
|
61
81
|
'fetchMarkOHLCV': False,
|
82
|
+
'fetchMarkPrices': False,
|
83
|
+
'fetchMyLiquidations': False,
|
84
|
+
'fetchMySettlementHistory': False,
|
62
85
|
'fetchMyTrades': True,
|
63
86
|
'fetchOHLCV': True,
|
87
|
+
'fetchOpenInterest': False,
|
64
88
|
'fetchOpenInterestHistory': False,
|
89
|
+
'fetchOpenInterests': False,
|
65
90
|
'fetchOpenOrders': True,
|
91
|
+
'fetchOption': False,
|
92
|
+
'fetchOptionChain': False,
|
66
93
|
'fetchOrder': True,
|
67
94
|
'fetchOrderBook': True,
|
68
95
|
'fetchPosition': False,
|
@@ -73,14 +100,19 @@ class bitbank(Exchange, ImplicitAPI):
|
|
73
100
|
'fetchPositionsHistory': False,
|
74
101
|
'fetchPositionsRisk': False,
|
75
102
|
'fetchPremiumIndexOHLCV': False,
|
103
|
+
'fetchSettlementHistory': False,
|
76
104
|
'fetchTicker': True,
|
77
105
|
'fetchTrades': True,
|
78
106
|
'fetchTradingFee': False,
|
79
107
|
'fetchTradingFees': True,
|
80
108
|
'fetchTransfer': False,
|
81
109
|
'fetchTransfers': False,
|
110
|
+
'fetchVolatilityHistory': False,
|
82
111
|
'reduceMargin': False,
|
112
|
+
'repayCrossMargin': False,
|
113
|
+
'repayIsolatedMargin': False,
|
83
114
|
'setLeverage': False,
|
115
|
+
'setMargin': False,
|
84
116
|
'setMarginMode': False,
|
85
117
|
'setPositionMode': False,
|
86
118
|
'transfer': False,
|
ccxt/async_support/bitbns.py
CHANGED
ccxt/async_support/bitflyer.py
CHANGED
ccxt/async_support/bithumb.py
CHANGED
@@ -40,30 +40,59 @@ class bithumb(Exchange, ImplicitAPI):
|
|
40
40
|
'future': False,
|
41
41
|
'option': False,
|
42
42
|
'addMargin': False,
|
43
|
+
'borrowCrossMargin': False,
|
44
|
+
'borrowIsolatedMargin': False,
|
45
|
+
'borrowMargin': False,
|
43
46
|
'cancelOrder': True,
|
44
47
|
'closeAllPositions': False,
|
45
48
|
'closePosition': False,
|
46
49
|
'createMarketOrder': True,
|
47
50
|
'createOrder': True,
|
51
|
+
'createOrderWithTakeProfitAndStopLoss': False,
|
52
|
+
'createOrderWithTakeProfitAndStopLossWs': False,
|
48
53
|
'createReduceOnlyOrder': False,
|
49
54
|
'fetchBalance': True,
|
55
|
+
'fetchBorrowInterest': False,
|
56
|
+
'fetchBorrowRate': False,
|
50
57
|
'fetchBorrowRateHistories': False,
|
51
58
|
'fetchBorrowRateHistory': False,
|
59
|
+
'fetchBorrowRates': False,
|
60
|
+
'fetchBorrowRatesPerSymbol': False,
|
52
61
|
'fetchCrossBorrowRate': False,
|
53
62
|
'fetchCrossBorrowRates': False,
|
54
63
|
'fetchFundingHistory': False,
|
64
|
+
'fetchFundingInterval': False,
|
65
|
+
'fetchFundingIntervals': False,
|
55
66
|
'fetchFundingRate': False,
|
56
67
|
'fetchFundingRateHistory': False,
|
57
68
|
'fetchFundingRates': False,
|
69
|
+
'fetchGreeks': False,
|
58
70
|
'fetchIndexOHLCV': False,
|
59
71
|
'fetchIsolatedBorrowRate': False,
|
60
72
|
'fetchIsolatedBorrowRates': False,
|
73
|
+
'fetchIsolatedPositions': False,
|
61
74
|
'fetchLeverage': False,
|
75
|
+
'fetchLeverages': False,
|
76
|
+
'fetchLeverageTiers': False,
|
77
|
+
'fetchLiquidations': False,
|
78
|
+
'fetchLongShortRatio': False,
|
79
|
+
'fetchLongShortRatioHistory': False,
|
80
|
+
'fetchMarginAdjustmentHistory': False,
|
81
|
+
'fetchMarginMode': False,
|
82
|
+
'fetchMarginModes': False,
|
83
|
+
'fetchMarketLeverageTiers': False,
|
62
84
|
'fetchMarkets': True,
|
63
85
|
'fetchMarkOHLCV': False,
|
86
|
+
'fetchMarkPrices': False,
|
87
|
+
'fetchMyLiquidations': False,
|
88
|
+
'fetchMySettlementHistory': False,
|
64
89
|
'fetchOHLCV': True,
|
90
|
+
'fetchOpenInterest': False,
|
65
91
|
'fetchOpenInterestHistory': False,
|
92
|
+
'fetchOpenInterests': False,
|
66
93
|
'fetchOpenOrders': True,
|
94
|
+
'fetchOption': False,
|
95
|
+
'fetchOptionChain': False,
|
67
96
|
'fetchOrder': True,
|
68
97
|
'fetchOrderBook': True,
|
69
98
|
'fetchPosition': False,
|
@@ -74,13 +103,18 @@ class bithumb(Exchange, ImplicitAPI):
|
|
74
103
|
'fetchPositionsHistory': False,
|
75
104
|
'fetchPositionsRisk': False,
|
76
105
|
'fetchPremiumIndexOHLCV': False,
|
106
|
+
'fetchSettlementHistory': False,
|
77
107
|
'fetchTicker': True,
|
78
108
|
'fetchTickers': True,
|
79
109
|
'fetchTrades': True,
|
80
110
|
'fetchTransfer': False,
|
81
111
|
'fetchTransfers': False,
|
112
|
+
'fetchVolatilityHistory': False,
|
82
113
|
'reduceMargin': False,
|
114
|
+
'repayCrossMargin': False,
|
115
|
+
'repayIsolatedMargin': False,
|
83
116
|
'setLeverage': False,
|
117
|
+
'setMargin': False,
|
84
118
|
'setMarginMode': False,
|
85
119
|
'setPositionMode': False,
|
86
120
|
'transfer': False,
|
ccxt/async_support/bitmart.py
CHANGED
@@ -104,7 +104,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
104
104
|
'fetchOrders': False,
|
105
105
|
'fetchOrderTrades': True,
|
106
106
|
'fetchPosition': True,
|
107
|
-
'fetchPositionMode':
|
107
|
+
'fetchPositionMode': True,
|
108
108
|
'fetchPositions': True,
|
109
109
|
'fetchStatus': True,
|
110
110
|
'fetchTicker': True,
|
@@ -126,6 +126,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
126
126
|
'repayIsolatedMargin': True,
|
127
127
|
'setLeverage': True,
|
128
128
|
'setMarginMode': False,
|
129
|
+
'setPositionMode': True,
|
129
130
|
'transfer': True,
|
130
131
|
'withdraw': True,
|
131
132
|
},
|
@@ -231,6 +232,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
231
232
|
'contract/private/affilate/rebate-list': 10,
|
232
233
|
'contract/private/affilate/trade-list': 10,
|
233
234
|
'contract/private/transaction-history': 10,
|
235
|
+
'contract/private/get-position-mode': 1,
|
234
236
|
},
|
235
237
|
'post': {
|
236
238
|
# sub-account endpoints
|
@@ -283,6 +285,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
283
285
|
'contract/private/modify-tp-sl-order': 2.5,
|
284
286
|
'contract/private/submit-trail-order': 2.5, # weight is not provided by the exchange, is set order
|
285
287
|
'contract/private/cancel-trail-order': 1.5, # weight is not provided by the exchange, is set order
|
288
|
+
'contract/private/set-position-mode': 1,
|
286
289
|
},
|
287
290
|
},
|
288
291
|
},
|
@@ -1205,7 +1208,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1205
1208
|
# {
|
1206
1209
|
# "message": "OK",
|
1207
1210
|
# "code": 1000,
|
1208
|
-
# "trace": "619294ecef584282b26a3be322b1e01f.66.
|
1211
|
+
# "trace": "619294ecef584282b26a3be322b1e01f.66.17403093228242229",
|
1209
1212
|
# "data": {
|
1210
1213
|
# "currencies": [
|
1211
1214
|
# {
|
@@ -3847,10 +3850,11 @@ class bitmart(Exchange, ImplicitAPI):
|
|
3847
3850
|
timestamp = self.safe_integer(transaction, 'apply_time')
|
3848
3851
|
currencyId = self.safe_string(transaction, 'currency')
|
3849
3852
|
networkId: Str = None
|
3850
|
-
if currencyId
|
3851
|
-
|
3852
|
-
|
3853
|
-
|
3853
|
+
if currencyId is not None:
|
3854
|
+
if currencyId.find('NFT') < 0:
|
3855
|
+
parts = currencyId.split('-')
|
3856
|
+
currencyId = self.safe_string(parts, 0)
|
3857
|
+
networkId = self.safe_string(parts, 1)
|
3854
3858
|
code = self.safe_currency_code(currencyId, currency)
|
3855
3859
|
status = self.parse_transaction_status(self.safe_string(transaction, 'status'))
|
3856
3860
|
feeCost = self.safe_number(transaction, 'fee')
|
@@ -5212,6 +5216,66 @@ class bitmart(Exchange, ImplicitAPI):
|
|
5212
5216
|
addresses.append(address)
|
5213
5217
|
return addresses
|
5214
5218
|
|
5219
|
+
async def set_position_mode(self, hedged: bool, symbol: Str = None, params={}):
|
5220
|
+
"""
|
5221
|
+
set hedged to True or False for a market
|
5222
|
+
|
5223
|
+
https://developer-pro.bitmart.com/en/futuresv2/#submit-leverage-signed
|
5224
|
+
|
5225
|
+
:param bool hedged: set to True to use dualSidePosition
|
5226
|
+
:param str symbol: not used by bingx setPositionMode()
|
5227
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5228
|
+
:returns dict: response from the exchange
|
5229
|
+
"""
|
5230
|
+
await self.load_markets()
|
5231
|
+
positionMode = None
|
5232
|
+
if hedged:
|
5233
|
+
positionMode = 'hedge_mode'
|
5234
|
+
else:
|
5235
|
+
positionMode = 'one_way_mode'
|
5236
|
+
request: dict = {
|
5237
|
+
'position_mode': positionMode,
|
5238
|
+
}
|
5239
|
+
#
|
5240
|
+
# {
|
5241
|
+
# "code": 1000,
|
5242
|
+
# "trace": "0cc6f4c4-8b8c-4253-8e90-8d3195aa109c",
|
5243
|
+
# "message": "Ok",
|
5244
|
+
# "data": {
|
5245
|
+
# "position_mode":"one_way_mode"
|
5246
|
+
# }
|
5247
|
+
# }
|
5248
|
+
#
|
5249
|
+
return await self.privatePostContractPrivateSetPositionMode(self.extend(request, params))
|
5250
|
+
|
5251
|
+
async def fetch_position_mode(self, symbol: Str = None, params={}):
|
5252
|
+
"""
|
5253
|
+
fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
|
5254
|
+
|
5255
|
+
https://developer-pro.bitmart.com/en/futuresv2/#get-position-mode-keyed
|
5256
|
+
|
5257
|
+
:param str symbol: not used
|
5258
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5259
|
+
:returns dict: an object detailing whether the market is in hedged or one-way mode
|
5260
|
+
"""
|
5261
|
+
response = await self.privateGetContractPrivateGetPositionMode(params)
|
5262
|
+
#
|
5263
|
+
# {
|
5264
|
+
# "code": 1000,
|
5265
|
+
# "trace": "0cc6f4c4-8b8c-4253-8e90-8d3195aa109c",
|
5266
|
+
# "message": "Ok",
|
5267
|
+
# "data": {
|
5268
|
+
# "position_mode":"one_way_mode"
|
5269
|
+
# }
|
5270
|
+
# }
|
5271
|
+
#
|
5272
|
+
data = self.safe_dict(response, 'data')
|
5273
|
+
positionMode = self.safe_string(data, 'position_mode')
|
5274
|
+
return {
|
5275
|
+
'info': response,
|
5276
|
+
'hedged': (positionMode == 'hedge_mode'),
|
5277
|
+
}
|
5278
|
+
|
5215
5279
|
def nonce(self):
|
5216
5280
|
return self.milliseconds() - self.options['timeDifference']
|
5217
5281
|
|