ccxt 4.4.40__py2.py3-none-any.whl → 4.4.42__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 -1
- ccxt/abstract/binance.py +3 -0
- ccxt/abstract/binancecoinm.py +3 -0
- ccxt/abstract/binanceus.py +3 -0
- ccxt/abstract/binanceusdm.py +3 -0
- ccxt/abstract/bitmart.py +2 -0
- ccxt/abstract/okx.py +5 -0
- ccxt/ace.py +1 -1
- ccxt/alpaca.py +0 -1
- ccxt/ascendex.py +0 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +1 -1
- ccxt/async_support/alpaca.py +0 -1
- ccxt/async_support/ascendex.py +0 -1
- ccxt/async_support/base/exchange.py +24 -17
- ccxt/async_support/bigone.py +0 -1
- ccxt/async_support/binance.py +27 -24
- ccxt/async_support/bingx.py +5 -1
- ccxt/async_support/bitfinex.py +123 -1
- ccxt/async_support/bitget.py +1 -0
- ccxt/async_support/bitmart.py +243 -2
- ccxt/async_support/blofin.py +16 -7
- ccxt/async_support/bybit.py +8 -8
- ccxt/async_support/cex.py +1 -1
- ccxt/async_support/coinbase.py +8 -9
- ccxt/async_support/coinbaseexchange.py +5 -6
- ccxt/async_support/coinbaseinternational.py +7 -8
- ccxt/async_support/coincatch.py +0 -1
- ccxt/async_support/coincheck.py +0 -1
- ccxt/async_support/coinex.py +91 -6
- ccxt/async_support/coinlist.py +3 -4
- ccxt/async_support/coinmate.py +1 -3
- ccxt/async_support/coinmetro.py +4 -5
- ccxt/async_support/coinone.py +0 -1
- ccxt/async_support/coinsph.py +7 -8
- ccxt/async_support/cryptocom.py +3 -0
- ccxt/async_support/currencycom.py +3 -4
- ccxt/async_support/defx.py +6 -7
- ccxt/async_support/deribit.py +1 -3
- ccxt/async_support/digifinex.py +0 -1
- ccxt/async_support/ellipx.py +0 -2
- ccxt/async_support/exmo.py +61 -6
- ccxt/async_support/gate.py +2 -3
- ccxt/async_support/gemini.py +4 -5
- ccxt/async_support/hashkey.py +79 -67
- ccxt/async_support/hitbtc.py +47 -5
- ccxt/async_support/hollaex.py +4 -6
- ccxt/async_support/htx.py +2 -4
- ccxt/async_support/huobijp.py +0 -1
- ccxt/async_support/hyperliquid.py +60 -1
- ccxt/async_support/idex.py +8 -8
- ccxt/async_support/independentreserve.py +0 -1
- ccxt/async_support/indodax.py +0 -1
- ccxt/async_support/kraken.py +186 -28
- ccxt/async_support/krakenfutures.py +75 -3
- ccxt/async_support/kucoin.py +6 -4
- ccxt/async_support/kucoinfutures.py +10 -9
- ccxt/async_support/kuna.py +1 -3
- ccxt/async_support/latoken.py +1 -3
- ccxt/async_support/lbank.py +0 -1
- ccxt/async_support/luno.py +0 -1
- ccxt/async_support/lykke.py +0 -1
- ccxt/async_support/mercado.py +0 -1
- ccxt/async_support/mexc.py +6 -7
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/novadax.py +4 -6
- ccxt/async_support/oceanex.py +0 -1
- ccxt/async_support/okcoin.py +1 -3
- ccxt/async_support/okx.py +7 -4
- ccxt/async_support/onetrading.py +1 -3
- ccxt/async_support/p2b.py +1 -1
- ccxt/async_support/paradex.py +5 -7
- ccxt/async_support/phemex.py +8 -10
- ccxt/async_support/poloniex.py +1 -3
- ccxt/async_support/poloniexfutures.py +6 -6
- ccxt/async_support/probit.py +0 -1
- ccxt/async_support/timex.py +0 -1
- ccxt/async_support/tokocrypto.py +11 -14
- ccxt/async_support/tradeogre.py +1 -1
- ccxt/async_support/upbit.py +0 -1
- ccxt/async_support/wavesexchange.py +4 -5
- ccxt/async_support/whitebit.py +8 -9
- ccxt/async_support/woo.py +98 -12
- ccxt/async_support/woofipro.py +96 -15
- ccxt/async_support/xt.py +6 -3
- ccxt/async_support/yobit.py +0 -1
- ccxt/async_support/zaif.py +0 -1
- ccxt/async_support/zonda.py +1 -2
- ccxt/base/exchange.py +39 -20
- ccxt/base/types.py +10 -0
- ccxt/bigone.py +0 -1
- ccxt/binance.py +27 -24
- ccxt/bingx.py +5 -1
- ccxt/bitfinex.py +123 -1
- ccxt/bitget.py +1 -0
- ccxt/bitmart.py +243 -2
- ccxt/blofin.py +16 -7
- ccxt/bybit.py +8 -8
- ccxt/cex.py +1 -1
- ccxt/coinbase.py +8 -9
- ccxt/coinbaseexchange.py +5 -6
- ccxt/coinbaseinternational.py +7 -8
- ccxt/coincatch.py +0 -1
- ccxt/coincheck.py +0 -1
- ccxt/coinex.py +91 -6
- ccxt/coinlist.py +3 -4
- ccxt/coinmate.py +1 -3
- ccxt/coinmetro.py +4 -5
- ccxt/coinone.py +0 -1
- ccxt/coinsph.py +7 -8
- ccxt/cryptocom.py +3 -0
- ccxt/currencycom.py +3 -4
- ccxt/defx.py +6 -7
- ccxt/deribit.py +1 -3
- ccxt/digifinex.py +0 -1
- ccxt/ellipx.py +0 -2
- ccxt/exmo.py +61 -6
- ccxt/gate.py +2 -3
- ccxt/gemini.py +4 -5
- ccxt/hashkey.py +79 -67
- ccxt/hitbtc.py +47 -5
- ccxt/hollaex.py +4 -6
- ccxt/htx.py +2 -4
- ccxt/huobijp.py +0 -1
- ccxt/hyperliquid.py +60 -1
- ccxt/idex.py +8 -8
- ccxt/independentreserve.py +0 -1
- ccxt/indodax.py +0 -1
- ccxt/kraken.py +186 -28
- ccxt/krakenfutures.py +75 -3
- ccxt/kucoin.py +6 -4
- ccxt/kucoinfutures.py +10 -9
- ccxt/kuna.py +1 -3
- ccxt/latoken.py +1 -3
- ccxt/lbank.py +0 -1
- ccxt/luno.py +0 -1
- ccxt/lykke.py +0 -1
- ccxt/mercado.py +0 -1
- ccxt/mexc.py +6 -7
- ccxt/ndax.py +1 -1
- ccxt/novadax.py +4 -6
- ccxt/oceanex.py +0 -1
- ccxt/okcoin.py +1 -3
- ccxt/okx.py +7 -4
- ccxt/onetrading.py +1 -3
- ccxt/p2b.py +1 -1
- ccxt/paradex.py +5 -7
- ccxt/phemex.py +8 -10
- ccxt/poloniex.py +1 -3
- ccxt/poloniexfutures.py +6 -6
- ccxt/pro/__init__.py +1 -1
- ccxt/probit.py +0 -1
- ccxt/timex.py +0 -1
- ccxt/tokocrypto.py +11 -14
- ccxt/tradeogre.py +1 -1
- ccxt/upbit.py +0 -1
- ccxt/wavesexchange.py +4 -5
- ccxt/whitebit.py +8 -9
- ccxt/woo.py +98 -12
- ccxt/woofipro.py +96 -15
- ccxt/xt.py +6 -3
- ccxt/yobit.py +0 -1
- ccxt/zaif.py +0 -1
- ccxt/zonda.py +1 -2
- {ccxt-4.4.40.dist-info → ccxt-4.4.42.dist-info}/METADATA +5 -5
- {ccxt-4.4.40.dist-info → ccxt-4.4.42.dist-info}/RECORD +169 -173
- ccxt/bitbay.py +0 -17
- ccxt/bitfinex2.py +0 -3624
- ccxt/hitbtc3.py +0 -16
- ccxt/pro/bitfinex2.py +0 -1086
- {ccxt-4.4.40.dist-info → ccxt-4.4.42.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.40.dist-info → ccxt-4.4.42.dist-info}/WHEEL +0 -0
- {ccxt-4.4.40.dist-info → ccxt-4.4.42.dist-info}/top_level.txt +0 -0
ccxt/wavesexchange.py
CHANGED
@@ -1243,7 +1243,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1243
1243
|
:param float amount: how much of currency you want to trade in units of base currency
|
1244
1244
|
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1245
1245
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1246
|
-
:param float [params.
|
1246
|
+
:param float [params.triggerPrice]: The price at which a stop order is triggered at
|
1247
1247
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1248
1248
|
"""
|
1249
1249
|
self.check_required_dependencies()
|
@@ -1254,8 +1254,8 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1254
1254
|
amountAsset = self.get_asset_id(market['baseId'])
|
1255
1255
|
priceAsset = self.get_asset_id(market['quoteId'])
|
1256
1256
|
isMarketOrder = (type == 'market')
|
1257
|
-
|
1258
|
-
isStopOrder = (
|
1257
|
+
triggerPrice = self.safe_float_2(params, 'triggerPrice', 'stopPrice')
|
1258
|
+
isStopOrder = (triggerPrice is not None)
|
1259
1259
|
if (isMarketOrder) and (price is None):
|
1260
1260
|
raise InvalidOrder(self.id + ' createOrder() requires a price argument for ' + type + ' orders to determine the max price for buy and the min price for sell')
|
1261
1261
|
timestamp = self.milliseconds()
|
@@ -1351,7 +1351,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1351
1351
|
'c': {
|
1352
1352
|
't': 'sp',
|
1353
1353
|
'v': {
|
1354
|
-
'p': self.to_real_symbol_price(symbol,
|
1354
|
+
'p': self.to_real_symbol_price(symbol, triggerPrice),
|
1355
1355
|
},
|
1356
1356
|
},
|
1357
1357
|
}
|
@@ -1725,7 +1725,6 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1725
1725
|
'postOnly': None,
|
1726
1726
|
'side': side,
|
1727
1727
|
'price': price,
|
1728
|
-
'stopPrice': triggerPrice,
|
1729
1728
|
'triggerPrice': triggerPrice,
|
1730
1729
|
'amount': amount,
|
1731
1730
|
'cost': None,
|
ccxt/whitebit.py
CHANGED
@@ -1275,8 +1275,8 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1275
1275
|
marketType = self.safe_string(market, 'type')
|
1276
1276
|
isLimitOrder = type == 'limit'
|
1277
1277
|
isMarketOrder = type == 'market'
|
1278
|
-
|
1279
|
-
isStopOrder = (
|
1278
|
+
triggerPrice = self.safe_number_n(params, ['triggerPrice', 'stopPrice', 'activation_price'])
|
1279
|
+
isStopOrder = (triggerPrice is not None)
|
1280
1280
|
postOnly = self.is_post_only(isMarketOrder, False, params)
|
1281
1281
|
marginMode, query = self.handle_margin_mode_and_params('createOrder', params)
|
1282
1282
|
if postOnly:
|
@@ -1287,7 +1287,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1287
1287
|
useCollateralEndpoint = marginMode is not None or marketType == 'swap'
|
1288
1288
|
response = None
|
1289
1289
|
if isStopOrder:
|
1290
|
-
request['activation_price'] = self.price_to_precision(symbol,
|
1290
|
+
request['activation_price'] = self.price_to_precision(symbol, triggerPrice)
|
1291
1291
|
if isLimitOrder:
|
1292
1292
|
# stop limit order
|
1293
1293
|
request['price'] = self.price_to_precision(symbol, price)
|
@@ -1347,11 +1347,11 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1347
1347
|
# Update clientOrderId of the order
|
1348
1348
|
request['clientOrderId'] = clientOrderId
|
1349
1349
|
isLimitOrder = type == 'limit'
|
1350
|
-
|
1351
|
-
isStopOrder = (
|
1350
|
+
triggerPrice = self.safe_number_n(params, ['triggerPrice', 'stopPrice', 'activation_price'])
|
1351
|
+
isStopOrder = (triggerPrice is not None)
|
1352
1352
|
params = self.omit(params, ['clOrdId', 'clientOrderId', 'triggerPrice', 'stopPrice'])
|
1353
1353
|
if isStopOrder:
|
1354
|
-
request['activation_price'] = self.price_to_precision(symbol,
|
1354
|
+
request['activation_price'] = self.price_to_precision(symbol, triggerPrice)
|
1355
1355
|
if isLimitOrder:
|
1356
1356
|
# stop limit order
|
1357
1357
|
request['amount'] = self.amount_to_precision(symbol, amount)
|
@@ -1714,7 +1714,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1714
1714
|
if clientOrderId == '':
|
1715
1715
|
clientOrderId = None
|
1716
1716
|
price = self.safe_string(order, 'price')
|
1717
|
-
|
1717
|
+
triggerPrice = self.safe_number(order, 'activation_price')
|
1718
1718
|
orderId = self.safe_string_2(order, 'orderId', 'id')
|
1719
1719
|
type = self.safe_string(order, 'type')
|
1720
1720
|
orderType = self.parse_order_type(type)
|
@@ -1747,8 +1747,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1747
1747
|
'side': side,
|
1748
1748
|
'price': price,
|
1749
1749
|
'type': orderType,
|
1750
|
-
'
|
1751
|
-
'triggerPrice': stopPrice,
|
1750
|
+
'triggerPrice': triggerPrice,
|
1752
1751
|
'amount': amount,
|
1753
1752
|
'filled': filled,
|
1754
1753
|
'remaining': remaining,
|
ccxt/woo.py
CHANGED
@@ -321,6 +321,92 @@ class woo(Exchange, ImplicitAPI):
|
|
321
321
|
},
|
322
322
|
'brokerId': 'bc830de7-50f3-460b-9ee0-f430f83f9dad',
|
323
323
|
},
|
324
|
+
'features': {
|
325
|
+
'default': {
|
326
|
+
'sandbox': True,
|
327
|
+
'createOrder': {
|
328
|
+
'marginMode': True,
|
329
|
+
'triggerPrice': True,
|
330
|
+
'triggerPriceType': {
|
331
|
+
'last': True,
|
332
|
+
'mark': True,
|
333
|
+
'index': False,
|
334
|
+
},
|
335
|
+
'triggerDirection': False,
|
336
|
+
'stopLossPrice': False, # todo by triggerPrice
|
337
|
+
'takeProfitPrice': False, # todo by triggerPrice
|
338
|
+
'attachedStopLossTakeProfit': None,
|
339
|
+
'timeInForce': {
|
340
|
+
'IOC': True,
|
341
|
+
'FOK': True,
|
342
|
+
'PO': True,
|
343
|
+
'GTD': True,
|
344
|
+
},
|
345
|
+
'hedged': False,
|
346
|
+
'trailing': True,
|
347
|
+
# exchange specific params:
|
348
|
+
# 'iceberg': True,
|
349
|
+
# 'oco': True,
|
350
|
+
},
|
351
|
+
'createOrders': None,
|
352
|
+
'fetchMyTrades': {
|
353
|
+
'marginMode': False,
|
354
|
+
'limit': 500,
|
355
|
+
'daysBack': 90,
|
356
|
+
'untilDays': 10000,
|
357
|
+
},
|
358
|
+
'fetchOrder': {
|
359
|
+
'marginMode': False,
|
360
|
+
'trigger': True,
|
361
|
+
'trailing': False,
|
362
|
+
},
|
363
|
+
'fetchOpenOrders': {
|
364
|
+
'marginMode': False,
|
365
|
+
'limit': 500,
|
366
|
+
'trigger': True,
|
367
|
+
'trailing': True,
|
368
|
+
},
|
369
|
+
'fetchOrders': {
|
370
|
+
'marginMode': False,
|
371
|
+
'limit': 500,
|
372
|
+
'daysBack': None,
|
373
|
+
'untilDays': 100000,
|
374
|
+
'trigger': True,
|
375
|
+
'trailing': True,
|
376
|
+
},
|
377
|
+
'fetchClosedOrders': {
|
378
|
+
'marginMode': False,
|
379
|
+
'limit': 500,
|
380
|
+
'daysBackClosed': None,
|
381
|
+
'daysBackCanceled': None,
|
382
|
+
'untilDays': 100000,
|
383
|
+
'trigger': True,
|
384
|
+
'trailing': True,
|
385
|
+
},
|
386
|
+
'fetchOHLCV': {
|
387
|
+
'limit': 1000,
|
388
|
+
},
|
389
|
+
},
|
390
|
+
'spot': {
|
391
|
+
'extends': 'default',
|
392
|
+
},
|
393
|
+
'forSwap': {
|
394
|
+
'extends': 'default',
|
395
|
+
'createOrder': {
|
396
|
+
'hedged': True,
|
397
|
+
},
|
398
|
+
},
|
399
|
+
'swap': {
|
400
|
+
'linear': {
|
401
|
+
'extends': 'forSwap',
|
402
|
+
},
|
403
|
+
'inverse': None,
|
404
|
+
},
|
405
|
+
'future': {
|
406
|
+
'linear': None,
|
407
|
+
'inverse': None,
|
408
|
+
},
|
409
|
+
},
|
324
410
|
'commonCurrencies': {},
|
325
411
|
'exceptions': {
|
326
412
|
'exact': {
|
@@ -965,7 +1051,7 @@ class woo(Exchange, ImplicitAPI):
|
|
965
1051
|
marginMode, params = self.handle_margin_mode_and_params('createOrder', params)
|
966
1052
|
if marginMode is not None:
|
967
1053
|
request['margin_mode'] = self.encode_margin_mode(marginMode)
|
968
|
-
|
1054
|
+
triggerPrice = self.safe_number_2(params, 'triggerPrice', 'stopPrice')
|
969
1055
|
stopLoss = self.safe_value(params, 'stopLoss')
|
970
1056
|
takeProfit = self.safe_value(params, 'takeProfit')
|
971
1057
|
algoType = self.safe_string(params, 'algoType')
|
@@ -975,7 +1061,7 @@ class woo(Exchange, ImplicitAPI):
|
|
975
1061
|
isTrailingAmountOrder = trailingAmount is not None
|
976
1062
|
isTrailingPercentOrder = trailingPercent is not None
|
977
1063
|
isTrailing = isTrailingAmountOrder or isTrailingPercentOrder
|
978
|
-
isConditional = isTrailing or
|
1064
|
+
isConditional = isTrailing or triggerPrice is not None or stopLoss is not None or takeProfit is not None or (self.safe_value(params, 'childOrders') is not None)
|
979
1065
|
isMarket = orderType == 'MARKET'
|
980
1066
|
timeInForce = self.safe_string_lower(params, 'timeInForce')
|
981
1067
|
postOnly = self.is_post_only(isMarket, None, params)
|
@@ -1028,9 +1114,9 @@ class woo(Exchange, ImplicitAPI):
|
|
1028
1114
|
elif isTrailingPercentOrder:
|
1029
1115
|
convertedTrailingPercent = Precise.string_div(trailingPercent, '100')
|
1030
1116
|
request['callbackRate'] = convertedTrailingPercent
|
1031
|
-
elif
|
1117
|
+
elif triggerPrice is not None:
|
1032
1118
|
if algoType != 'TRAILING_STOP':
|
1033
|
-
request['triggerPrice'] = self.price_to_precision(symbol,
|
1119
|
+
request['triggerPrice'] = self.price_to_precision(symbol, triggerPrice)
|
1034
1120
|
request['algoType'] = 'STOP'
|
1035
1121
|
elif (stopLoss is not None) or (takeProfit is not None):
|
1036
1122
|
request['algoType'] = 'BRACKET'
|
@@ -1145,9 +1231,9 @@ class woo(Exchange, ImplicitAPI):
|
|
1145
1231
|
clientOrderIdUnified = self.safe_string_2(params, 'clOrdID', 'clientOrderId')
|
1146
1232
|
clientOrderIdExchangeSpecific = self.safe_string(params, 'client_order_id', clientOrderIdUnified)
|
1147
1233
|
isByClientOrder = clientOrderIdExchangeSpecific is not None
|
1148
|
-
|
1149
|
-
if
|
1150
|
-
request['triggerPrice'] = self.price_to_precision(symbol,
|
1234
|
+
triggerPrice = self.safe_number_n(params, ['triggerPrice', 'stopPrice', 'takeProfitPrice', 'stopLossPrice'])
|
1235
|
+
if triggerPrice is not None:
|
1236
|
+
request['triggerPrice'] = self.price_to_precision(symbol, triggerPrice)
|
1151
1237
|
trailingTriggerPrice = self.safe_string_2(params, 'trailingTriggerPrice', 'activatedPrice', self.number_to_string(price))
|
1152
1238
|
trailingAmount = self.safe_string_2(params, 'trailingAmount', 'callbackValue')
|
1153
1239
|
trailingPercent = self.safe_string_2(params, 'trailingPercent', 'callbackRate')
|
@@ -1163,7 +1249,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1163
1249
|
convertedTrailingPercent = Precise.string_div(trailingPercent, '100')
|
1164
1250
|
request['callbackRate'] = convertedTrailingPercent
|
1165
1251
|
params = self.omit(params, ['clOrdID', 'clientOrderId', 'client_order_id', 'stopPrice', 'triggerPrice', 'takeProfitPrice', 'stopLossPrice', 'trailingTriggerPrice', 'trailingAmount', 'trailingPercent'])
|
1166
|
-
isConditional = isTrailing or (
|
1252
|
+
isConditional = isTrailing or (triggerPrice is not None) or (self.safe_value(params, 'childOrders') is not None)
|
1167
1253
|
response = None
|
1168
1254
|
if isByClientOrder:
|
1169
1255
|
request['client_order_id'] = clientOrderIdExchangeSpecific
|
@@ -1570,7 +1656,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1570
1656
|
fee = self.safe_number_2(order, 'total_fee', 'totalFee')
|
1571
1657
|
feeCurrency = self.safe_string_2(order, 'fee_asset', 'feeAsset')
|
1572
1658
|
transactions = self.safe_value(order, 'Transactions')
|
1573
|
-
|
1659
|
+
triggerPrice = self.safe_number(order, 'triggerPrice')
|
1574
1660
|
takeProfitPrice: Num = None
|
1575
1661
|
stopLossPrice: Num = None
|
1576
1662
|
childOrders = self.safe_value(order, 'childOrders')
|
@@ -1599,8 +1685,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1599
1685
|
'reduceOnly': self.safe_bool(order, 'reduce_only'),
|
1600
1686
|
'side': side,
|
1601
1687
|
'price': price,
|
1602
|
-
'
|
1603
|
-
'triggerPrice': stopPrice,
|
1688
|
+
'triggerPrice': triggerPrice,
|
1604
1689
|
'takeProfitPrice': takeProfitPrice,
|
1605
1690
|
'stopLossPrice': stopLossPrice,
|
1606
1691
|
'average': average,
|
@@ -1808,7 +1893,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1808
1893
|
"""
|
1809
1894
|
fetch all trades made by the user
|
1810
1895
|
|
1811
|
-
https://docs.woox.io/#get-
|
1896
|
+
https://docs.woox.io/#get-trade-history
|
1812
1897
|
|
1813
1898
|
:param str symbol: unified market symbol
|
1814
1899
|
:param int [since]: the earliest time in ms to fetch trades for
|
@@ -1829,6 +1914,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1829
1914
|
request['symbol'] = market['id']
|
1830
1915
|
if since is not None:
|
1831
1916
|
request['start_t'] = since
|
1917
|
+
request, params = self.handle_until_option('end_t', request, params)
|
1832
1918
|
if limit is not None:
|
1833
1919
|
request['size'] = limit
|
1834
1920
|
else:
|
ccxt/woofipro.py
CHANGED
@@ -308,6 +308,88 @@ class woofipro(Exchange, ImplicitAPI):
|
|
308
308
|
'brokerId': 'CCXT',
|
309
309
|
'verifyingContractAddress': '0x6F7a338F2aA472838dEFD3283eB360d4Dff5D203',
|
310
310
|
},
|
311
|
+
'features': {
|
312
|
+
'default': {
|
313
|
+
'sandbox': True,
|
314
|
+
'createOrder': {
|
315
|
+
'marginMode': False,
|
316
|
+
'triggerPrice': True,
|
317
|
+
'triggerPriceType': None,
|
318
|
+
'triggerDirection': False,
|
319
|
+
'stopLossPrice': False, # todo by triggerPrice
|
320
|
+
'takeProfitPrice': False, # todo by triggerPrice
|
321
|
+
'attachedStopLossTakeProfit': None,
|
322
|
+
'timeInForce': {
|
323
|
+
'IOC': True,
|
324
|
+
'FOK': True,
|
325
|
+
'PO': True,
|
326
|
+
'GTD': False,
|
327
|
+
},
|
328
|
+
'hedged': False,
|
329
|
+
'trailing': True,
|
330
|
+
# exchange specific
|
331
|
+
# 'iceberg': True,
|
332
|
+
},
|
333
|
+
'createOrders': {
|
334
|
+
'max': 10,
|
335
|
+
},
|
336
|
+
'fetchMyTrades': {
|
337
|
+
'marginMode': False,
|
338
|
+
'limit': 500,
|
339
|
+
'daysBack': None,
|
340
|
+
'untilDays': 100000,
|
341
|
+
},
|
342
|
+
'fetchOrder': {
|
343
|
+
'marginMode': False,
|
344
|
+
'trigger': True,
|
345
|
+
'trailing': False,
|
346
|
+
},
|
347
|
+
'fetchOpenOrders': {
|
348
|
+
'marginMode': False,
|
349
|
+
'limit': 500,
|
350
|
+
'trigger': True,
|
351
|
+
'trailing': False,
|
352
|
+
},
|
353
|
+
'fetchOrders': None,
|
354
|
+
'fetchClosedOrders': {
|
355
|
+
'marginMode': False,
|
356
|
+
'limit': 500,
|
357
|
+
'daysBackClosed': None,
|
358
|
+
'daysBackCanceled': None,
|
359
|
+
'untilDays': 100000,
|
360
|
+
'trigger': True,
|
361
|
+
'trailing': False,
|
362
|
+
},
|
363
|
+
'fetchOHLCV': {
|
364
|
+
'limit': 1000,
|
365
|
+
},
|
366
|
+
},
|
367
|
+
'spot': {
|
368
|
+
'extends': 'default',
|
369
|
+
},
|
370
|
+
'forDerivatives': {
|
371
|
+
'extends': 'default',
|
372
|
+
'createOrder': {
|
373
|
+
# todo: implementation needs unification
|
374
|
+
'triggerPriceType': None,
|
375
|
+
'attachedStopLossTakeProfit': {
|
376
|
+
# todo: implementation needs unification
|
377
|
+
'triggerPriceType': None,
|
378
|
+
'limitPrice': False,
|
379
|
+
},
|
380
|
+
},
|
381
|
+
},
|
382
|
+
'swap': {
|
383
|
+
'linear': {
|
384
|
+
'extends': 'forDerivatives',
|
385
|
+
},
|
386
|
+
'inverse': None,
|
387
|
+
},
|
388
|
+
'future': {
|
389
|
+
'linear': None,
|
390
|
+
'inverse': None,
|
391
|
+
},
|
392
|
+
},
|
311
393
|
'commonCurrencies': {},
|
312
394
|
'exceptions': {
|
313
395
|
'exact': {
|
@@ -1162,7 +1244,7 @@ class woofipro(Exchange, ImplicitAPI):
|
|
1162
1244
|
fee = self.safe_value_2(order, 'total_fee', 'totalFee')
|
1163
1245
|
feeCurrency = self.safe_string_2(order, 'fee_asset', 'feeAsset')
|
1164
1246
|
transactions = self.safe_value(order, 'Transactions')
|
1165
|
-
|
1247
|
+
triggerPrice = self.safe_number(order, 'triggerPrice')
|
1166
1248
|
takeProfitPrice: Num = None
|
1167
1249
|
stopLossPrice: Num = None
|
1168
1250
|
childOrders = self.safe_value(order, 'childOrders')
|
@@ -1191,8 +1273,7 @@ class woofipro(Exchange, ImplicitAPI):
|
|
1191
1273
|
'reduceOnly': self.safe_bool(order, 'reduce_only'),
|
1192
1274
|
'side': side,
|
1193
1275
|
'price': price,
|
1194
|
-
'
|
1195
|
-
'triggerPrice': stopPrice,
|
1276
|
+
'triggerPrice': triggerPrice,
|
1196
1277
|
'takeProfitPrice': takeProfitPrice,
|
1197
1278
|
'stopLossPrice': stopLossPrice,
|
1198
1279
|
'average': average,
|
@@ -1260,11 +1341,11 @@ class woofipro(Exchange, ImplicitAPI):
|
|
1260
1341
|
'symbol': market['id'],
|
1261
1342
|
'side': orderSide,
|
1262
1343
|
}
|
1263
|
-
|
1344
|
+
triggerPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
|
1264
1345
|
stopLoss = self.safe_value(params, 'stopLoss')
|
1265
1346
|
takeProfit = self.safe_value(params, 'takeProfit')
|
1266
1347
|
algoType = self.safe_string(params, 'algoType')
|
1267
|
-
isConditional =
|
1348
|
+
isConditional = triggerPrice is not None or stopLoss is not None or takeProfit is not None or (self.safe_value(params, 'childOrders') is not None)
|
1268
1349
|
isMarket = orderType == 'MARKET'
|
1269
1350
|
timeInForce = self.safe_string_lower(params, 'timeInForce')
|
1270
1351
|
postOnly = self.is_post_only(isMarket, None, params)
|
@@ -1290,8 +1371,8 @@ class woofipro(Exchange, ImplicitAPI):
|
|
1290
1371
|
clientOrderId = self.safe_string_n(params, ['clOrdID', 'clientOrderId', 'client_order_id'])
|
1291
1372
|
if clientOrderId is not None:
|
1292
1373
|
request['client_order_id'] = clientOrderId
|
1293
|
-
if
|
1294
|
-
request['trigger_price'] = self.price_to_precision(symbol,
|
1374
|
+
if triggerPrice is not None:
|
1375
|
+
request['trigger_price'] = self.price_to_precision(symbol, triggerPrice)
|
1295
1376
|
request['algo_type'] = 'STOP'
|
1296
1377
|
elif (stopLoss is not None) or (takeProfit is not None):
|
1297
1378
|
request['algo_type'] = 'TP_SL'
|
@@ -1352,10 +1433,10 @@ class woofipro(Exchange, ImplicitAPI):
|
|
1352
1433
|
self.load_markets()
|
1353
1434
|
market = self.market(symbol)
|
1354
1435
|
request = self.create_order_request(symbol, type, side, amount, price, params)
|
1355
|
-
|
1436
|
+
triggerPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
|
1356
1437
|
stopLoss = self.safe_value(params, 'stopLoss')
|
1357
1438
|
takeProfit = self.safe_value(params, 'takeProfit')
|
1358
|
-
isConditional =
|
1439
|
+
isConditional = triggerPrice is not None or stopLoss is not None or takeProfit is not None or (self.safe_value(params, 'childOrders') is not None)
|
1359
1440
|
response = None
|
1360
1441
|
if isConditional:
|
1361
1442
|
response = self.v1PrivatePostAlgoOrder(request)
|
@@ -1414,10 +1495,10 @@ class woofipro(Exchange, ImplicitAPI):
|
|
1414
1495
|
amount = self.safe_value(rawOrder, 'amount')
|
1415
1496
|
price = self.safe_value(rawOrder, 'price')
|
1416
1497
|
orderParams = self.safe_dict(rawOrder, 'params', {})
|
1417
|
-
|
1498
|
+
triggerPrice = self.safe_string_2(orderParams, 'triggerPrice', 'stopPrice')
|
1418
1499
|
stopLoss = self.safe_value(orderParams, 'stopLoss')
|
1419
1500
|
takeProfit = self.safe_value(orderParams, 'takeProfit')
|
1420
|
-
isConditional =
|
1501
|
+
isConditional = triggerPrice is not None or stopLoss is not None or takeProfit is not None or (self.safe_value(orderParams, 'childOrders') is not None)
|
1421
1502
|
if isConditional:
|
1422
1503
|
raise NotSupported(self.id + 'createOrders() only support non-stop order')
|
1423
1504
|
orderRequest = self.create_order_request(marketId, type, side, amount, price, orderParams)
|
@@ -1471,10 +1552,10 @@ class woofipro(Exchange, ImplicitAPI):
|
|
1471
1552
|
request: dict = {
|
1472
1553
|
'order_id': id,
|
1473
1554
|
}
|
1474
|
-
|
1475
|
-
if
|
1476
|
-
request['triggerPrice'] = self.price_to_precision(symbol,
|
1477
|
-
isConditional = (
|
1555
|
+
triggerPrice = self.safe_string_n(params, ['triggerPrice', 'stopPrice', 'takeProfitPrice', 'stopLossPrice'])
|
1556
|
+
if triggerPrice is not None:
|
1557
|
+
request['triggerPrice'] = self.price_to_precision(symbol, triggerPrice)
|
1558
|
+
isConditional = (triggerPrice is not None) or (self.safe_value(params, 'childOrders') is not None)
|
1478
1559
|
orderQtyKey = 'quantity' if isConditional else 'order_quantity'
|
1479
1560
|
priceKey = 'price' if isConditional else 'order_price'
|
1480
1561
|
if price is not None:
|
ccxt/xt.py
CHANGED
@@ -2231,7 +2231,8 @@ class xt(Exchange, ImplicitAPI):
|
|
2231
2231
|
:param str [params.timeInForce]: 'GTC', 'IOC', 'FOK' or 'GTX'
|
2232
2232
|
:param str [params.entrustType]: 'TAKE_PROFIT', 'STOP', 'TAKE_PROFIT_MARKET', 'STOP_MARKET', 'TRAILING_STOP_MARKET', required if stopPrice is defined, currently isn't functioning on xt's side
|
2233
2233
|
:param str [params.triggerPriceType]: 'INDEX_PRICE', 'MARK_PRICE', 'LATEST_PRICE', required if stopPrice is defined
|
2234
|
-
:param float [params.
|
2234
|
+
:param float [params.triggerPrice]: price to trigger a stop order
|
2235
|
+
:param float [params.stopPrice]: alias for triggerPrice
|
2235
2236
|
:param float [params.stopLoss]: price to set a stop-loss on an open position
|
2236
2237
|
:param float [params.takeProfit]: price to set a take-profit on an open position
|
2237
2238
|
:returns dict: an `order structure <https://docs.ccxt.com/en/latest/manual.html#order-structure>`
|
@@ -3333,7 +3334,7 @@ class xt(Exchange, ImplicitAPI):
|
|
3333
3334
|
'postOnly': None,
|
3334
3335
|
'side': self.safe_string_lower_2(order, 'side', 'orderSide'),
|
3335
3336
|
'price': self.safe_number(order, 'price'),
|
3336
|
-
'
|
3337
|
+
'triggerPrice': self.safe_number(order, 'stopPrice'),
|
3337
3338
|
'stopLoss': self.safe_number(order, 'triggerStopPrice'),
|
3338
3339
|
'takeProfit': self.safe_number(order, 'triggerProfitPrice'),
|
3339
3340
|
'amount': amount,
|
@@ -4174,6 +4175,8 @@ class xt(Exchange, ImplicitAPI):
|
|
4174
4175
|
symbol = self.safe_symbol(marketId, market, '_', 'swap')
|
4175
4176
|
timestamp = self.safe_integer(contract, 'nextCollectionTime')
|
4176
4177
|
interval = self.safe_string(contract, 'collectionInternal')
|
4178
|
+
if interval is not None:
|
4179
|
+
interval = interval + 'h'
|
4177
4180
|
return {
|
4178
4181
|
'info': contract,
|
4179
4182
|
'symbol': symbol,
|
@@ -4192,7 +4195,7 @@ class xt(Exchange, ImplicitAPI):
|
|
4192
4195
|
'previousFundingRate': None,
|
4193
4196
|
'previousFundingTimestamp': None,
|
4194
4197
|
'previousFundingDatetime': None,
|
4195
|
-
'interval': interval
|
4198
|
+
'interval': interval,
|
4196
4199
|
}
|
4197
4200
|
|
4198
4201
|
def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
ccxt/yobit.py
CHANGED
ccxt/zaif.py
CHANGED
ccxt/zonda.py
CHANGED
@@ -505,7 +505,6 @@ class zonda(Exchange, ImplicitAPI):
|
|
505
505
|
'postOnly': postOnly,
|
506
506
|
'side': self.safe_string_lower(order, 'offerType'),
|
507
507
|
'price': self.safe_string(order, 'rate'),
|
508
|
-
'stopPrice': None,
|
509
508
|
'triggerPrice': None,
|
510
509
|
'amount': amount,
|
511
510
|
'cost': None,
|
@@ -1400,7 +1399,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1400
1399
|
response = None
|
1401
1400
|
if isStopOrder:
|
1402
1401
|
if not isStopLossPrice:
|
1403
|
-
raise ExchangeError(self.id + ' createOrder() zonda requires `triggerPrice`
|
1402
|
+
raise ExchangeError(self.id + ' createOrder() zonda requires `triggerPrice` parameter for stop-limit or stop-market orders')
|
1404
1403
|
request['stopRate'] = self.price_to_precision(symbol, stopLossPrice)
|
1405
1404
|
response = self.v1_01PrivatePostTradingStopOfferSymbol(self.extend(request, params))
|
1406
1405
|
else:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ccxt
|
3
|
-
Version: 4.4.
|
3
|
+
Version: 4.4.42
|
4
4
|
Summary: A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges
|
5
5
|
Home-page: https://ccxt.com
|
6
6
|
Author: Igor Kroitor
|
@@ -140,7 +140,7 @@ The CCXT library currently supports the following 106 cryptocurrency exchange ma
|
|
140
140
|
| [](https://bitvavo.com/?a=24F34952F7) | bitvavo | [Bitvavo](https://bitvavo.com/?a=24F34952F7) | [](https://docs.bitvavo.com/) | cex | | [](https://ccxt.pro) |
|
141
141
|
| [](https://bl3p.eu) | bl3p | [BL3P](https://bl3p.eu) | [](https://github.com/BitonicNL/bl3p-api/tree/master/docs) | cex | | |
|
142
142
|
| [](https://blockchain.com) | blockchaincom | [Blockchain.com](https://blockchain.com) | [](https://api.blockchain.com/v3) | cex | | [](https://ccxt.pro) |
|
143
|
-
| [](https://blofin.com/register?referral_code=
|
143
|
+
| [](https://blofin.com/register?referral_code=f79EsS) | blofin | [BloFin](https://blofin.com/register?referral_code=f79EsS) | [](https://blofin.com/docs) | cex | | [](https://ccxt.pro) |
|
144
144
|
| [](https://btc-alpha.com/?r=123788) | btcalpha | [BTC-Alpha](https://btc-alpha.com/?r=123788) | [](https://btc-alpha.github.io/api-docs) | cex | | |
|
145
145
|
| [](https://www.btcbox.co.jp/) | btcbox | [BtcBox](https://www.btcbox.co.jp/) | [](https://blog.btcbox.jp/en/archives/8762) | cex | | |
|
146
146
|
| [](https://btcmarkets.net) | btcmarkets | [BTC Markets](https://btcmarkets.net) | [](https://api.btcmarkets.net/doc/v3) | cex | | |
|
@@ -275,13 +275,13 @@ console.log(version, Object.keys(exchanges));
|
|
275
275
|
|
276
276
|
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
277
277
|
|
278
|
-
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.
|
279
|
-
* unpkg: https://unpkg.com/ccxt@4.4.
|
278
|
+
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.42/dist/ccxt.browser.min.js
|
279
|
+
* unpkg: https://unpkg.com/ccxt@4.4.42/dist/ccxt.browser.min.js
|
280
280
|
|
281
281
|
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
|
282
282
|
|
283
283
|
```HTML
|
284
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.
|
284
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.42/dist/ccxt.browser.min.js"></script>
|
285
285
|
```
|
286
286
|
|
287
287
|
Creates a global `ccxt` object:
|