ccxt 4.3.11__py2.py3-none-any.whl → 4.3.13__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ccxt/__init__.py +1 -1
- ccxt/abstract/bybit.py +1 -0
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bigone.py +22 -22
- ccxt/async_support/binance.py +7 -7
- ccxt/async_support/bingx.py +2 -2
- ccxt/async_support/bitget.py +10 -8
- ccxt/async_support/bitmart.py +7 -11
- ccxt/async_support/bitmex.py +2 -2
- ccxt/async_support/bybit.py +76 -65
- ccxt/async_support/coinbase.py +8 -8
- ccxt/async_support/coinbaseinternational.py +2 -2
- ccxt/async_support/coinex.py +501 -445
- ccxt/async_support/coinlist.py +12 -12
- ccxt/async_support/coinmetro.py +2 -2
- ccxt/async_support/cryptocom.py +16 -16
- ccxt/async_support/digifinex.py +3 -3
- ccxt/async_support/gate.py +2 -2
- ccxt/async_support/hitbtc.py +3 -3
- ccxt/async_support/htx.py +6 -9
- ccxt/async_support/indodax.py +2 -2
- ccxt/async_support/kraken.py +3 -1
- ccxt/async_support/kucoin.py +4 -4
- ccxt/async_support/kucoinfutures.py +6 -6
- ccxt/async_support/mexc.py +5 -5
- ccxt/async_support/okx.py +9 -9
- ccxt/async_support/poloniexfutures.py +4 -4
- ccxt/async_support/probit.py +2 -2
- ccxt/async_support/whitebit.py +72 -1
- ccxt/async_support/woo.py +2 -2
- ccxt/base/exchange.py +14 -2
- ccxt/base/types.py +25 -0
- ccxt/bigone.py +22 -22
- ccxt/binance.py +7 -7
- ccxt/bingx.py +2 -2
- ccxt/bitget.py +10 -8
- ccxt/bitmart.py +7 -11
- ccxt/bitmex.py +2 -2
- ccxt/bybit.py +76 -65
- ccxt/coinbase.py +8 -8
- ccxt/coinbaseinternational.py +2 -2
- ccxt/coinex.py +501 -445
- ccxt/coinlist.py +12 -12
- ccxt/coinmetro.py +2 -2
- ccxt/cryptocom.py +16 -16
- ccxt/digifinex.py +3 -3
- ccxt/gate.py +2 -2
- ccxt/hitbtc.py +3 -3
- ccxt/htx.py +6 -9
- ccxt/indodax.py +2 -2
- ccxt/kraken.py +3 -1
- ccxt/kucoin.py +4 -4
- ccxt/kucoinfutures.py +6 -6
- ccxt/mexc.py +5 -5
- ccxt/okx.py +9 -9
- ccxt/poloniexfutures.py +4 -4
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bitget.py +139 -87
- ccxt/pro/bybit.py +192 -12
- ccxt/pro/coinbase.py +90 -20
- ccxt/pro/mexc.py +21 -1
- ccxt/probit.py +2 -2
- ccxt/test/base/test_datetime.py +6 -0
- ccxt/test/base/test_ledger_entry.py +2 -2
- ccxt/whitebit.py +72 -1
- ccxt/woo.py +2 -2
- {ccxt-4.3.11.dist-info → ccxt-4.3.13.dist-info}/METADATA +4 -4
- {ccxt-4.3.11.dist-info → ccxt-4.3.13.dist-info}/RECORD +71 -73
- ccxt/async_support/flowbtc.py +0 -34
- ccxt/flowbtc.py +0 -34
- {ccxt-4.3.11.dist-info → ccxt-4.3.13.dist-info}/WHEEL +0 -0
- {ccxt-4.3.11.dist-info → ccxt-4.3.13.dist-info}/top_level.txt +0 -0
ccxt/coinlist.py
CHANGED
@@ -683,9 +683,9 @@ class coinlist(Exchange, ImplicitAPI):
|
|
683
683
|
request['end_time'] = self.iso8601(self.sum(since, duration * (limit)))
|
684
684
|
else:
|
685
685
|
request['end_time'] = self.iso8601(self.milliseconds())
|
686
|
-
until = self.
|
686
|
+
until = self.safe_integer(params, 'until')
|
687
687
|
if until is not None:
|
688
|
-
params = self.omit(params, ['
|
688
|
+
params = self.omit(params, ['until'])
|
689
689
|
request['end_time'] = self.iso8601(until)
|
690
690
|
response = self.publicGetV1SymbolsSymbolCandles(self.extend(request, params))
|
691
691
|
#
|
@@ -756,9 +756,9 @@ class coinlist(Exchange, ImplicitAPI):
|
|
756
756
|
request['start_time'] = self.iso8601(since)
|
757
757
|
if limit is not None:
|
758
758
|
request['count'] = min(limit, 500)
|
759
|
-
until = self.
|
759
|
+
until = self.safe_integer(params, 'until')
|
760
760
|
if until is not None:
|
761
|
-
params = self.omit(params, ['
|
761
|
+
params = self.omit(params, ['until'])
|
762
762
|
request['end_time'] = self.iso8601(until)
|
763
763
|
response = self.publicGetV1SymbolsSymbolAuctions(self.extend(request, params))
|
764
764
|
#
|
@@ -1134,9 +1134,9 @@ class coinlist(Exchange, ImplicitAPI):
|
|
1134
1134
|
request['start_time'] = self.iso8601(since)
|
1135
1135
|
if limit is not None:
|
1136
1136
|
request['count'] = limit
|
1137
|
-
until = self.
|
1137
|
+
until = self.safe_integer(params, 'until')
|
1138
1138
|
if until is not None:
|
1139
|
-
params = self.omit(params, ['
|
1139
|
+
params = self.omit(params, ['until'])
|
1140
1140
|
request['end_time'] = self.iso8601(until)
|
1141
1141
|
response = self.privateGetV1Fills(self.extend(request, params))
|
1142
1142
|
#
|
@@ -1213,9 +1213,9 @@ class coinlist(Exchange, ImplicitAPI):
|
|
1213
1213
|
request['start_time'] = self.iso8601(since)
|
1214
1214
|
if limit is not None:
|
1215
1215
|
request['count'] = limit
|
1216
|
-
until = self.
|
1216
|
+
until = self.safe_integer(params, 'until')
|
1217
1217
|
if until is not None:
|
1218
|
-
params = self.omit(params, ['
|
1218
|
+
params = self.omit(params, ['until'])
|
1219
1219
|
request['end_time'] = self.iso8601(until)
|
1220
1220
|
response = self.privateGetV1Orders(self.extend(request, params))
|
1221
1221
|
#
|
@@ -1706,9 +1706,9 @@ class coinlist(Exchange, ImplicitAPI):
|
|
1706
1706
|
request['start_time'] = self.iso8601(since)
|
1707
1707
|
if limit is not None:
|
1708
1708
|
request['count'] = limit
|
1709
|
-
until = self.
|
1709
|
+
until = self.safe_integer(params, 'until')
|
1710
1710
|
if until is not None:
|
1711
|
-
params = self.omit(params, ['
|
1711
|
+
params = self.omit(params, ['until'])
|
1712
1712
|
request['end_time'] = self.iso8601(until)
|
1713
1713
|
response = self.privateGetV1Transfers(self.extend(request, params))
|
1714
1714
|
#
|
@@ -1988,9 +1988,9 @@ class coinlist(Exchange, ImplicitAPI):
|
|
1988
1988
|
request['start_time'] = self.iso8601(since)
|
1989
1989
|
if limit is not None:
|
1990
1990
|
request['count'] = limit
|
1991
|
-
until = self.
|
1991
|
+
until = self.safe_integer(params, 'until')
|
1992
1992
|
if until is not None:
|
1993
|
-
params = self.omit(params, ['
|
1993
|
+
params = self.omit(params, ['until'])
|
1994
1994
|
request['end_time'] = self.iso8601(until)
|
1995
1995
|
params = self.omit(params, ['trader_id', 'traderId'])
|
1996
1996
|
response = self.privateGetV1AccountsTraderIdLedger(self.extend(request, params))
|
ccxt/coinmetro.py
CHANGED
@@ -499,9 +499,9 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
499
499
|
until = self.sum(since, duration * (limit))
|
500
500
|
else:
|
501
501
|
request['from'] = ':from' # self endpoint doesn't accept empty from and to params(setting them into the value described in the documentation)
|
502
|
-
until = self.
|
502
|
+
until = self.safe_integer(params, 'until', until)
|
503
503
|
if until is not None:
|
504
|
-
params = self.omit(params, ['
|
504
|
+
params = self.omit(params, ['until'])
|
505
505
|
request['to'] = until
|
506
506
|
else:
|
507
507
|
request['to'] = ':to'
|
ccxt/cryptocom.py
CHANGED
@@ -671,8 +671,8 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
671
671
|
request['start_time'] = since
|
672
672
|
if limit is not None:
|
673
673
|
request['limit'] = limit
|
674
|
-
until = self.
|
675
|
-
params = self.omit(params, ['until'
|
674
|
+
until = self.safe_integer(params, 'until')
|
675
|
+
params = self.omit(params, ['until'])
|
676
676
|
if until is not None:
|
677
677
|
request['end_time'] = until
|
678
678
|
response = self.v1PrivatePostPrivateGetOrderHistory(self.extend(request, params))
|
@@ -744,8 +744,8 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
744
744
|
request['start_ts'] = since
|
745
745
|
if limit is not None:
|
746
746
|
request['count'] = limit
|
747
|
-
until = self.
|
748
|
-
params = self.omit(params, ['until'
|
747
|
+
until = self.safe_integer(params, 'until')
|
748
|
+
params = self.omit(params, ['until'])
|
749
749
|
if until is not None:
|
750
750
|
request['end_ts'] = until
|
751
751
|
response = self.v1PublicGetPublicGetTrades(self.extend(request, params))
|
@@ -800,8 +800,8 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
800
800
|
request['start_ts'] = since
|
801
801
|
if limit is not None:
|
802
802
|
request['count'] = limit
|
803
|
-
until = self.
|
804
|
-
params = self.omit(params, ['until'
|
803
|
+
until = self.safe_integer(params, 'until')
|
804
|
+
params = self.omit(params, ['until'])
|
805
805
|
if until is not None:
|
806
806
|
request['end_ts'] = until
|
807
807
|
response = self.v1PublicGetPublicGetCandlestick(self.extend(request, params))
|
@@ -1468,8 +1468,8 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
1468
1468
|
request['start_time'] = since
|
1469
1469
|
if limit is not None:
|
1470
1470
|
request['limit'] = limit
|
1471
|
-
until = self.
|
1472
|
-
params = self.omit(params, ['until'
|
1471
|
+
until = self.safe_integer(params, 'until')
|
1472
|
+
params = self.omit(params, ['until'])
|
1473
1473
|
if until is not None:
|
1474
1474
|
request['end_time'] = until
|
1475
1475
|
response = self.v1PrivatePostPrivateGetTrades(self.extend(request, params))
|
@@ -1671,8 +1671,8 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
1671
1671
|
request['start_ts'] = since
|
1672
1672
|
if limit is not None:
|
1673
1673
|
request['page_size'] = limit
|
1674
|
-
until = self.
|
1675
|
-
params = self.omit(params, ['until'
|
1674
|
+
until = self.safe_integer(params, 'until')
|
1675
|
+
params = self.omit(params, ['until'])
|
1676
1676
|
if until is not None:
|
1677
1677
|
request['end_ts'] = until
|
1678
1678
|
response = self.v1PrivatePostPrivateGetDepositHistory(self.extend(request, params))
|
@@ -1724,8 +1724,8 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
1724
1724
|
request['start_ts'] = since
|
1725
1725
|
if limit is not None:
|
1726
1726
|
request['page_size'] = limit
|
1727
|
-
until = self.
|
1728
|
-
params = self.omit(params, ['until'
|
1727
|
+
until = self.safe_integer(params, 'until')
|
1728
|
+
params = self.omit(params, ['until'])
|
1729
1729
|
if until is not None:
|
1730
1730
|
request['end_ts'] = until
|
1731
1731
|
response = self.v1PrivatePostPrivateGetWithdrawalHistory(self.extend(request, params))
|
@@ -2215,8 +2215,8 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
2215
2215
|
request['start_time'] = since
|
2216
2216
|
if limit is not None:
|
2217
2217
|
request['limit'] = limit
|
2218
|
-
until = self.
|
2219
|
-
params = self.omit(params, ['until'
|
2218
|
+
until = self.safe_integer(params, 'until')
|
2219
|
+
params = self.omit(params, ['until'])
|
2220
2220
|
if until is not None:
|
2221
2221
|
request['end_time'] = until
|
2222
2222
|
response = self.v1PrivatePostPrivateGetTransactions(self.extend(request, params))
|
@@ -2521,8 +2521,8 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
2521
2521
|
request['start_ts'] = since
|
2522
2522
|
if limit is not None:
|
2523
2523
|
request['count'] = limit
|
2524
|
-
until = self.
|
2525
|
-
params = self.omit(params, ['until'
|
2524
|
+
until = self.safe_integer(params, 'until')
|
2525
|
+
params = self.omit(params, ['until'])
|
2526
2526
|
if until is not None:
|
2527
2527
|
request['end_ts'] = until
|
2528
2528
|
response = self.v1PublicGetPublicGetValuations(self.extend(request, params))
|
ccxt/digifinex.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.digifinex import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
|
10
|
+
from ccxt.base.types import Balances, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -2851,7 +2851,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
2851
2851
|
'info': info,
|
2852
2852
|
}
|
2853
2853
|
|
2854
|
-
def fetch_cross_borrow_rate(self, code: str, params={}):
|
2854
|
+
def fetch_cross_borrow_rate(self, code: str, params={}) -> CrossBorrowRate:
|
2855
2855
|
"""
|
2856
2856
|
fetch the rate of interest to borrow a currency for margin trading
|
2857
2857
|
:see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets
|
@@ -2888,7 +2888,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
2888
2888
|
currency = self.currency(code)
|
2889
2889
|
return self.parse_borrow_rate(result, currency)
|
2890
2890
|
|
2891
|
-
def fetch_cross_borrow_rates(self, params={}):
|
2891
|
+
def fetch_cross_borrow_rates(self, params={}) -> CrossBorrowRates:
|
2892
2892
|
"""
|
2893
2893
|
fetch the borrow interest rates of all currencies
|
2894
2894
|
:see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets
|
ccxt/gate.py
CHANGED
@@ -3090,8 +3090,8 @@ class gate(Exchange, ImplicitAPI):
|
|
3090
3090
|
marginMode = None
|
3091
3091
|
request = {}
|
3092
3092
|
market = self.market(symbol) if (symbol is not None) else None
|
3093
|
-
until = self.
|
3094
|
-
params = self.omit(params, ['until'
|
3093
|
+
until = self.safe_integer(params, 'until')
|
3094
|
+
params = self.omit(params, ['until'])
|
3095
3095
|
type, params = self.handle_market_type_and_params('fetchMyTrades', market, params)
|
3096
3096
|
contract = (type == 'swap') or (type == 'future') or (type == 'option')
|
3097
3097
|
if contract:
|
ccxt/hitbtc.py
CHANGED
@@ -1658,7 +1658,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1658
1658
|
}
|
1659
1659
|
if since is not None:
|
1660
1660
|
request['from'] = self.iso8601(since)
|
1661
|
-
request, params = self.handle_until_option('
|
1661
|
+
request, params = self.handle_until_option('until', request, params)
|
1662
1662
|
if limit is not None:
|
1663
1663
|
request['limit'] = min(limit, 1000)
|
1664
1664
|
price = self.safe_string(params, 'price')
|
@@ -2604,11 +2604,11 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
2604
2604
|
# 'symbols': Comma separated list of symbol codes,
|
2605
2605
|
# 'sort': 'DESC' or 'ASC'
|
2606
2606
|
# 'from': 'Datetime or Number',
|
2607
|
-
# '
|
2607
|
+
# 'until': 'Datetime or Number',
|
2608
2608
|
# 'limit': 100,
|
2609
2609
|
# 'offset': 0,
|
2610
2610
|
}
|
2611
|
-
request, params = self.handle_until_option('
|
2611
|
+
request, params = self.handle_until_option('until', request, params)
|
2612
2612
|
if symbol is not None:
|
2613
2613
|
market = self.market(symbol)
|
2614
2614
|
symbol = market['symbol']
|
ccxt/htx.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.htx import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, IsolatedBorrowRate, IsolatedBorrowRates, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -6135,7 +6135,7 @@ class htx(Exchange, ImplicitAPI):
|
|
6135
6135
|
#
|
6136
6136
|
return self.parse_transfer(response, currency)
|
6137
6137
|
|
6138
|
-
def fetch_isolated_borrow_rates(self, params={}):
|
6138
|
+
def fetch_isolated_borrow_rates(self, params={}) -> IsolatedBorrowRates:
|
6139
6139
|
"""
|
6140
6140
|
fetch the borrow interest rates of all currencies
|
6141
6141
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -6173,12 +6173,9 @@ class htx(Exchange, ImplicitAPI):
|
|
6173
6173
|
# }
|
6174
6174
|
#
|
6175
6175
|
data = self.safe_value(response, 'data', [])
|
6176
|
-
|
6177
|
-
for i in range(0, len(data)):
|
6178
|
-
rates.append(self.parse_isolated_borrow_rate(data[i]))
|
6179
|
-
return rates
|
6176
|
+
return self.parse_isolated_borrow_rates(data)
|
6180
6177
|
|
6181
|
-
def parse_isolated_borrow_rate(self, info, market: Market = None):
|
6178
|
+
def parse_isolated_borrow_rate(self, info, market: Market = None) -> IsolatedBorrowRate:
|
6182
6179
|
#
|
6183
6180
|
# {
|
6184
6181
|
# "symbol": "1inchusdt",
|
@@ -8016,8 +8013,8 @@ class htx(Exchange, ImplicitAPI):
|
|
8016
8013
|
"""
|
8017
8014
|
if symbol is None:
|
8018
8015
|
raise ArgumentsRequired(self.id + ' fetchSettlementHistory() requires a symbol argument')
|
8019
|
-
until = self.
|
8020
|
-
params = self.omit(params, ['until'
|
8016
|
+
until = self.safe_integer(params, 'until')
|
8017
|
+
params = self.omit(params, ['until'])
|
8021
8018
|
market = self.market(symbol)
|
8022
8019
|
request = {}
|
8023
8020
|
if market['future']:
|
ccxt/indodax.py
CHANGED
@@ -580,8 +580,8 @@ class indodax(Exchange, ImplicitAPI):
|
|
580
580
|
timeframes = self.options['timeframes']
|
581
581
|
selectedTimeframe = self.safe_string(timeframes, timeframe, timeframe)
|
582
582
|
now = self.seconds()
|
583
|
-
until = self.
|
584
|
-
params = self.omit(params, ['until'
|
583
|
+
until = self.safe_integer(params, 'until', now)
|
584
|
+
params = self.omit(params, ['until'])
|
585
585
|
request = {
|
586
586
|
'to': until,
|
587
587
|
'tf': selectedTimeframe,
|
ccxt/kraken.py
CHANGED
@@ -548,6 +548,8 @@ class kraken(Exchange, ImplicitAPI):
|
|
548
548
|
leverageBuy = self.safe_value(market, 'leverage_buy', [])
|
549
549
|
leverageBuyLength = len(leverageBuy)
|
550
550
|
precisionPrice = self.parse_number(self.parse_precision(self.safe_string(market, 'pair_decimals')))
|
551
|
+
status = self.safe_string(market, 'status')
|
552
|
+
isActive = status == 'online'
|
551
553
|
result.append({
|
552
554
|
'id': id,
|
553
555
|
'wsId': self.safe_string(market, 'wsname'),
|
@@ -566,7 +568,7 @@ class kraken(Exchange, ImplicitAPI):
|
|
566
568
|
'swap': False,
|
567
569
|
'future': False,
|
568
570
|
'option': False,
|
569
|
-
'active':
|
571
|
+
'active': isActive,
|
570
572
|
'contract': False,
|
571
573
|
'linear': None,
|
572
574
|
'inverse': None,
|
ccxt/kucoin.py
CHANGED
@@ -2314,10 +2314,10 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2314
2314
|
"""
|
2315
2315
|
self.load_markets()
|
2316
2316
|
lowercaseStatus = status.lower()
|
2317
|
-
until = self.
|
2317
|
+
until = self.safe_integer(params, 'until')
|
2318
2318
|
stop = self.safe_bool(params, 'stop', False)
|
2319
2319
|
hf = self.safe_bool(params, 'hf', False)
|
2320
|
-
params = self.omit(params, ['stop', 'hf', '
|
2320
|
+
params = self.omit(params, ['stop', 'hf', 'until'])
|
2321
2321
|
marginMode, query = self.handle_margin_mode_and_params('fetchOrdersByStatus', params)
|
2322
2322
|
if lowercaseStatus == 'open':
|
2323
2323
|
lowercaseStatus = 'active'
|
@@ -2408,7 +2408,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2408
2408
|
:param int [since]: the earliest time in ms to fetch orders for
|
2409
2409
|
:param int [limit]: the maximum number of order structures to retrieve
|
2410
2410
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2411
|
-
:param int [params.
|
2411
|
+
:param int [params.until]: end time in ms
|
2412
2412
|
:param str [params.side]: buy or sell
|
2413
2413
|
:param str [params.type]: limit, market, limit_stop or market_stop
|
2414
2414
|
:param str [params.tradeType]: TRADE for spot trading, MARGIN_TRADE for Margin Trading
|
@@ -2435,7 +2435,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2435
2435
|
:param int [since]: the earliest time in ms to fetch open orders for
|
2436
2436
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
2437
2437
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2438
|
-
:param int [params.
|
2438
|
+
:param int [params.until]: end time in ms
|
2439
2439
|
:param bool [params.stop]: True if fetching stop orders
|
2440
2440
|
:param str [params.side]: buy or sell
|
2441
2441
|
:param str [params.type]: limit, market, limit_stop or market_stop
|
ccxt/kucoinfutures.py
CHANGED
@@ -1689,8 +1689,8 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
1689
1689
|
if paginate:
|
1690
1690
|
return self.fetch_paginated_call_dynamic('fetchOrdersByStatus', symbol, since, limit, params)
|
1691
1691
|
stop = self.safe_value_2(params, 'stop', 'trigger')
|
1692
|
-
until = self.
|
1693
|
-
params = self.omit(params, ['stop', 'until', '
|
1692
|
+
until = self.safe_integer(params, 'until')
|
1693
|
+
params = self.omit(params, ['stop', 'until', 'trigger'])
|
1694
1694
|
if status == 'closed':
|
1695
1695
|
status = 'done'
|
1696
1696
|
elif status == 'open':
|
@@ -1776,7 +1776,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
1776
1776
|
:param int [since]: the earliest time in ms to fetch orders for
|
1777
1777
|
:param int [limit]: the maximum number of order structures to retrieve
|
1778
1778
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1779
|
-
:param int [params.
|
1779
|
+
:param int [params.until]: end time in ms
|
1780
1780
|
:param str [params.side]: buy or sell
|
1781
1781
|
:param str [params.type]: limit, or market
|
1782
1782
|
: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)
|
@@ -1798,7 +1798,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
1798
1798
|
:param int [since]: the earliest time in ms to fetch orders for
|
1799
1799
|
:param int [limit]: the maximum number of order structures to retrieve
|
1800
1800
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1801
|
-
:param int [params.
|
1801
|
+
:param int [params.until]: end time in ms
|
1802
1802
|
:param str [params.side]: buy or sell
|
1803
1803
|
:param str [params.type]: limit, or market
|
1804
1804
|
:param boolean [params.trigger]: set to True to retrieve untriggered stop orders
|
@@ -2594,8 +2594,8 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
2594
2594
|
'from': 0,
|
2595
2595
|
'to': self.milliseconds(),
|
2596
2596
|
}
|
2597
|
-
until = self.
|
2598
|
-
params = self.omit(params, ['until'
|
2597
|
+
until = self.safe_integer(params, 'until')
|
2598
|
+
params = self.omit(params, ['until'])
|
2599
2599
|
if since is not None:
|
2600
2600
|
request['from'] = since
|
2601
2601
|
if until is None:
|
ccxt/mexc.py
CHANGED
@@ -1464,7 +1464,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
1464
1464
|
request['limit'] = limit
|
1465
1465
|
trades = None
|
1466
1466
|
if market['spot']:
|
1467
|
-
until = self.safe_integer_n(params, ['endTime', 'until'
|
1467
|
+
until = self.safe_integer_n(params, ['endTime', 'until'])
|
1468
1468
|
if since is not None:
|
1469
1469
|
request['startTime'] = since
|
1470
1470
|
if until is None:
|
@@ -1721,7 +1721,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
1721
1721
|
}
|
1722
1722
|
candles = None
|
1723
1723
|
if market['spot']:
|
1724
|
-
until = self.safe_integer_n(params, ['until', 'endTime'
|
1724
|
+
until = self.safe_integer_n(params, ['until', 'endTime'])
|
1725
1725
|
if since is not None:
|
1726
1726
|
request['startTime'] = since
|
1727
1727
|
if until is None:
|
@@ -1732,7 +1732,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
1732
1732
|
if limit is not None:
|
1733
1733
|
request['limit'] = limit
|
1734
1734
|
if until is not None:
|
1735
|
-
params = self.omit(params, ['until'
|
1735
|
+
params = self.omit(params, ['until'])
|
1736
1736
|
request['endTime'] = until
|
1737
1737
|
response = self.spotPublicGetKlines(self.extend(request, params))
|
1738
1738
|
#
|
@@ -1751,11 +1751,11 @@ class mexc(Exchange, ImplicitAPI):
|
|
1751
1751
|
#
|
1752
1752
|
candles = response
|
1753
1753
|
elif market['swap']:
|
1754
|
-
until = self.safe_integer_product_n(params, ['until', 'endTime'
|
1754
|
+
until = self.safe_integer_product_n(params, ['until', 'endTime'], 0.001)
|
1755
1755
|
if since is not None:
|
1756
1756
|
request['start'] = self.parse_to_int(since / 1000)
|
1757
1757
|
if until is not None:
|
1758
|
-
params = self.omit(params, ['until'
|
1758
|
+
params = self.omit(params, ['until'])
|
1759
1759
|
request['end'] = until
|
1760
1760
|
priceType = self.safe_string(params, 'price', 'default')
|
1761
1761
|
params = self.omit(params, 'price')
|
ccxt/okx.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.okx import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Conversion, Currencies, Currency, Greeks, Int, Leverage, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Balances, Conversion, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, Greeks, Int, Leverage, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from typing import Any
|
12
12
|
from ccxt.base.errors import ExchangeError
|
@@ -3773,10 +3773,10 @@ class okx(Exchange, ImplicitAPI):
|
|
3773
3773
|
else:
|
3774
3774
|
if since is not None:
|
3775
3775
|
request['begin'] = since
|
3776
|
-
until = self.
|
3776
|
+
until = self.safe_integer(query, 'until')
|
3777
3777
|
if until is not None:
|
3778
3778
|
request['end'] = until
|
3779
|
-
query = self.omit(query, ['until'
|
3779
|
+
query = self.omit(query, ['until'])
|
3780
3780
|
send = self.omit(query, ['method', 'stop', 'trigger', 'trailing'])
|
3781
3781
|
response = None
|
3782
3782
|
if method == 'privateGetTradeOrdersAlgoHistory':
|
@@ -3948,10 +3948,10 @@ class okx(Exchange, ImplicitAPI):
|
|
3948
3948
|
else:
|
3949
3949
|
if since is not None:
|
3950
3950
|
request['begin'] = since
|
3951
|
-
until = self.
|
3951
|
+
until = self.safe_integer(query, 'until')
|
3952
3952
|
if until is not None:
|
3953
3953
|
request['end'] = until
|
3954
|
-
query = self.omit(query, ['until'
|
3954
|
+
query = self.omit(query, ['until'])
|
3955
3955
|
request['state'] = 'filled'
|
3956
3956
|
send = self.omit(query, ['method', 'stop', 'trigger', 'trailing'])
|
3957
3957
|
response = None
|
@@ -5973,7 +5973,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5973
5973
|
#
|
5974
5974
|
return response
|
5975
5975
|
|
5976
|
-
def fetch_cross_borrow_rates(self, params={}):
|
5976
|
+
def fetch_cross_borrow_rates(self, params={}) -> CrossBorrowRates:
|
5977
5977
|
"""
|
5978
5978
|
fetch the borrow interest rates of all currencies
|
5979
5979
|
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
|
@@ -6000,7 +6000,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6000
6000
|
rates.append(self.parse_borrow_rate(data[i]))
|
6001
6001
|
return rates
|
6002
6002
|
|
6003
|
-
def fetch_cross_borrow_rate(self, code: str, params={}):
|
6003
|
+
def fetch_cross_borrow_rate(self, code: str, params={}) -> CrossBorrowRate:
|
6004
6004
|
"""
|
6005
6005
|
fetch the rate of interest to borrow a currency for margin trading
|
6006
6006
|
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
|
@@ -6636,10 +6636,10 @@ class okx(Exchange, ImplicitAPI):
|
|
6636
6636
|
else:
|
6637
6637
|
if since is not None:
|
6638
6638
|
request['begin'] = since
|
6639
|
-
until = self.
|
6639
|
+
until = self.safe_integer(params, 'until')
|
6640
6640
|
if until is not None:
|
6641
6641
|
request['end'] = until
|
6642
|
-
params = self.omit(params, ['until'
|
6642
|
+
params = self.omit(params, ['until'])
|
6643
6643
|
response = self.publicGetRubikStatContractsOpenInterestVolume(self.extend(request, params))
|
6644
6644
|
#
|
6645
6645
|
# {
|
ccxt/poloniexfutures.py
CHANGED
@@ -1219,8 +1219,8 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1219
1219
|
"""
|
1220
1220
|
self.load_markets()
|
1221
1221
|
stop = self.safe_value_2(params, 'stop', 'trigger')
|
1222
|
-
until = self.
|
1223
|
-
params = self.omit(params, ['
|
1222
|
+
until = self.safe_integer(params, 'until')
|
1223
|
+
params = self.omit(params, ['trigger', 'stop', 'until'])
|
1224
1224
|
if status == 'closed':
|
1225
1225
|
status = 'done'
|
1226
1226
|
request = {}
|
@@ -1308,7 +1308,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1308
1308
|
:param int [since]: the earliest time in ms to fetch open orders for
|
1309
1309
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
1310
1310
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1311
|
-
:param int [params.
|
1311
|
+
:param int [params.until]: end time in ms
|
1312
1312
|
:param str [params.side]: buy or sell
|
1313
1313
|
:param str [params.type]: limit, or market
|
1314
1314
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -1324,7 +1324,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1324
1324
|
:param int [since]: the earliest time in ms to fetch orders for
|
1325
1325
|
:param int [limit]: the maximum number of order structures to retrieve
|
1326
1326
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1327
|
-
:param int [params.
|
1327
|
+
:param int [params.until]: end time in ms
|
1328
1328
|
:param str [params.side]: buy or sell
|
1329
1329
|
:param str [params.type]: limit, or market
|
1330
1330
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|