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/gate.py
CHANGED
@@ -945,6 +945,7 @@ class gate(Exchange, ImplicitAPI):
|
|
945
945
|
except Exception as e:
|
946
946
|
# if the request fails, the unifiedAccount is disabled
|
947
947
|
self.options['unifiedAccount'] = False
|
948
|
+
return self.options['unifiedAccount']
|
948
949
|
|
949
950
|
def upgrade_unified_trade_account(self, params={}):
|
950
951
|
return self.privateUnifiedPutUnifiedMode(params)
|
ccxt/hyperliquid.py
CHANGED
ccxt/krakenfutures.py
CHANGED
@@ -51,6 +51,8 @@ class krakenfutures(Exchange, ImplicitAPI):
|
|
51
51
|
'cancelOrders': True,
|
52
52
|
'createMarketOrder': False,
|
53
53
|
'createOrder': True,
|
54
|
+
'createStopOrder': True,
|
55
|
+
'createTriggerOrder': True,
|
54
56
|
'editOrder': True,
|
55
57
|
'fetchBalance': True,
|
56
58
|
'fetchBorrowRateHistories': False,
|
@@ -216,7 +218,7 @@ class krakenfutures(Exchange, ImplicitAPI):
|
|
216
218
|
'invalidAmount': BadRequest,
|
217
219
|
'insufficientFunds': InsufficientFunds,
|
218
220
|
'Bad Request': BadRequest, # The URL contains invalid characters.(Please encode the json URL parameter)
|
219
|
-
'Unavailable':
|
221
|
+
'Unavailable': ExchangeNotAvailable, # https://github.com/ccxt/ccxt/issues/24338
|
220
222
|
'invalidUnit': BadRequest,
|
221
223
|
'Json Parse Error': ExchangeError,
|
222
224
|
'nonceBelowThreshold': InvalidNonce,
|
ccxt/okcoin.py
CHANGED
@@ -56,6 +56,8 @@ class okcoin(Exchange, ImplicitAPI):
|
|
56
56
|
'createMarketOrderWithCost': False,
|
57
57
|
'createMarketSellOrderWithCost': False,
|
58
58
|
'createOrder': True,
|
59
|
+
'createStopOrder': True,
|
60
|
+
'createTriggerOrder': True,
|
59
61
|
'fetchBalance': True,
|
60
62
|
'fetchBorrowInterest': False,
|
61
63
|
'fetchBorrowRate': False,
|
ccxt/okx.py
CHANGED
@@ -1204,6 +1204,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1204
1204
|
'default': {
|
1205
1205
|
'sandbox': True,
|
1206
1206
|
'createOrder': {
|
1207
|
+
'marginMode': True,
|
1207
1208
|
'triggerPrice': True,
|
1208
1209
|
'triggerPriceType': {
|
1209
1210
|
'last': True,
|
@@ -1213,7 +1214,6 @@ class okx(Exchange, ImplicitAPI):
|
|
1213
1214
|
'triggerDirection': False,
|
1214
1215
|
'stopLossPrice': True,
|
1215
1216
|
'takeProfitPrice': True,
|
1216
|
-
'marginMode': True,
|
1217
1217
|
'attachedStopLossTakeProfit': {
|
1218
1218
|
'triggerPriceType': {
|
1219
1219
|
'last': True,
|
@@ -1241,6 +1241,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1241
1241
|
'max': 20,
|
1242
1242
|
},
|
1243
1243
|
'fetchMyTrades': {
|
1244
|
+
'marginMode': False,
|
1244
1245
|
'daysBack': 90,
|
1245
1246
|
'limit': 100,
|
1246
1247
|
'untilDays': 10000,
|
@@ -1251,18 +1252,18 @@ class okx(Exchange, ImplicitAPI):
|
|
1251
1252
|
'trailing': True,
|
1252
1253
|
},
|
1253
1254
|
'fetchOpenOrders': {
|
1254
|
-
'limit': 100,
|
1255
1255
|
'marginMode': False,
|
1256
|
+
'limit': 100,
|
1256
1257
|
'trigger': True,
|
1257
1258
|
'trailing': True,
|
1258
1259
|
},
|
1259
1260
|
'fetchOrders': None, # not supported
|
1260
1261
|
'fetchClosedOrders': {
|
1262
|
+
'marginMode': False,
|
1261
1263
|
'limit': 100,
|
1262
1264
|
'daysBackClosed': 90, # 3 months
|
1263
1265
|
'daysBackCanceled': 1 / 12, # 2 hour
|
1264
1266
|
'untilDays': None,
|
1265
|
-
'marginMode': False,
|
1266
1267
|
'trigger': True,
|
1267
1268
|
'trailing': True,
|
1268
1269
|
},
|
@@ -1817,7 +1818,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1817
1818
|
'active': active,
|
1818
1819
|
'deposit': canDeposit,
|
1819
1820
|
'withdraw': canWithdraw,
|
1820
|
-
'fee': self.safe_number(chain, '
|
1821
|
+
'fee': self.safe_number(chain, 'fee'),
|
1821
1822
|
'precision': self.parse_number(precision),
|
1822
1823
|
'limits': {
|
1823
1824
|
'withdraw': {
|
@@ -6175,7 +6176,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6175
6176
|
:param str symbol: unified market symbol
|
6176
6177
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
6177
6178
|
:param str [params.marginMode]: 'cross' or 'isolated'
|
6178
|
-
:param str [params.posSide]: 'long' or 'short' for isolated margin long/short mode on futures and swap markets
|
6179
|
+
:param str [params.posSide]: 'long' or 'short' or 'net' for isolated margin long/short mode on futures and swap markets, default is 'net'
|
6179
6180
|
:returns dict: response from the exchange
|
6180
6181
|
"""
|
6181
6182
|
if symbol is None:
|
@@ -6197,12 +6198,11 @@ class okx(Exchange, ImplicitAPI):
|
|
6197
6198
|
'mgnMode': marginMode,
|
6198
6199
|
'instId': market['id'],
|
6199
6200
|
}
|
6200
|
-
posSide = self.safe_string(params, 'posSide')
|
6201
|
+
posSide = self.safe_string(params, 'posSide', 'net')
|
6201
6202
|
if marginMode == 'isolated':
|
6202
|
-
if posSide is None:
|
6203
|
-
raise ArgumentsRequired(self.id + ' setLeverage() requires a posSide argument for isolated margin')
|
6204
6203
|
if posSide != 'long' and posSide != 'short' and posSide != 'net':
|
6205
6204
|
raise BadRequest(self.id + ' setLeverage() requires the posSide argument to be either "long", "short" or "net"')
|
6205
|
+
request['posSide'] = posSide
|
6206
6206
|
response = self.privatePostAccountSetLeverage(self.extend(request, params))
|
6207
6207
|
#
|
6208
6208
|
# {
|
@@ -7105,7 +7105,11 @@ class okx(Exchange, ImplicitAPI):
|
|
7105
7105
|
:returns dict[]: a list of `fees structures <https://docs.ccxt.com/#/?id=fee-structure>`
|
7106
7106
|
"""
|
7107
7107
|
self.load_markets()
|
7108
|
-
|
7108
|
+
request = {}
|
7109
|
+
if codes is not None:
|
7110
|
+
ids = self.currency_ids(codes)
|
7111
|
+
request['ccy'] = ','.join(ids)
|
7112
|
+
response = self.privateGetAssetCurrencies(self.extend(request, params))
|
7109
7113
|
#
|
7110
7114
|
# {
|
7111
7115
|
# "code": "0",
|
@@ -7190,7 +7194,7 @@ class okx(Exchange, ImplicitAPI):
|
|
7190
7194
|
continue
|
7191
7195
|
chainSplit = chain.split('-')
|
7192
7196
|
networkId = self.safe_value(chainSplit, 1)
|
7193
|
-
withdrawFee = self.safe_number(feeInfo, '
|
7197
|
+
withdrawFee = self.safe_number(feeInfo, 'fee')
|
7194
7198
|
withdrawResult: dict = {
|
7195
7199
|
'fee': withdrawFee,
|
7196
7200
|
'percentage': False if (withdrawFee is not None) else None,
|
ccxt/onetrading.py
CHANGED
@@ -16,6 +16,7 @@ from ccxt.base.errors import InsufficientFunds
|
|
16
16
|
from ccxt.base.errors import InvalidAddress
|
17
17
|
from ccxt.base.errors import InvalidOrder
|
18
18
|
from ccxt.base.errors import OrderNotFound
|
19
|
+
from ccxt.base.errors import NotSupported
|
19
20
|
from ccxt.base.errors import DDoSProtection
|
20
21
|
from ccxt.base.errors import ExchangeNotAvailable
|
21
22
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
@@ -317,6 +318,9 @@ class onetrading(Exchange, ImplicitAPI):
|
|
317
318
|
def fetch_time(self, params={}):
|
318
319
|
"""
|
319
320
|
fetches the current integer timestamp in milliseconds from the exchange server
|
321
|
+
|
322
|
+
https://docs.onetrading.com/#time
|
323
|
+
|
320
324
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
321
325
|
:returns int: the current integer timestamp in milliseconds from the exchange server
|
322
326
|
"""
|
@@ -332,6 +336,9 @@ class onetrading(Exchange, ImplicitAPI):
|
|
332
336
|
def fetch_currencies(self, params={}) -> Currencies:
|
333
337
|
"""
|
334
338
|
fetches all available currencies on an exchange
|
339
|
+
|
340
|
+
https://docs.onetrading.com/#currencies
|
341
|
+
|
335
342
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
336
343
|
:returns dict: an associative dictionary of currencies
|
337
344
|
"""
|
@@ -370,6 +377,9 @@ class onetrading(Exchange, ImplicitAPI):
|
|
370
377
|
def fetch_markets(self, params={}) -> List[Market]:
|
371
378
|
"""
|
372
379
|
retrieves data on all markets for onetrading
|
380
|
+
|
381
|
+
https://docs.onetrading.com/#instruments
|
382
|
+
|
373
383
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
374
384
|
:returns dict[]: an array of objects representing market data
|
375
385
|
"""
|
@@ -450,6 +460,10 @@ class onetrading(Exchange, ImplicitAPI):
|
|
450
460
|
def fetch_trading_fees(self, params={}) -> TradingFees:
|
451
461
|
"""
|
452
462
|
fetch the trading fees for multiple markets
|
463
|
+
|
464
|
+
https://docs.onetrading.com/#fee-groups
|
465
|
+
https://docs.onetrading.com/#fees
|
466
|
+
|
453
467
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
454
468
|
:returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>` indexed by market symbols
|
455
469
|
"""
|
@@ -458,7 +472,12 @@ class onetrading(Exchange, ImplicitAPI):
|
|
458
472
|
if method is None:
|
459
473
|
options = self.safe_value(self.options, 'fetchTradingFees', {})
|
460
474
|
method = self.safe_string(options, 'method', 'fetchPrivateTradingFees')
|
461
|
-
|
475
|
+
if method == 'fetchPrivateTradingFees':
|
476
|
+
return self.fetch_private_trading_fees(params)
|
477
|
+
elif method == 'fetchPublicTradingFees':
|
478
|
+
return self.fetch_public_trading_fees(params)
|
479
|
+
else:
|
480
|
+
raise NotSupported(self.id + ' fetchTradingFees() does not support ' + method + ', fetchPrivateTradingFees and fetchPublicTradingFees are supported')
|
462
481
|
|
463
482
|
def fetch_public_trading_fees(self, params={}):
|
464
483
|
self.load_markets()
|
ccxt/paradex.py
CHANGED
ccxt/phemex.py
CHANGED
@@ -2537,6 +2537,22 @@ class phemex(Exchange, ImplicitAPI):
|
|
2537
2537
|
if triggerPrice is not None:
|
2538
2538
|
triggerType = self.safe_string(params, 'triggerType', 'ByMarkPrice')
|
2539
2539
|
request['triggerType'] = triggerType
|
2540
|
+
# set direction & exchange specific order type
|
2541
|
+
triggerDirection = None
|
2542
|
+
triggerDirection, params = self.handle_param_string(params, 'triggerDirection')
|
2543
|
+
if triggerDirection is None:
|
2544
|
+
raise ArgumentsRequired(self.id + " createOrder() also requires a 'triggerDirection' parameter with either 'up' or 'down' value")
|
2545
|
+
# the flow defined per https://phemex-docs.github.io/#more-order-type-examples
|
2546
|
+
if triggerDirection == 'up':
|
2547
|
+
if side == 'sell':
|
2548
|
+
request['ordType'] = 'MarketIfTouched' if (type == 'Market') else 'LimitIfTouched'
|
2549
|
+
elif side == 'buy':
|
2550
|
+
request['ordType'] = 'Stop' if (type == 'Market') else 'StopLimit'
|
2551
|
+
elif triggerDirection == 'down':
|
2552
|
+
if side == 'sell':
|
2553
|
+
request['ordType'] = 'Stop' if (type == 'Market') else 'StopLimit'
|
2554
|
+
elif side == 'buy':
|
2555
|
+
request['ordType'] = 'MarketIfTouched' if (type == 'Market') else 'LimitIfTouched'
|
2540
2556
|
if stopLossDefined or takeProfitDefined:
|
2541
2557
|
if stopLossDefined:
|
2542
2558
|
stopLossTriggerPrice = self.safe_value_2(stopLoss, 'triggerPrice', 'stopPrice')
|
ccxt/poloniex.py
CHANGED
@@ -51,6 +51,8 @@ class poloniex(Exchange, ImplicitAPI):
|
|
51
51
|
'createMarketOrderWithCost': False,
|
52
52
|
'createMarketSellOrderWithCost': False,
|
53
53
|
'createOrder': True,
|
54
|
+
'createStopOrder': True,
|
55
|
+
'createTriggerOrder': True,
|
54
56
|
'editOrder': True,
|
55
57
|
'fetchBalance': True,
|
56
58
|
'fetchClosedOrder': False,
|
@@ -1256,7 +1258,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1256
1258
|
:param float amount: how much of currency you want to trade in units of base currency
|
1257
1259
|
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1258
1260
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1259
|
-
:param float [params.triggerPrice]:
|
1261
|
+
:param float [params.triggerPrice]: the price at which a trigger order is triggered at
|
1260
1262
|
:param float [params.cost]: *spot market buy only* the quote quantity that can be used alternative for the amount
|
1261
1263
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1262
1264
|
"""
|
ccxt/poloniexfutures.py
CHANGED
@@ -42,6 +42,8 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
42
42
|
'future': False,
|
43
43
|
'option': None,
|
44
44
|
'createOrder': True,
|
45
|
+
'createStopOrder': True,
|
46
|
+
'createTriggerOrder': True,
|
45
47
|
'fetchBalance': True,
|
46
48
|
'fetchClosedOrders': True,
|
47
49
|
'fetchCurrencies': False,
|
@@ -827,7 +829,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
827
829
|
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
828
830
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
829
831
|
:param float [params.leverage]: Leverage size of the order
|
830
|
-
:param float [params.
|
832
|
+
:param float [params.triggerPrice]: The price at which a trigger order is triggered at
|
831
833
|
:param bool [params.reduceOnly]: A mark to reduce the position size only. Set to False by default. Need to set the position size when reduceOnly is True.
|
832
834
|
:param str [params.timeInForce]: GTC, GTT, IOC, or FOK, default is GTC, limit orders only
|
833
835
|
:param str [params.postOnly]: Post only flag, invalid when timeInForce is IOC or FOK
|
ccxt/pro/__init__.py
CHANGED
ccxt/pro/idex.py
CHANGED
@@ -72,6 +72,9 @@ class idex(ccxt.async_support.idex):
|
|
72
72
|
async def watch_ticker(self, symbol: str, params={}) -> Ticker:
|
73
73
|
"""
|
74
74
|
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
75
|
+
|
76
|
+
https://api-docs-v4.idex.io/#tickers
|
77
|
+
|
75
78
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
76
79
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
77
80
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -141,6 +144,9 @@ class idex(ccxt.async_support.idex):
|
|
141
144
|
async def watch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
142
145
|
"""
|
143
146
|
get the list of most recent trades for a particular symbol
|
147
|
+
|
148
|
+
https://api-docs-v4.idex.io/#trades
|
149
|
+
|
144
150
|
:param str symbol: unified symbol of the market to fetch trades for
|
145
151
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
146
152
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -231,6 +237,9 @@ class idex(ccxt.async_support.idex):
|
|
231
237
|
async def watch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
|
232
238
|
"""
|
233
239
|
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
240
|
+
|
241
|
+
https://api-docs-v4.idex.io/#candles
|
242
|
+
|
234
243
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
235
244
|
:param str timeframe: the length of time each candle represents
|
236
245
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
@@ -383,6 +392,9 @@ class idex(ccxt.async_support.idex):
|
|
383
392
|
async def watch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
384
393
|
"""
|
385
394
|
watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
395
|
+
|
396
|
+
https://api-docs-v4.idex.io/#l2-order-book
|
397
|
+
|
386
398
|
:param str symbol: unified symbol of the market to fetch the order book for
|
387
399
|
:param int [limit]: the maximum amount of order book entries to return
|
388
400
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -478,6 +490,9 @@ class idex(ccxt.async_support.idex):
|
|
478
490
|
async def watch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
479
491
|
"""
|
480
492
|
watches information on multiple orders made by the user
|
493
|
+
|
494
|
+
https://api-docs-v4.idex.io/#orders
|
495
|
+
|
481
496
|
:param str symbol: unified market symbol of the market orders were made in
|
482
497
|
:param int [since]: the earliest time in ms to fetch orders for
|
483
498
|
:param int [limit]: the maximum number of order structures to retrieve
|
ccxt/pro/probit.py
CHANGED
@@ -503,10 +503,12 @@ class probit(ccxt.async_support.probit):
|
|
503
503
|
if ticker is not None:
|
504
504
|
self.handle_ticker(client, message)
|
505
505
|
trades = self.safe_value(message, 'recent_trades', [])
|
506
|
-
|
506
|
+
tradesLength = len(trades)
|
507
|
+
if tradesLength:
|
507
508
|
self.handle_trades(client, message)
|
508
509
|
orderBook = self.safe_value_n(message, ['order_books', 'order_books_l1', 'order_books_l2', 'order_books_l3', 'order_books_l4'], [])
|
509
|
-
|
510
|
+
orderBookLength = len(orderBook)
|
511
|
+
if orderBookLength:
|
510
512
|
self.handle_order_book(client, message, orderBook)
|
511
513
|
|
512
514
|
def handle_message(self, client: Client, message):
|
ccxt/pro/woo.py
CHANGED
@@ -35,14 +35,14 @@ class woo(ccxt.async_support.woo):
|
|
35
35
|
'urls': {
|
36
36
|
'api': {
|
37
37
|
'ws': {
|
38
|
-
'public': 'wss://wss.
|
39
|
-
'private': 'wss://wss.
|
38
|
+
'public': 'wss://wss.woox.io/ws/stream',
|
39
|
+
'private': 'wss://wss.woox.io/v2/ws/private/stream',
|
40
40
|
},
|
41
41
|
},
|
42
42
|
'test': {
|
43
43
|
'ws': {
|
44
|
-
'public': 'wss://wss.staging.
|
45
|
-
'private': 'wss://wss.staging.
|
44
|
+
'public': 'wss://wss.staging.woox.io/ws/stream',
|
45
|
+
'private': 'wss://wss.staging.woox.io/v2/ws/private/stream',
|
46
46
|
},
|
47
47
|
},
|
48
48
|
},
|
@@ -93,8 +93,8 @@ class woo(ccxt.async_support.woo):
|
|
93
93
|
async def watch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
94
94
|
"""
|
95
95
|
|
96
|
-
https://docs.
|
97
|
-
https://docs.
|
96
|
+
https://docs.woox.io/#orderbookupdate
|
97
|
+
https://docs.woox.io/#orderbook
|
98
98
|
|
99
99
|
watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
100
100
|
:param str symbol: unified symbol of the market to fetch the order book for
|
@@ -327,7 +327,7 @@ class woo(ccxt.async_support.woo):
|
|
327
327
|
async def watch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
328
328
|
"""
|
329
329
|
|
330
|
-
https://docs.
|
330
|
+
https://docs.woox.io/#24h-tickers
|
331
331
|
|
332
332
|
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
333
333
|
:param str[] symbols: unified symbol of the market to fetch the ticker for
|
@@ -461,7 +461,7 @@ class woo(ccxt.async_support.woo):
|
|
461
461
|
"""
|
462
462
|
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
463
463
|
|
464
|
-
https://docs.
|
464
|
+
https://docs.woox.io/#k-line
|
465
465
|
|
466
466
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
467
467
|
:param str timeframe: the length of time each candle represents
|
@@ -534,7 +534,7 @@ class woo(ccxt.async_support.woo):
|
|
534
534
|
"""
|
535
535
|
watches information on multiple trades made in a market
|
536
536
|
|
537
|
-
https://docs.
|
537
|
+
https://docs.woox.io/#trade
|
538
538
|
|
539
539
|
:param str symbol: unified market symbol of the market trades were made in
|
540
540
|
:param int [since]: the earliest time in ms to fetch trades for
|
@@ -716,8 +716,8 @@ class woo(ccxt.async_support.woo):
|
|
716
716
|
async def watch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
717
717
|
"""
|
718
718
|
|
719
|
-
https://docs.
|
720
|
-
https://docs.
|
719
|
+
https://docs.woox.io/#executionreport
|
720
|
+
https://docs.woox.io/#algoexecutionreportv2
|
721
721
|
|
722
722
|
watches information on multiple orders made by the user
|
723
723
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -749,8 +749,8 @@ class woo(ccxt.async_support.woo):
|
|
749
749
|
async def watch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
750
750
|
"""
|
751
751
|
|
752
|
-
https://docs.
|
753
|
-
https://docs.
|
752
|
+
https://docs.woox.io/#executionreport
|
753
|
+
https://docs.woox.io/#algoexecutionreportv2
|
754
754
|
|
755
755
|
watches information on multiple trades made by the user
|
756
756
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -974,7 +974,7 @@ class woo(ccxt.async_support.woo):
|
|
974
974
|
async def watch_positions(self, symbols: Strings = None, since: Int = None, limit: Int = None, params={}) -> List[Position]:
|
975
975
|
"""
|
976
976
|
|
977
|
-
https://docs.
|
977
|
+
https://docs.woox.io/#position-push
|
978
978
|
|
979
979
|
watch all open positions
|
980
980
|
:param str[]|None symbols: list of unified market symbols
|
@@ -1080,7 +1080,7 @@ class woo(ccxt.async_support.woo):
|
|
1080
1080
|
async def watch_balance(self, params={}) -> Balances:
|
1081
1081
|
"""
|
1082
1082
|
|
1083
|
-
https://docs.
|
1083
|
+
https://docs.woox.io/#balance
|
1084
1084
|
|
1085
1085
|
watch balance and get the amount of funds available for trading or funds locked in orders
|
1086
1086
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
ccxt/test/tests_helpers.py
CHANGED
@@ -40,7 +40,6 @@ class Argv(object):
|
|
40
40
|
ws_tests = False
|
41
41
|
request_tests = False
|
42
42
|
response_tests = False
|
43
|
-
token_bucket = False
|
44
43
|
sandbox = False
|
45
44
|
privateOnly = False
|
46
45
|
private = False
|
@@ -58,7 +57,6 @@ class Argv(object):
|
|
58
57
|
|
59
58
|
argv = Argv()
|
60
59
|
parser = argparse.ArgumentParser()
|
61
|
-
parser.add_argument('--token_bucket', action='store_true', help='enable token bucket experimental test')
|
62
60
|
parser.add_argument('--sandbox', action='store_true', help='enable sandbox mode')
|
63
61
|
parser.add_argument('--privateOnly', action='store_true', help='run private tests only')
|
64
62
|
parser.add_argument('--private', action='store_true', help='run private tests')
|
ccxt/vertex.py
CHANGED