ccxt 4.2.75 → 4.2.76
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 +5 -5
- package/build.sh +1 -1
- package/dist/ccxt.browser.js +39 -20
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/binance.js +2 -0
- package/dist/cjs/src/bingx.js +12 -14
- package/dist/cjs/src/bybit.js +2 -1
- package/dist/cjs/src/coinbase.js +18 -2
- package/dist/cjs/src/coinbaseinternational.js +1 -1
- package/dist/cjs/src/gate.js +1 -0
- package/dist/cjs/src/htx.js +1 -0
- package/dist/cjs/src/pro/coinbaseinternational.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/binance.d.ts +1 -0
- package/js/src/abstract/binancecoinm.d.ts +1 -0
- package/js/src/abstract/binanceus.d.ts +1 -0
- package/js/src/abstract/binanceusdm.d.ts +1 -0
- package/js/src/abstract/bingx.d.ts +2 -0
- package/js/src/binance.js +2 -0
- package/js/src/bingx.js +12 -14
- package/js/src/bybit.js +2 -1
- package/js/src/coinbase.js +18 -2
- package/js/src/coinbaseinternational.js +1 -1
- package/js/src/gate.js +1 -0
- package/js/src/htx.js +1 -0
- package/js/src/pro/coinbaseinternational.js +1 -1
- package/package.json +1 -1
package/dist/cjs/ccxt.js
CHANGED
|
@@ -181,7 +181,7 @@ var woo$1 = require('./src/pro/woo.js');
|
|
|
181
181
|
|
|
182
182
|
//-----------------------------------------------------------------------------
|
|
183
183
|
// this is updated by vss.js when building
|
|
184
|
-
const version = '4.2.
|
|
184
|
+
const version = '4.2.76';
|
|
185
185
|
Exchange["default"].ccxtVersion = version;
|
|
186
186
|
const exchanges = {
|
|
187
187
|
'ace': ace,
|
package/dist/cjs/src/binance.js
CHANGED
|
@@ -808,6 +808,7 @@ class binance extends binance$1 {
|
|
|
808
808
|
'userTrades': 5,
|
|
809
809
|
'income': 30,
|
|
810
810
|
'commissionRate': 20,
|
|
811
|
+
'rateLimit/order': 1,
|
|
811
812
|
'apiTradingStatus': 1,
|
|
812
813
|
'multiAssetsMargin': 30,
|
|
813
814
|
// broker endpoints
|
|
@@ -11664,6 +11665,7 @@ class binance extends binance$1 {
|
|
|
11664
11665
|
* @param {int} [limit] default 30, max 500
|
|
11665
11666
|
* @param {object} [params] exchange specific parameters
|
|
11666
11667
|
* @param {int} [params.until] the time(ms) of the latest record to retrieve as a unix timestamp
|
|
11668
|
+
* @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)
|
|
11667
11669
|
* @returns {object} an array of [open interest structure]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
11668
11670
|
*/
|
|
11669
11671
|
if (timeframe === '1m') {
|
package/dist/cjs/src/bingx.js
CHANGED
|
@@ -124,6 +124,7 @@ class bingx extends bingx$1 {
|
|
|
124
124
|
'v1': {
|
|
125
125
|
'public': {
|
|
126
126
|
'get': {
|
|
127
|
+
'server/time': 3,
|
|
127
128
|
'common/symbols': 3,
|
|
128
129
|
'market/trades': 3,
|
|
129
130
|
'market/depth': 3,
|
|
@@ -147,6 +148,7 @@ class bingx extends bingx$1 {
|
|
|
147
148
|
'trade/order/cancelReplace': 3,
|
|
148
149
|
'trade/cancelOrders': 3,
|
|
149
150
|
'trade/cancelOpenOrders': 3,
|
|
151
|
+
'trade/cancelAllAfter': 1,
|
|
150
152
|
},
|
|
151
153
|
},
|
|
152
154
|
},
|
|
@@ -1809,15 +1811,18 @@ class bingx extends bingx$1 {
|
|
|
1809
1811
|
request[exchangeClientOrderId] = clientOrderId;
|
|
1810
1812
|
}
|
|
1811
1813
|
const timeInForce = this.safeStringUpper(params, 'timeInForce');
|
|
1812
|
-
|
|
1814
|
+
[postOnly, params] = this.handlePostOnly(isMarketOrder, timeInForce === 'PostOnly', params);
|
|
1815
|
+
if (postOnly || (timeInForce === 'PostOnly')) {
|
|
1816
|
+
request['timeInForce'] = 'PostOnly';
|
|
1817
|
+
}
|
|
1818
|
+
else if (timeInForce === 'IOC') {
|
|
1813
1819
|
request['timeInForce'] = 'IOC';
|
|
1814
1820
|
}
|
|
1821
|
+
else if (timeInForce === 'GTC') {
|
|
1822
|
+
request['timeInForce'] = 'GTC';
|
|
1823
|
+
}
|
|
1815
1824
|
const triggerPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
|
|
1816
1825
|
if (isSpot) {
|
|
1817
|
-
[postOnly, params] = this.handlePostOnly(isMarketOrder, timeInForce === 'POC', params);
|
|
1818
|
-
if (postOnly || (timeInForce === 'POC')) {
|
|
1819
|
-
request['timeInForce'] = 'POC';
|
|
1820
|
-
}
|
|
1821
1826
|
const cost = this.safeNumber2(params, 'cost', 'quoteOrderQty');
|
|
1822
1827
|
params = this.omit(params, 'cost');
|
|
1823
1828
|
if (cost !== undefined) {
|
|
@@ -1850,14 +1855,7 @@ class bingx extends bingx$1 {
|
|
|
1850
1855
|
}
|
|
1851
1856
|
}
|
|
1852
1857
|
else {
|
|
1853
|
-
|
|
1854
|
-
if (postOnly || (timeInForce === 'PostOnly')) {
|
|
1855
|
-
request['timeInForce'] = 'PostOnly';
|
|
1856
|
-
}
|
|
1857
|
-
else if (timeInForce === 'GTC') {
|
|
1858
|
-
request['timeInForce'] = 'GTC';
|
|
1859
|
-
}
|
|
1860
|
-
else if (timeInForce === 'FOK') {
|
|
1858
|
+
if (timeInForce === 'FOK') {
|
|
1861
1859
|
request['timeInForce'] = 'FOK';
|
|
1862
1860
|
}
|
|
1863
1861
|
const stopLossPrice = this.safeString(params, 'stopLossPrice');
|
|
@@ -1985,7 +1983,7 @@ class bingx extends bingx$1 {
|
|
|
1985
1983
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1986
1984
|
* @param {string} [params.clientOrderId] a unique id for the order
|
|
1987
1985
|
* @param {bool} [params.postOnly] true to place a post only order
|
|
1988
|
-
* @param {string} [params.timeInForce] spot supports 'PO' and 'IOC', swap supports 'PO', 'GTC', 'IOC' and 'FOK'
|
|
1986
|
+
* @param {string} [params.timeInForce] spot supports 'PO', 'GTC' and 'IOC', swap supports 'PO', 'GTC', 'IOC' and 'FOK'
|
|
1989
1987
|
* @param {bool} [params.reduceOnly] *swap only* true or false whether the order is reduce only
|
|
1990
1988
|
* @param {float} [params.triggerPrice] *swap only* triggerPrice at which the attached take profit / stop loss order will be triggered
|
|
1991
1989
|
* @param {float} [params.stopLossPrice] *swap only* stop loss trigger price
|
package/dist/cjs/src/bybit.js
CHANGED
|
@@ -2650,7 +2650,7 @@ class bybit extends bybit$1 {
|
|
|
2650
2650
|
//
|
|
2651
2651
|
const id = this.safeStringN(trade, ['execId', 'id', 'tradeId']);
|
|
2652
2652
|
const marketId = this.safeString(trade, 'symbol');
|
|
2653
|
-
let marketType = 'contract';
|
|
2653
|
+
let marketType = ('createType' in trade) ? 'contract' : 'spot';
|
|
2654
2654
|
if (market !== undefined) {
|
|
2655
2655
|
marketType = market['type'];
|
|
2656
2656
|
}
|
|
@@ -6789,6 +6789,7 @@ class bybit extends bybit$1 {
|
|
|
6789
6789
|
* @param {int} [since] Not used by Bybit
|
|
6790
6790
|
* @param {int} [limit] The number of open interest structures to return. Max 200, default 50
|
|
6791
6791
|
* @param {object} [params] Exchange specific parameters
|
|
6792
|
+
* @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)
|
|
6792
6793
|
* @returns An array of open interest structures
|
|
6793
6794
|
*/
|
|
6794
6795
|
if (timeframe === '1m') {
|
package/dist/cjs/src/coinbase.js
CHANGED
|
@@ -1323,7 +1323,7 @@ class coinbase extends coinbase$1 {
|
|
|
1323
1323
|
* @returns {object} an associative dictionary of currencies
|
|
1324
1324
|
*/
|
|
1325
1325
|
const response = await this.fetchCurrenciesFromCache(params);
|
|
1326
|
-
const currencies = this.
|
|
1326
|
+
const currencies = this.safeList(response, 'currencies', []);
|
|
1327
1327
|
//
|
|
1328
1328
|
// fiat
|
|
1329
1329
|
//
|
|
@@ -1875,9 +1875,15 @@ class coinbase extends coinbase$1 {
|
|
|
1875
1875
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1876
1876
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
1877
1877
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1878
|
+
* @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)
|
|
1878
1879
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
1879
1880
|
*/
|
|
1880
1881
|
await this.loadMarkets();
|
|
1882
|
+
let paginate = false;
|
|
1883
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchLedger', 'paginate');
|
|
1884
|
+
if (paginate) {
|
|
1885
|
+
return await this.fetchPaginatedCallCursor('fetchLedger', code, since, limit, params, 'next_starting_after', 'starting_after', undefined, 100);
|
|
1886
|
+
}
|
|
1881
1887
|
let currency = undefined;
|
|
1882
1888
|
if (code !== undefined) {
|
|
1883
1889
|
currency = this.currency(code);
|
|
@@ -1888,7 +1894,17 @@ class coinbase extends coinbase$1 {
|
|
|
1888
1894
|
// the value for the next page can be obtained from the result of the previous call in the 'pagination' field
|
|
1889
1895
|
// eg: instance.last_json_response.pagination.next_starting_after
|
|
1890
1896
|
const response = await this.v2PrivateGetAccountsAccountIdTransactions(this.extend(request, params));
|
|
1891
|
-
|
|
1897
|
+
const ledger = this.parseLedger(response['data'], currency, since, limit);
|
|
1898
|
+
const length = ledger.length;
|
|
1899
|
+
const lastIndex = length - 1;
|
|
1900
|
+
const last = this.safeDict(ledger, lastIndex);
|
|
1901
|
+
const pagination = this.safeDict(response, 'pagination', {});
|
|
1902
|
+
const cursor = this.safeString(pagination, 'next_starting_after');
|
|
1903
|
+
if ((cursor !== undefined) && (cursor !== '')) {
|
|
1904
|
+
last['next_starting_after'] = cursor;
|
|
1905
|
+
ledger[lastIndex] = last;
|
|
1906
|
+
}
|
|
1907
|
+
return ledger;
|
|
1892
1908
|
}
|
|
1893
1909
|
parseLedgerEntryStatus(status) {
|
|
1894
1910
|
const types = {
|
|
@@ -16,7 +16,7 @@ class coinbaseinternational extends coinbaseinternational$1 {
|
|
|
16
16
|
describe() {
|
|
17
17
|
return this.deepExtend(super.describe(), {
|
|
18
18
|
'id': 'coinbaseinternational',
|
|
19
|
-
'name': '
|
|
19
|
+
'name': 'Coinbase International',
|
|
20
20
|
'countries': ['US'],
|
|
21
21
|
'certified': true,
|
|
22
22
|
'pro': true,
|
package/dist/cjs/src/gate.js
CHANGED
|
@@ -6155,6 +6155,7 @@ class gate extends gate$1 {
|
|
|
6155
6155
|
* @param {int} [since] the time(ms) of the earliest record to retrieve as a unix timestamp
|
|
6156
6156
|
* @param {int} [limit] default 30
|
|
6157
6157
|
* @param {object} [params] exchange specific parameters
|
|
6158
|
+
* @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)
|
|
6158
6159
|
* @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
6159
6160
|
*/
|
|
6160
6161
|
await this.loadMarkets();
|
package/dist/cjs/src/htx.js
CHANGED
|
@@ -6792,6 +6792,7 @@ class htx extends htx$1 {
|
|
|
6792
6792
|
* @param {int} [since] not used by huobi, but filtered internally by ccxt
|
|
6793
6793
|
* @param {int} [limit] not used by huobi, but filtered internally by ccxt
|
|
6794
6794
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6795
|
+
* @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)
|
|
6795
6796
|
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
6796
6797
|
*/
|
|
6797
6798
|
if (symbol === undefined) {
|
package/js/ccxt.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
|
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import type { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode, Greeks, Leverage, Leverages } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.2.
|
|
7
|
+
declare const version = "4.2.75";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.2.
|
|
41
|
+
const version = '4.2.76';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -496,6 +496,7 @@ interface Exchange {
|
|
|
496
496
|
fapiPrivateGetUserTrades(params?: {}): Promise<implicitReturnType>;
|
|
497
497
|
fapiPrivateGetIncome(params?: {}): Promise<implicitReturnType>;
|
|
498
498
|
fapiPrivateGetCommissionRate(params?: {}): Promise<implicitReturnType>;
|
|
499
|
+
fapiPrivateGetRateLimitOrder(params?: {}): Promise<implicitReturnType>;
|
|
499
500
|
fapiPrivateGetApiTradingStatus(params?: {}): Promise<implicitReturnType>;
|
|
500
501
|
fapiPrivateGetMultiAssetsMargin(params?: {}): Promise<implicitReturnType>;
|
|
501
502
|
fapiPrivateGetApiReferralIfNewUser(params?: {}): Promise<implicitReturnType>;
|
|
@@ -496,6 +496,7 @@ interface binance {
|
|
|
496
496
|
fapiPrivateGetUserTrades(params?: {}): Promise<implicitReturnType>;
|
|
497
497
|
fapiPrivateGetIncome(params?: {}): Promise<implicitReturnType>;
|
|
498
498
|
fapiPrivateGetCommissionRate(params?: {}): Promise<implicitReturnType>;
|
|
499
|
+
fapiPrivateGetRateLimitOrder(params?: {}): Promise<implicitReturnType>;
|
|
499
500
|
fapiPrivateGetApiTradingStatus(params?: {}): Promise<implicitReturnType>;
|
|
500
501
|
fapiPrivateGetMultiAssetsMargin(params?: {}): Promise<implicitReturnType>;
|
|
501
502
|
fapiPrivateGetApiReferralIfNewUser(params?: {}): Promise<implicitReturnType>;
|
|
@@ -548,6 +548,7 @@ interface binance {
|
|
|
548
548
|
fapiPrivateGetUserTrades(params?: {}): Promise<implicitReturnType>;
|
|
549
549
|
fapiPrivateGetIncome(params?: {}): Promise<implicitReturnType>;
|
|
550
550
|
fapiPrivateGetCommissionRate(params?: {}): Promise<implicitReturnType>;
|
|
551
|
+
fapiPrivateGetRateLimitOrder(params?: {}): Promise<implicitReturnType>;
|
|
551
552
|
fapiPrivateGetApiTradingStatus(params?: {}): Promise<implicitReturnType>;
|
|
552
553
|
fapiPrivateGetMultiAssetsMargin(params?: {}): Promise<implicitReturnType>;
|
|
553
554
|
fapiPrivateGetApiReferralIfNewUser(params?: {}): Promise<implicitReturnType>;
|
|
@@ -496,6 +496,7 @@ interface binance {
|
|
|
496
496
|
fapiPrivateGetUserTrades(params?: {}): Promise<implicitReturnType>;
|
|
497
497
|
fapiPrivateGetIncome(params?: {}): Promise<implicitReturnType>;
|
|
498
498
|
fapiPrivateGetCommissionRate(params?: {}): Promise<implicitReturnType>;
|
|
499
|
+
fapiPrivateGetRateLimitOrder(params?: {}): Promise<implicitReturnType>;
|
|
499
500
|
fapiPrivateGetApiTradingStatus(params?: {}): Promise<implicitReturnType>;
|
|
500
501
|
fapiPrivateGetMultiAssetsMargin(params?: {}): Promise<implicitReturnType>;
|
|
501
502
|
fapiPrivateGetApiReferralIfNewUser(params?: {}): Promise<implicitReturnType>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { implicitReturnType } from '../base/types.js';
|
|
2
2
|
import { Exchange as _Exchange } from '../base/Exchange.js';
|
|
3
3
|
interface Exchange {
|
|
4
|
+
spotV1PublicGetServerTime(params?: {}): Promise<implicitReturnType>;
|
|
4
5
|
spotV1PublicGetCommonSymbols(params?: {}): Promise<implicitReturnType>;
|
|
5
6
|
spotV1PublicGetMarketTrades(params?: {}): Promise<implicitReturnType>;
|
|
6
7
|
spotV1PublicGetMarketDepth(params?: {}): Promise<implicitReturnType>;
|
|
@@ -18,6 +19,7 @@ interface Exchange {
|
|
|
18
19
|
spotV1PrivatePostTradeOrderCancelReplace(params?: {}): Promise<implicitReturnType>;
|
|
19
20
|
spotV1PrivatePostTradeCancelOrders(params?: {}): Promise<implicitReturnType>;
|
|
20
21
|
spotV1PrivatePostTradeCancelOpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
22
|
+
spotV1PrivatePostTradeCancelAllAfter(params?: {}): Promise<implicitReturnType>;
|
|
21
23
|
spotV3PrivateGetGetAssetTransfer(params?: {}): Promise<implicitReturnType>;
|
|
22
24
|
spotV3PrivateGetAssetTransfer(params?: {}): Promise<implicitReturnType>;
|
|
23
25
|
spotV3PrivateGetCapitalDepositHisrec(params?: {}): Promise<implicitReturnType>;
|
package/js/src/binance.js
CHANGED
|
@@ -811,6 +811,7 @@ export default class binance extends Exchange {
|
|
|
811
811
|
'userTrades': 5,
|
|
812
812
|
'income': 30,
|
|
813
813
|
'commissionRate': 20,
|
|
814
|
+
'rateLimit/order': 1,
|
|
814
815
|
'apiTradingStatus': 1,
|
|
815
816
|
'multiAssetsMargin': 30,
|
|
816
817
|
// broker endpoints
|
|
@@ -11667,6 +11668,7 @@ export default class binance extends Exchange {
|
|
|
11667
11668
|
* @param {int} [limit] default 30, max 500
|
|
11668
11669
|
* @param {object} [params] exchange specific parameters
|
|
11669
11670
|
* @param {int} [params.until] the time(ms) of the latest record to retrieve as a unix timestamp
|
|
11671
|
+
* @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)
|
|
11670
11672
|
* @returns {object} an array of [open interest structure]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
11671
11673
|
*/
|
|
11672
11674
|
if (timeframe === '1m') {
|
package/js/src/bingx.js
CHANGED
|
@@ -127,6 +127,7 @@ export default class bingx extends Exchange {
|
|
|
127
127
|
'v1': {
|
|
128
128
|
'public': {
|
|
129
129
|
'get': {
|
|
130
|
+
'server/time': 3,
|
|
130
131
|
'common/symbols': 3,
|
|
131
132
|
'market/trades': 3,
|
|
132
133
|
'market/depth': 3,
|
|
@@ -150,6 +151,7 @@ export default class bingx extends Exchange {
|
|
|
150
151
|
'trade/order/cancelReplace': 3,
|
|
151
152
|
'trade/cancelOrders': 3,
|
|
152
153
|
'trade/cancelOpenOrders': 3,
|
|
154
|
+
'trade/cancelAllAfter': 1,
|
|
153
155
|
},
|
|
154
156
|
},
|
|
155
157
|
},
|
|
@@ -1812,15 +1814,18 @@ export default class bingx extends Exchange {
|
|
|
1812
1814
|
request[exchangeClientOrderId] = clientOrderId;
|
|
1813
1815
|
}
|
|
1814
1816
|
const timeInForce = this.safeStringUpper(params, 'timeInForce');
|
|
1815
|
-
|
|
1817
|
+
[postOnly, params] = this.handlePostOnly(isMarketOrder, timeInForce === 'PostOnly', params);
|
|
1818
|
+
if (postOnly || (timeInForce === 'PostOnly')) {
|
|
1819
|
+
request['timeInForce'] = 'PostOnly';
|
|
1820
|
+
}
|
|
1821
|
+
else if (timeInForce === 'IOC') {
|
|
1816
1822
|
request['timeInForce'] = 'IOC';
|
|
1817
1823
|
}
|
|
1824
|
+
else if (timeInForce === 'GTC') {
|
|
1825
|
+
request['timeInForce'] = 'GTC';
|
|
1826
|
+
}
|
|
1818
1827
|
const triggerPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
|
|
1819
1828
|
if (isSpot) {
|
|
1820
|
-
[postOnly, params] = this.handlePostOnly(isMarketOrder, timeInForce === 'POC', params);
|
|
1821
|
-
if (postOnly || (timeInForce === 'POC')) {
|
|
1822
|
-
request['timeInForce'] = 'POC';
|
|
1823
|
-
}
|
|
1824
1829
|
const cost = this.safeNumber2(params, 'cost', 'quoteOrderQty');
|
|
1825
1830
|
params = this.omit(params, 'cost');
|
|
1826
1831
|
if (cost !== undefined) {
|
|
@@ -1853,14 +1858,7 @@ export default class bingx extends Exchange {
|
|
|
1853
1858
|
}
|
|
1854
1859
|
}
|
|
1855
1860
|
else {
|
|
1856
|
-
|
|
1857
|
-
if (postOnly || (timeInForce === 'PostOnly')) {
|
|
1858
|
-
request['timeInForce'] = 'PostOnly';
|
|
1859
|
-
}
|
|
1860
|
-
else if (timeInForce === 'GTC') {
|
|
1861
|
-
request['timeInForce'] = 'GTC';
|
|
1862
|
-
}
|
|
1863
|
-
else if (timeInForce === 'FOK') {
|
|
1861
|
+
if (timeInForce === 'FOK') {
|
|
1864
1862
|
request['timeInForce'] = 'FOK';
|
|
1865
1863
|
}
|
|
1866
1864
|
const stopLossPrice = this.safeString(params, 'stopLossPrice');
|
|
@@ -1988,7 +1986,7 @@ export default class bingx extends Exchange {
|
|
|
1988
1986
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1989
1987
|
* @param {string} [params.clientOrderId] a unique id for the order
|
|
1990
1988
|
* @param {bool} [params.postOnly] true to place a post only order
|
|
1991
|
-
* @param {string} [params.timeInForce] spot supports 'PO' and 'IOC', swap supports 'PO', 'GTC', 'IOC' and 'FOK'
|
|
1989
|
+
* @param {string} [params.timeInForce] spot supports 'PO', 'GTC' and 'IOC', swap supports 'PO', 'GTC', 'IOC' and 'FOK'
|
|
1992
1990
|
* @param {bool} [params.reduceOnly] *swap only* true or false whether the order is reduce only
|
|
1993
1991
|
* @param {float} [params.triggerPrice] *swap only* triggerPrice at which the attached take profit / stop loss order will be triggered
|
|
1994
1992
|
* @param {float} [params.stopLossPrice] *swap only* stop loss trigger price
|
package/js/src/bybit.js
CHANGED
|
@@ -2653,7 +2653,7 @@ export default class bybit extends Exchange {
|
|
|
2653
2653
|
//
|
|
2654
2654
|
const id = this.safeStringN(trade, ['execId', 'id', 'tradeId']);
|
|
2655
2655
|
const marketId = this.safeString(trade, 'symbol');
|
|
2656
|
-
let marketType = 'contract';
|
|
2656
|
+
let marketType = ('createType' in trade) ? 'contract' : 'spot';
|
|
2657
2657
|
if (market !== undefined) {
|
|
2658
2658
|
marketType = market['type'];
|
|
2659
2659
|
}
|
|
@@ -6792,6 +6792,7 @@ export default class bybit extends Exchange {
|
|
|
6792
6792
|
* @param {int} [since] Not used by Bybit
|
|
6793
6793
|
* @param {int} [limit] The number of open interest structures to return. Max 200, default 50
|
|
6794
6794
|
* @param {object} [params] Exchange specific parameters
|
|
6795
|
+
* @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)
|
|
6795
6796
|
* @returns An array of open interest structures
|
|
6796
6797
|
*/
|
|
6797
6798
|
if (timeframe === '1m') {
|
package/js/src/coinbase.js
CHANGED
|
@@ -1326,7 +1326,7 @@ export default class coinbase extends Exchange {
|
|
|
1326
1326
|
* @returns {object} an associative dictionary of currencies
|
|
1327
1327
|
*/
|
|
1328
1328
|
const response = await this.fetchCurrenciesFromCache(params);
|
|
1329
|
-
const currencies = this.
|
|
1329
|
+
const currencies = this.safeList(response, 'currencies', []);
|
|
1330
1330
|
//
|
|
1331
1331
|
// fiat
|
|
1332
1332
|
//
|
|
@@ -1878,9 +1878,15 @@ export default class coinbase extends Exchange {
|
|
|
1878
1878
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1879
1879
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
1880
1880
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1881
|
+
* @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)
|
|
1881
1882
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
1882
1883
|
*/
|
|
1883
1884
|
await this.loadMarkets();
|
|
1885
|
+
let paginate = false;
|
|
1886
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchLedger', 'paginate');
|
|
1887
|
+
if (paginate) {
|
|
1888
|
+
return await this.fetchPaginatedCallCursor('fetchLedger', code, since, limit, params, 'next_starting_after', 'starting_after', undefined, 100);
|
|
1889
|
+
}
|
|
1884
1890
|
let currency = undefined;
|
|
1885
1891
|
if (code !== undefined) {
|
|
1886
1892
|
currency = this.currency(code);
|
|
@@ -1891,7 +1897,17 @@ export default class coinbase extends Exchange {
|
|
|
1891
1897
|
// the value for the next page can be obtained from the result of the previous call in the 'pagination' field
|
|
1892
1898
|
// eg: instance.last_json_response.pagination.next_starting_after
|
|
1893
1899
|
const response = await this.v2PrivateGetAccountsAccountIdTransactions(this.extend(request, params));
|
|
1894
|
-
|
|
1900
|
+
const ledger = this.parseLedger(response['data'], currency, since, limit);
|
|
1901
|
+
const length = ledger.length;
|
|
1902
|
+
const lastIndex = length - 1;
|
|
1903
|
+
const last = this.safeDict(ledger, lastIndex);
|
|
1904
|
+
const pagination = this.safeDict(response, 'pagination', {});
|
|
1905
|
+
const cursor = this.safeString(pagination, 'next_starting_after');
|
|
1906
|
+
if ((cursor !== undefined) && (cursor !== '')) {
|
|
1907
|
+
last['next_starting_after'] = cursor;
|
|
1908
|
+
ledger[lastIndex] = last;
|
|
1909
|
+
}
|
|
1910
|
+
return ledger;
|
|
1895
1911
|
}
|
|
1896
1912
|
parseLedgerEntryStatus(status) {
|
|
1897
1913
|
const types = {
|
|
@@ -19,7 +19,7 @@ export default class coinbaseinternational extends Exchange {
|
|
|
19
19
|
describe() {
|
|
20
20
|
return this.deepExtend(super.describe(), {
|
|
21
21
|
'id': 'coinbaseinternational',
|
|
22
|
-
'name': '
|
|
22
|
+
'name': 'Coinbase International',
|
|
23
23
|
'countries': ['US'],
|
|
24
24
|
'certified': true,
|
|
25
25
|
'pro': true,
|
package/js/src/gate.js
CHANGED
|
@@ -6158,6 +6158,7 @@ export default class gate extends Exchange {
|
|
|
6158
6158
|
* @param {int} [since] the time(ms) of the earliest record to retrieve as a unix timestamp
|
|
6159
6159
|
* @param {int} [limit] default 30
|
|
6160
6160
|
* @param {object} [params] exchange specific parameters
|
|
6161
|
+
* @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)
|
|
6161
6162
|
* @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
6162
6163
|
*/
|
|
6163
6164
|
await this.loadMarkets();
|
package/js/src/htx.js
CHANGED
|
@@ -6795,6 +6795,7 @@ export default class htx extends Exchange {
|
|
|
6795
6795
|
* @param {int} [since] not used by huobi, but filtered internally by ccxt
|
|
6796
6796
|
* @param {int} [limit] not used by huobi, but filtered internally by ccxt
|
|
6797
6797
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6798
|
+
* @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)
|
|
6798
6799
|
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
6799
6800
|
*/
|
|
6800
6801
|
if (symbol === undefined) {
|
package/package.json
CHANGED