ccxt 4.3.6__py2.py3-none-any.whl → 4.3.8__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 +1 -1
- ccxt/abstract/coinbase.py +5 -0
- ccxt/ace.py +5 -0
- ccxt/alpaca.py +6 -0
- ccxt/ascendex.py +2 -2
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +5 -0
- ccxt/async_support/alpaca.py +6 -0
- ccxt/async_support/ascendex.py +2 -2
- ccxt/async_support/base/exchange.py +27 -1
- ccxt/async_support/bigone.py +1 -1
- ccxt/async_support/binance.py +6 -4
- ccxt/async_support/bingx.py +4 -2
- ccxt/async_support/bitbank.py +4 -1
- ccxt/async_support/bitfinex.py +1 -1
- ccxt/async_support/bitfinex2.py +1 -1
- ccxt/async_support/bitflyer.py +1 -1
- ccxt/async_support/bitget.py +71 -5
- ccxt/async_support/bithumb.py +5 -1
- ccxt/async_support/bitmart.py +1 -1
- ccxt/async_support/bitmex.py +3 -1
- ccxt/async_support/bitopro.py +6 -1
- ccxt/async_support/bitrue.py +1 -1
- ccxt/async_support/bitso.py +4 -1
- ccxt/async_support/bitstamp.py +4 -1
- ccxt/async_support/bitteam.py +4 -0
- ccxt/async_support/bitvavo.py +4 -1
- ccxt/async_support/bl3p.py +3 -0
- ccxt/async_support/blockchaincom.py +1 -1
- ccxt/async_support/btcalpha.py +3 -0
- ccxt/async_support/btcbox.py +3 -0
- ccxt/async_support/btcmarkets.py +4 -1
- ccxt/async_support/btcturk.py +3 -0
- ccxt/async_support/bybit.py +116 -14
- ccxt/async_support/cex.py +6 -0
- ccxt/async_support/coinbase.py +94 -18
- ccxt/async_support/coinbaseinternational.py +3 -1
- ccxt/async_support/coinbasepro.py +7 -1
- ccxt/async_support/coincheck.py +3 -0
- ccxt/async_support/coinex.py +255 -192
- ccxt/async_support/coinlist.py +5 -1
- ccxt/async_support/coinmate.py +4 -1
- ccxt/async_support/coinone.py +3 -0
- ccxt/async_support/coinsph.py +5 -1
- ccxt/async_support/coinspot.py +3 -0
- ccxt/async_support/cryptocom.py +3 -1
- ccxt/async_support/delta.py +2 -2
- ccxt/async_support/deribit.py +1 -1
- ccxt/async_support/digifinex.py +3 -3
- ccxt/async_support/exmo.py +8 -3
- ccxt/async_support/gate.py +112 -24
- ccxt/async_support/gemini.py +1 -1
- ccxt/async_support/hitbtc.py +7 -6
- ccxt/async_support/hollaex.py +1 -1
- ccxt/async_support/htx.py +3 -1
- ccxt/async_support/huobijp.py +1 -1
- ccxt/async_support/hyperliquid.py +2 -2
- ccxt/async_support/idex.py +4 -1
- ccxt/async_support/independentreserve.py +3 -0
- ccxt/async_support/indodax.py +4 -1
- ccxt/async_support/kraken.py +1 -1
- ccxt/async_support/kucoin.py +3 -1
- ccxt/async_support/kucoinfutures.py +3 -1
- ccxt/async_support/kuna.py +1 -1
- ccxt/async_support/latoken.py +6 -0
- ccxt/async_support/lbank.py +1 -1
- ccxt/async_support/luno.py +3 -0
- ccxt/async_support/lykke.py +6 -1
- ccxt/async_support/mercado.py +4 -1
- ccxt/async_support/mexc.py +110 -4
- ccxt/async_support/ndax.py +5 -1
- ccxt/async_support/novadax.py +5 -1
- ccxt/async_support/okcoin.py +1 -1
- ccxt/async_support/okx.py +81 -5
- ccxt/async_support/onetrading.py +4 -1
- ccxt/async_support/p2b.py +3 -0
- ccxt/async_support/phemex.py +1 -1
- ccxt/async_support/poloniex.py +1 -1
- ccxt/async_support/probit.py +4 -1
- ccxt/async_support/timex.py +3 -0
- ccxt/async_support/tokocrypto.py +1 -1
- ccxt/async_support/tradeogre.py +3 -0
- ccxt/async_support/upbit.py +1 -1
- ccxt/async_support/wavesexchange.py +4 -1
- ccxt/async_support/wazirx.py +3 -0
- ccxt/async_support/whitebit.py +1 -1
- ccxt/async_support/woo.py +4 -2
- ccxt/async_support/yobit.py +4 -1
- ccxt/async_support/zaif.py +1 -1
- ccxt/async_support/zonda.py +1 -1
- ccxt/base/exchange.py +38 -4
- ccxt/bigone.py +1 -1
- ccxt/binance.py +6 -4
- ccxt/bingx.py +4 -2
- ccxt/bitbank.py +4 -1
- ccxt/bitfinex.py +1 -1
- ccxt/bitfinex2.py +1 -1
- ccxt/bitflyer.py +1 -1
- ccxt/bitget.py +71 -5
- ccxt/bithumb.py +5 -1
- ccxt/bitmart.py +1 -1
- ccxt/bitmex.py +3 -1
- ccxt/bitopro.py +6 -1
- ccxt/bitrue.py +1 -1
- ccxt/bitso.py +4 -1
- ccxt/bitstamp.py +4 -1
- ccxt/bitteam.py +4 -0
- ccxt/bitvavo.py +4 -1
- ccxt/bl3p.py +3 -0
- ccxt/blockchaincom.py +1 -1
- ccxt/btcalpha.py +3 -0
- ccxt/btcbox.py +3 -0
- ccxt/btcmarkets.py +4 -1
- ccxt/btcturk.py +3 -0
- ccxt/bybit.py +116 -14
- ccxt/cex.py +6 -0
- ccxt/coinbase.py +94 -18
- ccxt/coinbaseinternational.py +3 -1
- ccxt/coinbasepro.py +7 -1
- ccxt/coincheck.py +3 -0
- ccxt/coinex.py +255 -192
- ccxt/coinlist.py +5 -1
- ccxt/coinmate.py +4 -1
- ccxt/coinone.py +3 -0
- ccxt/coinsph.py +5 -1
- ccxt/coinspot.py +3 -0
- ccxt/cryptocom.py +3 -1
- ccxt/delta.py +2 -2
- ccxt/deribit.py +1 -1
- ccxt/digifinex.py +3 -3
- ccxt/exmo.py +8 -3
- ccxt/gate.py +112 -24
- ccxt/gemini.py +1 -1
- ccxt/hitbtc.py +7 -6
- ccxt/hollaex.py +1 -1
- ccxt/htx.py +3 -1
- ccxt/huobijp.py +1 -1
- ccxt/hyperliquid.py +2 -2
- ccxt/idex.py +4 -1
- ccxt/independentreserve.py +3 -0
- ccxt/indodax.py +4 -1
- ccxt/kraken.py +1 -1
- ccxt/kucoin.py +3 -1
- ccxt/kucoinfutures.py +3 -1
- ccxt/kuna.py +1 -1
- ccxt/latoken.py +6 -0
- ccxt/lbank.py +1 -1
- ccxt/luno.py +3 -0
- ccxt/lykke.py +6 -1
- ccxt/mercado.py +4 -1
- ccxt/mexc.py +110 -4
- ccxt/ndax.py +5 -1
- ccxt/novadax.py +5 -1
- ccxt/okcoin.py +1 -1
- ccxt/okx.py +81 -5
- ccxt/onetrading.py +4 -1
- ccxt/p2b.py +3 -0
- ccxt/phemex.py +1 -1
- ccxt/poloniex.py +1 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bybit.py +1 -1
- ccxt/pro/coinbase.py +28 -28
- ccxt/probit.py +4 -1
- ccxt/timex.py +3 -0
- ccxt/tokocrypto.py +1 -1
- ccxt/tradeogre.py +3 -0
- ccxt/upbit.py +1 -1
- ccxt/wavesexchange.py +4 -1
- ccxt/wazirx.py +3 -0
- ccxt/whitebit.py +1 -1
- ccxt/woo.py +4 -2
- ccxt/yobit.py +4 -1
- ccxt/zaif.py +1 -1
- ccxt/zonda.py +1 -1
- {ccxt-4.3.6.dist-info → ccxt-4.3.8.dist-info}/METADATA +4 -4
- {ccxt-4.3.6.dist-info → ccxt-4.3.8.dist-info}/RECORD +178 -178
- {ccxt-4.3.6.dist-info → ccxt-4.3.8.dist-info}/WHEEL +0 -0
- {ccxt-4.3.6.dist-info → ccxt-4.3.8.dist-info}/top_level.txt +0 -0
ccxt/async_support/woo.py
CHANGED
@@ -97,8 +97,10 @@ class woo(Exchange, ImplicitAPI):
|
|
97
97
|
'fetchOrders': True,
|
98
98
|
'fetchOrderTrades': True,
|
99
99
|
'fetchPosition': True,
|
100
|
+
'fetchPositionHistory': False,
|
100
101
|
'fetchPositionMode': False,
|
101
102
|
'fetchPositions': True,
|
103
|
+
'fetchPositionsHistory': False,
|
102
104
|
'fetchPremiumIndexOHLCV': False,
|
103
105
|
'fetchStatus': True,
|
104
106
|
'fetchTicker': False,
|
@@ -2238,7 +2240,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2238
2240
|
}
|
2239
2241
|
return self.safe_string(statuses, status, status)
|
2240
2242
|
|
2241
|
-
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2243
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2242
2244
|
"""
|
2243
2245
|
make a withdrawal
|
2244
2246
|
:param str code: unified currency code
|
@@ -2962,7 +2964,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2962
2964
|
#
|
2963
2965
|
data = self.safe_dict(response, 'data', {})
|
2964
2966
|
rows = self.safe_list(data, 'tradeVos', [])
|
2965
|
-
return self.parse_conversions(rows, 'sellAsset', 'buyAsset', since, limit)
|
2967
|
+
return self.parse_conversions(rows, code, 'sellAsset', 'buyAsset', since, limit)
|
2966
2968
|
|
2967
2969
|
def parse_conversion(self, conversion, fromCurrency: Currency = None, toCurrency: Currency = None) -> Conversion:
|
2968
2970
|
#
|
ccxt/async_support/yobit.py
CHANGED
@@ -76,8 +76,11 @@ class yobit(Exchange, ImplicitAPI):
|
|
76
76
|
'fetchOrderBook': True,
|
77
77
|
'fetchOrderBooks': True,
|
78
78
|
'fetchPosition': False,
|
79
|
+
'fetchPositionHistory': False,
|
79
80
|
'fetchPositionMode': False,
|
80
81
|
'fetchPositions': False,
|
82
|
+
'fetchPositionsForSymbol': False,
|
83
|
+
'fetchPositionsHistory': False,
|
81
84
|
'fetchPositionsRisk': False,
|
82
85
|
'fetchPremiumIndexOHLCV': False,
|
83
86
|
'fetchTicker': True,
|
@@ -1150,7 +1153,7 @@ class yobit(Exchange, ImplicitAPI):
|
|
1150
1153
|
},
|
1151
1154
|
}
|
1152
1155
|
|
1153
|
-
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1156
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1154
1157
|
"""
|
1155
1158
|
:see: https://yobit.net/en/api
|
1156
1159
|
make a withdrawal
|
ccxt/async_support/zaif.py
CHANGED
@@ -557,7 +557,7 @@ class zaif(Exchange, ImplicitAPI):
|
|
557
557
|
response = await self.privatePostTradeHistory(self.extend(request, params))
|
558
558
|
return self.parse_orders(response['return'], market, since, limit)
|
559
559
|
|
560
|
-
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
560
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
561
561
|
"""
|
562
562
|
:see: https://zaif-api-document.readthedocs.io/ja/latest/TradingAPI.html#id41
|
563
563
|
make a withdrawal
|
ccxt/async_support/zonda.py
CHANGED
@@ -1649,7 +1649,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1649
1649
|
}
|
1650
1650
|
return self.safe_string(statuses, status, status)
|
1651
1651
|
|
1652
|
-
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1652
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1653
1653
|
"""
|
1654
1654
|
:see: https://docs.zondacrypto.exchange/reference/crypto-withdrawal-1
|
1655
1655
|
make a withdrawal
|
ccxt/base/exchange.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.3.
|
7
|
+
__version__ = '4.3.8'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -5683,7 +5683,7 @@ class Exchange(object):
|
|
5683
5683
|
def parse_leverage(self, leverage, market: Market = None):
|
5684
5684
|
raise NotSupported(self.id + ' parseLeverage() is not supported yet')
|
5685
5685
|
|
5686
|
-
def parse_conversions(self, conversions: List[Any], fromCurrencyKey: Str = None, toCurrencyKey: Str = None, since: Int = None, limit: Int = None, params={}):
|
5686
|
+
def parse_conversions(self, conversions: List[Any], code: Str = None, fromCurrencyKey: Str = None, toCurrencyKey: Str = None, since: Int = None, limit: Int = None, params={}):
|
5687
5687
|
conversions = self.to_array(conversions)
|
5688
5688
|
result = []
|
5689
5689
|
fromCurrency = None
|
@@ -5699,8 +5699,16 @@ class Exchange(object):
|
|
5699
5699
|
conversion = self.extend(self.parseConversion(entry, fromCurrency, toCurrency), params)
|
5700
5700
|
result.append(conversion)
|
5701
5701
|
sorted = self.sort_by(result, 'timestamp')
|
5702
|
-
|
5703
|
-
|
5702
|
+
currency = None
|
5703
|
+
if code is not None:
|
5704
|
+
currency = self.currency(code)
|
5705
|
+
code = currency['code']
|
5706
|
+
if code is None:
|
5707
|
+
return self.filter_by_since_limit(sorted, since, limit)
|
5708
|
+
fromConversion = self.filter_by(sorted, 'fromCurrency', code)
|
5709
|
+
toConversion = self.filter_by(sorted, 'toCurrency', code)
|
5710
|
+
both = self.array_concat(fromConversion, toConversion)
|
5711
|
+
return self.filter_by_since_limit(both, since, limit)
|
5704
5712
|
|
5705
5713
|
def parse_conversion(self, conversion, fromCurrency: Currency = None, toCurrency: Currency = None):
|
5706
5714
|
raise NotSupported(self.id + ' parseConversion() is not supported yet')
|
@@ -5772,6 +5780,32 @@ class Exchange(object):
|
|
5772
5780
|
reconstructedDate = day + month + year
|
5773
5781
|
return reconstructedDate
|
5774
5782
|
|
5783
|
+
def fetch_position_history(self, symbol: str, since: Int = None, limit: Int = None, params={}):
|
5784
|
+
"""
|
5785
|
+
fetches the history of margin added or reduced from contract isolated positions
|
5786
|
+
:param str [symbol]: unified market symbol
|
5787
|
+
:param int [since]: timestamp in ms of the position
|
5788
|
+
:param int [limit]: the maximum amount of candles to fetch, default=1000
|
5789
|
+
:param dict params: extra parameters specific to the exchange api endpoint
|
5790
|
+
:returns dict[]: a list of `position structures <https://docs.ccxt.com/#/?id=position-structure>`
|
5791
|
+
"""
|
5792
|
+
if self.has['fetchPositionsHistory']:
|
5793
|
+
positions = self.fetch_positions_history([symbol], since, limit, params)
|
5794
|
+
return self.safe_dict(positions, 0)
|
5795
|
+
else:
|
5796
|
+
raise NotSupported(self.id + ' fetchPositionHistory() is not supported yet')
|
5797
|
+
|
5798
|
+
def fetch_positions_history(self, symbols: Strings = None, since: Int = None, limit: Int = None, params={}):
|
5799
|
+
"""
|
5800
|
+
fetches the history of margin added or reduced from contract isolated positions
|
5801
|
+
:param str [symbol]: unified market symbol
|
5802
|
+
:param int [since]: timestamp in ms of the position
|
5803
|
+
:param int [limit]: the maximum amount of candles to fetch, default=1000
|
5804
|
+
:param dict params: extra parameters specific to the exchange api endpoint
|
5805
|
+
:returns dict[]: a list of `position structures <https://docs.ccxt.com/#/?id=position-structure>`
|
5806
|
+
"""
|
5807
|
+
raise NotSupported(self.id + ' fetchPositionsHistory() is not supported yet')
|
5808
|
+
|
5775
5809
|
def parse_margin_modification(self, data, market: Market = None):
|
5776
5810
|
raise NotSupported(self.id + ' parseMarginModification() is not supported yet')
|
5777
5811
|
|
ccxt/bigone.py
CHANGED
@@ -2043,7 +2043,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
2043
2043
|
}
|
2044
2044
|
return self.safe_string(statuses, status, 'failed')
|
2045
2045
|
|
2046
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2046
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2047
2047
|
"""
|
2048
2048
|
make a withdrawal
|
2049
2049
|
:see: https://open.big.one/docs/spot_withdrawal.html#create-withdrawal-of-user
|
ccxt/binance.py
CHANGED
@@ -147,8 +147,10 @@ class binance(Exchange, ImplicitAPI):
|
|
147
147
|
'fetchOrders': True,
|
148
148
|
'fetchOrderTrades': True,
|
149
149
|
'fetchPosition': True,
|
150
|
+
'fetchPositionHistory': False,
|
150
151
|
'fetchPositionMode': True,
|
151
152
|
'fetchPositions': True,
|
153
|
+
'fetchPositionsHistory': False,
|
152
154
|
'fetchPositionsRisk': True,
|
153
155
|
'fetchPremiumIndexOHLCV': False,
|
154
156
|
'fetchSettlementHistory': True,
|
@@ -8018,7 +8020,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8018
8020
|
}
|
8019
8021
|
return result
|
8020
8022
|
|
8021
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
8023
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
8022
8024
|
"""
|
8023
8025
|
make a withdrawal
|
8024
8026
|
:see: https://binance-docs.github.io/apidocs/spot/en/#withdraw-user_data
|
@@ -10379,7 +10381,7 @@ class binance(Exchange, ImplicitAPI):
|
|
10379
10381
|
'datetime': self.iso8601(timestamp),
|
10380
10382
|
}
|
10381
10383
|
|
10382
|
-
def reduce_margin(self, symbol: str, amount, params={}) -> MarginModification:
|
10384
|
+
def reduce_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
|
10383
10385
|
"""
|
10384
10386
|
:see: https://binance-docs.github.io/apidocs/delivery/en/#modify-isolated-position-margin-trade
|
10385
10387
|
:see: https://binance-docs.github.io/apidocs/futures/en/#modify-isolated-position-margin-trade
|
@@ -10391,7 +10393,7 @@ class binance(Exchange, ImplicitAPI):
|
|
10391
10393
|
"""
|
10392
10394
|
return self.modify_margin_helper(symbol, amount, 2, params)
|
10393
10395
|
|
10394
|
-
def add_margin(self, symbol: str, amount, params={}) -> MarginModification:
|
10396
|
+
def add_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
|
10395
10397
|
"""
|
10396
10398
|
:see: https://binance-docs.github.io/apidocs/delivery/en/#modify-isolated-position-margin-trade
|
10397
10399
|
:see: https://binance-docs.github.io/apidocs/futures/en/#modify-isolated-position-margin-trade
|
@@ -11881,7 +11883,7 @@ class binance(Exchange, ImplicitAPI):
|
|
11881
11883
|
# }
|
11882
11884
|
#
|
11883
11885
|
rows = self.safe_list(response, responseQuery, [])
|
11884
|
-
return self.parse_conversions(rows, fromCurrencyKey, toCurrencyKey, since, limit)
|
11886
|
+
return self.parse_conversions(rows, code, fromCurrencyKey, toCurrencyKey, since, limit)
|
11885
11887
|
|
11886
11888
|
def parse_conversion(self, conversion, fromCurrency: Currency = None, toCurrency: Currency = None) -> Conversion:
|
11887
11889
|
#
|
ccxt/bingx.py
CHANGED
@@ -86,8 +86,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
86
86
|
'fetchOrder': True,
|
87
87
|
'fetchOrderBook': True,
|
88
88
|
'fetchOrders': True,
|
89
|
+
'fetchPositionHistory': False,
|
89
90
|
'fetchPositionMode': True,
|
90
91
|
'fetchPositions': True,
|
92
|
+
'fetchPositionsHistory': False,
|
91
93
|
'fetchTicker': True,
|
92
94
|
'fetchTickers': True,
|
93
95
|
'fetchTime': True,
|
@@ -2315,7 +2317,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2315
2317
|
return self.safe_order({
|
2316
2318
|
'info': info,
|
2317
2319
|
'id': self.safe_string_2(order, 'orderId', 'i'),
|
2318
|
-
'clientOrderId': self.safe_string_n(order, ['clientOrderID', 'origClientOrderId', 'c']),
|
2320
|
+
'clientOrderId': self.safe_string_n(order, ['clientOrderID', 'clientOrderId', 'origClientOrderId', 'c']),
|
2319
2321
|
'symbol': self.safe_symbol(marketId, market, '-', marketType),
|
2320
2322
|
'timestamp': timestamp,
|
2321
2323
|
'datetime': self.iso8601(timestamp),
|
@@ -3682,7 +3684,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
3682
3684
|
coins = self.safe_list(response, 'data')
|
3683
3685
|
return self.parse_deposit_withdraw_fees(coins, codes, 'coin')
|
3684
3686
|
|
3685
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
3687
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
3686
3688
|
"""
|
3687
3689
|
make a withdrawal
|
3688
3690
|
:see: https://bingx-api.github.io/docs/#/common/account-api.html#Withdraw
|
ccxt/bitbank.py
CHANGED
@@ -64,8 +64,11 @@ class bitbank(Exchange, ImplicitAPI):
|
|
64
64
|
'fetchOrder': True,
|
65
65
|
'fetchOrderBook': True,
|
66
66
|
'fetchPosition': False,
|
67
|
+
'fetchPositionHistory': False,
|
67
68
|
'fetchPositionMode': False,
|
68
69
|
'fetchPositions': False,
|
70
|
+
'fetchPositionsForSymbol': False,
|
71
|
+
'fetchPositionsHistory': False,
|
69
72
|
'fetchPositionsRisk': False,
|
70
73
|
'fetchPremiumIndexOHLCV': False,
|
71
74
|
'fetchTicker': True,
|
@@ -763,7 +766,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
763
766
|
'info': response,
|
764
767
|
}
|
765
768
|
|
766
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
769
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
767
770
|
"""
|
768
771
|
make a withdrawal
|
769
772
|
:see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#new-withdrawal-request
|
ccxt/bitfinex.py
CHANGED
@@ -1462,7 +1462,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1462
1462
|
}
|
1463
1463
|
return self.safe_string(statuses, status, status)
|
1464
1464
|
|
1465
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1465
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1466
1466
|
"""
|
1467
1467
|
make a withdrawal
|
1468
1468
|
:see: https://docs.bitfinex.com/v1/reference/rest-auth-withdrawal
|
ccxt/bitfinex2.py
CHANGED
@@ -2424,7 +2424,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2424
2424
|
#
|
2425
2425
|
return self.parse_transactions(response, currency, since, limit)
|
2426
2426
|
|
2427
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2427
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2428
2428
|
"""
|
2429
2429
|
make a withdrawal
|
2430
2430
|
:see: https://docs.bitfinex.com/reference/rest-auth-withdraw
|
ccxt/bitflyer.py
CHANGED
@@ -764,7 +764,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
764
764
|
# todo unify parsePosition/parsePositions
|
765
765
|
return response
|
766
766
|
|
767
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
767
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
768
768
|
"""
|
769
769
|
make a withdrawal
|
770
770
|
:see: https://lightning.bitflyer.com/docs?lang=en#withdrawing-funds
|
ccxt/bitget.py
CHANGED
@@ -127,8 +127,10 @@ class bitget(Exchange, ImplicitAPI):
|
|
127
127
|
'fetchOrders': False,
|
128
128
|
'fetchOrderTrades': False,
|
129
129
|
'fetchPosition': True,
|
130
|
+
'fetchPositionHistory': 'emulated',
|
130
131
|
'fetchPositionMode': False,
|
131
132
|
'fetchPositions': True,
|
133
|
+
'fetchPositionsHistory': True,
|
132
134
|
'fetchPositionsRisk': False,
|
133
135
|
'fetchPremiumIndexOHLCV': False,
|
134
136
|
'fetchStatus': False,
|
@@ -2159,7 +2161,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2159
2161
|
rawTransactions = self.safe_list(response, 'data', [])
|
2160
2162
|
return self.parse_transactions(rawTransactions, currency, since, limit)
|
2161
2163
|
|
2162
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2164
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2163
2165
|
"""
|
2164
2166
|
make a withdrawal
|
2165
2167
|
:see: https://www.bitget.com/api-doc/spot/account/Wallet-Withdrawal
|
@@ -6085,7 +6087,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6085
6087
|
# "cTime": "1700807507275"
|
6086
6088
|
# }
|
6087
6089
|
#
|
6088
|
-
#
|
6090
|
+
# fetchPositionsHistory: privateMixGetV2MixPositionHistoryPosition
|
6089
6091
|
#
|
6090
6092
|
# {
|
6091
6093
|
# "symbol": "BTCUSDT",
|
@@ -6500,7 +6502,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6500
6502
|
'datetime': None,
|
6501
6503
|
}
|
6502
6504
|
|
6503
|
-
def reduce_margin(self, symbol: str, amount, params={}) -> MarginModification:
|
6505
|
+
def reduce_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
|
6504
6506
|
"""
|
6505
6507
|
remove margin from a position
|
6506
6508
|
:see: https://www.bitget.com/api-doc/contract/account/Change-Margin
|
@@ -6516,7 +6518,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6516
6518
|
raise ArgumentsRequired(self.id + ' reduceMargin() requires a holdSide parameter, either long or short')
|
6517
6519
|
return self.modify_margin_helper(symbol, amount, 'reduce', params)
|
6518
6520
|
|
6519
|
-
def add_margin(self, symbol: str, amount, params={}) -> MarginModification:
|
6521
|
+
def add_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
|
6520
6522
|
"""
|
6521
6523
|
add margin
|
6522
6524
|
:see: https://www.bitget.com/api-doc/contract/account/Change-Margin
|
@@ -7857,6 +7859,70 @@ class bitget(Exchange, ImplicitAPI):
|
|
7857
7859
|
'marginMode': marginType,
|
7858
7860
|
}
|
7859
7861
|
|
7862
|
+
def fetch_positions_history(self, symbols: Strings = None, since: Int = None, limit: Int = None, params={}) -> List[Position]:
|
7863
|
+
"""
|
7864
|
+
fetches historical positions
|
7865
|
+
:see: https://www.bitget.com/api-doc/contract/position/Get-History-Position
|
7866
|
+
:param str [symbol]: unified contract symbols
|
7867
|
+
:param int [since]: timestamp in ms of the earliest position to fetch, default=3 months ago, max range for params["until"] - since is 3 months
|
7868
|
+
:param int [limit]: the maximum amount of records to fetch, default=20, max=100
|
7869
|
+
:param dict params: extra parameters specific to the exchange api endpoint
|
7870
|
+
:param int [params.until]: timestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months
|
7871
|
+
*
|
7872
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
7873
|
+
:param str [params.productType]: USDT-FUTURES(default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES
|
7874
|
+
:returns dict[]: a list of `position structures <https://docs.ccxt.com/#/?id=position-structure>`
|
7875
|
+
"""
|
7876
|
+
self.load_markets()
|
7877
|
+
until = self.safe_integer(params, 'until')
|
7878
|
+
params = self.omit(params, 'until')
|
7879
|
+
request = {}
|
7880
|
+
if symbols is not None:
|
7881
|
+
symbolsLength = len(symbols)
|
7882
|
+
if symbolsLength > 0:
|
7883
|
+
market = self.market(symbols[0])
|
7884
|
+
request['symbol'] = market['id']
|
7885
|
+
if since is not None:
|
7886
|
+
request['startTime'] = since
|
7887
|
+
if limit is not None:
|
7888
|
+
request['limit'] = limit
|
7889
|
+
if until is not None:
|
7890
|
+
request['endTime'] = until
|
7891
|
+
response = self.privateMixGetV2MixPositionHistoryPosition(self.extend(request, params))
|
7892
|
+
#
|
7893
|
+
# {
|
7894
|
+
# code: '00000',
|
7895
|
+
# msg: 'success',
|
7896
|
+
# requestTime: '1712794148791',
|
7897
|
+
# data: {
|
7898
|
+
# list: [
|
7899
|
+
# {
|
7900
|
+
# symbol: 'XRPUSDT',
|
7901
|
+
# marginCoin: 'USDT',
|
7902
|
+
# holdSide: 'long',
|
7903
|
+
# openAvgPrice: '0.64967',
|
7904
|
+
# closeAvgPrice: '0.58799',
|
7905
|
+
# marginMode: 'isolated',
|
7906
|
+
# openTotalPos: '10',
|
7907
|
+
# closeTotalPos: '10',
|
7908
|
+
# pnl: '-0.62976205',
|
7909
|
+
# netProfit: '-0.65356802',
|
7910
|
+
# totalFunding: '-0.01638',
|
7911
|
+
# openFee: '-0.00389802',
|
7912
|
+
# closeFee: '-0.00352794',
|
7913
|
+
# ctime: '1709590322199',
|
7914
|
+
# utime: '1709667583395'
|
7915
|
+
# },
|
7916
|
+
# ...
|
7917
|
+
# ]
|
7918
|
+
# }
|
7919
|
+
# }
|
7920
|
+
#
|
7921
|
+
data = self.safe_dict(response, 'data')
|
7922
|
+
responseList = self.safe_list(data, 'list')
|
7923
|
+
positions = self.parse_positions(responseList, symbols, params)
|
7924
|
+
return self.filter_by_since_limit(positions, since, limit)
|
7925
|
+
|
7860
7926
|
def fetch_convert_quote(self, fromCode: str, toCode: str, amount: Num = None, params={}) -> Conversion:
|
7861
7927
|
"""
|
7862
7928
|
fetch a quote for converting from one currency to another
|
@@ -7996,7 +8062,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7996
8062
|
#
|
7997
8063
|
data = self.safe_dict(response, 'data', {})
|
7998
8064
|
dataList = self.safe_list(data, 'dataList', [])
|
7999
|
-
return self.parse_conversions(dataList, 'fromCoin', 'toCoin', since, limit)
|
8065
|
+
return self.parse_conversions(dataList, code, 'fromCoin', 'toCoin', since, limit)
|
8000
8066
|
|
8001
8067
|
def parse_conversion(self, conversion, fromCurrency: Currency = None, toCurrency: Currency = None) -> Conversion:
|
8002
8068
|
#
|
ccxt/bithumb.py
CHANGED
@@ -66,7 +66,11 @@ class bithumb(Exchange, ImplicitAPI):
|
|
66
66
|
'fetchOrder': True,
|
67
67
|
'fetchOrderBook': True,
|
68
68
|
'fetchPosition': False,
|
69
|
+
'fetchPositionHistory': False,
|
70
|
+
'fetchPositionMode': False,
|
69
71
|
'fetchPositions': False,
|
72
|
+
'fetchPositionsForSymbol': False,
|
73
|
+
'fetchPositionsHistory': False,
|
70
74
|
'fetchPositionsRisk': False,
|
71
75
|
'fetchPremiumIndexOHLCV': False,
|
72
76
|
'fetchTicker': True,
|
@@ -928,7 +932,7 @@ class bithumb(Exchange, ImplicitAPI):
|
|
928
932
|
}
|
929
933
|
return self.cancel_order(order['id'], order['symbol'], self.extend(request, params))
|
930
934
|
|
931
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
935
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
932
936
|
"""
|
933
937
|
make a withdrawal
|
934
938
|
:see: https://apidocs.bithumb.com/reference/%EC%BD%94%EC%9D%B8-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0-%EA%B0%9C%EC%9D%B8
|
ccxt/bitmart.py
CHANGED
@@ -2961,7 +2961,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
2961
2961
|
return code
|
2962
2962
|
return self.network_id_to_code(networkId)
|
2963
2963
|
|
2964
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2964
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2965
2965
|
"""
|
2966
2966
|
make a withdrawal
|
2967
2967
|
:param str code: unified currency code
|
ccxt/bitmex.py
CHANGED
@@ -88,7 +88,9 @@ class bitmex(Exchange, ImplicitAPI):
|
|
88
88
|
'fetchOrderBook': True,
|
89
89
|
'fetchOrders': True,
|
90
90
|
'fetchPosition': False,
|
91
|
+
'fetchPositionHistory': False,
|
91
92
|
'fetchPositions': True,
|
93
|
+
'fetchPositionsHistory': False,
|
92
94
|
'fetchPositionsRisk': False,
|
93
95
|
'fetchPremiumIndexOHLCV': False,
|
94
96
|
'fetchTicker': True,
|
@@ -2277,7 +2279,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
2277
2279
|
'takeProfitPrice': None,
|
2278
2280
|
})
|
2279
2281
|
|
2280
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2282
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2281
2283
|
"""
|
2282
2284
|
make a withdrawal
|
2283
2285
|
:see: https://www.bitmex.com/api/explorer/#not /User/User_requestWithdrawal
|
ccxt/bitopro.py
CHANGED
@@ -73,8 +73,13 @@ class bitopro(Exchange, ImplicitAPI):
|
|
73
73
|
'fetchOrderBook': True,
|
74
74
|
'fetchOrders': False,
|
75
75
|
'fetchOrderTrades': False,
|
76
|
+
'fetchPosition': False,
|
77
|
+
'fetchPositionHistory': False,
|
76
78
|
'fetchPositionMode': False,
|
77
79
|
'fetchPositions': False,
|
80
|
+
'fetchPositionsForSymbol': False,
|
81
|
+
'fetchPositionsHistory': False,
|
82
|
+
'fetchPositionsRisk': False,
|
78
83
|
'fetchPremiumIndexOHLCV': False,
|
79
84
|
'fetchTicker': True,
|
80
85
|
'fetchTickers': True,
|
@@ -1479,7 +1484,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1479
1484
|
#
|
1480
1485
|
return self.parse_transaction(result, currency)
|
1481
1486
|
|
1482
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1487
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1483
1488
|
"""
|
1484
1489
|
make a withdrawal
|
1485
1490
|
:see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/create_an_withdraw_invoice.md
|
ccxt/bitrue.py
CHANGED
@@ -2591,7 +2591,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2591
2591
|
'fee': fee,
|
2592
2592
|
}
|
2593
2593
|
|
2594
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2594
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2595
2595
|
"""
|
2596
2596
|
make a withdrawal
|
2597
2597
|
:see: https://github.com/Bitrue-exchange/Spot-official-api-docs#withdraw-commit--withdraw_data
|
ccxt/bitso.py
CHANGED
@@ -77,8 +77,11 @@ class bitso(Exchange, ImplicitAPI):
|
|
77
77
|
'fetchOrderBook': True,
|
78
78
|
'fetchOrderTrades': True,
|
79
79
|
'fetchPosition': False,
|
80
|
+
'fetchPositionHistory': False,
|
80
81
|
'fetchPositionMode': False,
|
81
82
|
'fetchPositions': False,
|
83
|
+
'fetchPositionsForSymbol': False,
|
84
|
+
'fetchPositionsHistory': False,
|
82
85
|
'fetchPositionsRisk': False,
|
83
86
|
'fetchPremiumIndexOHLCV': False,
|
84
87
|
'fetchTicker': True,
|
@@ -1473,7 +1476,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1473
1476
|
result[code]['info'][code] = withdrawFee
|
1474
1477
|
return result
|
1475
1478
|
|
1476
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1479
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1477
1480
|
"""
|
1478
1481
|
make a withdrawal
|
1479
1482
|
:param str code: unified currency code
|
ccxt/bitstamp.py
CHANGED
@@ -82,8 +82,11 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
82
82
|
'fetchOrder': True,
|
83
83
|
'fetchOrderBook': True,
|
84
84
|
'fetchPosition': False,
|
85
|
+
'fetchPositionHistory': False,
|
85
86
|
'fetchPositionMode': False,
|
86
87
|
'fetchPositions': False,
|
88
|
+
'fetchPositionsForSymbol': False,
|
89
|
+
'fetchPositionsHistory': False,
|
87
90
|
'fetchPositionsRisk': False,
|
88
91
|
'fetchPremiumIndexOHLCV': False,
|
89
92
|
'fetchTicker': True,
|
@@ -1963,7 +1966,7 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
1963
1966
|
'info': response,
|
1964
1967
|
}
|
1965
1968
|
|
1966
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1969
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1967
1970
|
"""
|
1968
1971
|
make a withdrawal
|
1969
1972
|
:see: https://www.bitstamp.net/api/#tag/Withdrawals/operation/RequestFiatWithdrawal
|
ccxt/bitteam.py
CHANGED
@@ -96,7 +96,11 @@ class bitteam(Exchange, ImplicitAPI):
|
|
96
96
|
'fetchOrders': True,
|
97
97
|
'fetchOrderTrades': False,
|
98
98
|
'fetchPosition': False,
|
99
|
+
'fetchPositionHistory': False,
|
100
|
+
'fetchPositionMode': False,
|
99
101
|
'fetchPositions': False,
|
102
|
+
'fetchPositionsForSymbol': False,
|
103
|
+
'fetchPositionsHistory': False,
|
100
104
|
'fetchPositionsRisk': False,
|
101
105
|
'fetchPremiumIndexOHLCV': False,
|
102
106
|
'fetchStatus': False,
|
ccxt/bitvavo.py
CHANGED
@@ -88,8 +88,11 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
88
88
|
'fetchOrderBook': True,
|
89
89
|
'fetchOrders': True,
|
90
90
|
'fetchPosition': False,
|
91
|
+
'fetchPositionHistory': False,
|
91
92
|
'fetchPositionMode': False,
|
92
93
|
'fetchPositions': False,
|
94
|
+
'fetchPositionsForSymbol': False,
|
95
|
+
'fetchPositionsHistory': False,
|
93
96
|
'fetchPositionsRisk': False,
|
94
97
|
'fetchPremiumIndexOHLCV': False,
|
95
98
|
'fetchTicker': True,
|
@@ -1627,7 +1630,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1627
1630
|
request['paymentId'] = tag
|
1628
1631
|
return self.extend(request, params)
|
1629
1632
|
|
1630
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1633
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1631
1634
|
"""
|
1632
1635
|
make a withdrawal
|
1633
1636
|
:param str code: unified currency code
|
ccxt/bl3p.py
CHANGED
@@ -61,8 +61,11 @@ class bl3p(Exchange, ImplicitAPI):
|
|
61
61
|
'fetchOpenInterestHistory': False,
|
62
62
|
'fetchOrderBook': True,
|
63
63
|
'fetchPosition': False,
|
64
|
+
'fetchPositionHistory': False,
|
64
65
|
'fetchPositionMode': False,
|
65
66
|
'fetchPositions': False,
|
67
|
+
'fetchPositionsForSymbol': False,
|
68
|
+
'fetchPositionsHistory': False,
|
66
69
|
'fetchPositionsRisk': False,
|
67
70
|
'fetchPremiumIndexOHLCV': False,
|
68
71
|
'fetchTicker': True,
|
ccxt/blockchaincom.py
CHANGED
@@ -873,7 +873,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
873
873
|
'fee': fee,
|
874
874
|
}
|
875
875
|
|
876
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
876
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
877
877
|
"""
|
878
878
|
make a withdrawal
|
879
879
|
:see: https://api.blockchain.com/v3/#/payments/createWithdrawal
|
ccxt/btcalpha.py
CHANGED
@@ -73,8 +73,11 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
73
73
|
'fetchOrderBook': True,
|
74
74
|
'fetchOrders': True,
|
75
75
|
'fetchPosition': False,
|
76
|
+
'fetchPositionHistory': False,
|
76
77
|
'fetchPositionMode': False,
|
77
78
|
'fetchPositions': False,
|
79
|
+
'fetchPositionsForSymbol': False,
|
80
|
+
'fetchPositionsHistory': False,
|
78
81
|
'fetchPositionsRisk': False,
|
79
82
|
'fetchPremiumIndexOHLCV': False,
|
80
83
|
'fetchTicker': True,
|
ccxt/btcbox.py
CHANGED
@@ -65,8 +65,11 @@ class btcbox(Exchange, ImplicitAPI):
|
|
65
65
|
'fetchOrderBook': True,
|
66
66
|
'fetchOrders': True,
|
67
67
|
'fetchPosition': False,
|
68
|
+
'fetchPositionHistory': False,
|
68
69
|
'fetchPositionMode': False,
|
69
70
|
'fetchPositions': False,
|
71
|
+
'fetchPositionsForSymbol': False,
|
72
|
+
'fetchPositionsHistory': False,
|
70
73
|
'fetchPositionsRisk': False,
|
71
74
|
'fetchPremiumIndexOHLCV': False,
|
72
75
|
'fetchTicker': True,
|
ccxt/btcmarkets.py
CHANGED
@@ -73,8 +73,11 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
73
73
|
'fetchOrderBook': True,
|
74
74
|
'fetchOrders': True,
|
75
75
|
'fetchPosition': False,
|
76
|
+
'fetchPositionHistory': False,
|
76
77
|
'fetchPositionMode': False,
|
77
78
|
'fetchPositions': False,
|
79
|
+
'fetchPositionsForSymbol': False,
|
80
|
+
'fetchPositionsHistory': False,
|
78
81
|
'fetchPositionsRisk': False,
|
79
82
|
'fetchPremiumIndexOHLCV': False,
|
80
83
|
'fetchTicker': True,
|
@@ -1093,7 +1096,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
1093
1096
|
#
|
1094
1097
|
return self.parse_trades(response, market, since, limit)
|
1095
1098
|
|
1096
|
-
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1099
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1097
1100
|
"""
|
1098
1101
|
make a withdrawal
|
1099
1102
|
:see: https://docs.btcmarkets.net/v3/#tag/Fund-Management-APIs/paths/~1v3~1withdrawals/post
|