ccxt 4.2.38__py2.py3-none-any.whl → 4.2.40__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/abstract/bingx.py +4 -0
- ccxt/abstract/coinbase.py +1 -0
- ccxt/abstract/coinbasepro.py +1 -0
- ccxt/abstract/okx.py +1 -0
- ccxt/ascendex.py +31 -27
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ascendex.py +31 -27
- ccxt/async_support/base/exchange.py +19 -7
- ccxt/async_support/bigone.py +2 -2
- ccxt/async_support/binance.py +478 -188
- ccxt/async_support/bingx.py +250 -28
- ccxt/async_support/bitfinex.py +3 -3
- ccxt/async_support/bitfinex2.py +2 -2
- ccxt/async_support/bitget.py +16 -7
- ccxt/async_support/bitmart.py +2 -2
- ccxt/async_support/bitmex.py +2 -2
- ccxt/async_support/bitrue.py +2 -2
- ccxt/async_support/bitso.py +19 -3
- ccxt/async_support/bitstamp.py +25 -3
- ccxt/async_support/bitvavo.py +1 -1
- ccxt/async_support/bl3p.py +6 -0
- ccxt/async_support/blockchaincom.py +21 -0
- ccxt/async_support/blofin.py +2 -2
- ccxt/async_support/btcalpha.py +9 -0
- ccxt/async_support/btcbox.py +9 -0
- ccxt/async_support/btcmarkets.py +19 -0
- ccxt/async_support/bybit.py +9 -7
- ccxt/async_support/cex.py +1 -1
- ccxt/async_support/coinbase.py +20 -9
- ccxt/async_support/coinbasepro.py +1 -0
- ccxt/async_support/coinex.py +4 -4
- ccxt/async_support/coinlist.py +11 -9
- ccxt/async_support/coinmetro.py +2 -1
- ccxt/async_support/coinone.py +1 -1
- ccxt/async_support/delta.py +2 -2
- ccxt/async_support/deribit.py +3 -3
- ccxt/async_support/digifinex.py +3 -3
- ccxt/async_support/exmo.py +2 -2
- ccxt/async_support/gate.py +6 -6
- ccxt/async_support/hitbtc.py +2 -2
- ccxt/async_support/hollaex.py +1 -1
- ccxt/async_support/htx.py +3 -3
- ccxt/async_support/huobijp.py +1 -1
- ccxt/async_support/kraken.py +2 -2
- ccxt/async_support/krakenfutures.py +117 -16
- ccxt/async_support/kucoin.py +5 -5
- ccxt/async_support/kucoinfutures.py +2 -2
- ccxt/async_support/latoken.py +1 -1
- ccxt/async_support/lbank.py +2 -2
- ccxt/async_support/luno.py +2 -2
- ccxt/async_support/mexc.py +5 -5
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/novadax.py +1 -1
- ccxt/async_support/okcoin.py +2 -2
- ccxt/async_support/okx.py +18 -21
- ccxt/async_support/paymium.py +2 -2
- ccxt/async_support/phemex.py +5 -4
- ccxt/async_support/poloniex.py +2 -2
- ccxt/async_support/poloniexfutures.py +10 -6
- ccxt/async_support/probit.py +1 -1
- ccxt/async_support/timex.py +1 -1
- ccxt/async_support/upbit.py +1 -1
- ccxt/async_support/wavesexchange.py +1 -1
- ccxt/async_support/whitebit.py +2 -2
- ccxt/async_support/woo.py +4 -4
- ccxt/async_support/zonda.py +3 -3
- ccxt/base/exchange.py +37 -25
- ccxt/bigone.py +2 -2
- ccxt/binance.py +478 -188
- ccxt/bingx.py +250 -28
- ccxt/bitfinex.py +3 -3
- ccxt/bitfinex2.py +2 -2
- ccxt/bitget.py +16 -7
- ccxt/bitmart.py +2 -2
- ccxt/bitmex.py +2 -2
- ccxt/bitrue.py +2 -2
- ccxt/bitso.py +19 -3
- ccxt/bitstamp.py +25 -3
- ccxt/bitvavo.py +1 -1
- ccxt/bl3p.py +6 -0
- ccxt/blockchaincom.py +21 -0
- ccxt/blofin.py +2 -2
- ccxt/btcalpha.py +9 -0
- ccxt/btcbox.py +9 -0
- ccxt/btcmarkets.py +19 -0
- ccxt/bybit.py +9 -7
- ccxt/cex.py +1 -1
- ccxt/coinbase.py +20 -9
- ccxt/coinbasepro.py +1 -0
- ccxt/coinex.py +4 -4
- ccxt/coinlist.py +11 -9
- ccxt/coinmetro.py +2 -1
- ccxt/coinone.py +1 -1
- ccxt/delta.py +2 -2
- ccxt/deribit.py +3 -3
- ccxt/digifinex.py +3 -3
- ccxt/exmo.py +2 -2
- ccxt/gate.py +6 -6
- ccxt/hitbtc.py +2 -2
- ccxt/hollaex.py +1 -1
- ccxt/htx.py +3 -3
- ccxt/huobijp.py +1 -1
- ccxt/kraken.py +2 -2
- ccxt/krakenfutures.py +117 -16
- ccxt/kucoin.py +5 -5
- ccxt/kucoinfutures.py +2 -2
- ccxt/latoken.py +1 -1
- ccxt/lbank.py +2 -2
- ccxt/luno.py +2 -2
- ccxt/mexc.py +5 -5
- ccxt/ndax.py +1 -1
- ccxt/novadax.py +1 -1
- ccxt/okcoin.py +2 -2
- ccxt/okx.py +18 -21
- ccxt/paymium.py +2 -2
- ccxt/phemex.py +5 -4
- ccxt/poloniex.py +2 -2
- ccxt/poloniexfutures.py +10 -6
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bitmart.py +129 -46
- ccxt/pro/bitvavo.py +1 -1
- ccxt/pro/bybit.py +6 -6
- ccxt/pro/cex.py +2 -2
- ccxt/pro/coinbase.py +2 -2
- ccxt/pro/coinex.py +1 -1
- ccxt/pro/lbank.py +1 -1
- ccxt/pro/mexc.py +1 -1
- ccxt/probit.py +1 -1
- ccxt/test/test_async.py +3 -1
- ccxt/test/test_sync.py +3 -1
- ccxt/timex.py +1 -1
- ccxt/upbit.py +1 -1
- ccxt/wavesexchange.py +1 -1
- ccxt/whitebit.py +2 -2
- ccxt/woo.py +4 -4
- ccxt/zonda.py +3 -3
- {ccxt-4.2.38.dist-info → ccxt-4.2.40.dist-info}/METADATA +4 -4
- {ccxt-4.2.38.dist-info → ccxt-4.2.40.dist-info}/RECORD +141 -141
- {ccxt-4.2.38.dist-info → ccxt-4.2.40.dist-info}/WHEEL +0 -0
- {ccxt-4.2.38.dist-info → ccxt-4.2.40.dist-info}/top_level.txt +0 -0
ccxt/async_support/btcbox.py
CHANGED
@@ -152,6 +152,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
152
152
|
async def fetch_balance(self, params={}) -> Balances:
|
153
153
|
"""
|
154
154
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
155
|
+
:see: https://blog.btcbox.jp/en/archives/8762#toc13
|
155
156
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
156
157
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
157
158
|
"""
|
@@ -162,6 +163,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
162
163
|
async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
163
164
|
"""
|
164
165
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
166
|
+
:see: https://blog.btcbox.jp/en/archives/8762#toc6
|
165
167
|
:param str symbol: unified symbol of the market to fetch the order book for
|
166
168
|
:param int [limit]: the maximum amount of order book entries to return
|
167
169
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -205,6 +207,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
205
207
|
async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
206
208
|
"""
|
207
209
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
210
|
+
:see: https://blog.btcbox.jp/en/archives/8762#toc5
|
208
211
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
209
212
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
210
213
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -256,6 +259,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
256
259
|
async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
257
260
|
"""
|
258
261
|
get the list of most recent trades for a particular symbol
|
262
|
+
:see: https://blog.btcbox.jp/en/archives/8762#toc7
|
259
263
|
:param str symbol: unified symbol of the market to fetch trades for
|
260
264
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
261
265
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -285,6 +289,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
285
289
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
286
290
|
"""
|
287
291
|
create a trade order
|
292
|
+
:see: https://blog.btcbox.jp/en/archives/8762#toc18
|
288
293
|
:param str symbol: unified symbol of the market to create an order in
|
289
294
|
:param str type: 'market' or 'limit'
|
290
295
|
:param str side: 'buy' or 'sell'
|
@@ -313,6 +318,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
313
318
|
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
314
319
|
"""
|
315
320
|
cancels an open order
|
321
|
+
:see: https://blog.btcbox.jp/en/archives/8762#toc17
|
316
322
|
:param str id: order id
|
317
323
|
:param str symbol: unified symbol of the market the order was made in
|
318
324
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -402,6 +408,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
402
408
|
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
403
409
|
"""
|
404
410
|
fetches information on an order made by the user
|
411
|
+
:see: https://blog.btcbox.jp/en/archives/8762#toc16
|
405
412
|
:param str symbol: unified symbol of the market the order was made in
|
406
413
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
407
414
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -464,6 +471,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
464
471
|
async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
465
472
|
"""
|
466
473
|
fetches information on multiple orders made by the user
|
474
|
+
:see: https://blog.btcbox.jp/en/archives/8762#toc15
|
467
475
|
:param str symbol: unified market symbol of the market orders were made in
|
468
476
|
:param int [since]: the earliest time in ms to fetch orders for
|
469
477
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -475,6 +483,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
475
483
|
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
476
484
|
"""
|
477
485
|
fetch all unfilled currently open orders
|
486
|
+
:see: https://blog.btcbox.jp/en/archives/8762#toc15
|
478
487
|
:param str symbol: unified market symbol
|
479
488
|
:param int [since]: the earliest time in ms to fetch open orders for
|
480
489
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
ccxt/async_support/btcmarkets.py
CHANGED
@@ -197,6 +197,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
197
197
|
async def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
198
198
|
"""
|
199
199
|
fetch history of deposits and withdrawals
|
200
|
+
:see: https://docs.btcmarkets.net/v3/#tag/Fund-Management-APIs/paths/~1v3~1transfers/get
|
200
201
|
:param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
|
201
202
|
:param int [since]: timestamp in ms of the earliest deposit/withdrawal, default is None
|
202
203
|
:param int [limit]: max number of deposit/withdrawals to return, default is None
|
@@ -208,6 +209,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
208
209
|
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
209
210
|
"""
|
210
211
|
fetch all deposits made to an account
|
212
|
+
:see: https://docs.btcmarkets.net/v3/#tag/Fund-Management-APIs/paths/~1v3~1deposits/get
|
211
213
|
:param str code: unified currency code
|
212
214
|
:param int [since]: the earliest time in ms to fetch deposits for
|
213
215
|
:param int [limit]: the maximum number of deposits structures to retrieve
|
@@ -219,6 +221,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
219
221
|
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
220
222
|
"""
|
221
223
|
fetch all withdrawals made from an account
|
224
|
+
:see: https://docs.btcmarkets.net/v3/#tag/Fund-Management-APIs/paths/~1v3~1withdrawals/get
|
222
225
|
:param str code: unified currency code
|
223
226
|
:param int [since]: the earliest time in ms to fetch withdrawals for
|
224
227
|
:param int [limit]: the maximum number of withdrawals structures to retrieve
|
@@ -346,6 +349,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
346
349
|
async def fetch_markets(self, params={}):
|
347
350
|
"""
|
348
351
|
retrieves data on all markets for btcmarkets
|
352
|
+
:see: https://docs.btcmarkets.net/v3/#tag/Market-Data-APIs/paths/~1v3~1markets/get
|
349
353
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
350
354
|
:returns dict[]: an array of objects representing market data
|
351
355
|
"""
|
@@ -434,6 +438,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
434
438
|
async def fetch_time(self, params={}):
|
435
439
|
"""
|
436
440
|
fetches the current integer timestamp in milliseconds from the exchange server
|
441
|
+
:see: https://docs.btcmarkets.net/v3/#tag/Misc-APIs/paths/~1v3~1time/get
|
437
442
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
438
443
|
:returns int: the current integer timestamp in milliseconds from the exchange server
|
439
444
|
"""
|
@@ -460,6 +465,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
460
465
|
async def fetch_balance(self, params={}) -> Balances:
|
461
466
|
"""
|
462
467
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
468
|
+
:see: https://docs.btcmarkets.net/v3/#tag/Account-APIs/paths/~1v3~1accounts~1me~1balances/get
|
463
469
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
464
470
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
465
471
|
"""
|
@@ -490,6 +496,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
490
496
|
async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
|
491
497
|
"""
|
492
498
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
499
|
+
:see: https://docs.btcmarkets.net/v3/#tag/Market-Data-APIs/paths/~1v3~1markets~1{marketId}~1candles/get
|
493
500
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
494
501
|
:param str timeframe: the length of time each candle represents
|
495
502
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
@@ -525,6 +532,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
525
532
|
async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
526
533
|
"""
|
527
534
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
535
|
+
:see: https://docs.btcmarkets.net/v3/#tag/Market-Data-APIs/paths/~1v3~1markets~1{marketId}~1orderbook/get
|
528
536
|
:param str symbol: unified symbol of the market to fetch the order book for
|
529
537
|
:param int [limit]: the maximum amount of order book entries to return
|
530
538
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -610,6 +618,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
610
618
|
async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
611
619
|
"""
|
612
620
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
621
|
+
:see: https://docs.btcmarkets.net/v3/#tag/Market-Data-APIs/paths/~1v3~1markets~1{marketId}~1ticker/get
|
613
622
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
614
623
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
615
624
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -713,6 +722,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
713
722
|
async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
714
723
|
"""
|
715
724
|
get the list of most recent trades for a particular symbol
|
725
|
+
:see: https://docs.btcmarkets.net/v3/#tag/Market-Data-APIs/paths/~1v3~1markets~1{marketId}~1trades/get
|
716
726
|
:param str symbol: unified symbol of the market to fetch trades for
|
717
727
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
718
728
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -738,6 +748,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
738
748
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
739
749
|
"""
|
740
750
|
create a trade order
|
751
|
+
:see: https://docs.btcmarkets.net/v3/#tag/Order-Placement-APIs/paths/~1v3~1orders/post
|
741
752
|
:param str symbol: unified symbol of the market to create an order in
|
742
753
|
:param str type: 'market' or 'limit'
|
743
754
|
:param str side: 'buy' or 'sell'
|
@@ -825,6 +836,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
825
836
|
async def cancel_orders(self, ids, symbol: Str = None, params={}):
|
826
837
|
"""
|
827
838
|
cancel multiple orders
|
839
|
+
:see: https://docs.btcmarkets.net/v3/#tag/Batch-Order-APIs/paths/~1v3~1batchorders~1{ids}/delete
|
828
840
|
:param str[] ids: order ids
|
829
841
|
:param str symbol: not used by btcmarkets cancelOrders()
|
830
842
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -841,6 +853,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
841
853
|
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
842
854
|
"""
|
843
855
|
cancels an open order
|
856
|
+
:see: https://docs.btcmarkets.net/v3/#operation/cancelOrder
|
844
857
|
:param str id: order id
|
845
858
|
:param str symbol: not used by btcmarket cancelOrder()
|
846
859
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -954,6 +967,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
954
967
|
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
955
968
|
"""
|
956
969
|
fetches information on an order made by the user
|
970
|
+
:see: https://docs.btcmarkets.net/v3/#operation/getOrderById
|
957
971
|
:param str symbol: not used by btcmarkets fetchOrder
|
958
972
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
959
973
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -968,6 +982,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
968
982
|
async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
969
983
|
"""
|
970
984
|
fetches information on multiple orders made by the user
|
985
|
+
:see: https://docs.btcmarkets.net/v3/#operation/listOrders
|
971
986
|
:param str symbol: unified market symbol of the market orders were made in
|
972
987
|
:param int [since]: the earliest time in ms to fetch orders for
|
973
988
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -992,6 +1007,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
992
1007
|
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
993
1008
|
"""
|
994
1009
|
fetch all unfilled currently open orders
|
1010
|
+
:see: https://docs.btcmarkets.net/v3/#operation/listOrders
|
995
1011
|
:param str symbol: unified market symbol
|
996
1012
|
:param int [since]: the earliest time in ms to fetch open orders for
|
997
1013
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
@@ -1004,6 +1020,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
1004
1020
|
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1005
1021
|
"""
|
1006
1022
|
fetches information on multiple closed orders made by the user
|
1023
|
+
:see: https://docs.btcmarkets.net/v3/#operation/listOrders
|
1007
1024
|
:param str symbol: unified market symbol of the market orders were made in
|
1008
1025
|
:param int [since]: the earliest time in ms to fetch orders for
|
1009
1026
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -1016,6 +1033,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
1016
1033
|
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1017
1034
|
"""
|
1018
1035
|
fetch all trades made by the user
|
1036
|
+
:see: https://docs.btcmarkets.net/v3/#operation/getTrades
|
1019
1037
|
:param str symbol: unified market symbol
|
1020
1038
|
:param int [since]: the earliest time in ms to fetch trades for
|
1021
1039
|
:param int [limit]: the maximum number of trades structures to retrieve
|
@@ -1065,6 +1083,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
1065
1083
|
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1066
1084
|
"""
|
1067
1085
|
make a withdrawal
|
1086
|
+
:see: https://docs.btcmarkets.net/v3/#tag/Fund-Management-APIs/paths/~1v3~1withdrawals/post
|
1068
1087
|
:param str code: unified currency code
|
1069
1088
|
:param float amount: the amount to withdraw
|
1070
1089
|
:param str address: the address to withdraw to
|
ccxt/async_support/bybit.py
CHANGED
@@ -1185,7 +1185,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1185
1185
|
reconstructedDate = day + month + year
|
1186
1186
|
return reconstructedDate
|
1187
1187
|
|
1188
|
-
def create_expired_option_market(self, symbol):
|
1188
|
+
def create_expired_option_market(self, symbol: str):
|
1189
1189
|
# support expired option contracts
|
1190
1190
|
quote = 'USD'
|
1191
1191
|
settle = 'USDC'
|
@@ -2155,6 +2155,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
2155
2155
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
2156
2156
|
:param int [limit]: the maximum amount of candles to fetch
|
2157
2157
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2158
|
+
:param int [params.until]: the latest time in ms to fetch orders for
|
2158
2159
|
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
2159
2160
|
:returns int[][]: A list of candles ordered, open, high, low, close, volume
|
2160
2161
|
"""
|
@@ -2175,6 +2176,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
2175
2176
|
request['start'] = since
|
2176
2177
|
if limit is not None:
|
2177
2178
|
request['limit'] = limit # max 1000, default 1000
|
2179
|
+
request, params = self.handle_until_option('end', request, params)
|
2178
2180
|
request['interval'] = self.safe_string(self.timeframes, timeframe, timeframe)
|
2179
2181
|
response = None
|
2180
2182
|
if market['spot']:
|
@@ -3299,7 +3301,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
3299
3301
|
raise InvalidOrder(self.id + ' returned more than one order')
|
3300
3302
|
return self.safe_value(result, 0)
|
3301
3303
|
|
3302
|
-
async def create_market_buy_order_with_cost(self, symbol: str, cost, params={}):
|
3304
|
+
async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
|
3303
3305
|
"""
|
3304
3306
|
:see: https://bybit-exchange.github.io/docs/v5/order/create-order
|
3305
3307
|
create a market buy order by providing the symbol and cost
|
@@ -3314,7 +3316,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
3314
3316
|
raise NotSupported(self.id + ' createMarketBuyOrderWithCost() supports spot orders only')
|
3315
3317
|
return await self.create_order(symbol, 'market', 'buy', cost, 1, params)
|
3316
3318
|
|
3317
|
-
async def create_market_sell_order_with_cost(self, symbol: str, cost, params={}):
|
3319
|
+
async def create_market_sell_order_with_cost(self, symbol: str, cost: float, params={}):
|
3318
3320
|
"""
|
3319
3321
|
:see: https://bybit-exchange.github.io/docs/v5/order/create-order
|
3320
3322
|
create a market sell order by providing the symbol and cost
|
@@ -3796,7 +3798,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
3796
3798
|
result = self.safe_value(response, 'result', {})
|
3797
3799
|
return self.parse_order(result, market)
|
3798
3800
|
|
3799
|
-
async def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
3801
|
+
async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float = None, price: float = None, params={}):
|
3800
3802
|
"""
|
3801
3803
|
edit a trade order
|
3802
3804
|
:see: https://bybit-exchange.github.io/docs/v5/order/amend-order
|
@@ -5695,7 +5697,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
5695
5697
|
'takeProfitPrice': self.safe_number_2(position, 'take_profit', 'takeProfit'),
|
5696
5698
|
})
|
5697
5699
|
|
5698
|
-
async def set_margin_mode(self, marginMode, symbol: Str = None, params={}):
|
5700
|
+
async def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
|
5699
5701
|
"""
|
5700
5702
|
set margin mode(account) or trade mode(symbol)
|
5701
5703
|
:see: https://bybit-exchange.github.io/docs/v5/account/set-margin-mode
|
@@ -5821,7 +5823,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
5821
5823
|
response = await self.privatePostV5PositionSetLeverage(self.extend(request, params))
|
5822
5824
|
return response
|
5823
5825
|
|
5824
|
-
async def set_position_mode(self, hedged, symbol: Str = None, params={}):
|
5826
|
+
async def set_position_mode(self, hedged: bool, symbol: Str = None, params={}):
|
5825
5827
|
"""
|
5826
5828
|
set hedged to True or False for a market
|
5827
5829
|
:see: https://bybit-exchange.github.io/docs/v5/position/position-mode
|
@@ -6140,7 +6142,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
6140
6142
|
'info': info,
|
6141
6143
|
}
|
6142
6144
|
|
6143
|
-
async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
6145
|
+
async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
6144
6146
|
"""
|
6145
6147
|
transfer currency internally between wallets on the same account
|
6146
6148
|
:see: https://bybit-exchange.github.io/docs/v5/asset/create-inter-transfer
|
ccxt/async_support/cex.py
CHANGED
@@ -1474,7 +1474,7 @@ class cex(Exchange, ImplicitAPI):
|
|
1474
1474
|
def parse_order_status(self, status):
|
1475
1475
|
return self.safe_string(self.options['order']['status'], status, status)
|
1476
1476
|
|
1477
|
-
async def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
1477
|
+
async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float = None, price: float = None, params={}):
|
1478
1478
|
"""
|
1479
1479
|
edit a trade order
|
1480
1480
|
:see: https://docs.cex.io/#cancel-replace-order
|
ccxt/async_support/coinbase.py
CHANGED
@@ -227,6 +227,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
227
227
|
'brokerage/orders/batch_cancel',
|
228
228
|
'brokerage/orders/edit',
|
229
229
|
'brokerage/orders/edit_preview',
|
230
|
+
'brokerage/orders/preview',
|
230
231
|
'brokerage/portfolios',
|
231
232
|
'brokerage/portfolios/move_funds',
|
232
233
|
'brokerage/convert/quote',
|
@@ -430,11 +431,12 @@ class coinbase(Exchange, ImplicitAPI):
|
|
430
431
|
# ]
|
431
432
|
# }
|
432
433
|
#
|
433
|
-
data = self.
|
434
|
-
pagination = self.
|
434
|
+
data = self.safe_list(response, 'data', [])
|
435
|
+
pagination = self.safe_dict(response, 'pagination', {})
|
435
436
|
cursor = self.safe_string(pagination, 'next_starting_after')
|
436
|
-
accounts = self.
|
437
|
-
|
437
|
+
accounts = self.safe_list(response, 'data', [])
|
438
|
+
length = len(accounts)
|
439
|
+
lastIndex = length - 1
|
438
440
|
last = self.safe_value(accounts, lastIndex)
|
439
441
|
if (cursor is not None) and (cursor != ''):
|
440
442
|
last['next_starting_after'] = cursor
|
@@ -481,8 +483,9 @@ class coinbase(Exchange, ImplicitAPI):
|
|
481
483
|
# "size": 9
|
482
484
|
# }
|
483
485
|
#
|
484
|
-
accounts = self.
|
485
|
-
|
486
|
+
accounts = self.safe_list(response, 'accounts', [])
|
487
|
+
length = len(accounts)
|
488
|
+
lastIndex = length - 1
|
486
489
|
last = self.safe_value(accounts, lastIndex)
|
487
490
|
cursor = self.safe_string(response, 'cursor')
|
488
491
|
if (cursor is not None) and (cursor != ''):
|
@@ -2098,7 +2101,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2098
2101
|
request['limit'] = limit
|
2099
2102
|
return request
|
2100
2103
|
|
2101
|
-
async def create_market_buy_order_with_cost(self, symbol: str, cost, params={}):
|
2104
|
+
async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
|
2102
2105
|
"""
|
2103
2106
|
create a market buy order by providing the symbol and cost
|
2104
2107
|
:see: https://docs.cloud.coinbase.com/advanced-trade-api/reference/retailbrokerageapi_postorder
|
@@ -2133,6 +2136,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2133
2136
|
:param str [params.stop_direction]: 'UNKNOWN_STOP_DIRECTION', 'STOP_DIRECTION_STOP_UP', 'STOP_DIRECTION_STOP_DOWN' the direction the stopPrice is triggered from
|
2134
2137
|
:param str [params.end_time]: '2023-05-25T17:01:05.092Z' for 'GTD' orders
|
2135
2138
|
:param float [params.cost]: *spot market buy only* the quote quantity that can be used alternative for the amount
|
2139
|
+
:param boolean [params.preview]: default to False, wether to use the test/preview endpoint or not
|
2136
2140
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
2137
2141
|
"""
|
2138
2142
|
await self.load_markets()
|
@@ -2248,7 +2252,14 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2248
2252
|
},
|
2249
2253
|
}
|
2250
2254
|
params = self.omit(params, ['timeInForce', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'stopPrice', 'stop_price', 'stopDirection', 'stop_direction', 'clientOrderId', 'postOnly', 'post_only', 'end_time'])
|
2251
|
-
|
2255
|
+
preview = self.safe_value_2(params, 'preview', 'test', False)
|
2256
|
+
response = None
|
2257
|
+
if preview:
|
2258
|
+
params = self.omit(params, ['preview', 'test'])
|
2259
|
+
request = self.omit(request, 'client_order_id')
|
2260
|
+
response = await self.v3PrivatePostBrokerageOrdersPreview(self.extend(request, params))
|
2261
|
+
else:
|
2262
|
+
response = await self.v3PrivatePostBrokerageOrders(self.extend(request, params))
|
2252
2263
|
#
|
2253
2264
|
# successful order
|
2254
2265
|
#
|
@@ -2503,7 +2514,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2503
2514
|
raise BadRequest(self.id + ' cancelOrders() has failed, check your arguments and parameters')
|
2504
2515
|
return self.parse_orders(orders, market)
|
2505
2516
|
|
2506
|
-
async def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
2517
|
+
async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float = None, price: float = None, params={}):
|
2507
2518
|
"""
|
2508
2519
|
edit a trade order
|
2509
2520
|
:see: https://docs.cloud.coinbase.com/advanced-trade-api/reference/retailbrokerageapi_editorder
|
ccxt/async_support/coinex.py
CHANGED
@@ -1884,7 +1884,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
1884
1884
|
'info': order,
|
1885
1885
|
}, market)
|
1886
1886
|
|
1887
|
-
async def create_market_buy_order_with_cost(self, symbol: str, cost, params={}):
|
1887
|
+
async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
|
1888
1888
|
"""
|
1889
1889
|
create a market buy order by providing the symbol and cost
|
1890
1890
|
:see: https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade003_market_order
|
@@ -2386,7 +2386,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
2386
2386
|
results.append(order)
|
2387
2387
|
return results
|
2388
2388
|
|
2389
|
-
async def edit_order(self, id, symbol, type, side, amount=None, price=None, params={}):
|
2389
|
+
async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float = None, price: float = None, params={}):
|
2390
2390
|
"""
|
2391
2391
|
edit a trade order
|
2392
2392
|
:see: https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade022_modify_order
|
@@ -3563,7 +3563,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
3563
3563
|
'takeProfitPrice': self.omit_zero(self.safe_string(position, 'take_profit_price')),
|
3564
3564
|
})
|
3565
3565
|
|
3566
|
-
async def set_margin_mode(self, marginMode, symbol: Str = None, params={}):
|
3566
|
+
async def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
|
3567
3567
|
"""
|
3568
3568
|
set margin mode to 'cross' or 'isolated'
|
3569
3569
|
:see: https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http014_adjust_leverage
|
@@ -4299,7 +4299,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
4299
4299
|
'internal': internal,
|
4300
4300
|
}
|
4301
4301
|
|
4302
|
-
async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
4302
|
+
async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
4303
4303
|
"""
|
4304
4304
|
transfer currency internally between wallets on the same account
|
4305
4305
|
:see: https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account014_balance_contract_transfer
|
ccxt/async_support/coinlist.py
CHANGED
@@ -1014,13 +1014,15 @@ class coinlist(Exchange, ImplicitAPI):
|
|
1014
1014
|
takerFees.append([None, self.parse_number(taker)])
|
1015
1015
|
takerFees = self.sort_by(takerFees, 1, True)
|
1016
1016
|
makerFees = self.sort_by(makerFees, 1, True)
|
1017
|
-
firstTier = self.
|
1018
|
-
exchangeFees = self.
|
1019
|
-
exchangeFeesTrading = self.
|
1020
|
-
exchangeFeesTradingTiers = self.
|
1021
|
-
exchangeFeesTradingTiersTaker = self.
|
1022
|
-
exchangeFeesTradingTiersMaker = self.
|
1023
|
-
|
1017
|
+
firstTier = self.safe_dict(takerFees, 0, [])
|
1018
|
+
exchangeFees = self.safe_dict(self, 'fees', {})
|
1019
|
+
exchangeFeesTrading = self.safe_dict(exchangeFees, 'trading', {})
|
1020
|
+
exchangeFeesTradingTiers = self.safe_dict(exchangeFeesTrading, 'tiers', {})
|
1021
|
+
exchangeFeesTradingTiersTaker = self.safe_list(exchangeFeesTradingTiers, 'taker', [])
|
1022
|
+
exchangeFeesTradingTiersMaker = self.safe_list(exchangeFeesTradingTiers, 'maker', [])
|
1023
|
+
exchangeFeesTradingTiersTakerLength = len(exchangeFeesTradingTiersTaker)
|
1024
|
+
firstTierLength = len(firstTier)
|
1025
|
+
if (keysLength == exchangeFeesTradingTiersTakerLength) and (firstTierLength > 0):
|
1024
1026
|
for i in range(0, keysLength):
|
1025
1027
|
takerFees[i][0] = exchangeFeesTradingTiersTaker[i][0]
|
1026
1028
|
makerFees[i][0] = exchangeFeesTradingTiersMaker[i][0]
|
@@ -1459,7 +1461,7 @@ class coinlist(Exchange, ImplicitAPI):
|
|
1459
1461
|
order = self.safe_value(response, 'order', {})
|
1460
1462
|
return self.parse_order(order, market)
|
1461
1463
|
|
1462
|
-
async def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
1464
|
+
async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float = None, price: float = None, params={}):
|
1463
1465
|
"""
|
1464
1466
|
create a trade order
|
1465
1467
|
:see: https://trade-docs.coinlist.co/?javascript--nodejs#modify-existing-order
|
@@ -1631,7 +1633,7 @@ class coinlist(Exchange, ImplicitAPI):
|
|
1631
1633
|
}
|
1632
1634
|
return self.safe_string(statuses, status, status)
|
1633
1635
|
|
1634
|
-
async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
1636
|
+
async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
1635
1637
|
"""
|
1636
1638
|
transfer currency internally between wallets on the same account
|
1637
1639
|
:see: https://trade-docs.coinlist.co/?javascript--nodejs#transfer-funds-between-entities
|
ccxt/async_support/coinmetro.py
CHANGED
@@ -1123,7 +1123,8 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
1123
1123
|
descriptionArray = description.split(' ')
|
1124
1124
|
type = None
|
1125
1125
|
referenceId = None
|
1126
|
-
|
1126
|
+
length = len(descriptionArray)
|
1127
|
+
if length > 1:
|
1127
1128
|
type = self.parse_ledger_entry_type(descriptionArray[0])
|
1128
1129
|
if descriptionArray[1] != '-':
|
1129
1130
|
referenceId = descriptionArray[1]
|
ccxt/async_support/coinone.py
CHANGED
@@ -1019,7 +1019,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
1019
1019
|
#
|
1020
1020
|
return response
|
1021
1021
|
|
1022
|
-
async def fetch_deposit_addresses(self, codes=None, params={}):
|
1022
|
+
async def fetch_deposit_addresses(self, codes: List[str] = None, params={}):
|
1023
1023
|
"""
|
1024
1024
|
fetch deposit addresses for multiple currencies and chain types
|
1025
1025
|
:param str[]|None codes: list of unified currency codes, default is None
|
ccxt/async_support/delta.py
CHANGED
@@ -259,7 +259,7 @@ class delta(Exchange, ImplicitAPI):
|
|
259
259
|
reconstructedDate = '20' + year + '-' + month + '-' + day + 'T00:00:00Z'
|
260
260
|
return reconstructedDate
|
261
261
|
|
262
|
-
def create_expired_option_market(self, symbol):
|
262
|
+
def create_expired_option_market(self, symbol: str):
|
263
263
|
# support expired option contracts
|
264
264
|
quote = 'USDT'
|
265
265
|
optionParts = symbol.split('-')
|
@@ -1810,7 +1810,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1810
1810
|
result = self.safe_value(response, 'result', {})
|
1811
1811
|
return self.parse_order(result, market)
|
1812
1812
|
|
1813
|
-
async def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
1813
|
+
async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float = None, price: float = None, params={}):
|
1814
1814
|
"""
|
1815
1815
|
edit a trade order
|
1816
1816
|
:see: https://docs.delta.exchange/#edit-order
|
ccxt/async_support/deribit.py
CHANGED
@@ -479,7 +479,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
479
479
|
reconstructedDate = day + month + year
|
480
480
|
return reconstructedDate
|
481
481
|
|
482
|
-
def create_expired_option_market(self, symbol):
|
482
|
+
def create_expired_option_market(self, symbol: str):
|
483
483
|
# support expired option contracts
|
484
484
|
quote = 'USD'
|
485
485
|
settle = None
|
@@ -1964,7 +1964,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1964
1964
|
order['trades'] = trades
|
1965
1965
|
return self.parse_order(order, market)
|
1966
1966
|
|
1967
|
-
async def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
1967
|
+
async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float = None, price: float = None, params={}):
|
1968
1968
|
"""
|
1969
1969
|
edit a trade order
|
1970
1970
|
:see: https://docs.deribit.com/#private-edit
|
@@ -2663,7 +2663,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2663
2663
|
transfers = self.safe_value(result, 'data', [])
|
2664
2664
|
return self.parse_transfers(transfers, currency, since, limit, params)
|
2665
2665
|
|
2666
|
-
async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
2666
|
+
async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
2667
2667
|
"""
|
2668
2668
|
transfer currency internally between wallets on the same account
|
2669
2669
|
:param str code: unified currency code
|
ccxt/async_support/digifinex.py
CHANGED
@@ -1727,7 +1727,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
1727
1727
|
params = self.omit(params, ['postOnly'])
|
1728
1728
|
return self.extend(request, params)
|
1729
1729
|
|
1730
|
-
async def create_market_buy_order_with_cost(self, symbol: str, cost, params={}):
|
1730
|
+
async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
|
1731
1731
|
"""
|
1732
1732
|
create a market buy order by providing the symbol and cost
|
1733
1733
|
:see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#create-new-order
|
@@ -2723,7 +2723,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
2723
2723
|
'status': self.parse_transfer_status(self.safe_string(transfer, 'code')),
|
2724
2724
|
}
|
2725
2725
|
|
2726
|
-
async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
2726
|
+
async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
2727
2727
|
"""
|
2728
2728
|
transfer currency internally between wallets on the same account
|
2729
2729
|
:param str code: unified currency code
|
@@ -3913,7 +3913,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
3913
3913
|
'amount': self.safe_number(income, 'amount'),
|
3914
3914
|
}
|
3915
3915
|
|
3916
|
-
async def set_margin_mode(self, marginMode, symbol: Str = None, params={}):
|
3916
|
+
async def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
|
3917
3917
|
"""
|
3918
3918
|
set margin mode to 'cross' or 'isolated'
|
3919
3919
|
:see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#positionmode
|
ccxt/async_support/exmo.py
CHANGED
@@ -416,7 +416,7 @@ class exmo(Exchange, ImplicitAPI):
|
|
416
416
|
raise ExchangeError(self.id + ' parseFixedFloatValue() detected an unsupported non-zero percentage-based fee ' + input)
|
417
417
|
return result
|
418
418
|
|
419
|
-
async def fetch_transaction_fees(self, codes=None, params={}):
|
419
|
+
async def fetch_transaction_fees(self, codes: List[str] = None, params={}):
|
420
420
|
"""
|
421
421
|
* @deprecated
|
422
422
|
please use fetchDepositWithdrawFees instead
|
@@ -1882,7 +1882,7 @@ class exmo(Exchange, ImplicitAPI):
|
|
1882
1882
|
result.append(order)
|
1883
1883
|
return result
|
1884
1884
|
|
1885
|
-
async def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
1885
|
+
async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float = None, price: float = None, params={}):
|
1886
1886
|
"""
|
1887
1887
|
*margin only* edit a trade order
|
1888
1888
|
:see: https://documenter.getpostman.com/view/10287440/SzYXWKPi#f27ee040-c75f-4b59-b608-d05bd45b7899 # margin
|
ccxt/async_support/gate.py
CHANGED
@@ -888,7 +888,7 @@ class gate(Exchange, ImplicitAPI):
|
|
888
888
|
reconstructedDate = '20' + year + '-' + month + '-' + day + 'T00:00:00Z'
|
889
889
|
return reconstructedDate
|
890
890
|
|
891
|
-
def create_expired_option_market(self, symbol):
|
891
|
+
def create_expired_option_market(self, symbol: str):
|
892
892
|
# support expired option contracts
|
893
893
|
quote = 'USDT'
|
894
894
|
settle = quote
|
@@ -2017,7 +2017,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2017
2017
|
'taker': self.safe_number(info, takerKey),
|
2018
2018
|
}
|
2019
2019
|
|
2020
|
-
async def fetch_transaction_fees(self, codes=None, params={}):
|
2020
|
+
async def fetch_transaction_fees(self, codes: List[str] = None, params={}):
|
2021
2021
|
"""
|
2022
2022
|
* @deprecated
|
2023
2023
|
please use fetchDepositWithdrawFees instead
|
@@ -3905,7 +3905,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3905
3905
|
}
|
3906
3906
|
return self.extend(request, params)
|
3907
3907
|
|
3908
|
-
async def create_market_buy_order_with_cost(self, symbol: str, cost, params={}):
|
3908
|
+
async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
|
3909
3909
|
"""
|
3910
3910
|
create a market buy order by providing the symbol and cost
|
3911
3911
|
:see: https://www.gate.io/docs/developers/apiv4/en/#create-an-order
|
@@ -3921,7 +3921,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3921
3921
|
params['createMarketBuyOrderRequiresPrice'] = False
|
3922
3922
|
return await self.create_order(symbol, 'market', 'buy', cost, None, params)
|
3923
3923
|
|
3924
|
-
async def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
3924
|
+
async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float = None, price: float = None, params={}):
|
3925
3925
|
"""
|
3926
3926
|
edit a trade order, gate currently only supports the modification of the price or amount fields
|
3927
3927
|
:see: https://www.gate.io/docs/developers/apiv4/en/#amend-an-order
|
@@ -4731,7 +4731,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4731
4731
|
#
|
4732
4732
|
return self.parse_orders(response, market)
|
4733
4733
|
|
4734
|
-
async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
4734
|
+
async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
4735
4735
|
"""
|
4736
4736
|
transfer currency internally between wallets on the same account
|
4737
4737
|
:see: https://www.gate.io/docs/developers/apiv4/en/#transfer-between-trading-accounts
|
@@ -6178,7 +6178,7 @@ class gate(Exchange, ImplicitAPI):
|
|
6178
6178
|
}
|
6179
6179
|
return self.safe_string(ledgerType, type, type)
|
6180
6180
|
|
6181
|
-
async def set_position_mode(self, hedged, symbol=None, params={}):
|
6181
|
+
async def set_position_mode(self, hedged: bool, symbol: str = None, params={}):
|
6182
6182
|
"""
|
6183
6183
|
set dual/hedged mode to True or False for a swap market, make sure all positions are closed and no orders are open before setting dual mode
|
6184
6184
|
:see: https://www.gate.io/docs/developers/apiv4/en/#enable-or-disable-dual-mode
|