ccxt 4.4.22__py2.py3-none-any.whl → 4.4.23__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/binance.py +64 -43
- ccxt/abstract/binancecoinm.py +64 -43
- ccxt/abstract/binanceus.py +64 -43
- ccxt/abstract/binanceusdm.py +64 -43
- ccxt/abstract/coincatch.py +94 -0
- ccxt/async_support/__init__.py +3 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +87 -62
- ccxt/async_support/bitfinex.py +4 -0
- ccxt/async_support/bitflyer.py +1 -0
- ccxt/async_support/bitrue.py +3 -0
- ccxt/async_support/bybit.py +2 -2
- ccxt/async_support/cex.py +4 -0
- ccxt/async_support/coinbase.py +1 -1
- ccxt/async_support/coinbaseexchange.py +3 -0
- ccxt/async_support/coincatch.py +4955 -0
- ccxt/async_support/coinex.py +60 -1
- ccxt/async_support/latoken.py +6 -0
- ccxt/async_support/mexc.py +1 -1
- ccxt/async_support/oceanex.py +2 -0
- ccxt/async_support/okcoin.py +1 -0
- ccxt/async_support/poloniex.py +5 -0
- ccxt/base/exchange.py +1 -1
- ccxt/binance.py +87 -62
- ccxt/bitfinex.py +4 -0
- ccxt/bitflyer.py +1 -0
- ccxt/bitrue.py +3 -0
- ccxt/bybit.py +2 -2
- ccxt/cex.py +4 -0
- ccxt/coinbase.py +1 -1
- ccxt/coinbaseexchange.py +3 -0
- ccxt/coincatch.py +4955 -0
- ccxt/coinex.py +60 -1
- ccxt/latoken.py +6 -0
- ccxt/mexc.py +1 -1
- ccxt/oceanex.py +2 -0
- ccxt/okcoin.py +1 -0
- ccxt/poloniex.py +5 -0
- ccxt/pro/__init__.py +3 -1
- ccxt/pro/coincatch.py +1429 -0
- ccxt/test/tests_async.py +15 -1
- ccxt/test/tests_sync.py +15 -1
- ccxt-4.4.23.dist-info/METADATA +636 -0
- {ccxt-4.4.22.dist-info → ccxt-4.4.23.dist-info}/RECORD +48 -44
- ccxt-4.4.22.dist-info/METADATA +0 -635
- {ccxt-4.4.22.dist-info → ccxt-4.4.23.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.22.dist-info → ccxt-4.4.23.dist-info}/WHEEL +0 -0
- {ccxt-4.4.22.dist-info → ccxt-4.4.23.dist-info}/top_level.txt +0 -0
ccxt/coinex.py
CHANGED
@@ -58,6 +58,8 @@ class coinex(Exchange, ImplicitAPI):
|
|
58
58
|
'cancelAllOrders': True,
|
59
59
|
'cancelOrder': True,
|
60
60
|
'cancelOrders': True,
|
61
|
+
'closeAllPositions': False,
|
62
|
+
'closePosition': True,
|
61
63
|
'createDepositAddress': True,
|
62
64
|
'createMarketBuyOrderWithCost': True,
|
63
65
|
'createMarketOrderWithCost': False,
|
@@ -1729,7 +1731,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
1729
1731
|
# "stop_id": 117180138153
|
1730
1732
|
# }
|
1731
1733
|
#
|
1732
|
-
# Swap createOrder, createOrders, editOrder, cancelOrders, cancelOrder, fetchOpenOrders, fetchClosedOrders
|
1734
|
+
# Swap createOrder, createOrders, editOrder, cancelOrders, cancelOrder, fetchOpenOrders, fetchClosedOrders, closePosition
|
1733
1735
|
#
|
1734
1736
|
# {
|
1735
1737
|
# "amount": "0.0001",
|
@@ -5363,6 +5365,63 @@ class coinex(Exchange, ImplicitAPI):
|
|
5363
5365
|
positions = self.parse_positions(records)
|
5364
5366
|
return self.filter_by_symbol_since_limit(positions, symbol, since, limit)
|
5365
5367
|
|
5368
|
+
def close_position(self, symbol: str, side: OrderSide = None, params={}) -> Order:
|
5369
|
+
"""
|
5370
|
+
closes an open position for a market
|
5371
|
+
:see: https://docs.coinex.com/api/v2/futures/position/http/close-position
|
5372
|
+
:param str symbol: unified CCXT market symbol
|
5373
|
+
:param str [side]: buy or sell, not used by coinex
|
5374
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5375
|
+
:param str params['type']: required by coinex, one of: limit, market, maker_only, ioc or fok, default is *market*
|
5376
|
+
:param str [params.price]: the price to fulfill the order, ignored in market orders
|
5377
|
+
:param str [params.amount]: the amount to trade in units of the base currency
|
5378
|
+
:param str [params.clientOrderId]: the client id of the order
|
5379
|
+
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
5380
|
+
"""
|
5381
|
+
self.load_markets()
|
5382
|
+
market = self.market(symbol)
|
5383
|
+
type = self.safe_string(params, 'type', 'market')
|
5384
|
+
request: dict = {
|
5385
|
+
'market': market['id'],
|
5386
|
+
'market_type': 'FUTURES',
|
5387
|
+
'type': type,
|
5388
|
+
}
|
5389
|
+
clientOrderId = self.safe_string_2(params, 'client_id', 'clientOrderId')
|
5390
|
+
if clientOrderId is not None:
|
5391
|
+
request['client_id'] = clientOrderId
|
5392
|
+
params = self.omit(params, 'clientOrderId')
|
5393
|
+
response = self.v2PrivatePostFuturesClosePosition(self.extend(request, params))
|
5394
|
+
#
|
5395
|
+
# {
|
5396
|
+
# "code": 0,
|
5397
|
+
# "data": {
|
5398
|
+
# "amount": "0.0001",
|
5399
|
+
# "client_id": "",
|
5400
|
+
# "created_at": 1729666043969,
|
5401
|
+
# "fee": "0.00335858",
|
5402
|
+
# "fee_ccy": "USDT",
|
5403
|
+
# "filled_amount": "0.0001",
|
5404
|
+
# "filled_value": "6.717179",
|
5405
|
+
# "last_filled_amount": "0.0001",
|
5406
|
+
# "last_filled_price": "67171.79",
|
5407
|
+
# "maker_fee_rate": "0",
|
5408
|
+
# "market": "BTCUSDT",
|
5409
|
+
# "market_type": "FUTURES",
|
5410
|
+
# "order_id": 155477479761,
|
5411
|
+
# "price": "0",
|
5412
|
+
# "realized_pnl": "-0.001823",
|
5413
|
+
# "side": "sell",
|
5414
|
+
# "taker_fee_rate": "0.0005",
|
5415
|
+
# "type": "market",
|
5416
|
+
# "unfilled_amount": "0",
|
5417
|
+
# "updated_at": 1729666043969
|
5418
|
+
# },
|
5419
|
+
# "message": "OK"
|
5420
|
+
# }
|
5421
|
+
#
|
5422
|
+
data = self.safe_dict(response, 'data', {})
|
5423
|
+
return self.parse_order(data, market)
|
5424
|
+
|
5366
5425
|
def handle_margin_mode_and_params(self, methodName, params={}, defaultValue=None):
|
5367
5426
|
"""
|
5368
5427
|
* @ignore
|
ccxt/latoken.py
CHANGED
@@ -60,6 +60,12 @@ class latoken(Exchange, ImplicitAPI):
|
|
60
60
|
'fetchDepositAddressesByNetwork': False,
|
61
61
|
'fetchDepositsWithdrawals': True,
|
62
62
|
'fetchDepositWithdrawFees': False,
|
63
|
+
'fetchFundingHistory': False,
|
64
|
+
'fetchFundingInterval': False,
|
65
|
+
'fetchFundingIntervals': False,
|
66
|
+
'fetchFundingRate': False,
|
67
|
+
'fetchFundingRateHistory': False,
|
68
|
+
'fetchFundingRates': False,
|
63
69
|
'fetchIsolatedBorrowRate': False,
|
64
70
|
'fetchIsolatedBorrowRates': False,
|
65
71
|
'fetchMarginMode': False,
|
ccxt/mexc.py
CHANGED
@@ -93,7 +93,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
93
93
|
'fetchFundingIntervals': False,
|
94
94
|
'fetchFundingRate': True,
|
95
95
|
'fetchFundingRateHistory': True,
|
96
|
-
'fetchFundingRates':
|
96
|
+
'fetchFundingRates': False,
|
97
97
|
'fetchIndexOHLCV': True,
|
98
98
|
'fetchIsolatedBorrowRate': False,
|
99
99
|
'fetchIsolatedBorrowRates': False,
|
ccxt/oceanex.py
CHANGED
@@ -57,6 +57,8 @@ class oceanex(Exchange, ImplicitAPI):
|
|
57
57
|
'fetchDepositAddress': 'emulated',
|
58
58
|
'fetchDepositAddresses': None,
|
59
59
|
'fetchDepositAddressesByNetwork': True,
|
60
|
+
'fetchFundingRateHistory': False,
|
61
|
+
'fetchFundingRates': False,
|
60
62
|
'fetchIsolatedBorrowRate': False,
|
61
63
|
'fetchIsolatedBorrowRates': False,
|
62
64
|
'fetchMarkets': True,
|
ccxt/okcoin.py
CHANGED
ccxt/poloniex.py
CHANGED
@@ -62,7 +62,12 @@ class poloniex(Exchange, ImplicitAPI):
|
|
62
62
|
'fetchDepositsWithdrawals': True,
|
63
63
|
'fetchDepositWithdrawFee': 'emulated',
|
64
64
|
'fetchDepositWithdrawFees': True,
|
65
|
+
'fetchFundingHistory': False,
|
66
|
+
'fetchFundingInterval': False,
|
67
|
+
'fetchFundingIntervals': False,
|
65
68
|
'fetchFundingRate': False,
|
69
|
+
'fetchFundingRateHistory': False,
|
70
|
+
'fetchFundingRates': False,
|
66
71
|
'fetchMarginMode': False,
|
67
72
|
'fetchMarkets': True,
|
68
73
|
'fetchMyTrades': True,
|
ccxt/pro/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# ----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.23'
|
8
8
|
|
9
9
|
# ----------------------------------------------------------------------------
|
10
10
|
|
@@ -40,6 +40,7 @@ from ccxt.pro.coinbase import coinbase # noqa
|
|
40
40
|
from ccxt.pro.coinbaseadvanced import coinbaseadvanced # noqa: F401
|
41
41
|
from ccxt.pro.coinbaseexchange import coinbaseexchange # noqa: F401
|
42
42
|
from ccxt.pro.coinbaseinternational import coinbaseinternational # noqa: F401
|
43
|
+
from ccxt.pro.coincatch import coincatch # noqa: F401
|
43
44
|
from ccxt.pro.coincheck import coincheck # noqa: F401
|
44
45
|
from ccxt.pro.coinex import coinex # noqa: F401
|
45
46
|
from ccxt.pro.coinone import coinone # noqa: F401
|
@@ -114,6 +115,7 @@ exchanges = [
|
|
114
115
|
'coinbaseadvanced',
|
115
116
|
'coinbaseexchange',
|
116
117
|
'coinbaseinternational',
|
118
|
+
'coincatch',
|
117
119
|
'coincheck',
|
118
120
|
'coinex',
|
119
121
|
'coinone',
|