ccxt 4.3.11 → 4.3.13
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.
- package/README.md +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +15 -0
- package/dist/cjs/src/bigone.js +22 -22
- package/dist/cjs/src/binance.js +5 -5
- package/dist/cjs/src/bingx.js +2 -2
- package/dist/cjs/src/bitget.js +7 -4
- package/dist/cjs/src/bitmart.js +3 -8
- package/dist/cjs/src/bitmex.js +2 -2
- package/dist/cjs/src/bybit.js +82 -71
- package/dist/cjs/src/coinbase.js +8 -8
- package/dist/cjs/src/coinbaseinternational.js +2 -2
- package/dist/cjs/src/coinex.js +513 -449
- package/dist/cjs/src/coinlist.js +12 -12
- package/dist/cjs/src/coinmetro.js +2 -2
- package/dist/cjs/src/cryptocom.js +16 -16
- package/dist/cjs/src/gate.js +2 -2
- package/dist/cjs/src/hitbtc.js +3 -3
- package/dist/cjs/src/htx.js +3 -7
- package/dist/cjs/src/indodax.js +2 -2
- package/dist/cjs/src/kraken.js +3 -1
- package/dist/cjs/src/kucoin.js +4 -4
- package/dist/cjs/src/kucoinfutures.js +6 -6
- package/dist/cjs/src/mexc.js +5 -5
- package/dist/cjs/src/okx.js +6 -6
- package/dist/cjs/src/poloniexfutures.js +4 -4
- package/dist/cjs/src/pro/bitget.js +140 -89
- package/dist/cjs/src/pro/bybit.js +196 -11
- package/dist/cjs/src/pro/coinbase.js +107 -29
- package/dist/cjs/src/pro/mexc.js +21 -1
- package/dist/cjs/src/probit.js +2 -2
- package/dist/cjs/src/whitebit.js +76 -1
- package/dist/cjs/src/woo.js +2 -2
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bybit.d.ts +1 -0
- package/js/src/base/Exchange.d.ts +10 -6
- package/js/src/base/Exchange.js +15 -0
- package/js/src/base/types.d.ts +17 -2
- package/js/src/bigone.js +22 -22
- package/js/src/binance.d.ts +2 -9
- package/js/src/binance.js +5 -5
- package/js/src/bingx.js +2 -2
- package/js/src/bitget.d.ts +4 -31
- package/js/src/bitget.js +7 -4
- package/js/src/bitmart.d.ts +4 -24
- package/js/src/bitmart.js +3 -8
- package/js/src/bitmex.js +2 -2
- package/js/src/bybit.d.ts +7 -9
- package/js/src/bybit.js +82 -71
- package/js/src/coinbase.js +8 -8
- package/js/src/coinbaseinternational.js +2 -2
- package/js/src/coinex.d.ts +4 -24
- package/js/src/coinex.js +513 -449
- package/js/src/coinlist.js +12 -12
- package/js/src/coinmetro.js +2 -2
- package/js/src/cryptocom.js +16 -16
- package/js/src/digifinex.d.ts +3 -10
- package/js/src/gate.js +2 -2
- package/js/src/hitbtc.js +3 -3
- package/js/src/htx.d.ts +3 -13
- package/js/src/htx.js +3 -7
- package/js/src/indodax.js +2 -2
- package/js/src/kraken.js +3 -1
- package/js/src/kucoin.js +4 -4
- package/js/src/kucoinfutures.js +6 -6
- package/js/src/mexc.js +5 -5
- package/js/src/okx.d.ts +3 -10
- package/js/src/okx.js +6 -6
- package/js/src/poloniexfutures.js +4 -4
- package/js/src/pro/bitget.js +140 -89
- package/js/src/pro/bybit.d.ts +5 -1
- package/js/src/pro/bybit.js +196 -11
- package/js/src/pro/coinbase.d.ts +4 -0
- package/js/src/pro/coinbase.js +107 -29
- package/js/src/pro/mexc.js +21 -1
- package/js/src/probit.js +2 -2
- package/js/src/whitebit.d.ts +1 -0
- package/js/src/whitebit.js +76 -1
- package/js/src/woo.js +2 -2
- package/package.json +6 -5
- package/dist/cjs/src/flowbtc.js +0 -35
package/js/src/coinlist.js
CHANGED
|
@@ -689,9 +689,9 @@ export default class coinlist extends Exchange {
|
|
|
689
689
|
request['end_time'] = this.iso8601(this.milliseconds());
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
|
-
const until = this.
|
|
692
|
+
const until = this.safeInteger(params, 'until');
|
|
693
693
|
if (until !== undefined) {
|
|
694
|
-
params = this.omit(params, ['
|
|
694
|
+
params = this.omit(params, ['until']);
|
|
695
695
|
request['end_time'] = this.iso8601(until);
|
|
696
696
|
}
|
|
697
697
|
const response = await this.publicGetV1SymbolsSymbolCandles(this.extend(request, params));
|
|
@@ -767,9 +767,9 @@ export default class coinlist extends Exchange {
|
|
|
767
767
|
if (limit !== undefined) {
|
|
768
768
|
request['count'] = Math.min(limit, 500);
|
|
769
769
|
}
|
|
770
|
-
const until = this.
|
|
770
|
+
const until = this.safeInteger(params, 'until');
|
|
771
771
|
if (until !== undefined) {
|
|
772
|
-
params = this.omit(params, ['
|
|
772
|
+
params = this.omit(params, ['until']);
|
|
773
773
|
request['end_time'] = this.iso8601(until);
|
|
774
774
|
}
|
|
775
775
|
const response = await this.publicGetV1SymbolsSymbolAuctions(this.extend(request, params));
|
|
@@ -1170,9 +1170,9 @@ export default class coinlist extends Exchange {
|
|
|
1170
1170
|
if (limit !== undefined) {
|
|
1171
1171
|
request['count'] = limit;
|
|
1172
1172
|
}
|
|
1173
|
-
const until = this.
|
|
1173
|
+
const until = this.safeInteger(params, 'until');
|
|
1174
1174
|
if (until !== undefined) {
|
|
1175
|
-
params = this.omit(params, ['
|
|
1175
|
+
params = this.omit(params, ['until']);
|
|
1176
1176
|
request['end_time'] = this.iso8601(until);
|
|
1177
1177
|
}
|
|
1178
1178
|
const response = await this.privateGetV1Fills(this.extend(request, params));
|
|
@@ -1258,9 +1258,9 @@ export default class coinlist extends Exchange {
|
|
|
1258
1258
|
if (limit !== undefined) {
|
|
1259
1259
|
request['count'] = limit;
|
|
1260
1260
|
}
|
|
1261
|
-
const until = this.
|
|
1261
|
+
const until = this.safeInteger(params, 'until');
|
|
1262
1262
|
if (until !== undefined) {
|
|
1263
|
-
params = this.omit(params, ['
|
|
1263
|
+
params = this.omit(params, ['until']);
|
|
1264
1264
|
request['end_time'] = this.iso8601(until);
|
|
1265
1265
|
}
|
|
1266
1266
|
const response = await this.privateGetV1Orders(this.extend(request, params));
|
|
@@ -1794,9 +1794,9 @@ export default class coinlist extends Exchange {
|
|
|
1794
1794
|
if (limit !== undefined) {
|
|
1795
1795
|
request['count'] = limit;
|
|
1796
1796
|
}
|
|
1797
|
-
const until = this.
|
|
1797
|
+
const until = this.safeInteger(params, 'until');
|
|
1798
1798
|
if (until !== undefined) {
|
|
1799
|
-
params = this.omit(params, ['
|
|
1799
|
+
params = this.omit(params, ['until']);
|
|
1800
1800
|
request['end_time'] = this.iso8601(until);
|
|
1801
1801
|
}
|
|
1802
1802
|
const response = await this.privateGetV1Transfers(this.extend(request, params));
|
|
@@ -2096,9 +2096,9 @@ export default class coinlist extends Exchange {
|
|
|
2096
2096
|
if (limit !== undefined) {
|
|
2097
2097
|
request['count'] = limit;
|
|
2098
2098
|
}
|
|
2099
|
-
const until = this.
|
|
2099
|
+
const until = this.safeInteger(params, 'until');
|
|
2100
2100
|
if (until !== undefined) {
|
|
2101
|
-
params = this.omit(params, ['
|
|
2101
|
+
params = this.omit(params, ['until']);
|
|
2102
2102
|
request['end_time'] = this.iso8601(until);
|
|
2103
2103
|
}
|
|
2104
2104
|
params = this.omit(params, ['trader_id', 'traderId']);
|
package/js/src/coinmetro.js
CHANGED
|
@@ -509,9 +509,9 @@ export default class coinmetro extends Exchange {
|
|
|
509
509
|
else {
|
|
510
510
|
request['from'] = ':from'; // this endpoint doesn't accept empty from and to params (setting them into the value described in the documentation)
|
|
511
511
|
}
|
|
512
|
-
until = this.
|
|
512
|
+
until = this.safeInteger(params, 'until', until);
|
|
513
513
|
if (until !== undefined) {
|
|
514
|
-
params = this.omit(params, ['
|
|
514
|
+
params = this.omit(params, ['until']);
|
|
515
515
|
request['to'] = until;
|
|
516
516
|
}
|
|
517
517
|
else {
|
package/js/src/cryptocom.js
CHANGED
|
@@ -680,8 +680,8 @@ export default class cryptocom extends Exchange {
|
|
|
680
680
|
if (limit !== undefined) {
|
|
681
681
|
request['limit'] = limit;
|
|
682
682
|
}
|
|
683
|
-
const until = this.
|
|
684
|
-
params = this.omit(params, ['until'
|
|
683
|
+
const until = this.safeInteger(params, 'until');
|
|
684
|
+
params = this.omit(params, ['until']);
|
|
685
685
|
if (until !== undefined) {
|
|
686
686
|
request['end_time'] = until;
|
|
687
687
|
}
|
|
@@ -759,8 +759,8 @@ export default class cryptocom extends Exchange {
|
|
|
759
759
|
if (limit !== undefined) {
|
|
760
760
|
request['count'] = limit;
|
|
761
761
|
}
|
|
762
|
-
const until = this.
|
|
763
|
-
params = this.omit(params, ['until'
|
|
762
|
+
const until = this.safeInteger(params, 'until');
|
|
763
|
+
params = this.omit(params, ['until']);
|
|
764
764
|
if (until !== undefined) {
|
|
765
765
|
request['end_ts'] = until;
|
|
766
766
|
}
|
|
@@ -821,8 +821,8 @@ export default class cryptocom extends Exchange {
|
|
|
821
821
|
if (limit !== undefined) {
|
|
822
822
|
request['count'] = limit;
|
|
823
823
|
}
|
|
824
|
-
const until = this.
|
|
825
|
-
params = this.omit(params, ['until'
|
|
824
|
+
const until = this.safeInteger(params, 'until');
|
|
825
|
+
params = this.omit(params, ['until']);
|
|
826
826
|
if (until !== undefined) {
|
|
827
827
|
request['end_ts'] = until;
|
|
828
828
|
}
|
|
@@ -1594,8 +1594,8 @@ export default class cryptocom extends Exchange {
|
|
|
1594
1594
|
if (limit !== undefined) {
|
|
1595
1595
|
request['limit'] = limit;
|
|
1596
1596
|
}
|
|
1597
|
-
const until = this.
|
|
1598
|
-
params = this.omit(params, ['until'
|
|
1597
|
+
const until = this.safeInteger(params, 'until');
|
|
1598
|
+
params = this.omit(params, ['until']);
|
|
1599
1599
|
if (until !== undefined) {
|
|
1600
1600
|
request['end_time'] = until;
|
|
1601
1601
|
}
|
|
@@ -1817,8 +1817,8 @@ export default class cryptocom extends Exchange {
|
|
|
1817
1817
|
if (limit !== undefined) {
|
|
1818
1818
|
request['page_size'] = limit;
|
|
1819
1819
|
}
|
|
1820
|
-
const until = this.
|
|
1821
|
-
params = this.omit(params, ['until'
|
|
1820
|
+
const until = this.safeInteger(params, 'until');
|
|
1821
|
+
params = this.omit(params, ['until']);
|
|
1822
1822
|
if (until !== undefined) {
|
|
1823
1823
|
request['end_ts'] = until;
|
|
1824
1824
|
}
|
|
@@ -1876,8 +1876,8 @@ export default class cryptocom extends Exchange {
|
|
|
1876
1876
|
if (limit !== undefined) {
|
|
1877
1877
|
request['page_size'] = limit;
|
|
1878
1878
|
}
|
|
1879
|
-
const until = this.
|
|
1880
|
-
params = this.omit(params, ['until'
|
|
1879
|
+
const until = this.safeInteger(params, 'until');
|
|
1880
|
+
params = this.omit(params, ['until']);
|
|
1881
1881
|
if (until !== undefined) {
|
|
1882
1882
|
request['end_ts'] = until;
|
|
1883
1883
|
}
|
|
@@ -2390,8 +2390,8 @@ export default class cryptocom extends Exchange {
|
|
|
2390
2390
|
if (limit !== undefined) {
|
|
2391
2391
|
request['limit'] = limit;
|
|
2392
2392
|
}
|
|
2393
|
-
const until = this.
|
|
2394
|
-
params = this.omit(params, ['until'
|
|
2393
|
+
const until = this.safeInteger(params, 'until');
|
|
2394
|
+
params = this.omit(params, ['until']);
|
|
2395
2395
|
if (until !== undefined) {
|
|
2396
2396
|
request['end_time'] = until;
|
|
2397
2397
|
}
|
|
@@ -2713,8 +2713,8 @@ export default class cryptocom extends Exchange {
|
|
|
2713
2713
|
if (limit !== undefined) {
|
|
2714
2714
|
request['count'] = limit;
|
|
2715
2715
|
}
|
|
2716
|
-
const until = this.
|
|
2717
|
-
params = this.omit(params, ['until'
|
|
2716
|
+
const until = this.safeInteger(params, 'until');
|
|
2717
|
+
params = this.omit(params, ['until']);
|
|
2718
2718
|
if (until !== undefined) {
|
|
2719
2719
|
request['end_ts'] = until;
|
|
2720
2720
|
}
|
package/js/src/digifinex.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/digifinex.js';
|
|
2
|
-
import type { FundingRateHistory, Int, OHLCV, Order, OrderSide, OrderType, OrderRequest, Trade, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Strings, Market, Currency, TransferEntry, Num, MarginModification, TradingFeeInterface, Currencies } from './base/types.js';
|
|
2
|
+
import type { FundingRateHistory, Int, OHLCV, Order, OrderSide, OrderType, OrderRequest, Trade, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Strings, Market, Currency, TransferEntry, Num, MarginModification, TradingFeeInterface, Currencies, CrossBorrowRate, CrossBorrowRates } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class digifinex
|
|
5
5
|
* @augments Exchange
|
|
@@ -98,15 +98,8 @@ export default class digifinex extends Exchange {
|
|
|
98
98
|
datetime: any;
|
|
99
99
|
info: any;
|
|
100
100
|
};
|
|
101
|
-
fetchCrossBorrowRate(code: string, params?: {}): Promise<
|
|
102
|
-
|
|
103
|
-
rate: number;
|
|
104
|
-
period: number;
|
|
105
|
-
timestamp: number;
|
|
106
|
-
datetime: string;
|
|
107
|
-
info: any;
|
|
108
|
-
}>;
|
|
109
|
-
fetchCrossBorrowRates(params?: {}): Promise<any>;
|
|
101
|
+
fetchCrossBorrowRate(code: string, params?: {}): Promise<CrossBorrowRate>;
|
|
102
|
+
fetchCrossBorrowRates(params?: {}): Promise<CrossBorrowRates>;
|
|
110
103
|
parseBorrowRate(info: any, currency?: Currency): {
|
|
111
104
|
currency: string;
|
|
112
105
|
rate: number;
|
package/js/src/gate.js
CHANGED
|
@@ -3255,8 +3255,8 @@ export default class gate extends Exchange {
|
|
|
3255
3255
|
let marginMode = undefined;
|
|
3256
3256
|
let request = {};
|
|
3257
3257
|
const market = (symbol !== undefined) ? this.market(symbol) : undefined;
|
|
3258
|
-
const until = this.
|
|
3259
|
-
params = this.omit(params, ['until'
|
|
3258
|
+
const until = this.safeInteger(params, 'until');
|
|
3259
|
+
params = this.omit(params, ['until']);
|
|
3260
3260
|
[type, params] = this.handleMarketTypeAndParams('fetchMyTrades', market, params);
|
|
3261
3261
|
const contract = (type === 'swap') || (type === 'future') || (type === 'option');
|
|
3262
3262
|
if (contract) {
|
package/js/src/hitbtc.js
CHANGED
|
@@ -1737,7 +1737,7 @@ export default class hitbtc extends Exchange {
|
|
|
1737
1737
|
if (since !== undefined) {
|
|
1738
1738
|
request['from'] = this.iso8601(since);
|
|
1739
1739
|
}
|
|
1740
|
-
[request, params] = this.handleUntilOption('
|
|
1740
|
+
[request, params] = this.handleUntilOption('until', request, params);
|
|
1741
1741
|
if (limit !== undefined) {
|
|
1742
1742
|
request['limit'] = Math.min(limit, 1000);
|
|
1743
1743
|
}
|
|
@@ -2809,11 +2809,11 @@ export default class hitbtc extends Exchange {
|
|
|
2809
2809
|
// 'symbols': Comma separated list of symbol codes,
|
|
2810
2810
|
// 'sort': 'DESC' or 'ASC'
|
|
2811
2811
|
// 'from': 'Datetime or Number',
|
|
2812
|
-
// '
|
|
2812
|
+
// 'until': 'Datetime or Number',
|
|
2813
2813
|
// 'limit': 100,
|
|
2814
2814
|
// 'offset': 0,
|
|
2815
2815
|
};
|
|
2816
|
-
[request, params] = this.handleUntilOption('
|
|
2816
|
+
[request, params] = this.handleUntilOption('until', request, params);
|
|
2817
2817
|
if (symbol !== undefined) {
|
|
2818
2818
|
market = this.market(symbol);
|
|
2819
2819
|
symbol = market['symbol'];
|
package/js/src/htx.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/htx.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { TransferEntry, Int, OrderSide, OrderType, Order, OHLCV, Trade, FundingRateHistory, Balances, Str, Transaction, Ticker, OrderBook, Tickers, OrderRequest, Strings, Market, Currency, Num, Account, TradingFeeInterface, Currencies, IsolatedBorrowRates, IsolatedBorrowRate } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class huobi
|
|
5
5
|
* @augments Exchange
|
|
@@ -121,18 +121,8 @@ export default class htx extends Exchange {
|
|
|
121
121
|
status: any;
|
|
122
122
|
};
|
|
123
123
|
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
124
|
-
fetchIsolatedBorrowRates(params?: {}): Promise<
|
|
125
|
-
parseIsolatedBorrowRate(info: any, market?: Market):
|
|
126
|
-
symbol: string;
|
|
127
|
-
base: string;
|
|
128
|
-
baseRate: number;
|
|
129
|
-
quote: string;
|
|
130
|
-
quoteRate: number;
|
|
131
|
-
period: number;
|
|
132
|
-
timestamp: any;
|
|
133
|
-
datetime: any;
|
|
134
|
-
info: any;
|
|
135
|
-
};
|
|
124
|
+
fetchIsolatedBorrowRates(params?: {}): Promise<IsolatedBorrowRates>;
|
|
125
|
+
parseIsolatedBorrowRate(info: any, market?: Market): IsolatedBorrowRate;
|
|
136
126
|
fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
|
|
137
127
|
parseFundingRate(contract: any, market?: Market): {
|
|
138
128
|
info: any;
|
package/js/src/htx.js
CHANGED
|
@@ -6757,11 +6757,7 @@ export default class htx extends Exchange {
|
|
|
6757
6757
|
// }
|
|
6758
6758
|
//
|
|
6759
6759
|
const data = this.safeValue(response, 'data', []);
|
|
6760
|
-
|
|
6761
|
-
for (let i = 0; i < data.length; i++) {
|
|
6762
|
-
rates.push(this.parseIsolatedBorrowRate(data[i]));
|
|
6763
|
-
}
|
|
6764
|
-
return rates;
|
|
6760
|
+
return this.parseIsolatedBorrowRates(data);
|
|
6765
6761
|
}
|
|
6766
6762
|
parseIsolatedBorrowRate(info, market = undefined) {
|
|
6767
6763
|
//
|
|
@@ -8752,8 +8748,8 @@ export default class htx extends Exchange {
|
|
|
8752
8748
|
if (symbol === undefined) {
|
|
8753
8749
|
throw new ArgumentsRequired(this.id + ' fetchSettlementHistory() requires a symbol argument');
|
|
8754
8750
|
}
|
|
8755
|
-
const until = this.
|
|
8756
|
-
params = this.omit(params, ['until'
|
|
8751
|
+
const until = this.safeInteger(params, 'until');
|
|
8752
|
+
params = this.omit(params, ['until']);
|
|
8757
8753
|
const market = this.market(symbol);
|
|
8758
8754
|
const request = {};
|
|
8759
8755
|
if (market['future']) {
|
package/js/src/indodax.js
CHANGED
|
@@ -592,8 +592,8 @@ export default class indodax extends Exchange {
|
|
|
592
592
|
const timeframes = this.options['timeframes'];
|
|
593
593
|
const selectedTimeframe = this.safeString(timeframes, timeframe, timeframe);
|
|
594
594
|
const now = this.seconds();
|
|
595
|
-
const until = this.
|
|
596
|
-
params = this.omit(params, ['until'
|
|
595
|
+
const until = this.safeInteger(params, 'until', now);
|
|
596
|
+
params = this.omit(params, ['until']);
|
|
597
597
|
const request = {
|
|
598
598
|
'to': until,
|
|
599
599
|
'tf': selectedTimeframe,
|
package/js/src/kraken.js
CHANGED
|
@@ -537,6 +537,8 @@ export default class kraken extends Exchange {
|
|
|
537
537
|
const leverageBuy = this.safeValue(market, 'leverage_buy', []);
|
|
538
538
|
const leverageBuyLength = leverageBuy.length;
|
|
539
539
|
const precisionPrice = this.parseNumber(this.parsePrecision(this.safeString(market, 'pair_decimals')));
|
|
540
|
+
const status = this.safeString(market, 'status');
|
|
541
|
+
const isActive = status === 'online';
|
|
540
542
|
result.push({
|
|
541
543
|
'id': id,
|
|
542
544
|
'wsId': this.safeString(market, 'wsname'),
|
|
@@ -555,7 +557,7 @@ export default class kraken extends Exchange {
|
|
|
555
557
|
'swap': false,
|
|
556
558
|
'future': false,
|
|
557
559
|
'option': false,
|
|
558
|
-
'active':
|
|
560
|
+
'active': isActive,
|
|
559
561
|
'contract': false,
|
|
560
562
|
'linear': undefined,
|
|
561
563
|
'inverse': undefined,
|
package/js/src/kucoin.js
CHANGED
|
@@ -2430,10 +2430,10 @@ export default class kucoin extends Exchange {
|
|
|
2430
2430
|
*/
|
|
2431
2431
|
await this.loadMarkets();
|
|
2432
2432
|
let lowercaseStatus = status.toLowerCase();
|
|
2433
|
-
const until = this.
|
|
2433
|
+
const until = this.safeInteger(params, 'until');
|
|
2434
2434
|
const stop = this.safeBool(params, 'stop', false);
|
|
2435
2435
|
const hf = this.safeBool(params, 'hf', false);
|
|
2436
|
-
params = this.omit(params, ['stop', 'hf', '
|
|
2436
|
+
params = this.omit(params, ['stop', 'hf', 'until']);
|
|
2437
2437
|
const [marginMode, query] = this.handleMarginModeAndParams('fetchOrdersByStatus', params);
|
|
2438
2438
|
if (lowercaseStatus === 'open') {
|
|
2439
2439
|
lowercaseStatus = 'active';
|
|
@@ -2538,7 +2538,7 @@ export default class kucoin extends Exchange {
|
|
|
2538
2538
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2539
2539
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2540
2540
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2541
|
-
* @param {int} [params.
|
|
2541
|
+
* @param {int} [params.until] end time in ms
|
|
2542
2542
|
* @param {string} [params.side] buy or sell
|
|
2543
2543
|
* @param {string} [params.type] limit, market, limit_stop or market_stop
|
|
2544
2544
|
* @param {string} [params.tradeType] TRADE for spot trading, MARGIN_TRADE for Margin Trading
|
|
@@ -2568,7 +2568,7 @@ export default class kucoin extends Exchange {
|
|
|
2568
2568
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2569
2569
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2570
2570
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2571
|
-
* @param {int} [params.
|
|
2571
|
+
* @param {int} [params.until] end time in ms
|
|
2572
2572
|
* @param {bool} [params.stop] true if fetching stop orders
|
|
2573
2573
|
* @param {string} [params.side] buy or sell
|
|
2574
2574
|
* @param {string} [params.type] limit, market, limit_stop or market_stop
|
package/js/src/kucoinfutures.js
CHANGED
|
@@ -1769,8 +1769,8 @@ export default class kucoinfutures extends kucoin {
|
|
|
1769
1769
|
return await this.fetchPaginatedCallDynamic('fetchOrdersByStatus', symbol, since, limit, params);
|
|
1770
1770
|
}
|
|
1771
1771
|
const stop = this.safeValue2(params, 'stop', 'trigger');
|
|
1772
|
-
const until = this.
|
|
1773
|
-
params = this.omit(params, ['stop', 'until', '
|
|
1772
|
+
const until = this.safeInteger(params, 'until');
|
|
1773
|
+
params = this.omit(params, ['stop', 'until', 'trigger']);
|
|
1774
1774
|
if (status === 'closed') {
|
|
1775
1775
|
status = 'done';
|
|
1776
1776
|
}
|
|
@@ -1867,7 +1867,7 @@ export default class kucoinfutures extends kucoin {
|
|
|
1867
1867
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1868
1868
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1869
1869
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1870
|
-
* @param {int} [params.
|
|
1870
|
+
* @param {int} [params.until] end time in ms
|
|
1871
1871
|
* @param {string} [params.side] buy or sell
|
|
1872
1872
|
* @param {string} [params.type] limit, or market
|
|
1873
1873
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
@@ -1892,7 +1892,7 @@ export default class kucoinfutures extends kucoin {
|
|
|
1892
1892
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1893
1893
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1894
1894
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1895
|
-
* @param {int} [params.
|
|
1895
|
+
* @param {int} [params.until] end time in ms
|
|
1896
1896
|
* @param {string} [params.side] buy or sell
|
|
1897
1897
|
* @param {string} [params.type] limit, or market
|
|
1898
1898
|
* @param {boolean} [params.trigger] set to true to retrieve untriggered stop orders
|
|
@@ -2738,8 +2738,8 @@ export default class kucoinfutures extends kucoin {
|
|
|
2738
2738
|
'from': 0,
|
|
2739
2739
|
'to': this.milliseconds(),
|
|
2740
2740
|
};
|
|
2741
|
-
const until = this.
|
|
2742
|
-
params = this.omit(params, ['until'
|
|
2741
|
+
const until = this.safeInteger(params, 'until');
|
|
2742
|
+
params = this.omit(params, ['until']);
|
|
2743
2743
|
if (since !== undefined) {
|
|
2744
2744
|
request['from'] = since;
|
|
2745
2745
|
if (until === undefined) {
|
package/js/src/mexc.js
CHANGED
|
@@ -1486,7 +1486,7 @@ export default class mexc extends Exchange {
|
|
|
1486
1486
|
}
|
|
1487
1487
|
let trades = undefined;
|
|
1488
1488
|
if (market['spot']) {
|
|
1489
|
-
const until = this.safeIntegerN(params, ['endTime', 'until'
|
|
1489
|
+
const until = this.safeIntegerN(params, ['endTime', 'until']);
|
|
1490
1490
|
if (since !== undefined) {
|
|
1491
1491
|
request['startTime'] = since;
|
|
1492
1492
|
if (until === undefined) {
|
|
@@ -1771,7 +1771,7 @@ export default class mexc extends Exchange {
|
|
|
1771
1771
|
};
|
|
1772
1772
|
let candles = undefined;
|
|
1773
1773
|
if (market['spot']) {
|
|
1774
|
-
const until = this.safeIntegerN(params, ['until', 'endTime'
|
|
1774
|
+
const until = this.safeIntegerN(params, ['until', 'endTime']);
|
|
1775
1775
|
if (since !== undefined) {
|
|
1776
1776
|
request['startTime'] = since;
|
|
1777
1777
|
if (until === undefined) {
|
|
@@ -1785,7 +1785,7 @@ export default class mexc extends Exchange {
|
|
|
1785
1785
|
request['limit'] = limit;
|
|
1786
1786
|
}
|
|
1787
1787
|
if (until !== undefined) {
|
|
1788
|
-
params = this.omit(params, ['until'
|
|
1788
|
+
params = this.omit(params, ['until']);
|
|
1789
1789
|
request['endTime'] = until;
|
|
1790
1790
|
}
|
|
1791
1791
|
const response = await this.spotPublicGetKlines(this.extend(request, params));
|
|
@@ -1806,12 +1806,12 @@ export default class mexc extends Exchange {
|
|
|
1806
1806
|
candles = response;
|
|
1807
1807
|
}
|
|
1808
1808
|
else if (market['swap']) {
|
|
1809
|
-
const until = this.safeIntegerProductN(params, ['until', 'endTime'
|
|
1809
|
+
const until = this.safeIntegerProductN(params, ['until', 'endTime'], 0.001);
|
|
1810
1810
|
if (since !== undefined) {
|
|
1811
1811
|
request['start'] = this.parseToInt(since / 1000);
|
|
1812
1812
|
}
|
|
1813
1813
|
if (until !== undefined) {
|
|
1814
|
-
params = this.omit(params, ['until'
|
|
1814
|
+
params = this.omit(params, ['until']);
|
|
1815
1815
|
request['end'] = until;
|
|
1816
1816
|
}
|
|
1817
1817
|
const priceType = this.safeString(params, 'price', 'default');
|
package/js/src/okx.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/okx.js';
|
|
2
|
-
import type { TransferEntry, Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Str, Transaction, Ticker, OrderBook, Balances, Tickers, Market, Greeks, Strings, MarketInterface, Currency, Leverage, Num, Account, OptionChain, Option, MarginModification, TradingFeeInterface, Currencies, Conversion, CancellationRequest, Position } from './base/types.js';
|
|
2
|
+
import type { TransferEntry, Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Str, Transaction, Ticker, OrderBook, Balances, Tickers, Market, Greeks, Strings, MarketInterface, Currency, Leverage, Num, Account, OptionChain, Option, MarginModification, TradingFeeInterface, Currencies, Conversion, CancellationRequest, Position, CrossBorrowRate, CrossBorrowRates } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class okx
|
|
5
5
|
* @augments Exchange
|
|
@@ -177,15 +177,8 @@ export default class okx extends Exchange {
|
|
|
177
177
|
}>;
|
|
178
178
|
setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
|
|
179
179
|
setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
|
|
180
|
-
fetchCrossBorrowRates(params?: {}): Promise<
|
|
181
|
-
fetchCrossBorrowRate(code: string, params?: {}): Promise<
|
|
182
|
-
currency: string;
|
|
183
|
-
rate: number;
|
|
184
|
-
period: number;
|
|
185
|
-
timestamp: number;
|
|
186
|
-
datetime: string;
|
|
187
|
-
info: any;
|
|
188
|
-
}>;
|
|
180
|
+
fetchCrossBorrowRates(params?: {}): Promise<CrossBorrowRates>;
|
|
181
|
+
fetchCrossBorrowRate(code: string, params?: {}): Promise<CrossBorrowRate>;
|
|
189
182
|
parseBorrowRate(info: any, currency?: Currency): {
|
|
190
183
|
currency: string;
|
|
191
184
|
rate: number;
|
package/js/src/okx.js
CHANGED
|
@@ -4030,10 +4030,10 @@ export default class okx extends Exchange {
|
|
|
4030
4030
|
if (since !== undefined) {
|
|
4031
4031
|
request['begin'] = since;
|
|
4032
4032
|
}
|
|
4033
|
-
const until = this.
|
|
4033
|
+
const until = this.safeInteger(query, 'until');
|
|
4034
4034
|
if (until !== undefined) {
|
|
4035
4035
|
request['end'] = until;
|
|
4036
|
-
query = this.omit(query, ['until'
|
|
4036
|
+
query = this.omit(query, ['until']);
|
|
4037
4037
|
}
|
|
4038
4038
|
}
|
|
4039
4039
|
const send = this.omit(query, ['method', 'stop', 'trigger', 'trailing']);
|
|
@@ -4219,10 +4219,10 @@ export default class okx extends Exchange {
|
|
|
4219
4219
|
if (since !== undefined) {
|
|
4220
4220
|
request['begin'] = since;
|
|
4221
4221
|
}
|
|
4222
|
-
const until = this.
|
|
4222
|
+
const until = this.safeInteger(query, 'until');
|
|
4223
4223
|
if (until !== undefined) {
|
|
4224
4224
|
request['end'] = until;
|
|
4225
|
-
query = this.omit(query, ['until'
|
|
4225
|
+
query = this.omit(query, ['until']);
|
|
4226
4226
|
}
|
|
4227
4227
|
request['state'] = 'filled';
|
|
4228
4228
|
}
|
|
@@ -7124,10 +7124,10 @@ export default class okx extends Exchange {
|
|
|
7124
7124
|
if (since !== undefined) {
|
|
7125
7125
|
request['begin'] = since;
|
|
7126
7126
|
}
|
|
7127
|
-
const until = this.
|
|
7127
|
+
const until = this.safeInteger(params, 'until');
|
|
7128
7128
|
if (until !== undefined) {
|
|
7129
7129
|
request['end'] = until;
|
|
7130
|
-
params = this.omit(params, ['until'
|
|
7130
|
+
params = this.omit(params, ['until']);
|
|
7131
7131
|
}
|
|
7132
7132
|
response = await this.publicGetRubikStatContractsOpenInterestVolume(this.extend(request, params));
|
|
7133
7133
|
}
|
|
@@ -1280,8 +1280,8 @@ export default class poloniexfutures extends Exchange {
|
|
|
1280
1280
|
*/
|
|
1281
1281
|
await this.loadMarkets();
|
|
1282
1282
|
const stop = this.safeValue2(params, 'stop', 'trigger');
|
|
1283
|
-
const until = this.
|
|
1284
|
-
params = this.omit(params, ['
|
|
1283
|
+
const until = this.safeInteger(params, 'until');
|
|
1284
|
+
params = this.omit(params, ['trigger', 'stop', 'until']);
|
|
1285
1285
|
if (status === 'closed') {
|
|
1286
1286
|
status = 'done';
|
|
1287
1287
|
}
|
|
@@ -1381,7 +1381,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
1381
1381
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1382
1382
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1383
1383
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1384
|
-
* @param {int} [params.
|
|
1384
|
+
* @param {int} [params.until] end time in ms
|
|
1385
1385
|
* @param {string} [params.side] buy or sell
|
|
1386
1386
|
* @param {string} [params.type] limit, or market
|
|
1387
1387
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -1399,7 +1399,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
1399
1399
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1400
1400
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1401
1401
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1402
|
-
* @param {int} [params.
|
|
1402
|
+
* @param {int} [params.until] end time in ms
|
|
1403
1403
|
* @param {string} [params.side] buy or sell
|
|
1404
1404
|
* @param {string} [params.type] limit, or market
|
|
1405
1405
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|