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/async_support/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 = await 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 = await 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 = await 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 = await 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 = await 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 = await self.privateGetV1AccountsTraderIdLedger(self.extend(request, params))
|
ccxt/async_support/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/async_support/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 = await 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 = await 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 = await 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 = await 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 = await 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 = await 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 = await 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 = await self.v1PublicGetPublicGetValuations(self.extend(request, params))
|
ccxt/async_support/digifinex.py
CHANGED
@@ -8,7 +8,7 @@ from ccxt.abstract.digifinex import ImplicitAPI
|
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
10
|
import json
|
11
|
-
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
|
11
|
+
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
|
12
12
|
from typing import List
|
13
13
|
from ccxt.base.errors import ExchangeError
|
14
14
|
from ccxt.base.errors import AuthenticationError
|
@@ -2852,7 +2852,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
2852
2852
|
'info': info,
|
2853
2853
|
}
|
2854
2854
|
|
2855
|
-
async def fetch_cross_borrow_rate(self, code: str, params={}):
|
2855
|
+
async def fetch_cross_borrow_rate(self, code: str, params={}) -> CrossBorrowRate:
|
2856
2856
|
"""
|
2857
2857
|
fetch the rate of interest to borrow a currency for margin trading
|
2858
2858
|
:see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets
|
@@ -2889,7 +2889,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
2889
2889
|
currency = self.currency(code)
|
2890
2890
|
return self.parse_borrow_rate(result, currency)
|
2891
2891
|
|
2892
|
-
async def fetch_cross_borrow_rates(self, params={}):
|
2892
|
+
async def fetch_cross_borrow_rates(self, params={}) -> CrossBorrowRates:
|
2893
2893
|
"""
|
2894
2894
|
fetch the borrow interest rates of all currencies
|
2895
2895
|
:see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets
|
ccxt/async_support/gate.py
CHANGED
@@ -3091,8 +3091,8 @@ class gate(Exchange, ImplicitAPI):
|
|
3091
3091
|
marginMode = None
|
3092
3092
|
request = {}
|
3093
3093
|
market = self.market(symbol) if (symbol is not None) else None
|
3094
|
-
until = self.
|
3095
|
-
params = self.omit(params, ['until'
|
3094
|
+
until = self.safe_integer(params, 'until')
|
3095
|
+
params = self.omit(params, ['until'])
|
3096
3096
|
type, params = self.handle_market_type_and_params('fetchMyTrades', market, params)
|
3097
3097
|
contract = (type == 'swap') or (type == 'future') or (type == 'option')
|
3098
3098
|
if contract:
|
ccxt/async_support/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/async_support/htx.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.htx import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
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
|
10
|
+
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
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -6136,7 +6136,7 @@ class htx(Exchange, ImplicitAPI):
|
|
6136
6136
|
#
|
6137
6137
|
return self.parse_transfer(response, currency)
|
6138
6138
|
|
6139
|
-
async def fetch_isolated_borrow_rates(self, params={}):
|
6139
|
+
async def fetch_isolated_borrow_rates(self, params={}) -> IsolatedBorrowRates:
|
6140
6140
|
"""
|
6141
6141
|
fetch the borrow interest rates of all currencies
|
6142
6142
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -6174,12 +6174,9 @@ class htx(Exchange, ImplicitAPI):
|
|
6174
6174
|
# }
|
6175
6175
|
#
|
6176
6176
|
data = self.safe_value(response, 'data', [])
|
6177
|
-
|
6178
|
-
for i in range(0, len(data)):
|
6179
|
-
rates.append(self.parse_isolated_borrow_rate(data[i]))
|
6180
|
-
return rates
|
6177
|
+
return self.parse_isolated_borrow_rates(data)
|
6181
6178
|
|
6182
|
-
def parse_isolated_borrow_rate(self, info, market: Market = None):
|
6179
|
+
def parse_isolated_borrow_rate(self, info, market: Market = None) -> IsolatedBorrowRate:
|
6183
6180
|
#
|
6184
6181
|
# {
|
6185
6182
|
# "symbol": "1inchusdt",
|
@@ -8017,8 +8014,8 @@ class htx(Exchange, ImplicitAPI):
|
|
8017
8014
|
"""
|
8018
8015
|
if symbol is None:
|
8019
8016
|
raise ArgumentsRequired(self.id + ' fetchSettlementHistory() requires a symbol argument')
|
8020
|
-
until = self.
|
8021
|
-
params = self.omit(params, ['until'
|
8017
|
+
until = self.safe_integer(params, 'until')
|
8018
|
+
params = self.omit(params, ['until'])
|
8022
8019
|
market = self.market(symbol)
|
8023
8020
|
request = {}
|
8024
8021
|
if market['future']:
|
ccxt/async_support/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/async_support/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/async_support/kucoin.py
CHANGED
@@ -2315,10 +2315,10 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2315
2315
|
"""
|
2316
2316
|
await self.load_markets()
|
2317
2317
|
lowercaseStatus = status.lower()
|
2318
|
-
until = self.
|
2318
|
+
until = self.safe_integer(params, 'until')
|
2319
2319
|
stop = self.safe_bool(params, 'stop', False)
|
2320
2320
|
hf = self.safe_bool(params, 'hf', False)
|
2321
|
-
params = self.omit(params, ['stop', 'hf', '
|
2321
|
+
params = self.omit(params, ['stop', 'hf', 'until'])
|
2322
2322
|
marginMode, query = self.handle_margin_mode_and_params('fetchOrdersByStatus', params)
|
2323
2323
|
if lowercaseStatus == 'open':
|
2324
2324
|
lowercaseStatus = 'active'
|
@@ -2409,7 +2409,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2409
2409
|
:param int [since]: the earliest time in ms to fetch orders for
|
2410
2410
|
:param int [limit]: the maximum number of order structures to retrieve
|
2411
2411
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2412
|
-
:param int [params.
|
2412
|
+
:param int [params.until]: end time in ms
|
2413
2413
|
:param str [params.side]: buy or sell
|
2414
2414
|
:param str [params.type]: limit, market, limit_stop or market_stop
|
2415
2415
|
:param str [params.tradeType]: TRADE for spot trading, MARGIN_TRADE for Margin Trading
|
@@ -2436,7 +2436,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2436
2436
|
:param int [since]: the earliest time in ms to fetch open orders for
|
2437
2437
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
2438
2438
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2439
|
-
:param int [params.
|
2439
|
+
:param int [params.until]: end time in ms
|
2440
2440
|
:param bool [params.stop]: True if fetching stop orders
|
2441
2441
|
:param str [params.side]: buy or sell
|
2442
2442
|
:param str [params.type]: limit, market, limit_stop or market_stop
|
@@ -1689,8 +1689,8 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
1689
1689
|
if paginate:
|
1690
1690
|
return await 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/async_support/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 = await 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/async_support/okx.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.okx import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
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
|
10
|
+
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
|
11
11
|
from typing import List
|
12
12
|
from typing import Any
|
13
13
|
from ccxt.base.errors import ExchangeError
|
@@ -3774,10 +3774,10 @@ class okx(Exchange, ImplicitAPI):
|
|
3774
3774
|
else:
|
3775
3775
|
if since is not None:
|
3776
3776
|
request['begin'] = since
|
3777
|
-
until = self.
|
3777
|
+
until = self.safe_integer(query, 'until')
|
3778
3778
|
if until is not None:
|
3779
3779
|
request['end'] = until
|
3780
|
-
query = self.omit(query, ['until'
|
3780
|
+
query = self.omit(query, ['until'])
|
3781
3781
|
send = self.omit(query, ['method', 'stop', 'trigger', 'trailing'])
|
3782
3782
|
response = None
|
3783
3783
|
if method == 'privateGetTradeOrdersAlgoHistory':
|
@@ -3949,10 +3949,10 @@ class okx(Exchange, ImplicitAPI):
|
|
3949
3949
|
else:
|
3950
3950
|
if since is not None:
|
3951
3951
|
request['begin'] = since
|
3952
|
-
until = self.
|
3952
|
+
until = self.safe_integer(query, 'until')
|
3953
3953
|
if until is not None:
|
3954
3954
|
request['end'] = until
|
3955
|
-
query = self.omit(query, ['until'
|
3955
|
+
query = self.omit(query, ['until'])
|
3956
3956
|
request['state'] = 'filled'
|
3957
3957
|
send = self.omit(query, ['method', 'stop', 'trigger', 'trailing'])
|
3958
3958
|
response = None
|
@@ -5974,7 +5974,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5974
5974
|
#
|
5975
5975
|
return response
|
5976
5976
|
|
5977
|
-
async def fetch_cross_borrow_rates(self, params={}):
|
5977
|
+
async def fetch_cross_borrow_rates(self, params={}) -> CrossBorrowRates:
|
5978
5978
|
"""
|
5979
5979
|
fetch the borrow interest rates of all currencies
|
5980
5980
|
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
|
@@ -6001,7 +6001,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6001
6001
|
rates.append(self.parse_borrow_rate(data[i]))
|
6002
6002
|
return rates
|
6003
6003
|
|
6004
|
-
async def fetch_cross_borrow_rate(self, code: str, params={}):
|
6004
|
+
async def fetch_cross_borrow_rate(self, code: str, params={}) -> CrossBorrowRate:
|
6005
6005
|
"""
|
6006
6006
|
fetch the rate of interest to borrow a currency for margin trading
|
6007
6007
|
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
|
@@ -6637,10 +6637,10 @@ class okx(Exchange, ImplicitAPI):
|
|
6637
6637
|
else:
|
6638
6638
|
if since is not None:
|
6639
6639
|
request['begin'] = since
|
6640
|
-
until = self.
|
6640
|
+
until = self.safe_integer(params, 'until')
|
6641
6641
|
if until is not None:
|
6642
6642
|
request['end'] = until
|
6643
|
-
params = self.omit(params, ['until'
|
6643
|
+
params = self.omit(params, ['until'])
|
6644
6644
|
response = await self.publicGetRubikStatContractsOpenInterestVolume(self.extend(request, params))
|
6645
6645
|
#
|
6646
6646
|
# {
|
@@ -1219,8 +1219,8 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1219
1219
|
"""
|
1220
1220
|
await 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>`
|
ccxt/async_support/probit.py
CHANGED
@@ -1428,10 +1428,10 @@ class probit(Exchange, ImplicitAPI):
|
|
1428
1428
|
request['start_time'] = self.iso8601(since)
|
1429
1429
|
else:
|
1430
1430
|
request['start_time'] = self.iso8601(1)
|
1431
|
-
until = self.
|
1431
|
+
until = self.safe_integer(params, 'until')
|
1432
1432
|
if until is not None:
|
1433
1433
|
request['end_time'] = self.iso8601(until)
|
1434
|
-
params = self.omit(params, ['until'
|
1434
|
+
params = self.omit(params, ['until'])
|
1435
1435
|
else:
|
1436
1436
|
request['end_time'] = self.iso8601(self.milliseconds())
|
1437
1437
|
if limit is not None:
|