ccxt 4.1.84__py2.py3-none-any.whl → 4.1.86__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/alpaca.py +1 -1
- ccxt/ascendex.py +1 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/alpaca.py +1 -1
- ccxt/async_support/ascendex.py +1 -1
- ccxt/async_support/base/exchange.py +7 -2
- ccxt/async_support/binance.py +1 -1
- ccxt/async_support/bingx.py +9 -8
- ccxt/async_support/bitget.py +1 -2
- ccxt/async_support/bithumb.py +2 -2
- ccxt/async_support/bitmart.py +90 -73
- ccxt/async_support/bitmex.py +1 -1
- ccxt/async_support/bitopro.py +2 -2
- ccxt/async_support/bybit.py +2 -4
- ccxt/async_support/coinex.py +2 -1
- ccxt/async_support/cryptocom.py +2 -2
- ccxt/async_support/digifinex.py +119 -103
- ccxt/async_support/hitbtc.py +1 -1
- ccxt/async_support/htx.py +1 -1
- ccxt/async_support/kraken.py +1 -1
- ccxt/async_support/krakenfutures.py +2 -2
- ccxt/async_support/kucoin.py +1 -5
- ccxt/async_support/kucoinfutures.py +0 -3
- ccxt/async_support/latoken.py +1 -1
- ccxt/async_support/mexc.py +76 -49
- ccxt/async_support/okx.py +3 -3
- ccxt/async_support/p2b.py +0 -2
- ccxt/async_support/poloniex.py +42 -42
- ccxt/async_support/probit.py +25 -17
- ccxt/async_support/tokocrypto.py +6 -3
- ccxt/base/exchange.py +21 -8
- ccxt/binance.py +1 -1
- ccxt/bingx.py +9 -8
- ccxt/bitget.py +1 -2
- ccxt/bitmart.py +90 -73
- ccxt/bitmex.py +1 -1
- ccxt/bybit.py +2 -4
- ccxt/coinex.py +2 -1
- ccxt/cryptocom.py +2 -2
- ccxt/digifinex.py +119 -103
- ccxt/hitbtc.py +1 -1
- ccxt/htx.py +1 -1
- ccxt/kraken.py +1 -1
- ccxt/krakenfutures.py +2 -2
- ccxt/kucoin.py +1 -5
- ccxt/kucoinfutures.py +0 -3
- ccxt/latoken.py +1 -1
- ccxt/mexc.py +76 -49
- ccxt/okx.py +3 -3
- ccxt/p2b.py +0 -2
- ccxt/poloniex.py +42 -42
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bitmart.py +965 -247
- ccxt/pro/bitmex.py +200 -2
- ccxt/pro/krakenfutures.py +4 -4
- ccxt/pro/mexc.py +1 -1
- ccxt/pro/poloniex.py +1 -1
- ccxt/pro/poloniexfutures.py +3 -3
- ccxt/probit.py +25 -17
- ccxt/tokocrypto.py +6 -3
- {ccxt-4.1.84.dist-info → ccxt-4.1.86.dist-info}/METADATA +6 -5
- {ccxt-4.1.84.dist-info → ccxt-4.1.86.dist-info}/RECORD +65 -65
- {ccxt-4.1.84.dist-info → ccxt-4.1.86.dist-info}/WHEEL +0 -0
- {ccxt-4.1.84.dist-info → ccxt-4.1.86.dist-info}/top_level.txt +0 -0
ccxt/mexc.py
CHANGED
@@ -1380,7 +1380,15 @@ class mexc(Exchange, ImplicitAPI):
|
|
1380
1380
|
request['endTime'] = until
|
1381
1381
|
method = self.safe_string(self.options, 'fetchTradesMethod', 'spotPublicGetAggTrades')
|
1382
1382
|
method = self.safe_string(params, 'method', method) # AggTrades, HistoricalTrades, Trades
|
1383
|
-
|
1383
|
+
params = self.omit(params, ['method'])
|
1384
|
+
if method == 'spotPublicGetAggTrades':
|
1385
|
+
trades = self.spotPublicGetAggTrades(self.extend(request, params))
|
1386
|
+
elif method == 'spotPublicGetHistoricalTrades':
|
1387
|
+
trades = self.spotPublicGetHistoricalTrades(self.extend(request, params))
|
1388
|
+
elif method == 'spotPublicGetTrades':
|
1389
|
+
trades = self.spotPublicGetTrades(self.extend(request, params))
|
1390
|
+
else:
|
1391
|
+
raise NotSupported(self.id + ' fetchTrades() not support self method')
|
1384
1392
|
#
|
1385
1393
|
# /trades, /historicalTrades
|
1386
1394
|
#
|
@@ -1656,12 +1664,15 @@ class mexc(Exchange, ImplicitAPI):
|
|
1656
1664
|
request['end'] = until
|
1657
1665
|
priceType = self.safe_string(params, 'price', 'default')
|
1658
1666
|
params = self.omit(params, 'price')
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1667
|
+
response = None
|
1668
|
+
if priceType == 'default':
|
1669
|
+
response = self.contractPublicGetKlineSymbol(self.extend(request, params))
|
1670
|
+
elif priceType == 'index':
|
1671
|
+
response = self.contractPublicGetKlineIndexPriceSymbol(self.extend(request, params))
|
1672
|
+
elif priceType == 'mark':
|
1673
|
+
response = self.contractPublicGetKlineFairPriceSymbol(self.extend(request, params))
|
1674
|
+
else:
|
1675
|
+
raise NotSupported(self.id + ' fetchOHLCV() not support self price type, [default, index, mark]')
|
1665
1676
|
#
|
1666
1677
|
# {
|
1667
1678
|
# "success":true,
|
@@ -2019,6 +2030,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
2019
2030
|
:param float [price]: the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
2020
2031
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2021
2032
|
:param str [params.marginMode]: only 'isolated' is supported for spot-margin trading
|
2033
|
+
:param float [params.triggerPrice]: The price at which a trigger order is triggered at
|
2022
2034
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
2023
2035
|
"""
|
2024
2036
|
self.load_markets()
|
@@ -2153,16 +2165,6 @@ class mexc(Exchange, ImplicitAPI):
|
|
2153
2165
|
# 'trend': 1, # Required for trigger order 1: latest price, 2: fair price, 3: index price
|
2154
2166
|
# 'orderType': 1, # Required for trigger order 1: limit order,2:Post Only Maker,3: close or cancel instantly ,4: close or cancel completely,5: Market order
|
2155
2167
|
}
|
2156
|
-
method = 'contractPrivatePostOrderSubmit'
|
2157
|
-
stopPrice = self.safe_number_2(params, 'triggerPrice', 'stopPrice')
|
2158
|
-
params = self.omit(params, ['stopPrice', 'triggerPrice'])
|
2159
|
-
if stopPrice:
|
2160
|
-
method = 'contractPrivatePostPlanorderPlace'
|
2161
|
-
request['triggerPrice'] = self.price_to_precision(symbol, stopPrice)
|
2162
|
-
request['triggerType'] = self.safe_integer(params, 'triggerType', 1)
|
2163
|
-
request['executeCycle'] = self.safe_integer(params, 'executeCycle', 1)
|
2164
|
-
request['trend'] = self.safe_integer(params, 'trend', 1)
|
2165
|
-
request['orderType'] = self.safe_integer(params, 'orderType', 1)
|
2166
2168
|
if (type != 5) and (type != 6) and (type != 'market'):
|
2167
2169
|
request['price'] = float(self.price_to_precision(symbol, price))
|
2168
2170
|
if openType == 1:
|
@@ -2177,8 +2179,18 @@ class mexc(Exchange, ImplicitAPI):
|
|
2177
2179
|
clientOrderId = self.safe_string_2(params, 'clientOrderId', 'externalOid')
|
2178
2180
|
if clientOrderId is not None:
|
2179
2181
|
request['externalOid'] = clientOrderId
|
2180
|
-
|
2181
|
-
|
2182
|
+
stopPrice = self.safe_number_2(params, 'triggerPrice', 'stopPrice')
|
2183
|
+
params = self.omit(params, ['clientOrderId', 'externalOid', 'postOnly', 'stopPrice', 'triggerPrice'])
|
2184
|
+
response = None
|
2185
|
+
if stopPrice:
|
2186
|
+
request['triggerPrice'] = self.price_to_precision(symbol, stopPrice)
|
2187
|
+
request['triggerType'] = self.safe_integer(params, 'triggerType', 1)
|
2188
|
+
request['executeCycle'] = self.safe_integer(params, 'executeCycle', 1)
|
2189
|
+
request['trend'] = self.safe_integer(params, 'trend', 1)
|
2190
|
+
request['orderType'] = self.safe_integer(params, 'orderType', 1)
|
2191
|
+
response = self.contractPrivatePostPlanorderPlace(self.extend(request, params))
|
2192
|
+
else:
|
2193
|
+
response = self.contractPrivatePostOrderSubmit(self.extend(request, params))
|
2182
2194
|
#
|
2183
2195
|
# Swap
|
2184
2196
|
# {"code":200,"data":"2ff3163e8617443cb9c6fc19d42b1ca4"}
|
@@ -2193,7 +2205,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
2193
2205
|
"""
|
2194
2206
|
*spot only* *all orders must have the same symbol* create a list of trade orders
|
2195
2207
|
:see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#batch-orders
|
2196
|
-
:param
|
2208
|
+
:param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
2197
2209
|
:param dict [params]: extra parameters specific to api endpoint
|
2198
2210
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
2199
2211
|
"""
|
@@ -2270,12 +2282,12 @@ class mexc(Exchange, ImplicitAPI):
|
|
2270
2282
|
else:
|
2271
2283
|
request['orderId'] = id
|
2272
2284
|
marginMode, query = self.handle_margin_mode_and_params('fetchOrder', params)
|
2273
|
-
method = 'spotPrivateGetOrder'
|
2274
2285
|
if marginMode is not None:
|
2275
2286
|
if marginMode != 'isolated':
|
2276
2287
|
raise BadRequest(self.id + ' fetchOrder() does not support marginMode ' + marginMode + ' for spot-margin trading')
|
2277
|
-
|
2278
|
-
|
2288
|
+
data = self.spotPrivateGetMarginOrder(self.extend(request, query))
|
2289
|
+
else:
|
2290
|
+
data = self.spotPrivateGetOrder(self.extend(request, query))
|
2279
2291
|
#
|
2280
2292
|
# spot
|
2281
2293
|
#
|
@@ -2379,16 +2391,17 @@ class mexc(Exchange, ImplicitAPI):
|
|
2379
2391
|
if symbol is None:
|
2380
2392
|
raise ArgumentsRequired(self.id + ' fetchOrders() requires a symbol argument for spot market')
|
2381
2393
|
marginMode, queryInner = self.handle_margin_mode_and_params('fetchOrders', params)
|
2382
|
-
method = 'spotPrivateGetAllOrders'
|
2383
|
-
if marginMode is not None:
|
2384
|
-
if marginMode != 'isolated':
|
2385
|
-
raise BadRequest(self.id + ' fetchOrders() does not support marginMode ' + marginMode + ' for spot-margin trading')
|
2386
|
-
method = 'spotPrivateGetMarginAllOrders'
|
2387
2394
|
if since is not None:
|
2388
2395
|
request['startTime'] = since
|
2389
2396
|
if limit is not None:
|
2390
2397
|
request['limit'] = limit
|
2391
|
-
response =
|
2398
|
+
response = None
|
2399
|
+
if marginMode is not None:
|
2400
|
+
if marginMode != 'isolated':
|
2401
|
+
raise BadRequest(self.id + ' fetchOrders() does not support marginMode ' + marginMode + ' for spot-margin trading')
|
2402
|
+
response = self.spotPrivateGetMarginAllOrders(self.extend(request, queryInner))
|
2403
|
+
else:
|
2404
|
+
response = self.spotPrivateGetAllOrders(self.extend(request, queryInner))
|
2392
2405
|
#
|
2393
2406
|
# spot
|
2394
2407
|
#
|
@@ -2591,13 +2604,14 @@ class mexc(Exchange, ImplicitAPI):
|
|
2591
2604
|
if symbol is None:
|
2592
2605
|
raise ArgumentsRequired(self.id + ' fetchOpenOrders() requires a symbol argument for spot market')
|
2593
2606
|
request['symbol'] = market['id']
|
2594
|
-
method = 'spotPrivateGetOpenOrders'
|
2595
2607
|
marginMode, query = self.handle_margin_mode_and_params('fetchOpenOrders', params)
|
2608
|
+
response = None
|
2596
2609
|
if marginMode is not None:
|
2597
2610
|
if marginMode != 'isolated':
|
2598
2611
|
raise BadRequest(self.id + ' fetchOpenOrders() does not support marginMode ' + marginMode + ' for spot-margin trading')
|
2599
|
-
|
2600
|
-
|
2612
|
+
response = self.spotPrivateGetMarginOpenOrders(self.extend(request, query))
|
2613
|
+
else:
|
2614
|
+
response = self.spotPrivateGetOpenOrders(self.extend(request, query))
|
2601
2615
|
#
|
2602
2616
|
# spot
|
2603
2617
|
#
|
@@ -2717,12 +2731,12 @@ class mexc(Exchange, ImplicitAPI):
|
|
2717
2731
|
requestInner['origClientOrderId'] = clientOrderId
|
2718
2732
|
else:
|
2719
2733
|
requestInner['orderId'] = id
|
2720
|
-
method = 'spotPrivateDeleteOrder'
|
2721
2734
|
if marginMode is not None:
|
2722
2735
|
if marginMode != 'isolated':
|
2723
2736
|
raise BadRequest(self.id + ' cancelOrder() does not support marginMode ' + marginMode + ' for spot-margin trading')
|
2724
|
-
|
2725
|
-
|
2737
|
+
data = self.spotPrivateDeleteMarginOrder(self.extend(requestInner, query))
|
2738
|
+
else:
|
2739
|
+
data = self.spotPrivateDeleteOrder(self.extend(requestInner, query))
|
2726
2740
|
#
|
2727
2741
|
# spot
|
2728
2742
|
#
|
@@ -2761,7 +2775,13 @@ class mexc(Exchange, ImplicitAPI):
|
|
2761
2775
|
# TODO: PlanorderCancel endpoint has bug atm. waiting for fix.
|
2762
2776
|
method = self.safe_string(self.options, 'cancelOrder', 'contractPrivatePostOrderCancel') # contractPrivatePostOrderCancel, contractPrivatePostPlanorderCancel
|
2763
2777
|
method = self.safe_string(query, 'method', method)
|
2764
|
-
response =
|
2778
|
+
response = None
|
2779
|
+
if method == 'contractPrivatePostOrderCancel':
|
2780
|
+
response = self.contractPrivatePostOrderCancel([id]) # the request cannot be changed or extended. This is the only way to send.
|
2781
|
+
elif method == 'contractPrivatePostPlanorderCancel':
|
2782
|
+
response = self.contractPrivatePostPlanorderCancel([id]) # the request cannot be changed or extended. This is the only way to send.
|
2783
|
+
else:
|
2784
|
+
raise NotSupported(self.id + ' cancelOrder() not support self method')
|
2765
2785
|
#
|
2766
2786
|
# {
|
2767
2787
|
# "success": True,
|
@@ -2831,12 +2851,13 @@ class mexc(Exchange, ImplicitAPI):
|
|
2831
2851
|
if symbol is None:
|
2832
2852
|
raise ArgumentsRequired(self.id + ' cancelAllOrders() requires a symbol argument on spot')
|
2833
2853
|
request['symbol'] = market['id']
|
2834
|
-
|
2854
|
+
response = None
|
2835
2855
|
if marginMode is not None:
|
2836
2856
|
if marginMode != 'isolated':
|
2837
2857
|
raise BadRequest(self.id + ' cancelAllOrders() does not support marginMode ' + marginMode + ' for spot-margin trading')
|
2838
|
-
|
2839
|
-
|
2858
|
+
response = self.spotPrivateDeleteMarginOpenOrders(self.extend(request, query))
|
2859
|
+
else:
|
2860
|
+
response = self.spotPrivateDeleteOpenOrders(self.extend(request, query))
|
2840
2861
|
#
|
2841
2862
|
# spot
|
2842
2863
|
#
|
@@ -2881,7 +2902,11 @@ class mexc(Exchange, ImplicitAPI):
|
|
2881
2902
|
# the Planorder endpoints work not only for stop-market orders but also for stop-limit orders that are supposed to have separate endpoint
|
2882
2903
|
method = self.safe_string(self.options, 'cancelAllOrders', 'contractPrivatePostOrderCancelAll')
|
2883
2904
|
method = self.safe_string(query, 'method', method)
|
2884
|
-
response =
|
2905
|
+
response = None
|
2906
|
+
if method == 'contractPrivatePostOrderCancelAll':
|
2907
|
+
response = self.contractPrivatePostOrderCancelAll(self.extend(request, query))
|
2908
|
+
elif method == 'contractPrivatePostPlanorderCancelAll':
|
2909
|
+
response = self.contractPrivatePostPlanorderCancelAll(self.extend(request, query))
|
2885
2910
|
#
|
2886
2911
|
# {
|
2887
2912
|
# "success": True,
|
@@ -3371,13 +3396,10 @@ class mexc(Exchange, ImplicitAPI):
|
|
3371
3396
|
marketType = None
|
3372
3397
|
request = {}
|
3373
3398
|
marketType, params = self.handle_market_type_and_params('fetchBalance', None, params)
|
3374
|
-
method = self.get_supported_mapping(marketType, {
|
3375
|
-
'spot': 'spotPrivateGetAccount',
|
3376
|
-
'swap': 'contractPrivateGetAccountAssets',
|
3377
|
-
'margin': 'spotPrivateGetMarginIsolatedAccount',
|
3378
|
-
})
|
3379
3399
|
marginMode = self.safe_string(params, 'marginMode')
|
3380
3400
|
isMargin = self.safe_value(params, 'margin', False)
|
3401
|
+
params = self.omit(params, ['margin', 'marginMode'])
|
3402
|
+
response = None
|
3381
3403
|
if (marginMode is not None) or (isMargin) or (marketType == 'margin'):
|
3382
3404
|
parsedSymbols = None
|
3383
3405
|
symbol = self.safe_string(params, 'symbol')
|
@@ -3389,11 +3411,16 @@ class mexc(Exchange, ImplicitAPI):
|
|
3389
3411
|
market = self.market(symbol)
|
3390
3412
|
parsedSymbols = market['id']
|
3391
3413
|
self.check_required_argument('fetchBalance', parsedSymbols, 'symbol or symbols')
|
3392
|
-
method = 'spotPrivateGetMarginIsolatedAccount'
|
3393
3414
|
marketType = 'margin'
|
3394
3415
|
request['symbols'] = parsedSymbols
|
3395
|
-
|
3396
|
-
|
3416
|
+
params = self.omit(params, ['symbol', 'symbols'])
|
3417
|
+
response = self.spotPrivateGetMarginIsolatedAccount(self.extend(request, params))
|
3418
|
+
elif marketType == 'spot':
|
3419
|
+
response = self.spotPrivateGetAccount(self.extend(request, params))
|
3420
|
+
elif marketType == 'swap':
|
3421
|
+
response = self.contractPrivateGetAccountAssets(self.extend(request, params))
|
3422
|
+
else:
|
3423
|
+
raise NotSupported(self.id + ' fetchBalance() not support self method')
|
3397
3424
|
#
|
3398
3425
|
# spot
|
3399
3426
|
#
|
@@ -4929,7 +4956,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
4929
4956
|
marginMode specified by params["marginMode"], self.options["marginMode"], self.options["defaultMarginMode"], params["margin"] = True or self.options["defaultType"] = 'margin'
|
4930
4957
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4931
4958
|
:param bool [params.margin]: True for trading spot-margin
|
4932
|
-
:returns
|
4959
|
+
:returns Array: the marginMode in lowercase
|
4933
4960
|
"""
|
4934
4961
|
defaultType = self.safe_string(self.options, 'defaultType')
|
4935
4962
|
isMargin = self.safe_value(params, 'margin', False)
|
ccxt/okx.py
CHANGED
@@ -2715,7 +2715,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2715
2715
|
"""
|
2716
2716
|
create a list of trade orders
|
2717
2717
|
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-multiple-orders
|
2718
|
-
:param
|
2718
|
+
:param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
2719
2719
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
2720
2720
|
"""
|
2721
2721
|
self.load_markets()
|
@@ -3212,7 +3212,7 @@ class okx(Exchange, ImplicitAPI):
|
|
3212
3212
|
:param str symbol: unified market symbol
|
3213
3213
|
:param dict [params]: extra and exchange specific parameters
|
3214
3214
|
:returns: `an order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
3215
|
-
|
3215
|
+
"""
|
3216
3216
|
if symbol is None:
|
3217
3217
|
raise ArgumentsRequired(self.id + ' fetchOrder() requires a symbol argument')
|
3218
3218
|
self.load_markets()
|
@@ -6707,7 +6707,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6707
6707
|
* EXCHANGE SPECIFIC PARAMETERS
|
6708
6708
|
:param boolean [params.autoCxl]: whether any pending orders for closing out needs to be automatically canceled when close position via a market order. False or True, the default is False
|
6709
6709
|
:param str [params.tag]: order tag a combination of case-sensitive alphanumerics, all numbers, or all letters of up to 16 characters
|
6710
|
-
:returns [
|
6710
|
+
:returns dict[]: `A list of position structures <https://docs.ccxt.com/#/?id=position-structure>`
|
6711
6711
|
"""
|
6712
6712
|
self.load_markets()
|
6713
6713
|
market = self.market(symbol)
|
ccxt/p2b.py
CHANGED
@@ -529,7 +529,6 @@ class p2b(Exchange, ImplicitAPI):
|
|
529
529
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
530
530
|
:param int [limit]: 1-100, default=50
|
531
531
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
532
|
-
*
|
533
532
|
:param int params['lastId']: order id
|
534
533
|
:returns Trade[]: a list of `trade structures <https://docs.ccxt.com/#/?id=public-trades>`
|
535
534
|
"""
|
@@ -642,7 +641,6 @@ class p2b(Exchange, ImplicitAPI):
|
|
642
641
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
643
642
|
:param int [limit]: 1-500, default=50
|
644
643
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
645
|
-
*
|
646
644
|
:param int [params.offset]: default=0, with self value the last candles are returned
|
647
645
|
:returns int[][]: A list of candles ordered, open, high, low, close, volume
|
648
646
|
"""
|
ccxt/poloniex.py
CHANGED
@@ -1209,18 +1209,18 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1209
1209
|
|
1210
1210
|
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1211
1211
|
"""
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1212
|
+
create a trade order
|
1213
|
+
:see: https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
|
1214
|
+
:see: https://docs.poloniex.com/#authenticated-endpoints-smart-orders-create-order # trigger orders
|
1215
|
+
:param str symbol: unified symbol of the market to create an order in
|
1216
|
+
:param str type: 'market' or 'limit'
|
1217
|
+
:param str side: 'buy' or 'sell'
|
1218
|
+
:param float amount: how much of currency you want to trade in units of base currency
|
1219
|
+
:param float [price]: the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
1220
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1221
|
+
:param float [params.triggerPrice]: *spot only* The price at which a trigger order is triggered at
|
1222
|
+
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1223
|
+
"""
|
1224
1224
|
self.load_markets()
|
1225
1225
|
market = self.market(symbol)
|
1226
1226
|
if not market['spot']:
|
@@ -1280,19 +1280,19 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1280
1280
|
|
1281
1281
|
def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
1282
1282
|
"""
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1283
|
+
edit a trade order
|
1284
|
+
:see: https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
|
1285
|
+
:see: https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-replace-order
|
1286
|
+
:param str id: order id
|
1287
|
+
:param str symbol: unified symbol of the market to create an order in
|
1288
|
+
:param str type: 'market' or 'limit'
|
1289
|
+
:param str side: 'buy' or 'sell'
|
1290
|
+
:param float [amount]: how much of the currency you want to trade in units of the base currency
|
1291
|
+
:param float [price]: the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
1292
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1293
|
+
:param float [params.triggerPrice]: The price at which a trigger order is triggered at
|
1294
|
+
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1295
|
+
"""
|
1296
1296
|
self.load_markets()
|
1297
1297
|
market = self.market(symbol)
|
1298
1298
|
if not market['spot']:
|
@@ -1358,14 +1358,14 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1358
1358
|
|
1359
1359
|
def cancel_all_orders(self, symbol: Str = None, params={}):
|
1360
1360
|
"""
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1361
|
+
cancel all open orders
|
1362
|
+
:see: https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
|
1363
|
+
:see: https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-all-orders # trigger orders
|
1364
|
+
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
1365
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1366
|
+
:param boolean [params.trigger]: True if canceling trigger orders
|
1367
|
+
:returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1368
|
+
"""
|
1369
1369
|
self.load_markets()
|
1370
1370
|
request = {
|
1371
1371
|
# 'accountTypes': 'SPOT',
|
@@ -1405,15 +1405,15 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1405
1405
|
|
1406
1406
|
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1407
1407
|
"""
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1408
|
+
fetch an order by it's id
|
1409
|
+
:see: https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
|
1410
|
+
:see: https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders # trigger orders
|
1411
|
+
:param str id: order id
|
1412
|
+
:param str symbol: unified market symbol, default is None
|
1413
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1414
|
+
:param boolean [params.trigger]: True if fetching a trigger order
|
1415
|
+
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1416
|
+
"""
|
1417
1417
|
self.load_markets()
|
1418
1418
|
id = str(id)
|
1419
1419
|
request = {
|