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/btcbox.py
CHANGED
@@ -152,6 +152,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
152
152
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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/btcmarkets.py
CHANGED
@@ -197,6 +197,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
197
197
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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/bybit.py
CHANGED
@@ -1184,7 +1184,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1184
1184
|
reconstructedDate = day + month + year
|
1185
1185
|
return reconstructedDate
|
1186
1186
|
|
1187
|
-
def create_expired_option_market(self, symbol):
|
1187
|
+
def create_expired_option_market(self, symbol: str):
|
1188
1188
|
# support expired option contracts
|
1189
1189
|
quote = 'USD'
|
1190
1190
|
settle = 'USDC'
|
@@ -2154,6 +2154,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
2154
2154
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
2155
2155
|
:param int [limit]: the maximum amount of candles to fetch
|
2156
2156
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2157
|
+
:param int [params.until]: the latest time in ms to fetch orders for
|
2157
2158
|
: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)
|
2158
2159
|
:returns int[][]: A list of candles ordered, open, high, low, close, volume
|
2159
2160
|
"""
|
@@ -2174,6 +2175,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
2174
2175
|
request['start'] = since
|
2175
2176
|
if limit is not None:
|
2176
2177
|
request['limit'] = limit # max 1000, default 1000
|
2178
|
+
request, params = self.handle_until_option('end', request, params)
|
2177
2179
|
request['interval'] = self.safe_string(self.timeframes, timeframe, timeframe)
|
2178
2180
|
response = None
|
2179
2181
|
if market['spot']:
|
@@ -3298,7 +3300,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
3298
3300
|
raise InvalidOrder(self.id + ' returned more than one order')
|
3299
3301
|
return self.safe_value(result, 0)
|
3300
3302
|
|
3301
|
-
def create_market_buy_order_with_cost(self, symbol: str, cost, params={}):
|
3303
|
+
def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
|
3302
3304
|
"""
|
3303
3305
|
:see: https://bybit-exchange.github.io/docs/v5/order/create-order
|
3304
3306
|
create a market buy order by providing the symbol and cost
|
@@ -3313,7 +3315,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
3313
3315
|
raise NotSupported(self.id + ' createMarketBuyOrderWithCost() supports spot orders only')
|
3314
3316
|
return self.create_order(symbol, 'market', 'buy', cost, 1, params)
|
3315
3317
|
|
3316
|
-
def create_market_sell_order_with_cost(self, symbol: str, cost, params={}):
|
3318
|
+
def create_market_sell_order_with_cost(self, symbol: str, cost: float, params={}):
|
3317
3319
|
"""
|
3318
3320
|
:see: https://bybit-exchange.github.io/docs/v5/order/create-order
|
3319
3321
|
create a market sell order by providing the symbol and cost
|
@@ -3795,7 +3797,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
3795
3797
|
result = self.safe_value(response, 'result', {})
|
3796
3798
|
return self.parse_order(result, market)
|
3797
3799
|
|
3798
|
-
def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
3800
|
+
def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float = None, price: float = None, params={}):
|
3799
3801
|
"""
|
3800
3802
|
edit a trade order
|
3801
3803
|
:see: https://bybit-exchange.github.io/docs/v5/order/amend-order
|
@@ -5694,7 +5696,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
5694
5696
|
'takeProfitPrice': self.safe_number_2(position, 'take_profit', 'takeProfit'),
|
5695
5697
|
})
|
5696
5698
|
|
5697
|
-
def set_margin_mode(self, marginMode, symbol: Str = None, params={}):
|
5699
|
+
def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
|
5698
5700
|
"""
|
5699
5701
|
set margin mode(account) or trade mode(symbol)
|
5700
5702
|
:see: https://bybit-exchange.github.io/docs/v5/account/set-margin-mode
|
@@ -5820,7 +5822,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
5820
5822
|
response = self.privatePostV5PositionSetLeverage(self.extend(request, params))
|
5821
5823
|
return response
|
5822
5824
|
|
5823
|
-
def set_position_mode(self, hedged, symbol: Str = None, params={}):
|
5825
|
+
def set_position_mode(self, hedged: bool, symbol: Str = None, params={}):
|
5824
5826
|
"""
|
5825
5827
|
set hedged to True or False for a market
|
5826
5828
|
:see: https://bybit-exchange.github.io/docs/v5/position/position-mode
|
@@ -6139,7 +6141,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
6139
6141
|
'info': info,
|
6140
6142
|
}
|
6141
6143
|
|
6142
|
-
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
6144
|
+
def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
6143
6145
|
"""
|
6144
6146
|
transfer currency internally between wallets on the same account
|
6145
6147
|
:see: https://bybit-exchange.github.io/docs/v5/asset/create-inter-transfer
|
ccxt/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
|
-
def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
1477
|
+
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/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
|
-
def create_market_buy_order_with_cost(self, symbol: str, cost, params={}):
|
2104
|
+
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
|
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 = self.v3PrivatePostBrokerageOrdersPreview(self.extend(request, params))
|
2261
|
+
else:
|
2262
|
+
response = 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
|
-
def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
2517
|
+
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/coinbasepro.py
CHANGED
ccxt/coinex.py
CHANGED
@@ -1883,7 +1883,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
1883
1883
|
'info': order,
|
1884
1884
|
}, market)
|
1885
1885
|
|
1886
|
-
def create_market_buy_order_with_cost(self, symbol: str, cost, params={}):
|
1886
|
+
def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
|
1887
1887
|
"""
|
1888
1888
|
create a market buy order by providing the symbol and cost
|
1889
1889
|
:see: https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade003_market_order
|
@@ -2385,7 +2385,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
2385
2385
|
results.append(order)
|
2386
2386
|
return results
|
2387
2387
|
|
2388
|
-
def edit_order(self, id, symbol, type, side, amount=None, price=None, params={}):
|
2388
|
+
def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float = None, price: float = None, params={}):
|
2389
2389
|
"""
|
2390
2390
|
edit a trade order
|
2391
2391
|
:see: https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade022_modify_order
|
@@ -3562,7 +3562,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
3562
3562
|
'takeProfitPrice': self.omit_zero(self.safe_string(position, 'take_profit_price')),
|
3563
3563
|
})
|
3564
3564
|
|
3565
|
-
def set_margin_mode(self, marginMode, symbol: Str = None, params={}):
|
3565
|
+
def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
|
3566
3566
|
"""
|
3567
3567
|
set margin mode to 'cross' or 'isolated'
|
3568
3568
|
:see: https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http014_adjust_leverage
|
@@ -4298,7 +4298,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
4298
4298
|
'internal': internal,
|
4299
4299
|
}
|
4300
4300
|
|
4301
|
-
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
4301
|
+
def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
4302
4302
|
"""
|
4303
4303
|
transfer currency internally between wallets on the same account
|
4304
4304
|
:see: https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account014_balance_contract_transfer
|
ccxt/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
|
-
def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
1464
|
+
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
|
-
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
1636
|
+
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/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/coinone.py
CHANGED
@@ -1019,7 +1019,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
1019
1019
|
#
|
1020
1020
|
return response
|
1021
1021
|
|
1022
|
-
def fetch_deposit_addresses(self, codes=None, params={}):
|
1022
|
+
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/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
|
-
def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
1813
|
+
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/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
|
-
def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
1967
|
+
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
|
-
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
2666
|
+
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/digifinex.py
CHANGED
@@ -1726,7 +1726,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
1726
1726
|
params = self.omit(params, ['postOnly'])
|
1727
1727
|
return self.extend(request, params)
|
1728
1728
|
|
1729
|
-
def create_market_buy_order_with_cost(self, symbol: str, cost, params={}):
|
1729
|
+
def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
|
1730
1730
|
"""
|
1731
1731
|
create a market buy order by providing the symbol and cost
|
1732
1732
|
:see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#create-new-order
|
@@ -2722,7 +2722,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
2722
2722
|
'status': self.parse_transfer_status(self.safe_string(transfer, 'code')),
|
2723
2723
|
}
|
2724
2724
|
|
2725
|
-
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
2725
|
+
def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
2726
2726
|
"""
|
2727
2727
|
transfer currency internally between wallets on the same account
|
2728
2728
|
:param str code: unified currency code
|
@@ -3912,7 +3912,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
3912
3912
|
'amount': self.safe_number(income, 'amount'),
|
3913
3913
|
}
|
3914
3914
|
|
3915
|
-
def set_margin_mode(self, marginMode, symbol: Str = None, params={}):
|
3915
|
+
def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
|
3916
3916
|
"""
|
3917
3917
|
set margin mode to 'cross' or 'isolated'
|
3918
3918
|
:see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#positionmode
|
ccxt/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
|
-
def fetch_transaction_fees(self, codes=None, params={}):
|
419
|
+
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
|
-
def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
1885
|
+
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/gate.py
CHANGED
@@ -887,7 +887,7 @@ class gate(Exchange, ImplicitAPI):
|
|
887
887
|
reconstructedDate = '20' + year + '-' + month + '-' + day + 'T00:00:00Z'
|
888
888
|
return reconstructedDate
|
889
889
|
|
890
|
-
def create_expired_option_market(self, symbol):
|
890
|
+
def create_expired_option_market(self, symbol: str):
|
891
891
|
# support expired option contracts
|
892
892
|
quote = 'USDT'
|
893
893
|
settle = quote
|
@@ -2016,7 +2016,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2016
2016
|
'taker': self.safe_number(info, takerKey),
|
2017
2017
|
}
|
2018
2018
|
|
2019
|
-
def fetch_transaction_fees(self, codes=None, params={}):
|
2019
|
+
def fetch_transaction_fees(self, codes: List[str] = None, params={}):
|
2020
2020
|
"""
|
2021
2021
|
* @deprecated
|
2022
2022
|
please use fetchDepositWithdrawFees instead
|
@@ -3904,7 +3904,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3904
3904
|
}
|
3905
3905
|
return self.extend(request, params)
|
3906
3906
|
|
3907
|
-
def create_market_buy_order_with_cost(self, symbol: str, cost, params={}):
|
3907
|
+
def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
|
3908
3908
|
"""
|
3909
3909
|
create a market buy order by providing the symbol and cost
|
3910
3910
|
:see: https://www.gate.io/docs/developers/apiv4/en/#create-an-order
|
@@ -3920,7 +3920,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3920
3920
|
params['createMarketBuyOrderRequiresPrice'] = False
|
3921
3921
|
return self.create_order(symbol, 'market', 'buy', cost, None, params)
|
3922
3922
|
|
3923
|
-
def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
3923
|
+
def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float = None, price: float = None, params={}):
|
3924
3924
|
"""
|
3925
3925
|
edit a trade order, gate currently only supports the modification of the price or amount fields
|
3926
3926
|
:see: https://www.gate.io/docs/developers/apiv4/en/#amend-an-order
|
@@ -4730,7 +4730,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4730
4730
|
#
|
4731
4731
|
return self.parse_orders(response, market)
|
4732
4732
|
|
4733
|
-
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
4733
|
+
def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
4734
4734
|
"""
|
4735
4735
|
transfer currency internally between wallets on the same account
|
4736
4736
|
:see: https://www.gate.io/docs/developers/apiv4/en/#transfer-between-trading-accounts
|
@@ -6177,7 +6177,7 @@ class gate(Exchange, ImplicitAPI):
|
|
6177
6177
|
}
|
6178
6178
|
return self.safe_string(ledgerType, type, type)
|
6179
6179
|
|
6180
|
-
def set_position_mode(self, hedged, symbol=None, params={}):
|
6180
|
+
def set_position_mode(self, hedged: bool, symbol: str = None, params={}):
|
6181
6181
|
"""
|
6182
6182
|
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
|
6183
6183
|
:see: https://www.gate.io/docs/developers/apiv4/en/#enable-or-disable-dual-mode
|