ccxt 4.3.11 → 4.3.12
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 +81 -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/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 +81 -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/bybit.js
CHANGED
|
@@ -2510,9 +2510,9 @@ export default class bybit extends Exchange {
|
|
|
2510
2510
|
if (since !== undefined) {
|
|
2511
2511
|
request['startTime'] = since;
|
|
2512
2512
|
}
|
|
2513
|
-
const until = this.
|
|
2513
|
+
const until = this.safeInteger(params, 'until'); // unified in milliseconds
|
|
2514
2514
|
const endTime = this.safeInteger(params, 'endTime', until); // exchange-specific in milliseconds
|
|
2515
|
-
params = this.omit(params, ['endTime', '
|
|
2515
|
+
params = this.omit(params, ['endTime', 'until']);
|
|
2516
2516
|
if (endTime !== undefined) {
|
|
2517
2517
|
request['endTime'] = endTime;
|
|
2518
2518
|
}
|
|
@@ -4070,44 +4070,8 @@ export default class bybit extends Exchange {
|
|
|
4070
4070
|
const result = this.safeDict(response, 'result', {});
|
|
4071
4071
|
return this.parseOrder(result, market);
|
|
4072
4072
|
}
|
|
4073
|
-
|
|
4074
|
-
/**
|
|
4075
|
-
* @method
|
|
4076
|
-
* @name bybit#editOrder
|
|
4077
|
-
* @description edit a trade order
|
|
4078
|
-
* @see https://bybit-exchange.github.io/docs/v5/order/amend-order
|
|
4079
|
-
* @see https://bybit-exchange.github.io/docs/derivatives/unified/replace-order
|
|
4080
|
-
* @see https://bybit-exchange.github.io/docs/api-explorer/derivatives/trade/contract/replace-order
|
|
4081
|
-
* @param {string} id cancel order id
|
|
4082
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
4083
|
-
* @param {string} type 'market' or 'limit'
|
|
4084
|
-
* @param {string} side 'buy' or 'sell'
|
|
4085
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4086
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
|
|
4087
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4088
|
-
* @param {float} [params.triggerPrice] The price that a trigger order is triggered at
|
|
4089
|
-
* @param {float} [params.stopLossPrice] The price that a stop loss order is triggered at
|
|
4090
|
-
* @param {float} [params.takeProfitPrice] The price that a take profit order is triggered at
|
|
4091
|
-
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice that the attached take profit order will be triggered
|
|
4092
|
-
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
4093
|
-
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice that the attached stop loss order will be triggered
|
|
4094
|
-
* @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
|
|
4095
|
-
* @param {string} [params.triggerBy] 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for triggerPrice
|
|
4096
|
-
* @param {string} [params.slTriggerBy] 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for stopLoss
|
|
4097
|
-
* @param {string} [params.tpTriggerby] 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for takeProfit
|
|
4098
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4099
|
-
*/
|
|
4100
|
-
if (symbol === undefined) {
|
|
4101
|
-
throw new ArgumentsRequired(this.id + ' editOrder() requires a symbol argument');
|
|
4102
|
-
}
|
|
4103
|
-
await this.loadMarkets();
|
|
4073
|
+
editOrderRequest(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
4104
4074
|
const market = this.market(symbol);
|
|
4105
|
-
const [enableUnifiedMargin, enableUnifiedAccount] = await this.isUnifiedEnabled();
|
|
4106
|
-
const isUnifiedAccount = (enableUnifiedMargin || enableUnifiedAccount);
|
|
4107
|
-
const isUsdcSettled = market['settle'] === 'USDC';
|
|
4108
|
-
if (isUsdcSettled && !isUnifiedAccount) {
|
|
4109
|
-
return await this.editUsdcOrder(id, symbol, type, side, amount, price, params);
|
|
4110
|
-
}
|
|
4111
4075
|
const request = {
|
|
4112
4076
|
'symbol': market['id'],
|
|
4113
4077
|
'orderId': id,
|
|
@@ -4181,6 +4145,47 @@ export default class bybit extends Exchange {
|
|
|
4181
4145
|
request['orderLinkId'] = clientOrderId;
|
|
4182
4146
|
}
|
|
4183
4147
|
params = this.omit(params, ['stopPrice', 'stopLossPrice', 'takeProfitPrice', 'triggerPrice', 'clientOrderId', 'stopLoss', 'takeProfit']);
|
|
4148
|
+
return request;
|
|
4149
|
+
}
|
|
4150
|
+
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
4151
|
+
/**
|
|
4152
|
+
* @method
|
|
4153
|
+
* @name bybit#editOrder
|
|
4154
|
+
* @description edit a trade order
|
|
4155
|
+
* @see https://bybit-exchange.github.io/docs/v5/order/amend-order
|
|
4156
|
+
* @see https://bybit-exchange.github.io/docs/derivatives/unified/replace-order
|
|
4157
|
+
* @see https://bybit-exchange.github.io/docs/api-explorer/derivatives/trade/contract/replace-order
|
|
4158
|
+
* @param {string} id cancel order id
|
|
4159
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
4160
|
+
* @param {string} type 'market' or 'limit'
|
|
4161
|
+
* @param {string} side 'buy' or 'sell'
|
|
4162
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4163
|
+
* @param {float} price the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
|
|
4164
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4165
|
+
* @param {float} [params.triggerPrice] The price that a trigger order is triggered at
|
|
4166
|
+
* @param {float} [params.stopLossPrice] The price that a stop loss order is triggered at
|
|
4167
|
+
* @param {float} [params.takeProfitPrice] The price that a take profit order is triggered at
|
|
4168
|
+
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice that the attached take profit order will be triggered
|
|
4169
|
+
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
4170
|
+
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice that the attached stop loss order will be triggered
|
|
4171
|
+
* @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
|
|
4172
|
+
* @param {string} [params.triggerBy] 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for triggerPrice
|
|
4173
|
+
* @param {string} [params.slTriggerBy] 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for stopLoss
|
|
4174
|
+
* @param {string} [params.tpTriggerby] 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for takeProfit
|
|
4175
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4176
|
+
*/
|
|
4177
|
+
await this.loadMarkets();
|
|
4178
|
+
if (symbol === undefined) {
|
|
4179
|
+
throw new ArgumentsRequired(this.id + ' editOrder() requires a symbol argument');
|
|
4180
|
+
}
|
|
4181
|
+
const market = this.market(symbol);
|
|
4182
|
+
const [enableUnifiedMargin, enableUnifiedAccount] = await this.isUnifiedEnabled();
|
|
4183
|
+
const isUnifiedAccount = (enableUnifiedMargin || enableUnifiedAccount);
|
|
4184
|
+
const isUsdcSettled = market['settle'] === 'USDC';
|
|
4185
|
+
if (isUsdcSettled && !isUnifiedAccount) {
|
|
4186
|
+
return await this.editUsdcOrder(id, symbol, type, side, amount, price, params);
|
|
4187
|
+
}
|
|
4188
|
+
const request = this.editOrderRequest(id, symbol, type, side, amount, price, params);
|
|
4184
4189
|
const response = await this.privatePostV5OrderAmend(this.extend(request, params));
|
|
4185
4190
|
//
|
|
4186
4191
|
// {
|
|
@@ -4240,30 +4245,8 @@ export default class bybit extends Exchange {
|
|
|
4240
4245
|
const result = this.safeDict(response, 'result', {});
|
|
4241
4246
|
return this.parseOrder(result, market);
|
|
4242
4247
|
}
|
|
4243
|
-
|
|
4244
|
-
/**
|
|
4245
|
-
* @method
|
|
4246
|
-
* @name bybit#cancelOrder
|
|
4247
|
-
* @description cancels an open order
|
|
4248
|
-
* @see https://bybit-exchange.github.io/docs/v5/order/cancel-order
|
|
4249
|
-
* @param {string} id order id
|
|
4250
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
4251
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4252
|
-
* @param {boolean} [params.stop] *spot only* whether the order is a stop order
|
|
4253
|
-
* @param {string} [params.orderFilter] *spot only* 'Order' or 'StopOrder' or 'tpslOrder'
|
|
4254
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4255
|
-
*/
|
|
4256
|
-
if (symbol === undefined) {
|
|
4257
|
-
throw new ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
4258
|
-
}
|
|
4259
|
-
await this.loadMarkets();
|
|
4248
|
+
cancelOrderRequest(id, symbol = undefined, params = {}) {
|
|
4260
4249
|
const market = this.market(symbol);
|
|
4261
|
-
const [enableUnifiedMargin, enableUnifiedAccount] = await this.isUnifiedEnabled();
|
|
4262
|
-
const isUnifiedAccount = (enableUnifiedMargin || enableUnifiedAccount);
|
|
4263
|
-
const isUsdcSettled = market['settle'] === 'USDC';
|
|
4264
|
-
if (isUsdcSettled && !isUnifiedAccount) {
|
|
4265
|
-
return await this.cancelUsdcOrder(id, symbol, params);
|
|
4266
|
-
}
|
|
4267
4250
|
const request = {
|
|
4268
4251
|
'symbol': market['id'],
|
|
4269
4252
|
// 'orderLinkId': 'string',
|
|
@@ -4273,7 +4256,7 @@ export default class bybit extends Exchange {
|
|
|
4273
4256
|
};
|
|
4274
4257
|
if (market['spot']) {
|
|
4275
4258
|
// only works for spot market
|
|
4276
|
-
const isStop = this.
|
|
4259
|
+
const isStop = this.safeBool2(params, 'stop', 'trigger', false);
|
|
4277
4260
|
params = this.omit(params, ['stop', 'trigger']);
|
|
4278
4261
|
request['orderFilter'] = isStop ? 'StopOrder' : 'Order';
|
|
4279
4262
|
}
|
|
@@ -4292,7 +4275,34 @@ export default class bybit extends Exchange {
|
|
|
4292
4275
|
else if (market['option']) {
|
|
4293
4276
|
request['category'] = 'option';
|
|
4294
4277
|
}
|
|
4295
|
-
|
|
4278
|
+
return this.extend(request, params);
|
|
4279
|
+
}
|
|
4280
|
+
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
4281
|
+
/**
|
|
4282
|
+
* @method
|
|
4283
|
+
* @name bybit#cancelOrder
|
|
4284
|
+
* @description cancels an open order
|
|
4285
|
+
* @see https://bybit-exchange.github.io/docs/v5/order/cancel-order
|
|
4286
|
+
* @param {string} id order id
|
|
4287
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
4288
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4289
|
+
* @param {boolean} [params.stop] *spot only* whether the order is a stop order
|
|
4290
|
+
* @param {string} [params.orderFilter] *spot only* 'Order' or 'StopOrder' or 'tpslOrder'
|
|
4291
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4292
|
+
*/
|
|
4293
|
+
if (symbol === undefined) {
|
|
4294
|
+
throw new ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
4295
|
+
}
|
|
4296
|
+
await this.loadMarkets();
|
|
4297
|
+
const market = this.market(symbol);
|
|
4298
|
+
const [enableUnifiedMargin, enableUnifiedAccount] = await this.isUnifiedEnabled();
|
|
4299
|
+
const isUnifiedAccount = (enableUnifiedMargin || enableUnifiedAccount);
|
|
4300
|
+
const isUsdcSettled = market['settle'] === 'USDC';
|
|
4301
|
+
if (isUsdcSettled && !isUnifiedAccount) {
|
|
4302
|
+
return await this.cancelUsdcOrder(id, symbol, params);
|
|
4303
|
+
}
|
|
4304
|
+
const requestExtended = this.cancelOrderRequest(id, symbol, params);
|
|
4305
|
+
const response = await this.privatePostV5OrderCancel(requestExtended);
|
|
4296
4306
|
//
|
|
4297
4307
|
// {
|
|
4298
4308
|
// "retCode": 0,
|
|
@@ -4818,9 +4828,9 @@ export default class bybit extends Exchange {
|
|
|
4818
4828
|
if (since !== undefined) {
|
|
4819
4829
|
request['startTime'] = since;
|
|
4820
4830
|
}
|
|
4821
|
-
const until = this.
|
|
4831
|
+
const until = this.safeInteger(params, 'until'); // unified in milliseconds
|
|
4822
4832
|
const endTime = this.safeInteger(params, 'endTime', until); // exchange-specific in milliseconds
|
|
4823
|
-
params = this.omit(params, ['endTime', '
|
|
4833
|
+
params = this.omit(params, ['endTime', 'until']);
|
|
4824
4834
|
if (endTime !== undefined) {
|
|
4825
4835
|
request['endTime'] = endTime;
|
|
4826
4836
|
}
|
|
@@ -4993,9 +5003,9 @@ export default class bybit extends Exchange {
|
|
|
4993
5003
|
if (since !== undefined) {
|
|
4994
5004
|
request['startTime'] = since;
|
|
4995
5005
|
}
|
|
4996
|
-
const until = this.
|
|
5006
|
+
const until = this.safeInteger(params, 'until'); // unified in milliseconds
|
|
4997
5007
|
const endTime = this.safeInteger(params, 'endTime', until); // exchange-specific in milliseconds
|
|
4998
|
-
params = this.omit(params, ['endTime', '
|
|
5008
|
+
params = this.omit(params, ['endTime', 'until']);
|
|
4999
5009
|
if (endTime !== undefined) {
|
|
5000
5010
|
request['endTime'] = endTime;
|
|
5001
5011
|
}
|
|
@@ -5787,7 +5797,7 @@ export default class bybit extends Exchange {
|
|
|
5787
5797
|
// 'coin': currency['id'],
|
|
5788
5798
|
// 'currency': currency['id'], // alias
|
|
5789
5799
|
// 'start_date': this.iso8601 (since),
|
|
5790
|
-
// 'end_date': this.iso8601 (
|
|
5800
|
+
// 'end_date': this.iso8601 (until),
|
|
5791
5801
|
// 'wallet_fund_type': 'Deposit', // Withdraw, RealisedPNL, Commission, Refund, Prize, ExchangeOrderWithdraw, ExchangeOrderDeposit
|
|
5792
5802
|
// 'page': 1,
|
|
5793
5803
|
// 'limit': 20, // max 50
|
|
@@ -6842,8 +6852,8 @@ export default class bybit extends Exchange {
|
|
|
6842
6852
|
if (since !== undefined) {
|
|
6843
6853
|
request['startTime'] = since;
|
|
6844
6854
|
}
|
|
6845
|
-
const until = this.
|
|
6846
|
-
params = this.omit(params, ['
|
|
6855
|
+
const until = this.safeInteger(params, 'until'); // unified in milliseconds
|
|
6856
|
+
params = this.omit(params, ['until']);
|
|
6847
6857
|
if (until !== undefined) {
|
|
6848
6858
|
request['endTime'] = until;
|
|
6849
6859
|
}
|
package/js/src/coinbase.js
CHANGED
|
@@ -3277,9 +3277,9 @@ export default class coinbase extends Exchange {
|
|
|
3277
3277
|
if (since !== undefined) {
|
|
3278
3278
|
request['start_date'] = this.iso8601(since);
|
|
3279
3279
|
}
|
|
3280
|
-
const until = this.safeIntegerN(params, ['until'
|
|
3280
|
+
const until = this.safeIntegerN(params, ['until']);
|
|
3281
3281
|
if (until !== undefined) {
|
|
3282
|
-
params = this.omit(params, ['until'
|
|
3282
|
+
params = this.omit(params, ['until']);
|
|
3283
3283
|
request['end_date'] = this.iso8601(until);
|
|
3284
3284
|
}
|
|
3285
3285
|
const response = await this.v3PrivateGetBrokerageOrdersHistoricalBatch(this.extend(request, params));
|
|
@@ -3353,9 +3353,9 @@ export default class coinbase extends Exchange {
|
|
|
3353
3353
|
if (since !== undefined) {
|
|
3354
3354
|
request['start_date'] = this.iso8601(since);
|
|
3355
3355
|
}
|
|
3356
|
-
const until = this.safeIntegerN(params, ['until'
|
|
3356
|
+
const until = this.safeIntegerN(params, ['until']);
|
|
3357
3357
|
if (until !== undefined) {
|
|
3358
|
-
params = this.omit(params, ['until'
|
|
3358
|
+
params = this.omit(params, ['until']);
|
|
3359
3359
|
request['end_date'] = this.iso8601(until);
|
|
3360
3360
|
}
|
|
3361
3361
|
const response = await this.v3PrivateGetBrokerageOrdersHistoricalBatch(this.extend(request, params));
|
|
@@ -3496,8 +3496,8 @@ export default class coinbase extends Exchange {
|
|
|
3496
3496
|
'product_id': market['id'],
|
|
3497
3497
|
'granularity': this.safeString(this.timeframes, timeframe, timeframe),
|
|
3498
3498
|
};
|
|
3499
|
-
const until = this.safeIntegerN(params, ['until', '
|
|
3500
|
-
params = this.omit(params, ['until'
|
|
3499
|
+
const until = this.safeIntegerN(params, ['until', 'end']);
|
|
3500
|
+
params = this.omit(params, ['until']);
|
|
3501
3501
|
const duration = this.parseTimeframe(timeframe);
|
|
3502
3502
|
const requestedDuration = limit * duration;
|
|
3503
3503
|
let sinceString = undefined;
|
|
@@ -3641,9 +3641,9 @@ export default class coinbase extends Exchange {
|
|
|
3641
3641
|
if (since !== undefined) {
|
|
3642
3642
|
request['start_sequence_timestamp'] = this.iso8601(since);
|
|
3643
3643
|
}
|
|
3644
|
-
const until = this.safeIntegerN(params, ['until'
|
|
3644
|
+
const until = this.safeIntegerN(params, ['until']);
|
|
3645
3645
|
if (until !== undefined) {
|
|
3646
|
-
params = this.omit(params, ['until'
|
|
3646
|
+
params = this.omit(params, ['until']);
|
|
3647
3647
|
request['end_sequence_timestamp'] = this.iso8601(until);
|
|
3648
3648
|
}
|
|
3649
3649
|
const response = await this.v3PrivateGetBrokerageOrdersHistoricalFills(this.extend(request, params));
|
|
@@ -1836,9 +1836,9 @@ export default class coinbaseinternational extends Exchange {
|
|
|
1836
1836
|
if (since !== undefined) {
|
|
1837
1837
|
request['time_from'] = this.iso8601(since);
|
|
1838
1838
|
}
|
|
1839
|
-
const until = this.safeStringN(params, ['until'
|
|
1839
|
+
const until = this.safeStringN(params, ['until']);
|
|
1840
1840
|
if (until !== undefined) {
|
|
1841
|
-
params = this.omit(params, ['until'
|
|
1841
|
+
params = this.omit(params, ['until']);
|
|
1842
1842
|
request['ref_datetime'] = this.iso8601(until);
|
|
1843
1843
|
}
|
|
1844
1844
|
const response = await this.v1PrivateGetPortfoliosFills(this.extend(request, params));
|
package/js/src/coinex.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/coinex.js';
|
|
2
|
-
import type { Balances, Currency, FundingHistory, FundingRateHistory, Int, Market, OHLCV, Order, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, OrderRequest, TransferEntry, Leverage, Leverages, Num, MarginModification, TradingFeeInterface, Currencies, TradingFees, Position } from './base/types.js';
|
|
2
|
+
import type { Balances, Currency, FundingHistory, FundingRateHistory, Int, Market, OHLCV, Order, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, OrderRequest, TransferEntry, Leverage, Leverages, Num, MarginModification, TradingFeeInterface, Currencies, TradingFees, Position, IsolatedBorrowRates, IsolatedBorrowRate } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class coinex
|
|
5
5
|
* @augments Exchange
|
|
@@ -136,29 +136,9 @@ export default class coinex extends Exchange {
|
|
|
136
136
|
fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
137
137
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
138
138
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
139
|
-
parseIsolatedBorrowRate(info: any, market?: Market):
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
baseRate: number;
|
|
143
|
-
quote: string;
|
|
144
|
-
quoteRate: number;
|
|
145
|
-
period: number;
|
|
146
|
-
timestamp: any;
|
|
147
|
-
datetime: any;
|
|
148
|
-
info: any;
|
|
149
|
-
};
|
|
150
|
-
fetchIsolatedBorrowRate(symbol: string, params?: {}): Promise<{
|
|
151
|
-
symbol: string;
|
|
152
|
-
base: string;
|
|
153
|
-
baseRate: number;
|
|
154
|
-
quote: string;
|
|
155
|
-
quoteRate: number;
|
|
156
|
-
period: number;
|
|
157
|
-
timestamp: any;
|
|
158
|
-
datetime: any;
|
|
159
|
-
info: any;
|
|
160
|
-
}>;
|
|
161
|
-
fetchIsolatedBorrowRates(params?: {}): Promise<any[]>;
|
|
139
|
+
parseIsolatedBorrowRate(info: any, market?: Market): IsolatedBorrowRate;
|
|
140
|
+
fetchIsolatedBorrowRate(symbol: string, params?: {}): Promise<IsolatedBorrowRate>;
|
|
141
|
+
fetchIsolatedBorrowRates(params?: {}): Promise<IsolatedBorrowRates>;
|
|
162
142
|
fetchBorrowInterest(code?: Str, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
163
143
|
parseBorrowInterest(info: any, market?: Market): {
|
|
164
144
|
account: any;
|