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/bybit.js
CHANGED
|
@@ -325,6 +325,7 @@ export default class bybit extends Exchange {
|
|
|
325
325
|
'v5/account/fee-rate': 10,
|
|
326
326
|
'v5/account/info': 5,
|
|
327
327
|
'v5/account/transaction-log': 1,
|
|
328
|
+
'v5/account/contract-transaction-log': 1,
|
|
328
329
|
'v5/account/smp-group': 1,
|
|
329
330
|
'v5/account/mmp-state': 5,
|
|
330
331
|
// asset
|
|
@@ -2510,9 +2511,9 @@ export default class bybit extends Exchange {
|
|
|
2510
2511
|
if (since !== undefined) {
|
|
2511
2512
|
request['startTime'] = since;
|
|
2512
2513
|
}
|
|
2513
|
-
const until = this.
|
|
2514
|
+
const until = this.safeInteger(params, 'until'); // unified in milliseconds
|
|
2514
2515
|
const endTime = this.safeInteger(params, 'endTime', until); // exchange-specific in milliseconds
|
|
2515
|
-
params = this.omit(params, ['endTime', '
|
|
2516
|
+
params = this.omit(params, ['endTime', 'until']);
|
|
2516
2517
|
if (endTime !== undefined) {
|
|
2517
2518
|
request['endTime'] = endTime;
|
|
2518
2519
|
}
|
|
@@ -4070,44 +4071,8 @@ export default class bybit extends Exchange {
|
|
|
4070
4071
|
const result = this.safeDict(response, 'result', {});
|
|
4071
4072
|
return this.parseOrder(result, market);
|
|
4072
4073
|
}
|
|
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();
|
|
4074
|
+
editOrderRequest(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
4104
4075
|
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
4076
|
const request = {
|
|
4112
4077
|
'symbol': market['id'],
|
|
4113
4078
|
'orderId': id,
|
|
@@ -4181,6 +4146,47 @@ export default class bybit extends Exchange {
|
|
|
4181
4146
|
request['orderLinkId'] = clientOrderId;
|
|
4182
4147
|
}
|
|
4183
4148
|
params = this.omit(params, ['stopPrice', 'stopLossPrice', 'takeProfitPrice', 'triggerPrice', 'clientOrderId', 'stopLoss', 'takeProfit']);
|
|
4149
|
+
return request;
|
|
4150
|
+
}
|
|
4151
|
+
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
4152
|
+
/**
|
|
4153
|
+
* @method
|
|
4154
|
+
* @name bybit#editOrder
|
|
4155
|
+
* @description edit a trade order
|
|
4156
|
+
* @see https://bybit-exchange.github.io/docs/v5/order/amend-order
|
|
4157
|
+
* @see https://bybit-exchange.github.io/docs/derivatives/unified/replace-order
|
|
4158
|
+
* @see https://bybit-exchange.github.io/docs/api-explorer/derivatives/trade/contract/replace-order
|
|
4159
|
+
* @param {string} id cancel order id
|
|
4160
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
4161
|
+
* @param {string} type 'market' or 'limit'
|
|
4162
|
+
* @param {string} side 'buy' or 'sell'
|
|
4163
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4164
|
+
* @param {float} price the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
|
|
4165
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4166
|
+
* @param {float} [params.triggerPrice] The price that a trigger order is triggered at
|
|
4167
|
+
* @param {float} [params.stopLossPrice] The price that a stop loss order is triggered at
|
|
4168
|
+
* @param {float} [params.takeProfitPrice] The price that a take profit order is triggered at
|
|
4169
|
+
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice that the attached take profit order will be triggered
|
|
4170
|
+
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
4171
|
+
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice that the attached stop loss order will be triggered
|
|
4172
|
+
* @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
|
|
4173
|
+
* @param {string} [params.triggerBy] 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for triggerPrice
|
|
4174
|
+
* @param {string} [params.slTriggerBy] 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for stopLoss
|
|
4175
|
+
* @param {string} [params.tpTriggerby] 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for takeProfit
|
|
4176
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4177
|
+
*/
|
|
4178
|
+
await this.loadMarkets();
|
|
4179
|
+
if (symbol === undefined) {
|
|
4180
|
+
throw new ArgumentsRequired(this.id + ' editOrder() requires a symbol argument');
|
|
4181
|
+
}
|
|
4182
|
+
const market = this.market(symbol);
|
|
4183
|
+
const [enableUnifiedMargin, enableUnifiedAccount] = await this.isUnifiedEnabled();
|
|
4184
|
+
const isUnifiedAccount = (enableUnifiedMargin || enableUnifiedAccount);
|
|
4185
|
+
const isUsdcSettled = market['settle'] === 'USDC';
|
|
4186
|
+
if (isUsdcSettled && !isUnifiedAccount) {
|
|
4187
|
+
return await this.editUsdcOrder(id, symbol, type, side, amount, price, params);
|
|
4188
|
+
}
|
|
4189
|
+
const request = this.editOrderRequest(id, symbol, type, side, amount, price, params);
|
|
4184
4190
|
const response = await this.privatePostV5OrderAmend(this.extend(request, params));
|
|
4185
4191
|
//
|
|
4186
4192
|
// {
|
|
@@ -4240,30 +4246,8 @@ export default class bybit extends Exchange {
|
|
|
4240
4246
|
const result = this.safeDict(response, 'result', {});
|
|
4241
4247
|
return this.parseOrder(result, market);
|
|
4242
4248
|
}
|
|
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();
|
|
4249
|
+
cancelOrderRequest(id, symbol = undefined, params = {}) {
|
|
4260
4250
|
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
4251
|
const request = {
|
|
4268
4252
|
'symbol': market['id'],
|
|
4269
4253
|
// 'orderLinkId': 'string',
|
|
@@ -4273,7 +4257,7 @@ export default class bybit extends Exchange {
|
|
|
4273
4257
|
};
|
|
4274
4258
|
if (market['spot']) {
|
|
4275
4259
|
// only works for spot market
|
|
4276
|
-
const isStop = this.
|
|
4260
|
+
const isStop = this.safeBool2(params, 'stop', 'trigger', false);
|
|
4277
4261
|
params = this.omit(params, ['stop', 'trigger']);
|
|
4278
4262
|
request['orderFilter'] = isStop ? 'StopOrder' : 'Order';
|
|
4279
4263
|
}
|
|
@@ -4292,7 +4276,34 @@ export default class bybit extends Exchange {
|
|
|
4292
4276
|
else if (market['option']) {
|
|
4293
4277
|
request['category'] = 'option';
|
|
4294
4278
|
}
|
|
4295
|
-
|
|
4279
|
+
return this.extend(request, params);
|
|
4280
|
+
}
|
|
4281
|
+
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
4282
|
+
/**
|
|
4283
|
+
* @method
|
|
4284
|
+
* @name bybit#cancelOrder
|
|
4285
|
+
* @description cancels an open order
|
|
4286
|
+
* @see https://bybit-exchange.github.io/docs/v5/order/cancel-order
|
|
4287
|
+
* @param {string} id order id
|
|
4288
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
4289
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4290
|
+
* @param {boolean} [params.stop] *spot only* whether the order is a stop order
|
|
4291
|
+
* @param {string} [params.orderFilter] *spot only* 'Order' or 'StopOrder' or 'tpslOrder'
|
|
4292
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4293
|
+
*/
|
|
4294
|
+
if (symbol === undefined) {
|
|
4295
|
+
throw new ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
4296
|
+
}
|
|
4297
|
+
await this.loadMarkets();
|
|
4298
|
+
const market = this.market(symbol);
|
|
4299
|
+
const [enableUnifiedMargin, enableUnifiedAccount] = await this.isUnifiedEnabled();
|
|
4300
|
+
const isUnifiedAccount = (enableUnifiedMargin || enableUnifiedAccount);
|
|
4301
|
+
const isUsdcSettled = market['settle'] === 'USDC';
|
|
4302
|
+
if (isUsdcSettled && !isUnifiedAccount) {
|
|
4303
|
+
return await this.cancelUsdcOrder(id, symbol, params);
|
|
4304
|
+
}
|
|
4305
|
+
const requestExtended = this.cancelOrderRequest(id, symbol, params);
|
|
4306
|
+
const response = await this.privatePostV5OrderCancel(requestExtended);
|
|
4296
4307
|
//
|
|
4297
4308
|
// {
|
|
4298
4309
|
// "retCode": 0,
|
|
@@ -4818,9 +4829,9 @@ export default class bybit extends Exchange {
|
|
|
4818
4829
|
if (since !== undefined) {
|
|
4819
4830
|
request['startTime'] = since;
|
|
4820
4831
|
}
|
|
4821
|
-
const until = this.
|
|
4832
|
+
const until = this.safeInteger(params, 'until'); // unified in milliseconds
|
|
4822
4833
|
const endTime = this.safeInteger(params, 'endTime', until); // exchange-specific in milliseconds
|
|
4823
|
-
params = this.omit(params, ['endTime', '
|
|
4834
|
+
params = this.omit(params, ['endTime', 'until']);
|
|
4824
4835
|
if (endTime !== undefined) {
|
|
4825
4836
|
request['endTime'] = endTime;
|
|
4826
4837
|
}
|
|
@@ -4993,9 +5004,9 @@ export default class bybit extends Exchange {
|
|
|
4993
5004
|
if (since !== undefined) {
|
|
4994
5005
|
request['startTime'] = since;
|
|
4995
5006
|
}
|
|
4996
|
-
const until = this.
|
|
5007
|
+
const until = this.safeInteger(params, 'until'); // unified in milliseconds
|
|
4997
5008
|
const endTime = this.safeInteger(params, 'endTime', until); // exchange-specific in milliseconds
|
|
4998
|
-
params = this.omit(params, ['endTime', '
|
|
5009
|
+
params = this.omit(params, ['endTime', 'until']);
|
|
4999
5010
|
if (endTime !== undefined) {
|
|
5000
5011
|
request['endTime'] = endTime;
|
|
5001
5012
|
}
|
|
@@ -5787,7 +5798,7 @@ export default class bybit extends Exchange {
|
|
|
5787
5798
|
// 'coin': currency['id'],
|
|
5788
5799
|
// 'currency': currency['id'], // alias
|
|
5789
5800
|
// 'start_date': this.iso8601 (since),
|
|
5790
|
-
// 'end_date': this.iso8601 (
|
|
5801
|
+
// 'end_date': this.iso8601 (until),
|
|
5791
5802
|
// 'wallet_fund_type': 'Deposit', // Withdraw, RealisedPNL, Commission, Refund, Prize, ExchangeOrderWithdraw, ExchangeOrderDeposit
|
|
5792
5803
|
// 'page': 1,
|
|
5793
5804
|
// 'limit': 20, // max 50
|
|
@@ -6842,8 +6853,8 @@ export default class bybit extends Exchange {
|
|
|
6842
6853
|
if (since !== undefined) {
|
|
6843
6854
|
request['startTime'] = since;
|
|
6844
6855
|
}
|
|
6845
|
-
const until = this.
|
|
6846
|
-
params = this.omit(params, ['
|
|
6856
|
+
const until = this.safeInteger(params, 'until'); // unified in milliseconds
|
|
6857
|
+
params = this.omit(params, ['until']);
|
|
6847
6858
|
if (until !== undefined) {
|
|
6848
6859
|
request['endTime'] = until;
|
|
6849
6860
|
}
|
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;
|