ccxt 4.4.88__py2.py3-none-any.whl → 4.4.91__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 -3
- ccxt/abstract/bitget.py +58 -0
- ccxt/abstract/bitrue.py +65 -65
- ccxt/abstract/cryptocom.py +2 -0
- ccxt/abstract/luno.py +1 -0
- ccxt/async_support/__init__.py +1 -3
- ccxt/async_support/base/exchange.py +6 -3
- ccxt/async_support/base/ws/client.py +173 -64
- ccxt/async_support/base/ws/future.py +23 -50
- ccxt/async_support/binance.py +2 -2
- ccxt/async_support/bingx.py +55 -29
- ccxt/async_support/bitget.py +469 -147
- ccxt/async_support/bitmex.py +2 -1
- ccxt/async_support/bitrue.py +72 -66
- ccxt/async_support/bitvavo.py +34 -0
- ccxt/async_support/btcalpha.py +35 -0
- ccxt/async_support/btcbox.py +35 -0
- ccxt/async_support/btcmarkets.py +35 -0
- ccxt/async_support/btcturk.py +35 -0
- ccxt/async_support/bybit.py +9 -3
- ccxt/async_support/cex.py +61 -0
- ccxt/async_support/coinbase.py +1 -3
- ccxt/async_support/cryptocom.py +66 -2
- ccxt/async_support/cryptomus.py +1 -1
- ccxt/async_support/delta.py +2 -2
- ccxt/async_support/digifinex.py +39 -99
- ccxt/async_support/exmo.py +14 -7
- ccxt/async_support/gate.py +14 -7
- ccxt/async_support/hashkey.py +15 -28
- ccxt/async_support/hollaex.py +27 -22
- ccxt/async_support/hyperliquid.py +104 -53
- ccxt/async_support/kraken.py +54 -50
- ccxt/async_support/luno.py +87 -1
- ccxt/async_support/mexc.py +1 -0
- ccxt/async_support/modetrade.py +2 -2
- ccxt/async_support/okx.py +2 -1
- ccxt/async_support/paradex.py +1 -1
- ccxt/async_support/phemex.py +16 -8
- ccxt/async_support/tradeogre.py +3 -3
- ccxt/async_support/xt.py +1 -1
- ccxt/base/exchange.py +20 -8
- ccxt/binance.py +2 -2
- ccxt/bingx.py +55 -29
- ccxt/bitget.py +469 -147
- ccxt/bitmex.py +2 -1
- ccxt/bitrue.py +72 -66
- ccxt/bitvavo.py +34 -0
- ccxt/btcalpha.py +35 -0
- ccxt/btcbox.py +35 -0
- ccxt/btcmarkets.py +35 -0
- ccxt/btcturk.py +35 -0
- ccxt/bybit.py +9 -3
- ccxt/cex.py +61 -0
- ccxt/coinbase.py +1 -3
- ccxt/cryptocom.py +66 -2
- ccxt/cryptomus.py +1 -1
- ccxt/delta.py +2 -2
- ccxt/digifinex.py +39 -99
- ccxt/exmo.py +13 -7
- ccxt/gate.py +14 -7
- ccxt/hashkey.py +15 -28
- ccxt/hollaex.py +27 -22
- ccxt/hyperliquid.py +104 -53
- ccxt/kraken.py +53 -50
- ccxt/luno.py +87 -1
- ccxt/mexc.py +1 -0
- ccxt/modetrade.py +2 -2
- ccxt/okx.py +2 -1
- ccxt/paradex.py +1 -1
- ccxt/phemex.py +16 -8
- ccxt/pro/__init__.py +1 -127
- ccxt/pro/bitstamp.py +1 -1
- ccxt/pro/bybit.py +6 -136
- ccxt/pro/coinbase.py +2 -0
- ccxt/pro/cryptocom.py +27 -0
- ccxt/pro/kraken.py +249 -267
- ccxt/pro/mexc.py +0 -1
- ccxt/tradeogre.py +3 -3
- ccxt/xt.py +1 -1
- {ccxt-4.4.88.dist-info → ccxt-4.4.91.dist-info}/METADATA +64 -23
- {ccxt-4.4.88.dist-info → ccxt-4.4.91.dist-info}/RECORD +84 -101
- ccxt/abstract/coinlist.py +0 -57
- ccxt/async_support/base/ws/aiohttp_client.py +0 -147
- ccxt/async_support/bitcoincom.py +0 -18
- ccxt/async_support/bitfinex1.py +0 -1711
- ccxt/async_support/bitpanda.py +0 -17
- ccxt/async_support/coinlist.py +0 -2542
- ccxt/async_support/poloniexfutures.py +0 -1875
- ccxt/bitcoincom.py +0 -18
- ccxt/bitfinex1.py +0 -1710
- ccxt/bitpanda.py +0 -17
- ccxt/coinlist.py +0 -2542
- ccxt/poloniexfutures.py +0 -1875
- ccxt/pro/bitcoincom.py +0 -35
- ccxt/pro/bitfinex1.py +0 -635
- ccxt/pro/bitpanda.py +0 -16
- ccxt/pro/poloniexfutures.py +0 -1004
- ccxt/pro/wazirx.py +0 -766
- {ccxt-4.4.88.dist-info → ccxt-4.4.91.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.88.dist-info → ccxt-4.4.91.dist-info}/WHEEL +0 -0
- {ccxt-4.4.88.dist-info → ccxt-4.4.91.dist-info}/top_level.txt +0 -0
ccxt/pro/bybit.py
CHANGED
@@ -1786,11 +1786,12 @@ class bybit(ccxt.async_support.bybit):
|
|
1786
1786
|
rawOrders = self.safe_value(rawOrders, 'result', rawOrders)
|
1787
1787
|
symbols: dict = {}
|
1788
1788
|
for i in range(0, len(rawOrders)):
|
1789
|
-
parsed =
|
1790
|
-
if isSpot:
|
1791
|
-
|
1792
|
-
else:
|
1793
|
-
|
1789
|
+
parsed = self.parse_order(rawOrders[i])
|
1790
|
+
# if isSpot:
|
1791
|
+
# parsed = self.parseWsSpotOrder(rawOrders[i])
|
1792
|
+
# else:
|
1793
|
+
# parsed = self.parse_order(rawOrders[i])
|
1794
|
+
# }
|
1794
1795
|
symbol = parsed['symbol']
|
1795
1796
|
symbols[symbol] = True
|
1796
1797
|
orders.append(parsed)
|
@@ -1801,137 +1802,6 @@ class bybit(ccxt.async_support.bybit):
|
|
1801
1802
|
messageHash = 'orders'
|
1802
1803
|
client.resolve(orders, messageHash)
|
1803
1804
|
|
1804
|
-
def parse_ws_spot_order(self, order, market=None):
|
1805
|
-
#
|
1806
|
-
# {
|
1807
|
-
# "e": "executionReport",
|
1808
|
-
# "E": "1653297251061", # timestamp
|
1809
|
-
# "s": "LTCUSDT", # symbol
|
1810
|
-
# "c": "1653297250740", # user id
|
1811
|
-
# "S": "SELL", # side
|
1812
|
-
# "o": "MARKET_OF_BASE", # order type
|
1813
|
-
# "f": "GTC", # time in force
|
1814
|
-
# "q": "0.16233", # quantity
|
1815
|
-
# "p": "0", # price
|
1816
|
-
# "X": "NEW", # status
|
1817
|
-
# "i": "1162336018974750208", # order id
|
1818
|
-
# "M": "0",
|
1819
|
-
# "l": "0", # last filled
|
1820
|
-
# "z": "0", # total filled
|
1821
|
-
# "L": "0", # last traded price
|
1822
|
-
# "n": "0", # trading fee
|
1823
|
-
# "N": '', # fee asset
|
1824
|
-
# "u": True,
|
1825
|
-
# "w": True,
|
1826
|
-
# "m": False, # is limit_maker
|
1827
|
-
# "O": "1653297251042", # order creation
|
1828
|
-
# "Z": "0", # total filled
|
1829
|
-
# "A": "0", # account id
|
1830
|
-
# "C": False, # is close
|
1831
|
-
# "v": "0", # leverage
|
1832
|
-
# "d": "NO_LIQ"
|
1833
|
-
# }
|
1834
|
-
# v5
|
1835
|
-
# {
|
1836
|
-
# "category":"spot",
|
1837
|
-
# "symbol":"LTCUSDT",
|
1838
|
-
# "orderId":"1474764674982492160",
|
1839
|
-
# "orderLinkId":"1690541649154749",
|
1840
|
-
# "blockTradeId":"",
|
1841
|
-
# "side":"Buy",
|
1842
|
-
# "positionIdx":0,
|
1843
|
-
# "orderStatus":"Cancelled",
|
1844
|
-
# "cancelType":"UNKNOWN",
|
1845
|
-
# "rejectReason":"EC_NoError",
|
1846
|
-
# "timeInForce":"GTC",
|
1847
|
-
# "isLeverage":"0",
|
1848
|
-
# "price":"0",
|
1849
|
-
# "qty":"5.00000",
|
1850
|
-
# "avgPrice":"0",
|
1851
|
-
# "leavesQty":"0.00000",
|
1852
|
-
# "leavesValue":"5.0000000",
|
1853
|
-
# "cumExecQty":"0.00000",
|
1854
|
-
# "cumExecValue":"0.0000000",
|
1855
|
-
# "cumExecFee":"",
|
1856
|
-
# "orderType":"Market",
|
1857
|
-
# "stopOrderType":"",
|
1858
|
-
# "orderIv":"",
|
1859
|
-
# "triggerPrice":"0.000",
|
1860
|
-
# "takeProfit":"",
|
1861
|
-
# "stopLoss":"",
|
1862
|
-
# "triggerBy":"",
|
1863
|
-
# "tpTriggerBy":"",
|
1864
|
-
# "slTriggerBy":"",
|
1865
|
-
# "triggerDirection":0,
|
1866
|
-
# "placeType":"",
|
1867
|
-
# "lastPriceOnCreated":"0.000",
|
1868
|
-
# "closeOnTrigger":false,
|
1869
|
-
# "reduceOnly":false,
|
1870
|
-
# "smpGroup":0,
|
1871
|
-
# "smpType":"None",
|
1872
|
-
# "smpOrderId":"",
|
1873
|
-
# "createdTime":"1690541649160",
|
1874
|
-
# "updatedTime":"1690541649168"
|
1875
|
-
# }
|
1876
|
-
#
|
1877
|
-
id = self.safe_string_2(order, 'i', 'orderId')
|
1878
|
-
marketId = self.safe_string_2(order, 's', 'symbol')
|
1879
|
-
symbol = self.safe_symbol(marketId, market, None, 'spot')
|
1880
|
-
timestamp = self.safe_integer_2(order, 'O', 'createdTime')
|
1881
|
-
price = self.safe_string_2(order, 'p', 'price')
|
1882
|
-
if price == '0':
|
1883
|
-
price = None # market orders
|
1884
|
-
filled = self.safe_string_2(order, 'z', 'cumExecQty')
|
1885
|
-
status = self.parse_order_status(self.safe_string_2(order, 'X', 'orderStatus'))
|
1886
|
-
side = self.safe_string_lower_2(order, 'S', 'side')
|
1887
|
-
lastTradeTimestamp = self.safe_string_2(order, 'E', 'updatedTime')
|
1888
|
-
timeInForce = self.safe_string_2(order, 'f', 'timeInForce')
|
1889
|
-
amount = None
|
1890
|
-
cost = self.safe_string_2(order, 'Z', 'cumExecValue')
|
1891
|
-
type = self.safe_string_lower_2(order, 'o', 'orderType')
|
1892
|
-
if (type is not None) and (type.find('market') >= 0):
|
1893
|
-
type = 'market'
|
1894
|
-
if type == 'market' and side == 'buy':
|
1895
|
-
amount = filled
|
1896
|
-
else:
|
1897
|
-
amount = self.safe_string_2(order, 'orderQty', 'qty')
|
1898
|
-
fee = None
|
1899
|
-
feeCost = self.safe_string_2(order, 'n', 'cumExecFee')
|
1900
|
-
if feeCost is not None and feeCost != '0':
|
1901
|
-
feeCurrencyId = self.safe_string(order, 'N')
|
1902
|
-
feeCurrencyCode = self.safe_currency_code(feeCurrencyId)
|
1903
|
-
fee = {
|
1904
|
-
'cost': feeCost,
|
1905
|
-
'currency': feeCurrencyCode,
|
1906
|
-
}
|
1907
|
-
triggerPrice = self.omit_zero(self.safe_string(order, 'triggerPrice'))
|
1908
|
-
return self.safe_order({
|
1909
|
-
'info': order,
|
1910
|
-
'id': id,
|
1911
|
-
'clientOrderId': self.safe_string_2(order, 'c', 'orderLinkId'),
|
1912
|
-
'timestamp': timestamp,
|
1913
|
-
'datetime': self.iso8601(timestamp),
|
1914
|
-
'lastTradeTimestamp': lastTradeTimestamp,
|
1915
|
-
'symbol': symbol,
|
1916
|
-
'type': type,
|
1917
|
-
'timeInForce': timeInForce,
|
1918
|
-
'postOnly': None,
|
1919
|
-
'side': side,
|
1920
|
-
'price': price,
|
1921
|
-
'stopPrice': triggerPrice,
|
1922
|
-
'triggerPrice': triggerPrice,
|
1923
|
-
'takeProfitPrice': self.safe_string(order, 'takeProfit'),
|
1924
|
-
'stopLossPrice': self.safe_string(order, 'stopLoss'),
|
1925
|
-
'reduceOnly': self.safe_value(order, 'reduceOnly'),
|
1926
|
-
'amount': amount,
|
1927
|
-
'cost': cost,
|
1928
|
-
'average': self.safe_string(order, 'avgPrice'),
|
1929
|
-
'filled': filled,
|
1930
|
-
'remaining': None,
|
1931
|
-
'status': status,
|
1932
|
-
'fee': fee,
|
1933
|
-
}, market)
|
1934
|
-
|
1935
1805
|
async def watch_balance(self, params={}) -> Balances:
|
1936
1806
|
"""
|
1937
1807
|
watch balance and get the amount of funds available for trading or funds locked in orders
|
ccxt/pro/coinbase.py
CHANGED
@@ -160,6 +160,7 @@ class coinbase(ccxt.async_support.coinbase):
|
|
160
160
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
161
161
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
162
162
|
"""
|
163
|
+
await self.load_markets()
|
163
164
|
name = 'ticker'
|
164
165
|
return await self.subscribe(name, False, symbol, params)
|
165
166
|
|
@@ -173,6 +174,7 @@ class coinbase(ccxt.async_support.coinbase):
|
|
173
174
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
174
175
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
175
176
|
"""
|
177
|
+
await self.load_markets()
|
176
178
|
if symbols is None:
|
177
179
|
symbols = self.symbols
|
178
180
|
name = 'ticker_batch'
|
ccxt/pro/cryptocom.py
CHANGED
@@ -36,6 +36,7 @@ class cryptocom(ccxt.async_support.cryptocom):
|
|
36
36
|
'createOrderWs': True,
|
37
37
|
'cancelOrderWs': True,
|
38
38
|
'cancelAllOrders': True,
|
39
|
+
'editOrderWs': True,
|
39
40
|
},
|
40
41
|
'urls': {
|
41
42
|
'api': {
|
@@ -1019,6 +1020,31 @@ class cryptocom(ccxt.async_support.cryptocom):
|
|
1019
1020
|
messageHash = self.nonce()
|
1020
1021
|
return await self.watch_private_request(messageHash, request)
|
1021
1022
|
|
1023
|
+
async def edit_order_ws(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}) -> Order:
|
1024
|
+
"""
|
1025
|
+
edit a trade order
|
1026
|
+
|
1027
|
+
https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-amend-order
|
1028
|
+
|
1029
|
+
:param str id: order id
|
1030
|
+
:param str symbol: unified market symbol of the order to edit
|
1031
|
+
:param str [type]: not used by cryptocom editOrder
|
1032
|
+
:param str [side]: not used by cryptocom editOrder
|
1033
|
+
:param float amount:(mandatory) how much of the currency you want to trade in units of the base currency
|
1034
|
+
:param float price:(mandatory) the price for the order, in units of the quote currency, ignored in market orders
|
1035
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1036
|
+
:param str [params.clientOrderId]: the original client order id of the order to edit, required if id is not provided
|
1037
|
+
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1038
|
+
"""
|
1039
|
+
await self.load_markets()
|
1040
|
+
params = self.edit_order_request(id, symbol, amount, price, params)
|
1041
|
+
request: dict = {
|
1042
|
+
'method': 'private/amend-order',
|
1043
|
+
'params': params,
|
1044
|
+
}
|
1045
|
+
messageHash = self.nonce()
|
1046
|
+
return await self.watch_private_request(messageHash, request)
|
1047
|
+
|
1022
1048
|
def handle_order(self, client: Client, message):
|
1023
1049
|
#
|
1024
1050
|
# {
|
@@ -1258,6 +1284,7 @@ class cryptocom(ccxt.async_support.cryptocom):
|
|
1258
1284
|
'public/heartbeat': self.handle_ping,
|
1259
1285
|
'public/auth': self.handle_authenticate,
|
1260
1286
|
'private/create-order': self.handle_order,
|
1287
|
+
'private/amend-order': self.handle_order,
|
1261
1288
|
'private/cancel-order': self.handle_order,
|
1262
1289
|
'private/cancel-all-orders': self.handle_cancel_all_orders,
|
1263
1290
|
'private/close-position': self.handle_order,
|