ccxt 4.2.30 → 4.2.31
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 +4 -5
- package/dist/ccxt.browser.js +498 -79
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +12 -4
- package/dist/cjs/src/binance.js +1 -1
- package/dist/cjs/src/bitfinex2.js +415 -41
- package/dist/cjs/src/bitforex.js +3 -0
- package/dist/cjs/src/coinbase.js +10 -0
- package/dist/cjs/src/deribit.js +1 -0
- package/dist/cjs/src/htx.js +1 -1
- package/dist/cjs/src/kraken.js +3 -1
- package/dist/cjs/src/krakenfutures.js +3 -0
- package/dist/cjs/src/lbank.js +27 -26
- package/dist/cjs/src/okx.js +16 -2
- package/dist/cjs/src/poloniexfutures.js +3 -0
- package/dist/cjs/src/timex.js +1 -1
- package/dist/cjs/src/whitebit.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/coinbase.d.ts +10 -0
- package/js/src/abstract/okx.d.ts +12 -1
- package/js/src/base/Exchange.d.ts +1 -1
- package/js/src/base/Exchange.js +12 -4
- package/js/src/binance.js +1 -1
- package/js/src/bitfinex2.d.ts +6 -1
- package/js/src/bitfinex2.js +415 -41
- package/js/src/bitforex.js +3 -0
- package/js/src/coinbase.js +10 -0
- package/js/src/deribit.js +1 -0
- package/js/src/htx.js +1 -1
- package/js/src/kraken.js +3 -1
- package/js/src/krakenfutures.js +3 -0
- package/js/src/lbank.d.ts +1 -1
- package/js/src/lbank.js +27 -26
- package/js/src/okx.js +16 -2
- package/js/src/poloniexfutures.js +3 -0
- package/js/src/timex.js +1 -1
- package/js/src/whitebit.js +1 -1
- package/package.json +1 -1
package/dist/ccxt.browser.js
CHANGED
|
@@ -8693,7 +8693,7 @@ class Exchange {
|
|
|
8693
8693
|
}
|
|
8694
8694
|
return result;
|
|
8695
8695
|
}
|
|
8696
|
-
filterByLimit(array, limit = undefined, key = 'timestamp') {
|
|
8696
|
+
filterByLimit(array, limit = undefined, key = 'timestamp', fromStart = false) {
|
|
8697
8697
|
if (this.valueIsDefined(limit)) {
|
|
8698
8698
|
const arrayLength = array.length;
|
|
8699
8699
|
if (arrayLength > 0) {
|
|
@@ -8705,7 +8705,12 @@ class Exchange {
|
|
|
8705
8705
|
ascending = first <= last; // true if array is sorted in ascending order based on 'timestamp'
|
|
8706
8706
|
}
|
|
8707
8707
|
}
|
|
8708
|
-
|
|
8708
|
+
if (fromStart) {
|
|
8709
|
+
array = ascending ? this.arraySlice(array, 0, limit) : this.arraySlice(array, -limit);
|
|
8710
|
+
}
|
|
8711
|
+
else {
|
|
8712
|
+
array = ascending ? this.arraySlice(array, -limit) : this.arraySlice(array, 0, limit);
|
|
8713
|
+
}
|
|
8709
8714
|
}
|
|
8710
8715
|
}
|
|
8711
8716
|
return array;
|
|
@@ -8727,7 +8732,10 @@ class Exchange {
|
|
|
8727
8732
|
if (tail && limit !== undefined) {
|
|
8728
8733
|
return this.arraySlice(result, -limit);
|
|
8729
8734
|
}
|
|
8730
|
-
|
|
8735
|
+
// if the user provided a 'since' argument
|
|
8736
|
+
// we want to limit the result starting from the 'since'
|
|
8737
|
+
const shouldFilterFromStart = !tail && sinceIsDefined;
|
|
8738
|
+
return this.filterByLimit(result, limit, key, shouldFilterFromStart);
|
|
8731
8739
|
}
|
|
8732
8740
|
filterByValueSinceLimit(array, field, value = undefined, since = undefined, limit = undefined, key = 'timestamp', tail = false) {
|
|
8733
8741
|
const valueIsDefined = this.valueIsDefined(value);
|
|
@@ -8752,7 +8760,7 @@ class Exchange {
|
|
|
8752
8760
|
if (tail && limit !== undefined) {
|
|
8753
8761
|
return this.arraySlice(result, -limit);
|
|
8754
8762
|
}
|
|
8755
|
-
return this.filterByLimit(result, limit, key);
|
|
8763
|
+
return this.filterByLimit(result, limit, key, sinceIsDefined);
|
|
8756
8764
|
}
|
|
8757
8765
|
setSandboxMode(enabled) {
|
|
8758
8766
|
if (enabled) {
|
|
@@ -23735,7 +23743,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23735
23743
|
params = this.omit(params, 'type');
|
|
23736
23744
|
const orders = await this.fetchOrders(symbol, since, undefined, params);
|
|
23737
23745
|
const filteredOrders = this.filterBy(orders, 'status', 'canceled');
|
|
23738
|
-
return this.
|
|
23746
|
+
return this.filterBySinceLimit(filteredOrders, since, limit);
|
|
23739
23747
|
}
|
|
23740
23748
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
23741
23749
|
/**
|
|
@@ -37614,11 +37622,13 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
37614
37622
|
'CORS': undefined,
|
|
37615
37623
|
'spot': true,
|
|
37616
37624
|
'margin': undefined,
|
|
37617
|
-
'swap':
|
|
37625
|
+
'swap': true,
|
|
37618
37626
|
'future': undefined,
|
|
37619
37627
|
'option': undefined,
|
|
37628
|
+
'addMargin': false,
|
|
37620
37629
|
'cancelAllOrders': true,
|
|
37621
37630
|
'cancelOrder': true,
|
|
37631
|
+
'cancelOrders': true,
|
|
37622
37632
|
'createDepositAddress': true,
|
|
37623
37633
|
'createLimitOrder': true,
|
|
37624
37634
|
'createMarketOrder': true,
|
|
@@ -37627,23 +37637,27 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
37627
37637
|
'createStopLimitOrder': true,
|
|
37628
37638
|
'createStopMarketOrder': true,
|
|
37629
37639
|
'createStopOrder': true,
|
|
37630
|
-
'createTriggerOrder': true,
|
|
37631
37640
|
'createTrailingAmountOrder': true,
|
|
37632
37641
|
'createTrailingPercentOrder': false,
|
|
37633
|
-
'
|
|
37642
|
+
'createTriggerOrder': true,
|
|
37643
|
+
'editOrder': true,
|
|
37634
37644
|
'fetchBalance': true,
|
|
37635
37645
|
'fetchClosedOrder': true,
|
|
37636
37646
|
'fetchClosedOrders': true,
|
|
37637
37647
|
'fetchCurrencies': true,
|
|
37638
37648
|
'fetchDepositAddress': true,
|
|
37639
37649
|
'fetchDepositsWithdrawals': true,
|
|
37650
|
+
'fetchFundingHistory': false,
|
|
37640
37651
|
'fetchFundingRate': true,
|
|
37641
37652
|
'fetchFundingRateHistory': true,
|
|
37642
37653
|
'fetchFundingRates': true,
|
|
37643
37654
|
'fetchIndexOHLCV': false,
|
|
37644
37655
|
'fetchLedger': true,
|
|
37656
|
+
'fetchLeverage': false,
|
|
37657
|
+
'fetchLeverageTiers': false,
|
|
37645
37658
|
'fetchLiquidations': true,
|
|
37646
37659
|
'fetchMarginMode': false,
|
|
37660
|
+
'fetchMarketLeverageTiers': false,
|
|
37647
37661
|
'fetchMarkOHLCV': false,
|
|
37648
37662
|
'fetchMyTrades': true,
|
|
37649
37663
|
'fetchOHLCV': true,
|
|
@@ -37653,7 +37667,10 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
37653
37667
|
'fetchOpenOrders': true,
|
|
37654
37668
|
'fetchOrder': true,
|
|
37655
37669
|
'fetchOrderTrades': true,
|
|
37670
|
+
'fetchPosition': false,
|
|
37656
37671
|
'fetchPositionMode': false,
|
|
37672
|
+
'fetchPositions': true,
|
|
37673
|
+
'fetchPremiumIndexOHLCV': false,
|
|
37657
37674
|
'fetchStatus': true,
|
|
37658
37675
|
'fetchTickers': true,
|
|
37659
37676
|
'fetchTime': false,
|
|
@@ -37661,7 +37678,11 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
37661
37678
|
'fetchTradingFees': true,
|
|
37662
37679
|
'fetchTransactionFees': undefined,
|
|
37663
37680
|
'fetchTransactions': 'emulated',
|
|
37681
|
+
'reduceMargin': false,
|
|
37682
|
+
'setLeverage': false,
|
|
37664
37683
|
'setMargin': true,
|
|
37684
|
+
'setMarginMode': false,
|
|
37685
|
+
'setPositionMode': false,
|
|
37665
37686
|
'withdraw': true,
|
|
37666
37687
|
},
|
|
37667
37688
|
'timeframes': {
|
|
@@ -37929,6 +37950,7 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
37929
37950
|
'margin': 'margin',
|
|
37930
37951
|
'derivatives': 'margin',
|
|
37931
37952
|
'future': 'margin',
|
|
37953
|
+
'swap': 'margin',
|
|
37932
37954
|
},
|
|
37933
37955
|
'withdraw': {
|
|
37934
37956
|
'includeFee': false,
|
|
@@ -38585,7 +38607,7 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
38585
38607
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
38586
38608
|
* @see https://docs.bitfinex.com/reference/rest-public-book
|
|
38587
38609
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
38588
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
38610
|
+
* @param {int} [limit] the maximum amount of order book entries to return, bitfinex only allows 1, 25, or 100
|
|
38589
38611
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
38590
38612
|
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
38591
38613
|
*/
|
|
@@ -38597,7 +38619,7 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
38597
38619
|
'precision': precision,
|
|
38598
38620
|
};
|
|
38599
38621
|
if (limit !== undefined) {
|
|
38600
|
-
request['len'] = limit;
|
|
38622
|
+
request['len'] = limit;
|
|
38601
38623
|
}
|
|
38602
38624
|
const fullRequest = this.extend(request, params);
|
|
38603
38625
|
const orderbook = await this.publicGetBookSymbolPrecision(fullRequest);
|
|
@@ -38869,9 +38891,9 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
38869
38891
|
* @see https://docs.bitfinex.com/reference/rest-public-trades
|
|
38870
38892
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
38871
38893
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
38872
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
38894
|
+
* @param {int} [limit] the maximum amount of trades to fetch, default 120, max 10000
|
|
38873
38895
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
38874
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [
|
|
38896
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
38875
38897
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
38876
38898
|
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
38877
38899
|
*/
|
|
@@ -38918,11 +38940,11 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
38918
38940
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
38919
38941
|
* @param {string} timeframe the length of time each candle represents
|
|
38920
38942
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
38921
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
38943
|
+
* @param {int} [limit] the maximum amount of candles to fetch, default 100 max 10000
|
|
38922
38944
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
38923
38945
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
38924
38946
|
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
38925
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [
|
|
38947
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
38926
38948
|
*/
|
|
38927
38949
|
await this.loadMarkets();
|
|
38928
38950
|
let paginate = false;
|
|
@@ -38932,7 +38954,7 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
38932
38954
|
}
|
|
38933
38955
|
const market = this.market(symbol);
|
|
38934
38956
|
if (limit === undefined) {
|
|
38935
|
-
limit = 10000;
|
|
38957
|
+
limit = 10000;
|
|
38936
38958
|
}
|
|
38937
38959
|
let request = {
|
|
38938
38960
|
'symbol': market['id'],
|
|
@@ -39080,30 +39102,20 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
39080
39102
|
'trades': undefined,
|
|
39081
39103
|
}, market);
|
|
39082
39104
|
}
|
|
39083
|
-
|
|
39105
|
+
createOrderRequest(symbol, type, side, amount, price = undefined, params = {}) {
|
|
39084
39106
|
/**
|
|
39085
39107
|
* @method
|
|
39086
|
-
* @
|
|
39087
|
-
* @
|
|
39088
|
-
* @
|
|
39089
|
-
* @param {string} symbol unified
|
|
39090
|
-
* @param {string} type '
|
|
39108
|
+
* @ignore
|
|
39109
|
+
* @name bitfinex2#createOrderRequest
|
|
39110
|
+
* @description helper function to build an order request
|
|
39111
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
39112
|
+
* @param {string} type 'market' or 'limit'
|
|
39091
39113
|
* @param {string} side 'buy' or 'sell'
|
|
39092
|
-
* @param {float} amount
|
|
39093
|
-
* @param {float} [price] price of the order
|
|
39114
|
+
* @param {float} amount how much you want to trade in units of the base currency
|
|
39115
|
+
* @param {float} [price] the price of the order, in units of the quote currency, ignored in market orders
|
|
39094
39116
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
39095
|
-
* @
|
|
39096
|
-
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
39097
|
-
* @param {boolean} [params.postOnly] set to true if you want to make a post only order
|
|
39098
|
-
* @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
|
|
39099
|
-
* @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
|
|
39100
|
-
* @param {int} [params.lev] leverage for a derivative order, supported by derivative symbol orders only. The value should be between 1 and 100 inclusive.
|
|
39101
|
-
* @param {string} [params.price_aux_limit] order price for stop limit orders
|
|
39102
|
-
* @param {string} [params.price_oco_stop] OCO stop price
|
|
39103
|
-
* @param {string} [params.trailingAmount] *swap only* the quote amount to trail away from the current market price
|
|
39104
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
39117
|
+
* @returns {object} request to be sent to the exchange
|
|
39105
39118
|
*/
|
|
39106
|
-
await this.loadMarkets();
|
|
39107
39119
|
const market = this.market(symbol);
|
|
39108
39120
|
let amountString = this.amountToPrecision(symbol, amount);
|
|
39109
39121
|
amountString = (side === 'buy') ? amountString : _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringNeg(amountString);
|
|
@@ -39117,7 +39129,6 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
39117
39129
|
const postOnlyParam = this.safeBool(params, 'postOnly', false);
|
|
39118
39130
|
const reduceOnly = this.safeBool(params, 'reduceOnly', false);
|
|
39119
39131
|
const clientOrderId = this.safeValue2(params, 'cid', 'clientOrderId');
|
|
39120
|
-
params = this.omit(params, ['triggerPrice', 'stopPrice', 'timeInForce', 'postOnly', 'reduceOnly', 'trailingAmount', 'clientOrderId']);
|
|
39121
39132
|
let orderType = type.toUpperCase();
|
|
39122
39133
|
if (trailingAmount !== undefined) {
|
|
39123
39134
|
orderType = 'TRAILING STOP';
|
|
@@ -39173,7 +39184,36 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
39173
39184
|
if (clientOrderId !== undefined) {
|
|
39174
39185
|
request['cid'] = clientOrderId;
|
|
39175
39186
|
}
|
|
39176
|
-
|
|
39187
|
+
params = this.omit(params, ['triggerPrice', 'stopPrice', 'timeInForce', 'postOnly', 'reduceOnly', 'trailingAmount', 'clientOrderId']);
|
|
39188
|
+
return this.extend(request, params);
|
|
39189
|
+
}
|
|
39190
|
+
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
39191
|
+
/**
|
|
39192
|
+
* @method
|
|
39193
|
+
* @name bitfinex2#createOrder
|
|
39194
|
+
* @description create an order on the exchange
|
|
39195
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-submit-order
|
|
39196
|
+
* @param {string} symbol unified CCXT market symbol
|
|
39197
|
+
* @param {string} type 'limit' or 'market'
|
|
39198
|
+
* @param {string} side 'buy' or 'sell'
|
|
39199
|
+
* @param {float} amount the amount of currency to trade
|
|
39200
|
+
* @param {float} [price] price of the order
|
|
39201
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
39202
|
+
* @param {float} [params.stopPrice] the price that triggers a trigger order
|
|
39203
|
+
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
39204
|
+
* @param {boolean} [params.postOnly] set to true if you want to make a post only order
|
|
39205
|
+
* @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
|
|
39206
|
+
* @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
|
|
39207
|
+
* @param {int} [params.lev] leverage for a derivative order, supported by derivative symbol orders only. The value should be between 1 and 100 inclusive.
|
|
39208
|
+
* @param {string} [params.price_aux_limit] order price for stop limit orders
|
|
39209
|
+
* @param {string} [params.price_oco_stop] OCO stop price
|
|
39210
|
+
* @param {string} [params.trailingAmount] *swap only* the quote amount to trail away from the current market price
|
|
39211
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
39212
|
+
*/
|
|
39213
|
+
await this.loadMarkets();
|
|
39214
|
+
const market = this.market(symbol);
|
|
39215
|
+
const request = this.createOrderRequest(symbol, type, side, amount, price, params);
|
|
39216
|
+
const response = await this.privatePostAuthWOrderSubmit(request);
|
|
39177
39217
|
//
|
|
39178
39218
|
// [
|
|
39179
39219
|
// 1653325121, // Timestamp in milliseconds
|
|
@@ -39231,6 +39271,67 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
39231
39271
|
const order = this.safeList(orders, 0);
|
|
39232
39272
|
return this.parseOrder(order, market);
|
|
39233
39273
|
}
|
|
39274
|
+
async createOrders(orders, params = {}) {
|
|
39275
|
+
/**
|
|
39276
|
+
* @method
|
|
39277
|
+
* @name bitfinex2#createOrders
|
|
39278
|
+
* @description create a list of trade orders
|
|
39279
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-order-multi
|
|
39280
|
+
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
39281
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
39282
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
39283
|
+
*/
|
|
39284
|
+
await this.loadMarkets();
|
|
39285
|
+
const ordersRequests = [];
|
|
39286
|
+
for (let i = 0; i < orders.length; i++) {
|
|
39287
|
+
const rawOrder = orders[i];
|
|
39288
|
+
const symbol = this.safeString(rawOrder, 'symbol');
|
|
39289
|
+
const type = this.safeString(rawOrder, 'type');
|
|
39290
|
+
const side = this.safeString(rawOrder, 'side');
|
|
39291
|
+
const amount = this.safeNumber(rawOrder, 'amount');
|
|
39292
|
+
const price = this.safeNumber(rawOrder, 'price');
|
|
39293
|
+
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
39294
|
+
const orderRequest = this.createOrderRequest(symbol, type, side, amount, price, orderParams);
|
|
39295
|
+
ordersRequests.push(['on', orderRequest]);
|
|
39296
|
+
}
|
|
39297
|
+
const request = {
|
|
39298
|
+
'ops': ordersRequests,
|
|
39299
|
+
};
|
|
39300
|
+
const response = await this.privatePostAuthWOrderMulti(request);
|
|
39301
|
+
//
|
|
39302
|
+
// [
|
|
39303
|
+
// 1706762515553,
|
|
39304
|
+
// "ox_multi-req",
|
|
39305
|
+
// null,
|
|
39306
|
+
// null,
|
|
39307
|
+
// [
|
|
39308
|
+
// [
|
|
39309
|
+
// 1706762515,
|
|
39310
|
+
// "on-req",
|
|
39311
|
+
// null,
|
|
39312
|
+
// null,
|
|
39313
|
+
// [
|
|
39314
|
+
// [139567428547,null,1706762515551,"tBTCUST",1706762515551,1706762515551,0.0001,0.0001,"EXCHANGE LIMIT",null,null,null,0,"ACTIVE",null,null,35000,0,0,0,null,null,null,0,0,null,null,null,"API>BFX",null,null,{}]
|
|
39315
|
+
// ],
|
|
39316
|
+
// null,
|
|
39317
|
+
// "SUCCESS",
|
|
39318
|
+
// "Submitting 1 orders."
|
|
39319
|
+
// ],
|
|
39320
|
+
// ],
|
|
39321
|
+
// null,
|
|
39322
|
+
// "SUCCESS",
|
|
39323
|
+
// "Submitting 2 order operations."
|
|
39324
|
+
// ]
|
|
39325
|
+
//
|
|
39326
|
+
const results = [];
|
|
39327
|
+
const data = this.safeList(response, 4, []);
|
|
39328
|
+
for (let i = 0; i < data.length; i++) {
|
|
39329
|
+
const entry = data[i];
|
|
39330
|
+
const individualOrder = entry[4];
|
|
39331
|
+
results.push(individualOrder[0]);
|
|
39332
|
+
}
|
|
39333
|
+
return this.parseOrders(results);
|
|
39334
|
+
}
|
|
39234
39335
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
39235
39336
|
/**
|
|
39236
39337
|
* @method
|
|
@@ -39241,6 +39342,7 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
39241
39342
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
39242
39343
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
39243
39344
|
*/
|
|
39345
|
+
await this.loadMarkets();
|
|
39244
39346
|
const request = {
|
|
39245
39347
|
'all': 1,
|
|
39246
39348
|
};
|
|
@@ -39259,6 +39361,7 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
39259
39361
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
39260
39362
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
39261
39363
|
*/
|
|
39364
|
+
await this.loadMarkets();
|
|
39262
39365
|
const cid = this.safeValue2(params, 'cid', 'clientOrderId'); // client order id
|
|
39263
39366
|
let request = undefined;
|
|
39264
39367
|
if (cid !== undefined) {
|
|
@@ -39281,6 +39384,82 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
39281
39384
|
const order = this.safeValue(response, 4);
|
|
39282
39385
|
return this.parseOrder(order);
|
|
39283
39386
|
}
|
|
39387
|
+
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
39388
|
+
/**
|
|
39389
|
+
* @method
|
|
39390
|
+
* @name bitfinex2#cancelOrders
|
|
39391
|
+
* @description cancel multiple orders at the same time
|
|
39392
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
|
|
39393
|
+
* @param {string[]} ids order ids
|
|
39394
|
+
* @param {string} symbol unified market symbol, default is undefined
|
|
39395
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
39396
|
+
* @returns {object} an array of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
39397
|
+
*/
|
|
39398
|
+
await this.loadMarkets();
|
|
39399
|
+
for (let i = 0; i < ids.length; i++) {
|
|
39400
|
+
ids[i] = this.parseToNumeric(ids[i]);
|
|
39401
|
+
}
|
|
39402
|
+
const request = {
|
|
39403
|
+
'id': ids,
|
|
39404
|
+
};
|
|
39405
|
+
let market = undefined;
|
|
39406
|
+
if (symbol !== undefined) {
|
|
39407
|
+
market = this.market(symbol);
|
|
39408
|
+
}
|
|
39409
|
+
const response = await this.privatePostAuthWOrderCancelMulti(this.extend(request, params));
|
|
39410
|
+
//
|
|
39411
|
+
// [
|
|
39412
|
+
// 1706740198811,
|
|
39413
|
+
// "oc_multi-req",
|
|
39414
|
+
// null,
|
|
39415
|
+
// null,
|
|
39416
|
+
// [
|
|
39417
|
+
// [
|
|
39418
|
+
// 139530205057,
|
|
39419
|
+
// null,
|
|
39420
|
+
// 1706740132275,
|
|
39421
|
+
// "tBTCF0:USTF0",
|
|
39422
|
+
// 1706740132276,
|
|
39423
|
+
// 1706740132276,
|
|
39424
|
+
// 0.0001,
|
|
39425
|
+
// 0.0001,
|
|
39426
|
+
// "LIMIT",
|
|
39427
|
+
// null,
|
|
39428
|
+
// null,
|
|
39429
|
+
// null,
|
|
39430
|
+
// 0,
|
|
39431
|
+
// "ACTIVE",
|
|
39432
|
+
// null,
|
|
39433
|
+
// null,
|
|
39434
|
+
// 39000,
|
|
39435
|
+
// 0,
|
|
39436
|
+
// 0,
|
|
39437
|
+
// 0,
|
|
39438
|
+
// null,
|
|
39439
|
+
// null,
|
|
39440
|
+
// null,
|
|
39441
|
+
// 0,
|
|
39442
|
+
// 0,
|
|
39443
|
+
// null,
|
|
39444
|
+
// null,
|
|
39445
|
+
// null,
|
|
39446
|
+
// "API>BFX",
|
|
39447
|
+
// null,
|
|
39448
|
+
// null,
|
|
39449
|
+
// {
|
|
39450
|
+
// "lev": 10,
|
|
39451
|
+
// "$F33": 10
|
|
39452
|
+
// }
|
|
39453
|
+
// ],
|
|
39454
|
+
// ],
|
|
39455
|
+
// null,
|
|
39456
|
+
// "SUCCESS",
|
|
39457
|
+
// "Submitting 2 order cancellations."
|
|
39458
|
+
// ]
|
|
39459
|
+
//
|
|
39460
|
+
const orders = this.safeList(response, 4, []);
|
|
39461
|
+
return this.parseOrders(orders, market);
|
|
39462
|
+
}
|
|
39284
39463
|
async fetchOpenOrder(id, symbol = undefined, params = {}) {
|
|
39285
39464
|
/**
|
|
39286
39465
|
* @method
|
|
@@ -40290,14 +40469,13 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
40290
40469
|
* @see https://docs.bitfinex.com/reference/rest-auth-ledgers
|
|
40291
40470
|
* @param {string} code unified currency code, default is undefined
|
|
40292
40471
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
40293
|
-
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
40472
|
+
* @param {int} [limit] max number of ledger entrys to return, default is undefined max is 2500
|
|
40294
40473
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
40295
40474
|
* @param {int} [params.until] timestamp in ms of the latest ledger entry
|
|
40296
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [
|
|
40475
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
40297
40476
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
40298
40477
|
*/
|
|
40299
40478
|
await this.loadMarkets();
|
|
40300
|
-
await this.loadMarkets();
|
|
40301
40479
|
let paginate = false;
|
|
40302
40480
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchLedger', 'paginate');
|
|
40303
40481
|
if (paginate) {
|
|
@@ -40309,7 +40487,7 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
40309
40487
|
request['start'] = since;
|
|
40310
40488
|
}
|
|
40311
40489
|
if (limit !== undefined) {
|
|
40312
|
-
request['limit'] = limit;
|
|
40490
|
+
request['limit'] = limit;
|
|
40313
40491
|
}
|
|
40314
40492
|
[request, params] = this.handleUntilOption('end', request, params);
|
|
40315
40493
|
let response = undefined;
|
|
@@ -40341,7 +40519,7 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
40341
40519
|
async fetchFundingRate(symbol, params = {}) {
|
|
40342
40520
|
/**
|
|
40343
40521
|
* @method
|
|
40344
|
-
* @name
|
|
40522
|
+
* @name bitfinex2#fetchFundingRate
|
|
40345
40523
|
* @description fetch the current funding rate
|
|
40346
40524
|
* @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
|
|
40347
40525
|
* @param {string} symbol unified market symbol
|
|
@@ -40353,7 +40531,7 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
40353
40531
|
async fetchFundingRates(symbols = undefined, params = {}) {
|
|
40354
40532
|
/**
|
|
40355
40533
|
* @method
|
|
40356
|
-
* @name
|
|
40534
|
+
* @name bitfinex2#fetchFundingRate
|
|
40357
40535
|
* @description fetch the current funding rate
|
|
40358
40536
|
* @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
|
|
40359
40537
|
* @param {string[]} symbols list of unified market symbols
|
|
@@ -40404,13 +40582,15 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
40404
40582
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
40405
40583
|
/**
|
|
40406
40584
|
* @method
|
|
40407
|
-
* @name
|
|
40585
|
+
* @name bitfinex2#fetchFundingRateHistory
|
|
40408
40586
|
* @description fetches historical funding rate prices
|
|
40409
40587
|
* @see https://docs.bitfinex.com/reference/rest-public-derivatives-status-history
|
|
40410
40588
|
* @param {string} symbol unified market symbol
|
|
40589
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate entry
|
|
40590
|
+
* @param {int} [limit] max number of funding rate entrys to return
|
|
40411
40591
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
40412
40592
|
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
40413
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [
|
|
40593
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
40414
40594
|
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
40415
40595
|
*/
|
|
40416
40596
|
if (symbol === undefined) {
|
|
@@ -40467,7 +40647,15 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
40467
40647
|
const rate = this.parseFundingRateHistory(fr, market);
|
|
40468
40648
|
rates.push(rate);
|
|
40469
40649
|
}
|
|
40470
|
-
|
|
40650
|
+
const reversedArray = [];
|
|
40651
|
+
const rawRates = this.filterBySymbolSinceLimit(rates, symbol, since, limit);
|
|
40652
|
+
const rawRatesLength = rawRates.length;
|
|
40653
|
+
const ratesLength = Math.max(rawRatesLength - 1, 0);
|
|
40654
|
+
for (let i = ratesLength; i >= 0; i--) {
|
|
40655
|
+
const valueAtIndex = rawRates[i];
|
|
40656
|
+
reversedArray.push(valueAtIndex);
|
|
40657
|
+
}
|
|
40658
|
+
return reversedArray;
|
|
40471
40659
|
}
|
|
40472
40660
|
parseFundingRate(contract, market = undefined) {
|
|
40473
40661
|
//
|
|
@@ -40617,7 +40805,8 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
40617
40805
|
// ]
|
|
40618
40806
|
// ]
|
|
40619
40807
|
//
|
|
40620
|
-
|
|
40808
|
+
const oi = this.safeList(response, 0);
|
|
40809
|
+
return this.parseOpenInterest(oi, market);
|
|
40621
40810
|
}
|
|
40622
40811
|
async fetchOpenInterestHistory(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
40623
40812
|
/**
|
|
@@ -40888,6 +41077,199 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
40888
41077
|
'status': marginStatus,
|
|
40889
41078
|
};
|
|
40890
41079
|
}
|
|
41080
|
+
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
41081
|
+
/**
|
|
41082
|
+
* @method
|
|
41083
|
+
* @name bitfinex2#fetchOrder
|
|
41084
|
+
* @description fetches information on an order made by the user
|
|
41085
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
41086
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
41087
|
+
* @param {string} id the order id
|
|
41088
|
+
* @param {string} [symbol] unified symbol of the market the order was made in
|
|
41089
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
41090
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
41091
|
+
*/
|
|
41092
|
+
await this.loadMarkets();
|
|
41093
|
+
const request = {
|
|
41094
|
+
'id': [this.parseToNumeric(id)],
|
|
41095
|
+
};
|
|
41096
|
+
let market = undefined;
|
|
41097
|
+
let response = undefined;
|
|
41098
|
+
if (symbol === undefined) {
|
|
41099
|
+
response = await this.privatePostAuthROrders(this.extend(request, params));
|
|
41100
|
+
}
|
|
41101
|
+
else {
|
|
41102
|
+
market = this.market(symbol);
|
|
41103
|
+
request['symbol'] = market['id'];
|
|
41104
|
+
response = await this.privatePostAuthROrdersSymbol(this.extend(request, params));
|
|
41105
|
+
}
|
|
41106
|
+
//
|
|
41107
|
+
// [
|
|
41108
|
+
// [
|
|
41109
|
+
// 139658969116,
|
|
41110
|
+
// null,
|
|
41111
|
+
// 1706843908637,
|
|
41112
|
+
// "tBTCUST",
|
|
41113
|
+
// 1706843908637,
|
|
41114
|
+
// 1706843908638,
|
|
41115
|
+
// 0.0001,
|
|
41116
|
+
// 0.0001,
|
|
41117
|
+
// "EXCHANGE LIMIT",
|
|
41118
|
+
// null,
|
|
41119
|
+
// null,
|
|
41120
|
+
// null,
|
|
41121
|
+
// 0,
|
|
41122
|
+
// "ACTIVE",
|
|
41123
|
+
// null,
|
|
41124
|
+
// null,
|
|
41125
|
+
// 35000,
|
|
41126
|
+
// 0,
|
|
41127
|
+
// 0,
|
|
41128
|
+
// 0,
|
|
41129
|
+
// null,
|
|
41130
|
+
// null,
|
|
41131
|
+
// null,
|
|
41132
|
+
// 0,
|
|
41133
|
+
// 0,
|
|
41134
|
+
// null,
|
|
41135
|
+
// null,
|
|
41136
|
+
// null,
|
|
41137
|
+
// "API>BFX",
|
|
41138
|
+
// null,
|
|
41139
|
+
// null,
|
|
41140
|
+
// {}
|
|
41141
|
+
// ]
|
|
41142
|
+
// ]
|
|
41143
|
+
//
|
|
41144
|
+
const order = this.safeList(response, 0);
|
|
41145
|
+
return this.parseOrder(order, market);
|
|
41146
|
+
}
|
|
41147
|
+
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
41148
|
+
/**
|
|
41149
|
+
* @method
|
|
41150
|
+
* @name bitfinex2#editOrder
|
|
41151
|
+
* @description edit a trade order
|
|
41152
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-update-order
|
|
41153
|
+
* @param {string} id edit order id
|
|
41154
|
+
* @param {string} symbol unified symbol of the market to edit an order in
|
|
41155
|
+
* @param {string} type 'market' or 'limit'
|
|
41156
|
+
* @param {string} side 'buy' or 'sell'
|
|
41157
|
+
* @param {float} amount how much you want to trade in units of the base currency
|
|
41158
|
+
* @param {float} [price] the price that the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
41159
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
41160
|
+
* @param {float} [params.stopPrice] the price that triggers a trigger order
|
|
41161
|
+
* @param {boolean} [params.postOnly] set to true if you want to make a post only order
|
|
41162
|
+
* @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
|
|
41163
|
+
* @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
|
|
41164
|
+
* @param {int} [params.leverage] leverage for a derivative order, supported by derivative symbol orders only, the value should be between 1 and 100 inclusive
|
|
41165
|
+
* @param {int} [params.clientOrderId] a unique client order id for the order
|
|
41166
|
+
* @param {float} [params.trailingAmount] *swap only* the quote amount to trail away from the current market price
|
|
41167
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
41168
|
+
*/
|
|
41169
|
+
await this.loadMarkets();
|
|
41170
|
+
const market = this.market(symbol);
|
|
41171
|
+
const request = {
|
|
41172
|
+
'id': this.parseToNumeric(id),
|
|
41173
|
+
};
|
|
41174
|
+
if (amount !== undefined) {
|
|
41175
|
+
let amountString = this.amountToPrecision(symbol, amount);
|
|
41176
|
+
amountString = (side === 'buy') ? amountString : _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringNeg(amountString);
|
|
41177
|
+
request['amount'] = amountString;
|
|
41178
|
+
}
|
|
41179
|
+
const stopPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
|
|
41180
|
+
const trailingAmount = this.safeString(params, 'trailingAmount');
|
|
41181
|
+
const timeInForce = this.safeString(params, 'timeInForce');
|
|
41182
|
+
const postOnlyParam = this.safeBool(params, 'postOnly', false);
|
|
41183
|
+
const reduceOnly = this.safeBool(params, 'reduceOnly', false);
|
|
41184
|
+
const clientOrderId = this.safeInteger2(params, 'cid', 'clientOrderId');
|
|
41185
|
+
if (trailingAmount !== undefined) {
|
|
41186
|
+
request['price_trailing'] = trailingAmount;
|
|
41187
|
+
}
|
|
41188
|
+
else if (stopPrice !== undefined) {
|
|
41189
|
+
// request['price'] is taken as stopPrice for stop orders
|
|
41190
|
+
request['price'] = this.priceToPrecision(symbol, stopPrice);
|
|
41191
|
+
if (type === 'limit') {
|
|
41192
|
+
request['price_aux_limit'] = this.priceToPrecision(symbol, price);
|
|
41193
|
+
}
|
|
41194
|
+
}
|
|
41195
|
+
const postOnly = (postOnlyParam || (timeInForce === 'PO'));
|
|
41196
|
+
if ((type !== 'market') && (stopPrice === undefined)) {
|
|
41197
|
+
request['price'] = this.priceToPrecision(symbol, price);
|
|
41198
|
+
}
|
|
41199
|
+
// flag values may be summed to combine flags
|
|
41200
|
+
let flags = 0;
|
|
41201
|
+
if (postOnly) {
|
|
41202
|
+
flags = this.sum(flags, 4096);
|
|
41203
|
+
}
|
|
41204
|
+
if (reduceOnly) {
|
|
41205
|
+
flags = this.sum(flags, 1024);
|
|
41206
|
+
}
|
|
41207
|
+
if (flags !== 0) {
|
|
41208
|
+
request['flags'] = flags;
|
|
41209
|
+
}
|
|
41210
|
+
if (clientOrderId !== undefined) {
|
|
41211
|
+
request['cid'] = clientOrderId;
|
|
41212
|
+
}
|
|
41213
|
+
const leverage = this.safeInteger2(params, 'leverage', 'lev');
|
|
41214
|
+
if (leverage !== undefined) {
|
|
41215
|
+
request['lev'] = leverage;
|
|
41216
|
+
}
|
|
41217
|
+
params = this.omit(params, ['triggerPrice', 'stopPrice', 'timeInForce', 'postOnly', 'reduceOnly', 'trailingAmount', 'clientOrderId', 'leverage']);
|
|
41218
|
+
const response = await this.privatePostAuthWOrderUpdate(this.extend(request, params));
|
|
41219
|
+
//
|
|
41220
|
+
// [
|
|
41221
|
+
// 1706845376402,
|
|
41222
|
+
// "ou-req",
|
|
41223
|
+
// null,
|
|
41224
|
+
// null,
|
|
41225
|
+
// [
|
|
41226
|
+
// 139658969116,
|
|
41227
|
+
// null,
|
|
41228
|
+
// 1706843908637,
|
|
41229
|
+
// "tBTCUST",
|
|
41230
|
+
// 1706843908637,
|
|
41231
|
+
// 1706843908638,
|
|
41232
|
+
// 0.0002,
|
|
41233
|
+
// 0.0002,
|
|
41234
|
+
// "EXCHANGE LIMIT",
|
|
41235
|
+
// null,
|
|
41236
|
+
// null,
|
|
41237
|
+
// null,
|
|
41238
|
+
// 0,
|
|
41239
|
+
// "ACTIVE",
|
|
41240
|
+
// null,
|
|
41241
|
+
// null,
|
|
41242
|
+
// 35000,
|
|
41243
|
+
// 0,
|
|
41244
|
+
// 0,
|
|
41245
|
+
// 0,
|
|
41246
|
+
// null,
|
|
41247
|
+
// null,
|
|
41248
|
+
// null,
|
|
41249
|
+
// 0,
|
|
41250
|
+
// 0,
|
|
41251
|
+
// null,
|
|
41252
|
+
// null,
|
|
41253
|
+
// null,
|
|
41254
|
+
// "API>BFX",
|
|
41255
|
+
// null,
|
|
41256
|
+
// null,
|
|
41257
|
+
// {}
|
|
41258
|
+
// ],
|
|
41259
|
+
// null,
|
|
41260
|
+
// "SUCCESS",
|
|
41261
|
+
// "Submitting update to exchange limit buy order for 0.0002 BTC."
|
|
41262
|
+
// ]
|
|
41263
|
+
//
|
|
41264
|
+
const status = this.safeString(response, 6);
|
|
41265
|
+
if (status !== 'SUCCESS') {
|
|
41266
|
+
const errorCode = response[5];
|
|
41267
|
+
const errorText = response[7];
|
|
41268
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + ' ' + response[6] + ': ' + errorText + ' (#' + errorCode + ')');
|
|
41269
|
+
}
|
|
41270
|
+
const order = this.safeList(response, 4, []);
|
|
41271
|
+
return this.parseOrder(order, market);
|
|
41272
|
+
}
|
|
40891
41273
|
}
|
|
40892
41274
|
|
|
40893
41275
|
|
|
@@ -41999,6 +42381,9 @@ class bitforex extends _abstract_bitforex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
41999
42381
|
'fetchClosedOrders': true,
|
|
42000
42382
|
'fetchCrossBorrowRate': false,
|
|
42001
42383
|
'fetchCrossBorrowRates': false,
|
|
42384
|
+
'fetchDepositAddress': false,
|
|
42385
|
+
'fetchDepositAddresses': false,
|
|
42386
|
+
'fetchDepositAddressesByNetwork': false,
|
|
42002
42387
|
'fetchFundingHistory': false,
|
|
42003
42388
|
'fetchFundingRate': false,
|
|
42004
42389
|
'fetchFundingRateHistory': false,
|
|
@@ -87932,6 +88317,13 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
87932
88317
|
'brokerage/best_bid_ask',
|
|
87933
88318
|
'brokerage/convert/trade/{trade_id}',
|
|
87934
88319
|
'brokerage/time',
|
|
88320
|
+
'brokerage/cfm/balance_summary',
|
|
88321
|
+
'brokerage/cfm/positions',
|
|
88322
|
+
'brokerage/cfm/positions/{product_id}',
|
|
88323
|
+
'brokerage/cfm/sweeps',
|
|
88324
|
+
'brokerage/intx/portfolio/{portfolio_uuid}',
|
|
88325
|
+
'brokerage/intx/positions/{portfolio_uuid}',
|
|
88326
|
+
'brokerage/intx/positions/{portfolio_uuid}/{symbol}',
|
|
87935
88327
|
],
|
|
87936
88328
|
'post': [
|
|
87937
88329
|
'brokerage/orders',
|
|
@@ -87942,12 +88334,15 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
87942
88334
|
'brokerage/portfolios/move_funds',
|
|
87943
88335
|
'brokerage/convert/quote',
|
|
87944
88336
|
'brokerage/convert/trade/{trade_id}',
|
|
88337
|
+
'brokerage/cfm/sweeps/schedule',
|
|
88338
|
+
'brokerage/intx/allocate',
|
|
87945
88339
|
],
|
|
87946
88340
|
'put': [
|
|
87947
88341
|
'brokerage/portfolios/{portfolio_uuid}',
|
|
87948
88342
|
],
|
|
87949
88343
|
'delete': [
|
|
87950
88344
|
'brokerage/portfolios/{portfolio_uuid}',
|
|
88345
|
+
'brokerage/cfm/sweeps',
|
|
87951
88346
|
],
|
|
87952
88347
|
},
|
|
87953
88348
|
},
|
|
@@ -117984,6 +118379,7 @@ class deribit extends _abstract_deribit_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
117984
118379
|
request['end_timestamp'] = now;
|
|
117985
118380
|
}
|
|
117986
118381
|
else {
|
|
118382
|
+
since = Math.max(since - 1, 0);
|
|
117987
118383
|
request['start_timestamp'] = since;
|
|
117988
118384
|
if (limit === undefined) {
|
|
117989
118385
|
request['end_timestamp'] = now;
|
|
@@ -146630,7 +147026,7 @@ class htx extends _abstract_htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
146630
147026
|
const marketId = this.safeString2(order, 'contract_code', 'symbol');
|
|
146631
147027
|
market = this.safeMarket(marketId, market);
|
|
146632
147028
|
const timestamp = this.safeIntegerN(order, ['created_at', 'created-at', 'create_date']);
|
|
146633
|
-
const clientOrderId = this.safeString2(order, 'client_order_id', 'client-
|
|
147029
|
+
const clientOrderId = this.safeString2(order, 'client_order_id', 'client-or' + 'der-id'); // transpiler regex trick for php issue
|
|
146634
147030
|
let cost = undefined;
|
|
146635
147031
|
let amount = undefined;
|
|
146636
147032
|
if ((type !== undefined) && (type.indexOf('market') >= 0)) {
|
|
@@ -157365,7 +157761,9 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
157365
157761
|
request['interval'] = timeframe;
|
|
157366
157762
|
}
|
|
157367
157763
|
if (since !== undefined) {
|
|
157368
|
-
|
|
157764
|
+
// contrary to kraken's api documentation, the since parameter must be passed in nanoseconds
|
|
157765
|
+
// the adding of '000000' is copied from the fetchTrades function
|
|
157766
|
+
request['since'] = this.numberToString(since) + '000000'; // expected to be in nanoseconds
|
|
157369
157767
|
}
|
|
157370
157768
|
const response = await this.publicGetOHLC(this.extend(request, params));
|
|
157371
157769
|
//
|
|
@@ -159335,6 +159733,9 @@ class krakenfutures extends _abstract_krakenfutures_js__WEBPACK_IMPORTED_MODULE_
|
|
|
159335
159733
|
'fetchClosedOrders': undefined,
|
|
159336
159734
|
'fetchCrossBorrowRate': false,
|
|
159337
159735
|
'fetchCrossBorrowRates': false,
|
|
159736
|
+
'fetchDepositAddress': false,
|
|
159737
|
+
'fetchDepositAddresses': false,
|
|
159738
|
+
'fetchDepositAddressesByNetwork': false,
|
|
159338
159739
|
'fetchFundingHistory': undefined,
|
|
159339
159740
|
'fetchFundingRate': 'emulated',
|
|
159340
159741
|
'fetchFundingRateHistory': true,
|
|
@@ -172467,7 +172868,7 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
172467
172868
|
|
|
172468
172869
|
// ---------------------------------------------------------------------------
|
|
172469
172870
|
/**
|
|
172470
|
-
* @class
|
|
172871
|
+
* @class lbank
|
|
172471
172872
|
* @augments Exchange
|
|
172472
172873
|
*/
|
|
172473
172874
|
class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
@@ -172505,6 +172906,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
172505
172906
|
'fetchClosedOrders': false,
|
|
172506
172907
|
'fetchCrossBorrowRate': false,
|
|
172507
172908
|
'fetchCrossBorrowRates': false,
|
|
172909
|
+
'fetchDepositAddress': true,
|
|
172508
172910
|
'fetchDepositWithdrawFee': 'emulated',
|
|
172509
172911
|
'fetchDepositWithdrawFees': true,
|
|
172510
172912
|
'fetchFundingHistory': false,
|
|
@@ -172753,7 +173155,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
172753
173155
|
async fetchTime(params = {}) {
|
|
172754
173156
|
/**
|
|
172755
173157
|
* @method
|
|
172756
|
-
* @name
|
|
173158
|
+
* @name lbank#fetchTime
|
|
172757
173159
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
172758
173160
|
* @see https://www.lbank.com/en-US/docs/index.html#get-timestamp
|
|
172759
173161
|
* @see https://www.lbank.com/en-US/docs/contract.html#get-the-current-time
|
|
@@ -172794,8 +173196,8 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
172794
173196
|
async fetchMarkets(params = {}) {
|
|
172795
173197
|
/**
|
|
172796
173198
|
* @method
|
|
172797
|
-
* @name
|
|
172798
|
-
* @description retrieves data on all markets for
|
|
173199
|
+
* @name lbank#fetchMarkets
|
|
173200
|
+
* @description retrieves data on all markets for lbank
|
|
172799
173201
|
* @see https://www.lbank.com/en-US/docs/index.html#trading-pairs
|
|
172800
173202
|
* @see https://www.lbank.com/en-US/docs/contract.html#query-contract-information-list
|
|
172801
173203
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -173048,7 +173450,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
173048
173450
|
async fetchTicker(symbol, params = {}) {
|
|
173049
173451
|
/**
|
|
173050
173452
|
* @method
|
|
173051
|
-
* @name
|
|
173453
|
+
* @name lbank#fetchTicker
|
|
173052
173454
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
173053
173455
|
* @see https://www.lbank.com/en-US/docs/index.html#query-current-market-data-new
|
|
173054
173456
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
@@ -173093,7 +173495,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
173093
173495
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
173094
173496
|
/**
|
|
173095
173497
|
* @method
|
|
173096
|
-
* @name
|
|
173498
|
+
* @name lbank#fetchTickers
|
|
173097
173499
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
173098
173500
|
* @see https://www.lbank.com/en-US/docs/index.html#query-current-market-data-new
|
|
173099
173501
|
* @see https://www.lbank.com/en-US/docs/contract.html#query-contract-market-list
|
|
@@ -173173,7 +173575,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
173173
173575
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
173174
173576
|
/**
|
|
173175
173577
|
* @method
|
|
173176
|
-
* @name
|
|
173578
|
+
* @name lbank#fetchOrderBook
|
|
173177
173579
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
173178
173580
|
* @see https://www.lbank.com/en-US/docs/index.html#query-market-depth
|
|
173179
173581
|
* @see https://www.lbank.com/en-US/docs/contract.html#get-handicap
|
|
@@ -173362,7 +173764,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
173362
173764
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
173363
173765
|
/**
|
|
173364
173766
|
* @method
|
|
173365
|
-
* @name
|
|
173767
|
+
* @name lbank#fetchTrades
|
|
173366
173768
|
* @description get the list of most recent trades for a particular symbol
|
|
173367
173769
|
* @see https://www.lbank.com/en-US/docs/index.html#query-historical-transactions
|
|
173368
173770
|
* @see https://www.lbank.com/en-US/docs/index.html#recent-transactions-list
|
|
@@ -173439,7 +173841,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
173439
173841
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
173440
173842
|
/**
|
|
173441
173843
|
* @method
|
|
173442
|
-
* @name
|
|
173844
|
+
* @name lbank#fetchOHLCV
|
|
173443
173845
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
173444
173846
|
* @see https://www.lbank.com/en-US/docs/index.html#query-k-bar-data
|
|
173445
173847
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
@@ -173624,7 +174026,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
173624
174026
|
async fetchBalance(params = {}) {
|
|
173625
174027
|
/**
|
|
173626
174028
|
* @method
|
|
173627
|
-
* @name
|
|
174029
|
+
* @name lbank#fetchBalance
|
|
173628
174030
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
173629
174031
|
* @see https://www.lbank.com/en-US/docs/index.html#asset-information
|
|
173630
174032
|
* @see https://www.lbank.com/en-US/docs/index.html#account-information
|
|
@@ -173698,7 +174100,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
173698
174100
|
async fetchTradingFee(symbol, params = {}) {
|
|
173699
174101
|
/**
|
|
173700
174102
|
* @method
|
|
173701
|
-
* @name
|
|
174103
|
+
* @name lbank#fetchTradingFee
|
|
173702
174104
|
* @description fetch the trading fees for a market
|
|
173703
174105
|
* @see https://www.lbank.com/en-US/docs/index.html#transaction-fee-rate-query
|
|
173704
174106
|
* @param {string} symbol unified market symbol
|
|
@@ -173712,7 +174114,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
173712
174114
|
async fetchTradingFees(params = {}) {
|
|
173713
174115
|
/**
|
|
173714
174116
|
* @method
|
|
173715
|
-
* @name
|
|
174117
|
+
* @name lbank#fetchTradingFees
|
|
173716
174118
|
* @description fetch the trading fees for multiple markets
|
|
173717
174119
|
* @see https://www.lbank.com/en-US/docs/index.html#transaction-fee-rate-query
|
|
173718
174120
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -173753,7 +174155,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
173753
174155
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
173754
174156
|
/**
|
|
173755
174157
|
* @method
|
|
173756
|
-
* @name
|
|
174158
|
+
* @name lbank#createOrder
|
|
173757
174159
|
* @description create a trade order
|
|
173758
174160
|
* @see https://www.lbank.com/en-US/docs/index.html#place-order
|
|
173759
174161
|
* @see https://www.lbank.com/en-US/docs/index.html#place-an-order
|
|
@@ -173997,7 +174399,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
173997
174399
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
173998
174400
|
/**
|
|
173999
174401
|
* @method
|
|
174000
|
-
* @name
|
|
174402
|
+
* @name lbank#fetchOrder
|
|
174001
174403
|
* @description fetches information on an order made by the user
|
|
174002
174404
|
* @see https://www.lbank.com/en-US/docs/index.html#query-order
|
|
174003
174405
|
* @see https://www.lbank.com/en-US/docs/index.html#query-order-new
|
|
@@ -174101,7 +174503,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
174101
174503
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
174102
174504
|
/**
|
|
174103
174505
|
* @method
|
|
174104
|
-
* @name
|
|
174506
|
+
* @name lbank#fetchMyTrades
|
|
174105
174507
|
* @description fetch all trades made by the user
|
|
174106
174508
|
* @see https://www.lbank.com/en-US/docs/index.html#past-transaction-details
|
|
174107
174509
|
* @param {string} symbol unified market symbol
|
|
@@ -174160,7 +174562,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
174160
174562
|
async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
174161
174563
|
/**
|
|
174162
174564
|
* @method
|
|
174163
|
-
* @name
|
|
174565
|
+
* @name lbank#fetchOrders
|
|
174164
174566
|
* @description fetches information on multiple orders made by the user
|
|
174165
174567
|
* @see https://www.lbank.com/en-US/docs/index.html#query-all-orders
|
|
174166
174568
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
@@ -174220,7 +174622,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
174220
174622
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
174221
174623
|
/**
|
|
174222
174624
|
* @method
|
|
174223
|
-
* @name
|
|
174625
|
+
* @name lbank#fetchOpenOrders
|
|
174224
174626
|
* @description fetch all unfilled currently open orders
|
|
174225
174627
|
* @see https://www.lbank.com/en-US/docs/index.html#current-pending-order
|
|
174226
174628
|
* @param {string} symbol unified market symbol
|
|
@@ -174277,7 +174679,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
174277
174679
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
174278
174680
|
/**
|
|
174279
174681
|
* @method
|
|
174280
|
-
* @name
|
|
174682
|
+
* @name lbank#cancelOrder
|
|
174281
174683
|
* @description cancels an open order
|
|
174282
174684
|
* @see https://www.lbank.com/en-US/docs/index.html#cancel-order-new
|
|
174283
174685
|
* @param {string} id order id
|
|
@@ -174319,7 +174721,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
174319
174721
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
174320
174722
|
/**
|
|
174321
174723
|
* @method
|
|
174322
|
-
* @name
|
|
174724
|
+
* @name lbank#cancelAllOrders
|
|
174323
174725
|
* @description cancel all open orders in a market
|
|
174324
174726
|
* @see https://www.lbank.com/en-US/docs/index.html#cancel-all-pending-orders-for-a-single-trading-pair
|
|
174325
174727
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
@@ -174366,7 +174768,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
174366
174768
|
async fetchDepositAddress(code, params = {}) {
|
|
174367
174769
|
/**
|
|
174368
174770
|
* @method
|
|
174369
|
-
* @name
|
|
174771
|
+
* @name lbank#fetchDepositAddress
|
|
174370
174772
|
* @description fetch the deposit address for a currency associated with this account
|
|
174371
174773
|
* @see https://www.lbank.com/en-US/docs/index.html#get-deposit-address
|
|
174372
174774
|
* @see https://www.lbank.com/en-US/docs/index.html#the-user-obtains-the-deposit-address
|
|
@@ -174470,7 +174872,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
174470
174872
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
174471
174873
|
/**
|
|
174472
174874
|
* @method
|
|
174473
|
-
* @name
|
|
174875
|
+
* @name lbank#withdraw
|
|
174474
174876
|
* @description make a withdrawal
|
|
174475
174877
|
* @see https://www.lbank.com/en-US/docs/index.html#withdrawal
|
|
174476
174878
|
* @param {string} code unified currency code
|
|
@@ -174636,7 +175038,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
174636
175038
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
174637
175039
|
/**
|
|
174638
175040
|
* @method
|
|
174639
|
-
* @name
|
|
175041
|
+
* @name lbank#fetchDeposits
|
|
174640
175042
|
* @description fetch all deposits made to an account
|
|
174641
175043
|
* @see https://www.lbank.com/en-US/docs/index.html#get-recharge-history
|
|
174642
175044
|
* @param {string} code unified currency code
|
|
@@ -174689,7 +175091,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
174689
175091
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
174690
175092
|
/**
|
|
174691
175093
|
* @method
|
|
174692
|
-
* @name
|
|
175094
|
+
* @name lbank#fetchWithdrawals
|
|
174693
175095
|
* @description fetch all withdrawals made from an account
|
|
174694
175096
|
* @see https://www.lbank.com/en-US/docs/index.html#get-withdrawal-history
|
|
174695
175097
|
* @param {string} code unified currency code
|
|
@@ -174746,10 +175148,10 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
174746
175148
|
async fetchTransactionFees(codes = undefined, params = {}) {
|
|
174747
175149
|
/**
|
|
174748
175150
|
* @method
|
|
174749
|
-
* @name
|
|
175151
|
+
* @name lbank#fetchTransactionFees
|
|
174750
175152
|
* @deprecated
|
|
174751
175153
|
* @description please use fetchDepositWithdrawFees instead
|
|
174752
|
-
* @param {string[]|undefined} codes not used by
|
|
175154
|
+
* @param {string[]|undefined} codes not used by lbank fetchTransactionFees ()
|
|
174753
175155
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
174754
175156
|
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
174755
175157
|
*/
|
|
@@ -174895,7 +175297,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
174895
175297
|
async fetchDepositWithdrawFees(codes = undefined, params = {}) {
|
|
174896
175298
|
/**
|
|
174897
175299
|
* @method
|
|
174898
|
-
* @name
|
|
175300
|
+
* @name lbank#fetchDepositWithdrawFees
|
|
174899
175301
|
* @description when using private endpoint, only returns information for currencies with non-zero balance, use public method by specifying this.options['fetchDepositWithdrawFees']['method'] = 'fetchPublicDepositWithdrawFees'
|
|
174900
175302
|
* @see https://www.lbank.com/en-US/docs/index.html#get-all-coins-information
|
|
174901
175303
|
* @see https://www.lbank.com/en-US/docs/index.html#withdrawal-configurations
|
|
@@ -192563,9 +192965,11 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
192563
192965
|
'tradingBot/grid/sub-orders': 1,
|
|
192564
192966
|
'tradingBot/grid/positions': 1,
|
|
192565
192967
|
'tradingBot/grid/ai-param': 1,
|
|
192566
|
-
'tradingBot/
|
|
192968
|
+
'tradingBot/signal/signals': 1,
|
|
192567
192969
|
'tradingBot/signal/orders-algo-details': 1,
|
|
192970
|
+
'tradingBot/signal/orders-algo-history': 1,
|
|
192568
192971
|
'tradingBot/signal/positions': 1,
|
|
192972
|
+
'tradingBot/signal/positions-history': 1,
|
|
192569
192973
|
'tradingBot/signal/sub-orders': 1,
|
|
192570
192974
|
'tradingBot/signal/event-history': 1,
|
|
192571
192975
|
'tradingBot/recurring/orders-algo-pending': 1,
|
|
@@ -192685,6 +193089,15 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
192685
193089
|
'tradingBot/grid/compute-margin-balance': 1,
|
|
192686
193090
|
'tradingBot/grid/margin-balance': 1,
|
|
192687
193091
|
'tradingBot/grid/min-investment': 1,
|
|
193092
|
+
'tradingBot/signal/create-signal': 1,
|
|
193093
|
+
'tradingBot/signal/order-algo': 1,
|
|
193094
|
+
'tradingBot/signal/stop-order-algo': 1,
|
|
193095
|
+
'tradingBot/signal/margin-balance': 1,
|
|
193096
|
+
'tradingBot/signal/amendTPSL': 1,
|
|
193097
|
+
'tradingBot/signal/set-instruments': 1,
|
|
193098
|
+
'tradingBot/signal/close-position': 1,
|
|
193099
|
+
'tradingBot/signal/sub-order': 1,
|
|
193100
|
+
'tradingBot/signal/cancel-sub-order': 1,
|
|
192688
193101
|
'tradingBot/recurring/order-algo': 1,
|
|
192689
193102
|
'tradingBot/recurring/amend-order-algo': 1,
|
|
192690
193103
|
'tradingBot/recurring/stop-order-algo': 1,
|
|
@@ -196425,10 +196838,13 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
196425
196838
|
market = this.market(symbol);
|
|
196426
196839
|
request['instId'] = market['id'];
|
|
196427
196840
|
}
|
|
196841
|
+
if (since !== undefined) {
|
|
196842
|
+
request['begin'] = since;
|
|
196843
|
+
}
|
|
196428
196844
|
[request, params] = this.handleUntilOption('end', request, params);
|
|
196429
196845
|
const [type, query] = this.handleMarketTypeAndParams('fetchMyTrades', market, params);
|
|
196430
196846
|
request['instType'] = this.convertToInstrumentType(type);
|
|
196431
|
-
if (limit !== undefined) {
|
|
196847
|
+
if ((limit !== undefined) && (since === undefined)) { // let limit = n, okx will return the n most recent results, instead of the n results after limit, so limit should only be sent when since is undefined
|
|
196432
196848
|
request['limit'] = limit; // default 100, max 100
|
|
196433
196849
|
}
|
|
196434
196850
|
const response = await this.privateGetTradeFillsHistory(this.extend(request, query));
|
|
@@ -210629,6 +211045,9 @@ class poloniexfutures extends _abstract_poloniexfutures_js__WEBPACK_IMPORTED_MOD
|
|
|
210629
211045
|
'fetchBalance': true,
|
|
210630
211046
|
'fetchClosedOrders': true,
|
|
210631
211047
|
'fetchCurrencies': false,
|
|
211048
|
+
'fetchDepositAddress': false,
|
|
211049
|
+
'fetchDepositAddresses': false,
|
|
211050
|
+
'fetchDepositAddressesByNetwork': false,
|
|
210632
211051
|
'fetchFundingRate': true,
|
|
210633
211052
|
'fetchFundingRateHistory': false,
|
|
210634
211053
|
'fetchL3OrderBook': true,
|
|
@@ -276653,7 +277072,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
276653
277072
|
'rest': 'https://plasma-relay-backend.timex.io',
|
|
276654
277073
|
},
|
|
276655
277074
|
'www': 'https://timex.io',
|
|
276656
|
-
'doc': 'https://
|
|
277075
|
+
'doc': 'https://plasma-relay-backend.timex.io/swagger-ui/index.html',
|
|
276657
277076
|
'referral': 'https://timex.io/?refcode=1x27vNkTbP1uwkCck',
|
|
276658
277077
|
},
|
|
276659
277078
|
'api': {
|
|
@@ -286147,7 +286566,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
286147
286566
|
'name': 'WhiteBit',
|
|
286148
286567
|
'version': 'v4',
|
|
286149
286568
|
'countries': ['EE'],
|
|
286150
|
-
'rateLimit':
|
|
286569
|
+
'rateLimit': 50,
|
|
286151
286570
|
'pro': true,
|
|
286152
286571
|
'has': {
|
|
286153
286572
|
'CORS': undefined,
|
|
@@ -300742,7 +301161,7 @@ SOFTWARE.
|
|
|
300742
301161
|
|
|
300743
301162
|
//-----------------------------------------------------------------------------
|
|
300744
301163
|
// this is updated by vss.js when building
|
|
300745
|
-
const version = '4.2.
|
|
301164
|
+
const version = '4.2.31';
|
|
300746
301165
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
|
|
300747
301166
|
//-----------------------------------------------------------------------------
|
|
300748
301167
|
|