ccxt 4.3.54 → 4.3.56
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 -6
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +1 -1
- package/dist/cjs/src/alpaca.js +1 -1
- package/dist/cjs/src/ascendex.js +6 -4
- package/dist/cjs/src/base/Exchange.js +26 -2
- package/dist/cjs/src/bigone.js +1 -1
- package/dist/cjs/src/binance.js +13 -13
- package/dist/cjs/src/bingx.js +38 -4
- package/dist/cjs/src/bit2c.js +1 -1
- package/dist/cjs/src/bitbank.js +1 -1
- package/dist/cjs/src/bitbns.js +1 -1
- package/dist/cjs/src/bitfinex.js +1 -1
- package/dist/cjs/src/bitfinex2.js +1 -1
- package/dist/cjs/src/bitflyer.js +8 -2
- package/dist/cjs/src/bitget.js +2 -2
- package/dist/cjs/src/bithumb.js +1 -1
- package/dist/cjs/src/bitmart.js +3 -3
- package/dist/cjs/src/bitmex.js +1 -1
- package/dist/cjs/src/bitopro.js +21 -4
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bitso.js +1 -1
- package/dist/cjs/src/bitstamp.js +1 -1
- package/dist/cjs/src/bitteam.js +1 -1
- package/dist/cjs/src/bitvavo.js +2 -2
- package/dist/cjs/src/bl3p.js +1 -1
- package/dist/cjs/src/blockchaincom.js +28 -28
- package/dist/cjs/src/blofin.js +1 -1
- package/dist/cjs/src/btcalpha.js +4 -12
- package/dist/cjs/src/btcbox.js +1 -1
- package/dist/cjs/src/btcmarkets.js +27 -28
- package/dist/cjs/src/btcturk.js +1 -1
- package/dist/cjs/src/bybit.js +11 -7
- package/dist/cjs/src/cex.js +2 -2
- package/dist/cjs/src/coinbase.js +33 -33
- package/dist/cjs/src/coinbaseexchange.js +1 -1
- package/dist/cjs/src/coinbaseinternational.js +1 -1
- package/dist/cjs/src/coincheck.js +1 -1
- package/dist/cjs/src/coinex.js +2 -2
- package/dist/cjs/src/coinlist.js +2 -2
- package/dist/cjs/src/coinmate.js +1 -1
- package/dist/cjs/src/coinmetro.js +1 -1
- package/dist/cjs/src/coinone.js +1 -1
- package/dist/cjs/src/coinsph.js +1 -1
- package/dist/cjs/src/coinspot.js +1 -1
- package/dist/cjs/src/cryptocom.js +1 -1
- package/dist/cjs/src/currencycom.js +1 -1
- package/dist/cjs/src/delta.js +7 -3
- package/dist/cjs/src/deribit.js +4 -4
- package/dist/cjs/src/digifinex.js +2 -2
- package/dist/cjs/src/exmo.js +2 -2
- package/dist/cjs/src/gate.js +3 -2
- package/dist/cjs/src/gemini.js +1 -1
- package/dist/cjs/src/hitbtc.js +1 -1
- package/dist/cjs/src/hollaex.js +1 -1
- package/dist/cjs/src/htx.js +3 -3
- package/dist/cjs/src/huobijp.js +1 -1
- package/dist/cjs/src/hyperliquid.js +3 -3
- package/dist/cjs/src/idex.js +1 -1
- package/dist/cjs/src/independentreserve.js +1 -1
- package/dist/cjs/src/indodax.js +1 -1
- package/dist/cjs/src/kraken.js +2 -2
- package/dist/cjs/src/kucoin.js +136 -47
- package/dist/cjs/src/kucoinfutures.js +1 -1
- package/dist/cjs/src/kuna.js +1 -1
- package/dist/cjs/src/latoken.js +1 -1
- package/dist/cjs/src/lbank.js +28 -7
- package/dist/cjs/src/luno.js +1 -1
- package/dist/cjs/src/lykke.js +1 -1
- package/dist/cjs/src/mercado.js +1 -1
- package/dist/cjs/src/mexc.js +1 -1
- package/dist/cjs/src/ndax.js +1 -1
- package/dist/cjs/src/novadax.js +1 -1
- package/dist/cjs/src/oceanex.js +1 -1
- package/dist/cjs/src/okcoin.js +1 -1
- package/dist/cjs/src/okx.js +3 -3
- package/dist/cjs/src/onetrading.js +1 -1
- package/dist/cjs/src/oxfun.js +2 -2
- package/dist/cjs/src/p2b.js +1 -1
- package/dist/cjs/src/paymium.js +1 -1
- package/dist/cjs/src/phemex.js +2 -2
- package/dist/cjs/src/poloniex.js +4 -3
- package/dist/cjs/src/poloniexfutures.js +1 -1
- package/dist/cjs/src/pro/binance.js +2 -2
- package/dist/cjs/src/pro/bitvavo.js +2 -2
- package/dist/cjs/src/pro/bybit.js +2 -2
- package/dist/cjs/src/pro/cex.js +3 -3
- package/dist/cjs/src/pro/coinbase.js +23 -1
- package/dist/cjs/src/pro/cryptocom.js +1 -1
- package/dist/cjs/src/pro/gate.js +2 -2
- package/dist/cjs/src/pro/hitbtc.js +1 -1
- package/dist/cjs/src/pro/kraken.js +2 -2
- package/dist/cjs/src/pro/kucoin.js +2 -2
- package/dist/cjs/src/pro/okx.js +2 -2
- package/dist/cjs/src/pro/oxfun.js +2 -2
- package/dist/cjs/src/pro/poloniex.js +1 -1
- package/dist/cjs/src/pro/vertex.js +1 -1
- package/dist/cjs/src/probit.js +1 -1
- package/dist/cjs/src/timex.js +1 -1
- package/dist/cjs/src/tokocrypto.js +1 -1
- package/dist/cjs/src/tradeogre.js +1 -1
- package/dist/cjs/src/upbit.js +1 -1
- package/dist/cjs/src/vertex.js +2 -2
- package/dist/cjs/src/wavesexchange.js +1 -1
- package/dist/cjs/src/wazirx.js +1 -1
- package/dist/cjs/src/whitebit.js +2 -2
- package/dist/cjs/src/woo.js +5 -5
- package/dist/cjs/src/woofipro.js +3 -3
- package/dist/cjs/src/yobit.js +1 -1
- package/dist/cjs/src/zaif.js +1 -1
- package/dist/cjs/src/zonda.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bingx.d.ts +16 -0
- package/js/src/abstract/kucoin.d.ts +3 -0
- package/js/src/abstract/kucoinfutures.d.ts +3 -0
- package/js/src/ace.js +1 -1
- package/js/src/alpaca.js +1 -1
- package/js/src/ascendex.d.ts +1 -1
- package/js/src/ascendex.js +6 -4
- package/js/src/base/Exchange.d.ts +1 -0
- package/js/src/base/Exchange.js +26 -2
- package/js/src/base/types.d.ts +4 -0
- package/js/src/bigone.js +1 -1
- package/js/src/binance.js +13 -13
- package/js/src/bingx.js +38 -4
- package/js/src/bit2c.js +1 -1
- package/js/src/bitbank.js +1 -1
- package/js/src/bitbns.js +1 -1
- package/js/src/bitfinex.js +1 -1
- package/js/src/bitfinex2.js +1 -1
- package/js/src/bitflyer.d.ts +1 -1
- package/js/src/bitflyer.js +8 -2
- package/js/src/bitget.js +2 -2
- package/js/src/bithumb.js +1 -1
- package/js/src/bitmart.js +3 -3
- package/js/src/bitmex.js +1 -1
- package/js/src/bitopro.d.ts +3 -2
- package/js/src/bitopro.js +21 -4
- package/js/src/bitrue.js +1 -1
- package/js/src/bitso.js +1 -1
- package/js/src/bitstamp.js +1 -1
- package/js/src/bitteam.js +1 -1
- package/js/src/bitvavo.js +2 -2
- package/js/src/bl3p.js +1 -1
- package/js/src/blockchaincom.js +28 -28
- package/js/src/blofin.js +1 -1
- package/js/src/btcalpha.js +5 -13
- package/js/src/btcbox.js +1 -1
- package/js/src/btcmarkets.js +28 -29
- package/js/src/btcturk.js +1 -1
- package/js/src/bybit.js +11 -7
- package/js/src/cex.js +2 -2
- package/js/src/coinbase.js +33 -33
- package/js/src/coinbaseexchange.js +1 -1
- package/js/src/coinbaseinternational.js +1 -1
- package/js/src/coincheck.js +1 -1
- package/js/src/coinex.js +2 -2
- package/js/src/coinlist.js +2 -2
- package/js/src/coinmate.js +1 -1
- package/js/src/coinmetro.js +1 -1
- package/js/src/coinone.js +1 -1
- package/js/src/coinsph.js +1 -1
- package/js/src/coinspot.js +1 -1
- package/js/src/cryptocom.js +1 -1
- package/js/src/currencycom.js +1 -1
- package/js/src/delta.d.ts +1 -1
- package/js/src/delta.js +7 -3
- package/js/src/deribit.js +4 -4
- package/js/src/digifinex.js +2 -2
- package/js/src/exmo.js +2 -2
- package/js/src/gate.js +3 -2
- package/js/src/gemini.js +1 -1
- package/js/src/hitbtc.js +1 -1
- package/js/src/hollaex.js +1 -1
- package/js/src/htx.js +3 -3
- package/js/src/huobijp.js +1 -1
- package/js/src/hyperliquid.js +3 -3
- package/js/src/idex.js +1 -1
- package/js/src/independentreserve.js +1 -1
- package/js/src/indodax.js +1 -1
- package/js/src/kraken.js +2 -2
- package/js/src/kucoin.d.ts +1 -0
- package/js/src/kucoin.js +136 -47
- package/js/src/kucoinfutures.js +1 -1
- package/js/src/kuna.js +1 -1
- package/js/src/latoken.js +1 -1
- package/js/src/lbank.d.ts +2 -2
- package/js/src/lbank.js +28 -7
- package/js/src/luno.js +1 -1
- package/js/src/lykke.js +1 -1
- package/js/src/mercado.js +1 -1
- package/js/src/mexc.js +1 -1
- package/js/src/ndax.js +1 -1
- package/js/src/novadax.js +1 -1
- package/js/src/oceanex.js +1 -1
- package/js/src/okcoin.js +1 -1
- package/js/src/okx.js +3 -3
- package/js/src/onetrading.js +1 -1
- package/js/src/oxfun.js +2 -2
- package/js/src/p2b.js +1 -1
- package/js/src/paymium.js +1 -1
- package/js/src/phemex.js +2 -2
- package/js/src/poloniex.js +4 -3
- package/js/src/poloniexfutures.js +1 -1
- package/js/src/pro/binance.js +2 -2
- package/js/src/pro/bitvavo.js +2 -2
- package/js/src/pro/bybit.js +2 -2
- package/js/src/pro/cex.js +3 -3
- package/js/src/pro/coinbase.d.ts +1 -0
- package/js/src/pro/coinbase.js +23 -1
- package/js/src/pro/cryptocom.js +1 -1
- package/js/src/pro/gate.js +2 -2
- package/js/src/pro/hitbtc.js +1 -1
- package/js/src/pro/kraken.js +2 -2
- package/js/src/pro/kucoin.js +2 -2
- package/js/src/pro/okx.js +2 -2
- package/js/src/pro/oxfun.js +2 -2
- package/js/src/pro/poloniex.js +1 -1
- package/js/src/pro/vertex.js +1 -1
- package/js/src/probit.js +1 -1
- package/js/src/timex.js +1 -1
- package/js/src/tokocrypto.js +1 -1
- package/js/src/tradeogre.js +1 -1
- package/js/src/upbit.js +1 -1
- package/js/src/vertex.js +2 -2
- package/js/src/wavesexchange.js +1 -1
- package/js/src/wazirx.js +1 -1
- package/js/src/whitebit.js +2 -2
- package/js/src/woo.js +5 -5
- package/js/src/woofipro.js +3 -3
- package/js/src/yobit.js +1 -1
- package/js/src/zaif.js +1 -1
- package/js/src/zonda.js +1 -1
- package/package.json +58 -52
|
@@ -48,6 +48,7 @@ interface Exchange {
|
|
|
48
48
|
privateGetMarketOrderbookLevel3(params?: {}): Promise<implicitReturnType>;
|
|
49
49
|
privateGetHfOrdersActive(params?: {}): Promise<implicitReturnType>;
|
|
50
50
|
privateGetHfOrdersActiveSymbols(params?: {}): Promise<implicitReturnType>;
|
|
51
|
+
privateGetHfMarginOrderActiveSymbols(params?: {}): Promise<implicitReturnType>;
|
|
51
52
|
privateGetHfOrdersDone(params?: {}): Promise<implicitReturnType>;
|
|
52
53
|
privateGetHfOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
53
54
|
privateGetHfOrdersClientOrderClientOid(params?: {}): Promise<implicitReturnType>;
|
|
@@ -75,6 +76,7 @@ interface Exchange {
|
|
|
75
76
|
privateGetMarginCurrencies(params?: {}): Promise<implicitReturnType>;
|
|
76
77
|
privateGetRiskLimitStrategy(params?: {}): Promise<implicitReturnType>;
|
|
77
78
|
privateGetIsolatedSymbols(params?: {}): Promise<implicitReturnType>;
|
|
79
|
+
privateGetMarginSymbols(params?: {}): Promise<implicitReturnType>;
|
|
78
80
|
privateGetIsolatedAccountSymbol(params?: {}): Promise<implicitReturnType>;
|
|
79
81
|
privateGetMarginBorrow(params?: {}): Promise<implicitReturnType>;
|
|
80
82
|
privateGetMarginRepay(params?: {}): Promise<implicitReturnType>;
|
|
@@ -116,6 +118,7 @@ interface Exchange {
|
|
|
116
118
|
privatePostRedeem(params?: {}): Promise<implicitReturnType>;
|
|
117
119
|
privatePostLendPurchaseUpdate(params?: {}): Promise<implicitReturnType>;
|
|
118
120
|
privatePostBulletPrivate(params?: {}): Promise<implicitReturnType>;
|
|
121
|
+
privatePostPositionUpdateUserLeverage(params?: {}): Promise<implicitReturnType>;
|
|
119
122
|
privateDeleteSubApiKey(params?: {}): Promise<implicitReturnType>;
|
|
120
123
|
privateDeleteWithdrawalsWithdrawalId(params?: {}): Promise<implicitReturnType>;
|
|
121
124
|
privateDeleteHfOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
@@ -48,6 +48,7 @@ interface kucoin {
|
|
|
48
48
|
privateGetMarketOrderbookLevel3(params?: {}): Promise<implicitReturnType>;
|
|
49
49
|
privateGetHfOrdersActive(params?: {}): Promise<implicitReturnType>;
|
|
50
50
|
privateGetHfOrdersActiveSymbols(params?: {}): Promise<implicitReturnType>;
|
|
51
|
+
privateGetHfMarginOrderActiveSymbols(params?: {}): Promise<implicitReturnType>;
|
|
51
52
|
privateGetHfOrdersDone(params?: {}): Promise<implicitReturnType>;
|
|
52
53
|
privateGetHfOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
53
54
|
privateGetHfOrdersClientOrderClientOid(params?: {}): Promise<implicitReturnType>;
|
|
@@ -75,6 +76,7 @@ interface kucoin {
|
|
|
75
76
|
privateGetMarginCurrencies(params?: {}): Promise<implicitReturnType>;
|
|
76
77
|
privateGetRiskLimitStrategy(params?: {}): Promise<implicitReturnType>;
|
|
77
78
|
privateGetIsolatedSymbols(params?: {}): Promise<implicitReturnType>;
|
|
79
|
+
privateGetMarginSymbols(params?: {}): Promise<implicitReturnType>;
|
|
78
80
|
privateGetIsolatedAccountSymbol(params?: {}): Promise<implicitReturnType>;
|
|
79
81
|
privateGetMarginBorrow(params?: {}): Promise<implicitReturnType>;
|
|
80
82
|
privateGetMarginRepay(params?: {}): Promise<implicitReturnType>;
|
|
@@ -116,6 +118,7 @@ interface kucoin {
|
|
|
116
118
|
privatePostRedeem(params?: {}): Promise<implicitReturnType>;
|
|
117
119
|
privatePostLendPurchaseUpdate(params?: {}): Promise<implicitReturnType>;
|
|
118
120
|
privatePostBulletPrivate(params?: {}): Promise<implicitReturnType>;
|
|
121
|
+
privatePostPositionUpdateUserLeverage(params?: {}): Promise<implicitReturnType>;
|
|
119
122
|
privateDeleteSubApiKey(params?: {}): Promise<implicitReturnType>;
|
|
120
123
|
privateDeleteWithdrawalsWithdrawalId(params?: {}): Promise<implicitReturnType>;
|
|
121
124
|
privateDeleteHfOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
package/js/src/ace.js
CHANGED
|
@@ -601,7 +601,7 @@ export default class ace extends Exchange {
|
|
|
601
601
|
* @param {string} type 'market' or 'limit'
|
|
602
602
|
* @param {string} side 'buy' or 'sell'
|
|
603
603
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
604
|
-
* @param {float} [price] the price at which the order is to be
|
|
604
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
605
605
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
606
606
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
607
607
|
*/
|
package/js/src/alpaca.js
CHANGED
|
@@ -694,7 +694,7 @@ export default class alpaca extends Exchange {
|
|
|
694
694
|
* @param {string} type 'market', 'limit' or 'stop_limit'
|
|
695
695
|
* @param {string} side 'buy' or 'sell'
|
|
696
696
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
697
|
-
* @param {float} [price] the price at which the order is to be
|
|
697
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
698
698
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
699
699
|
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
700
700
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/ascendex.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export default class ascendex extends Exchange {
|
|
|
33
33
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
34
34
|
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
35
35
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
36
|
-
cancelAllOrders(symbol?: Str, params?: {}): Promise<
|
|
36
|
+
cancelAllOrders(symbol?: Str, params?: {}): Promise<Order>;
|
|
37
37
|
parseDepositAddress(depositAddress: any, currency?: Currency): {
|
|
38
38
|
currency: string;
|
|
39
39
|
address: string;
|
package/js/src/ascendex.js
CHANGED
|
@@ -1503,7 +1503,7 @@ export default class ascendex extends Exchange {
|
|
|
1503
1503
|
* @param {string} type 'market' or 'limit'
|
|
1504
1504
|
* @param {string} side 'buy' or 'sell'
|
|
1505
1505
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
1506
|
-
* @param {float} [price] the price at which the order is to be
|
|
1506
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1507
1507
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1508
1508
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1509
1509
|
* @param {bool} [params.postOnly] true or false
|
|
@@ -1592,7 +1592,7 @@ export default class ascendex extends Exchange {
|
|
|
1592
1592
|
* @param {string} type "limit" or "market"
|
|
1593
1593
|
* @param {string} side "buy" or "sell"
|
|
1594
1594
|
* @param {float} amount the amount of currency to trade
|
|
1595
|
-
* @param {float} [price]
|
|
1595
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1596
1596
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1597
1597
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1598
1598
|
* @param {bool} [params.postOnly] true or false
|
|
@@ -2308,7 +2308,7 @@ export default class ascendex extends Exchange {
|
|
|
2308
2308
|
* @see https://ascendex.github.io/ascendex-futures-pro-api-v2/#cancel-all-open-orders
|
|
2309
2309
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2310
2310
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2311
|
-
* @returns {object[]} a list
|
|
2311
|
+
* @returns {object[]} a list with a single [order structure]{@link https://docs.ccxt.com/#/?id=order-structure} with the response assigned to the info property
|
|
2312
2312
|
*/
|
|
2313
2313
|
await this.loadMarkets();
|
|
2314
2314
|
await this.loadAccounts();
|
|
@@ -2374,7 +2374,9 @@ export default class ascendex extends Exchange {
|
|
|
2374
2374
|
// }
|
|
2375
2375
|
// }
|
|
2376
2376
|
//
|
|
2377
|
-
return
|
|
2377
|
+
return this.safeOrder({
|
|
2378
|
+
'info': response,
|
|
2379
|
+
});
|
|
2378
2380
|
}
|
|
2379
2381
|
parseDepositAddress(depositAddress, currency = undefined) {
|
|
2380
2382
|
//
|
package/js/src/base/Exchange.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// ----------------------------------------------------------------------------
|
|
8
8
|
/* eslint-disable */
|
|
9
9
|
import * as functions from './functions.js';
|
|
10
|
-
const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sortBy2, safeFloat2, groupBy, aggregate, uuid, unCamelCase, precisionFromString, Throttler, capitalize, now, decimalToPrecision, safeValue, safeValue2, safeString, safeString2, seconds, milliseconds, binaryToBase16, numberToBE, base16ToBinary, iso8601, omit, isJsonEncodedObject, safeInteger, sum, omitZero, implodeParams, extractParams, json, merge, binaryConcat, hash, ecdsa, arrayConcat, encode, urlencode, hmac, numberToString, parseTimeframe, safeInteger2, safeStringLower, parse8601, yyyymmdd, safeStringUpper, safeTimestamp, binaryConcatArray, uuidv1, numberToLE, ymdhms, stringToBase64, decode, uuid22, safeIntegerProduct2, safeIntegerProduct, safeStringLower2, yymmdd, base58ToBinary, binaryToBase58, safeTimestamp2, rawencode, keysort, inArray, isEmpty, ordered, filterBy, uuid16, safeFloat, base64ToBinary, safeStringUpper2, urlencodeWithArrayRepeat, microseconds, binaryToBase64, strip, toArray, safeFloatN, safeIntegerN, safeIntegerProductN, safeTimestampN, safeValueN, safeStringN, safeStringLowerN, safeStringUpperN, urlencodeNested, urlencodeBase64, parseDate, ymd, base64ToString, crc32, packb, TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING, TICK_SIZE, SIGNIFICANT_DIGITS } = functions;
|
|
10
|
+
const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sortBy2, safeFloat2, groupBy, aggregate, uuid, unCamelCase, precisionFromString, Throttler, capitalize, now, decimalToPrecision, safeValue, safeValue2, safeString, safeString2, seconds, milliseconds, binaryToBase16, numberToBE, base16ToBinary, iso8601, omit, isJsonEncodedObject, safeInteger, sum, omitZero, implodeParams, extractParams, json, merge, binaryConcat, hash, ecdsa, arrayConcat, encode, urlencode, hmac, numberToString, parseTimeframe, safeInteger2, safeStringLower, parse8601, yyyymmdd, safeStringUpper, safeTimestamp, binaryConcatArray, uuidv1, numberToLE, ymdhms, stringToBase64, decode, uuid22, safeIntegerProduct2, safeIntegerProduct, safeStringLower2, yymmdd, base58ToBinary, binaryToBase58, safeTimestamp2, rawencode, keysort, inArray, isEmpty, ordered, filterBy, uuid16, safeFloat, base64ToBinary, safeStringUpper2, urlencodeWithArrayRepeat, microseconds, binaryToBase64, strip, toArray, safeFloatN, safeIntegerN, safeIntegerProductN, safeTimestampN, safeValueN, safeStringN, safeStringLowerN, safeStringUpperN, urlencodeNested, urlencodeBase64, parseDate, ymd, base64ToString, crc32, packb, TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING, TICK_SIZE, SIGNIFICANT_DIGITS, sleep } = functions;
|
|
11
11
|
import { keys as keysFunc, values as valuesFunc, vwap as vwapFunc } from './functions.js';
|
|
12
12
|
// import exceptions from "./errors.js"
|
|
13
13
|
import { // eslint-disable-line object-curly-newline
|
|
@@ -31,6 +31,7 @@ import { SecureRandom } from "../static_dependencies/jsencrypt/lib/jsbn/rng.js";
|
|
|
31
31
|
export default class Exchange {
|
|
32
32
|
constructor(userConfig = {}) {
|
|
33
33
|
this.throttleProp = undefined;
|
|
34
|
+
this.sleep = sleep;
|
|
34
35
|
this.api = undefined;
|
|
35
36
|
this.userAgent = undefined;
|
|
36
37
|
this.user_agent = undefined;
|
|
@@ -3792,7 +3793,30 @@ export default class Exchange {
|
|
|
3792
3793
|
this.last_request_headers = request['headers'];
|
|
3793
3794
|
this.last_request_body = request['body'];
|
|
3794
3795
|
this.last_request_url = request['url'];
|
|
3795
|
-
|
|
3796
|
+
let retries = undefined;
|
|
3797
|
+
[retries, params] = this.handleOptionAndParams(params, path, 'maxRetriesOnFailure', 0);
|
|
3798
|
+
let retryDelay = undefined;
|
|
3799
|
+
[retryDelay, params] = this.handleOptionAndParams(params, path, 'maxRetriesOnFailureDelay', 0);
|
|
3800
|
+
for (let i = 0; i < retries + 1; i++) {
|
|
3801
|
+
try {
|
|
3802
|
+
return await this.fetch(request['url'], request['method'], request['headers'], request['body']);
|
|
3803
|
+
}
|
|
3804
|
+
catch (e) {
|
|
3805
|
+
if (e instanceof NetworkError) {
|
|
3806
|
+
if (i < retries) {
|
|
3807
|
+
if (this.verbose) {
|
|
3808
|
+
this.log('Request failed with the error: ' + e.toString() + ', retrying ' + (i + 1).toString() + ' of ' + retries.toString() + '...');
|
|
3809
|
+
}
|
|
3810
|
+
if ((retryDelay !== undefined) && (retryDelay !== 0)) {
|
|
3811
|
+
await this.sleep(retryDelay);
|
|
3812
|
+
}
|
|
3813
|
+
continue;
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
3816
|
+
throw e;
|
|
3817
|
+
}
|
|
3818
|
+
}
|
|
3819
|
+
return undefined; // this line is never reached, but exists for c# value return requirement
|
|
3796
3820
|
}
|
|
3797
3821
|
async request(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined, config = {}) {
|
|
3798
3822
|
return await this.fetch2(path, api, method, params, headers, body, config);
|
package/js/src/base/types.d.ts
CHANGED
package/js/src/bigone.js
CHANGED
|
@@ -1463,7 +1463,7 @@ export default class bigone extends Exchange {
|
|
|
1463
1463
|
* @param {string} type 'market' or 'limit'
|
|
1464
1464
|
* @param {string} side 'buy' or 'sell'
|
|
1465
1465
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1466
|
-
* @param {float} [price] the price at which the order is to be
|
|
1466
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1467
1467
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1468
1468
|
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
1469
1469
|
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
package/js/src/binance.js
CHANGED
|
@@ -1546,7 +1546,7 @@ export default class binance extends Exchange {
|
|
|
1546
1546
|
'-3042': BadRequest,
|
|
1547
1547
|
'-3043': PermissionDenied,
|
|
1548
1548
|
'-3044': OperationFailed,
|
|
1549
|
-
'-3045':
|
|
1549
|
+
'-3045': OperationRejected,
|
|
1550
1550
|
'-3999': PermissionDenied,
|
|
1551
1551
|
//
|
|
1552
1552
|
// 4xxx (different from contract markets)
|
|
@@ -1565,7 +1565,7 @@ export default class binance extends Exchange {
|
|
|
1565
1565
|
'-4011': BadRequest,
|
|
1566
1566
|
'-4012': PermissionDenied,
|
|
1567
1567
|
'-4013': AuthenticationError,
|
|
1568
|
-
'-4014':
|
|
1568
|
+
'-4014': OperationRejected,
|
|
1569
1569
|
'-4015': PermissionDenied,
|
|
1570
1570
|
'-4016': PermissionDenied,
|
|
1571
1571
|
'-4017': PermissionDenied,
|
|
@@ -1574,7 +1574,7 @@ export default class binance extends Exchange {
|
|
|
1574
1574
|
'-4020': ExchangeError,
|
|
1575
1575
|
'-4021': BadRequest,
|
|
1576
1576
|
'-4022': BadRequest,
|
|
1577
|
-
'-4023':
|
|
1577
|
+
'-4023': OperationRejected,
|
|
1578
1578
|
'-4024': InsufficientFunds,
|
|
1579
1579
|
'-4025': InsufficientFunds,
|
|
1580
1580
|
'-4026': InsufficientFunds,
|
|
@@ -1583,7 +1583,7 @@ export default class binance extends Exchange {
|
|
|
1583
1583
|
'-4029': BadRequest,
|
|
1584
1584
|
'-4030': BadResponse,
|
|
1585
1585
|
'-4031': OperationFailed,
|
|
1586
|
-
'-4032':
|
|
1586
|
+
'-4032': OperationRejected,
|
|
1587
1587
|
'-4033': BadRequest,
|
|
1588
1588
|
'-4034': OperationRejected,
|
|
1589
1589
|
'-4035': PermissionDenied,
|
|
@@ -1706,7 +1706,7 @@ export default class binance extends Exchange {
|
|
|
1706
1706
|
'-5003': InsufficientFunds,
|
|
1707
1707
|
'-5004': OperationRejected,
|
|
1708
1708
|
'-5005': OperationRejected,
|
|
1709
|
-
'-5006':
|
|
1709
|
+
'-5006': OperationRejected,
|
|
1710
1710
|
'-5007': BadRequest,
|
|
1711
1711
|
'-5008': OperationRejected,
|
|
1712
1712
|
'-5009': BadSymbol,
|
|
@@ -1724,8 +1724,8 @@ export default class binance extends Exchange {
|
|
|
1724
1724
|
'-6004': BadRequest,
|
|
1725
1725
|
'-6005': BadRequest,
|
|
1726
1726
|
'-6006': BadRequest,
|
|
1727
|
-
'-6007':
|
|
1728
|
-
'-6008':
|
|
1727
|
+
'-6007': OperationRejected,
|
|
1728
|
+
'-6008': OperationRejected,
|
|
1729
1729
|
'-6009': RateLimitExceeded,
|
|
1730
1730
|
'-6011': OperationRejected,
|
|
1731
1731
|
'-6012': InsufficientFunds,
|
|
@@ -4749,7 +4749,7 @@ export default class binance extends Exchange {
|
|
|
4749
4749
|
* @param {string} type 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
|
|
4750
4750
|
* @param {string} side 'buy' or 'sell'
|
|
4751
4751
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4752
|
-
* @param {float} [price] the price at which the order is to be
|
|
4752
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4753
4753
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
4754
4754
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4755
4755
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -4814,7 +4814,7 @@ export default class binance extends Exchange {
|
|
|
4814
4814
|
* @param {string} type 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
|
|
4815
4815
|
* @param {string} side 'buy' or 'sell'
|
|
4816
4816
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4817
|
-
* @param {float} [price] the price at which the order is to be
|
|
4817
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4818
4818
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
4819
4819
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
4820
4820
|
* @returns {object} request to be sent to the exchange
|
|
@@ -4973,7 +4973,7 @@ export default class binance extends Exchange {
|
|
|
4973
4973
|
* @param {string} type 'market' or 'limit'
|
|
4974
4974
|
* @param {string} side 'buy' or 'sell'
|
|
4975
4975
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4976
|
-
* @param {float} [price] the price at which the order is to be
|
|
4976
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4977
4977
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4978
4978
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4979
4979
|
*/
|
|
@@ -5029,7 +5029,7 @@ export default class binance extends Exchange {
|
|
|
5029
5029
|
* @param {string} type 'market' or 'limit'
|
|
5030
5030
|
* @param {string} side 'buy' or 'sell'
|
|
5031
5031
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
5032
|
-
* @param {float} [price] the price at which the order is to be
|
|
5032
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
5033
5033
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5034
5034
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5035
5035
|
*/
|
|
@@ -5727,7 +5727,7 @@ export default class binance extends Exchange {
|
|
|
5727
5727
|
* @param {string} type 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
|
|
5728
5728
|
* @param {string} side 'buy' or 'sell'
|
|
5729
5729
|
* @param {float} amount how much of you want to trade in units of the base currency
|
|
5730
|
-
* @param {float} [price] the price that the order is to be
|
|
5730
|
+
* @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
5731
5731
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5732
5732
|
* @param {string} [params.reduceOnly] for swap and future reduceOnly is a string 'true' or 'false' that cant be sent with close position set to true or in hedge mode. For spot margin and option reduceOnly is a boolean.
|
|
5733
5733
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
@@ -5830,7 +5830,7 @@ export default class binance extends Exchange {
|
|
|
5830
5830
|
* @param {string} type 'market' or 'limit'
|
|
5831
5831
|
* @param {string} side 'buy' or 'sell'
|
|
5832
5832
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
5833
|
-
* @param {float} [price] the price that the order is to be
|
|
5833
|
+
* @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
5834
5834
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5835
5835
|
* @returns {object} request to be sent to the exchange
|
|
5836
5836
|
*/
|
package/js/src/bingx.js
CHANGED
|
@@ -104,6 +104,7 @@ export default class bingx extends Exchange {
|
|
|
104
104
|
'subAccount': 'https://open-api.{hostname}/openApi',
|
|
105
105
|
'account': 'https://open-api.{hostname}/openApi',
|
|
106
106
|
'copyTrading': 'https://open-api.{hostname}/openApi',
|
|
107
|
+
'cswap': 'https://open-api.{hostname}/openApi',
|
|
107
108
|
},
|
|
108
109
|
'test': {
|
|
109
110
|
'swap': 'https://open-api-vst.{hostname}/openApi', // only swap is really "test" but since the API keys are the same, we want to keep all the functionalities when the user enables the sandboxmode
|
|
@@ -266,6 +267,36 @@ export default class bingx extends Exchange {
|
|
|
266
267
|
},
|
|
267
268
|
},
|
|
268
269
|
},
|
|
270
|
+
'cswap': {
|
|
271
|
+
'v1': {
|
|
272
|
+
'public': {
|
|
273
|
+
'get': {
|
|
274
|
+
'market/contracts': 1,
|
|
275
|
+
'market/premiumIndex': 1,
|
|
276
|
+
'market/openInterest': 1,
|
|
277
|
+
'market/klines': 1,
|
|
278
|
+
'market/depth': 1,
|
|
279
|
+
'market/ticker': 1,
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
'private': {
|
|
283
|
+
'get': {
|
|
284
|
+
'trade/leverage': 2,
|
|
285
|
+
'trade/forceOrders': 2,
|
|
286
|
+
'trade/allFillOrders': 2,
|
|
287
|
+
'user/commissionRate': 2,
|
|
288
|
+
'user/positions': 2,
|
|
289
|
+
'user/balance': 2,
|
|
290
|
+
},
|
|
291
|
+
'post': {
|
|
292
|
+
'trade/order': 2,
|
|
293
|
+
'trade/leverage': 2,
|
|
294
|
+
'trade/allOpenOrders': 2,
|
|
295
|
+
'trade/closeAllPositions': 2,
|
|
296
|
+
},
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
},
|
|
269
300
|
'contract': {
|
|
270
301
|
'v1': {
|
|
271
302
|
'private': {
|
|
@@ -1526,7 +1557,10 @@ export default class bingx extends Exchange {
|
|
|
1526
1557
|
percentage = percentage.replace('%', '');
|
|
1527
1558
|
}
|
|
1528
1559
|
const change = this.safeString(ticker, 'priceChange');
|
|
1529
|
-
|
|
1560
|
+
let ts = this.safeInteger(ticker, 'closeTime');
|
|
1561
|
+
if (ts === 0) {
|
|
1562
|
+
ts = undefined;
|
|
1563
|
+
}
|
|
1530
1564
|
const datetime = this.iso8601(ts);
|
|
1531
1565
|
const bid = this.safeString(ticker, 'bidPrice');
|
|
1532
1566
|
const bidVolume = this.safeString(ticker, 'bidQty');
|
|
@@ -1846,7 +1880,7 @@ export default class bingx extends Exchange {
|
|
|
1846
1880
|
* @param {string} type 'market' or 'limit'
|
|
1847
1881
|
* @param {string} side 'buy' or 'sell'
|
|
1848
1882
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
1849
|
-
* @param {float} [price] the price at which the order is to be
|
|
1883
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1850
1884
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1851
1885
|
* @returns {object} request to be sent to the exchange
|
|
1852
1886
|
*/
|
|
@@ -2046,7 +2080,7 @@ export default class bingx extends Exchange {
|
|
|
2046
2080
|
* @param {string} type 'market' or 'limit'
|
|
2047
2081
|
* @param {string} side 'buy' or 'sell'
|
|
2048
2082
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
2049
|
-
* @param {float} [price] the price at which the order is to be
|
|
2083
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2050
2084
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2051
2085
|
* @param {string} [params.clientOrderId] a unique id for the order
|
|
2052
2086
|
* @param {bool} [params.postOnly] true to place a post only order
|
|
@@ -4387,7 +4421,7 @@ export default class bingx extends Exchange {
|
|
|
4387
4421
|
* @param {string} type 'market' or 'limit'
|
|
4388
4422
|
* @param {string} side 'buy' or 'sell'
|
|
4389
4423
|
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
4390
|
-
* @param {float} [price] the price at which the order is to be
|
|
4424
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4391
4425
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4392
4426
|
* @param {string} [params.stopPrice] Trigger price used for TAKE_STOP_LIMIT, TAKE_STOP_MARKET, TRIGGER_LIMIT, TRIGGER_MARKET order types.
|
|
4393
4427
|
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
|
package/js/src/bit2c.js
CHANGED
|
@@ -429,7 +429,7 @@ export default class bit2c extends Exchange {
|
|
|
429
429
|
* @param {string} type 'market' or 'limit'
|
|
430
430
|
* @param {string} side 'buy' or 'sell'
|
|
431
431
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
432
|
-
* @param {float} [price] the price at which the order is to be
|
|
432
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
433
433
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
434
434
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
435
435
|
*/
|
package/js/src/bitbank.js
CHANGED
|
@@ -651,7 +651,7 @@ export default class bitbank extends Exchange {
|
|
|
651
651
|
* @param {string} type 'market' or 'limit'
|
|
652
652
|
* @param {string} side 'buy' or 'sell'
|
|
653
653
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
654
|
-
* @param {float} [price] the price at which the order is to be
|
|
654
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
655
655
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
656
656
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
657
657
|
*/
|
package/js/src/bitbns.js
CHANGED
|
@@ -590,7 +590,7 @@ export default class bitbns extends Exchange {
|
|
|
590
590
|
* @param {string} type 'market' or 'limit'
|
|
591
591
|
* @param {string} side 'buy' or 'sell'
|
|
592
592
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
593
|
-
* @param {float} [price] the price at which the order is to be
|
|
593
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
594
594
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
595
595
|
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
596
596
|
*
|
package/js/src/bitfinex.js
CHANGED
|
@@ -1085,7 +1085,7 @@ export default class bitfinex extends Exchange {
|
|
|
1085
1085
|
* @param {string} type 'market' or 'limit'
|
|
1086
1086
|
* @param {string} side 'buy' or 'sell'
|
|
1087
1087
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1088
|
-
* @param {float} [price] the price at which the order is to be
|
|
1088
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1089
1089
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1090
1090
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1091
1091
|
*/
|
package/js/src/bitfinex2.js
CHANGED
|
@@ -3659,7 +3659,7 @@ export default class bitfinex2 extends Exchange {
|
|
|
3659
3659
|
* @param {string} type 'market' or 'limit'
|
|
3660
3660
|
* @param {string} side 'buy' or 'sell'
|
|
3661
3661
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
3662
|
-
* @param {float} [price] the price
|
|
3662
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
3663
3663
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3664
3664
|
* @param {float} [params.stopPrice] the price that triggers a trigger order
|
|
3665
3665
|
* @param {boolean} [params.postOnly] set to true if you want to make a post only order
|
package/js/src/bitflyer.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export default class bitflyer extends Exchange {
|
|
|
18
18
|
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
19
19
|
fetchTradingFee(symbol: string, params?: {}): Promise<TradingFeeInterface>;
|
|
20
20
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
21
|
-
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<
|
|
21
|
+
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
22
22
|
parseOrderStatus(status: Str): string;
|
|
23
23
|
parseOrder(order: Dict, market?: Market): Order;
|
|
24
24
|
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
package/js/src/bitflyer.js
CHANGED
|
@@ -557,7 +557,7 @@ export default class bitflyer extends Exchange {
|
|
|
557
557
|
* @param {string} type 'market' or 'limit'
|
|
558
558
|
* @param {string} side 'buy' or 'sell'
|
|
559
559
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
560
|
-
* @param {float} [price] the price at which the order is to be
|
|
560
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
561
561
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
562
562
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
563
563
|
*/
|
|
@@ -596,7 +596,13 @@ export default class bitflyer extends Exchange {
|
|
|
596
596
|
'product_code': this.marketId(symbol),
|
|
597
597
|
'child_order_acceptance_id': id,
|
|
598
598
|
};
|
|
599
|
-
|
|
599
|
+
const response = await this.privatePostCancelchildorder(this.extend(request, params));
|
|
600
|
+
//
|
|
601
|
+
// 200 OK.
|
|
602
|
+
//
|
|
603
|
+
return this.safeOrder({
|
|
604
|
+
'info': response,
|
|
605
|
+
});
|
|
600
606
|
}
|
|
601
607
|
parseOrderStatus(status) {
|
|
602
608
|
const statuses = {
|
package/js/src/bitget.js
CHANGED
|
@@ -4132,7 +4132,7 @@ export default class bitget extends Exchange {
|
|
|
4132
4132
|
* @param {string} type 'market' or 'limit'
|
|
4133
4133
|
* @param {string} side 'buy' or 'sell'
|
|
4134
4134
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
4135
|
-
* @param {float} [price] the price at which the order is to be
|
|
4135
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4136
4136
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4137
4137
|
* @param {float} [params.cost] *spot only* how much you want to trade in units of the quote currency, for market buy orders only
|
|
4138
4138
|
* @param {float} [params.triggerPrice] *swap only* The price at which a trigger order is triggered at
|
|
@@ -4567,7 +4567,7 @@ export default class bitget extends Exchange {
|
|
|
4567
4567
|
* @param {string} type 'market' or 'limit'
|
|
4568
4568
|
* @param {string} side 'buy' or 'sell'
|
|
4569
4569
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
4570
|
-
* @param {float} [price] the price at which the order is to be
|
|
4570
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4571
4571
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4572
4572
|
* @param {float} [params.triggerPrice] the price that a trigger order is triggered at
|
|
4573
4573
|
* @param {float} [params.stopLossPrice] *swap only* The price at which a stop loss order is triggered at
|
package/js/src/bithumb.js
CHANGED
|
@@ -701,7 +701,7 @@ export default class bithumb extends Exchange {
|
|
|
701
701
|
* @param {string} type 'market' or 'limit'
|
|
702
702
|
* @param {string} side 'buy' or 'sell'
|
|
703
703
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
704
|
-
* @param {float} [price] the price at which the order is to be
|
|
704
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
705
705
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
706
706
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
707
707
|
*/
|
package/js/src/bitmart.js
CHANGED
|
@@ -2422,7 +2422,7 @@ export default class bitmart extends Exchange {
|
|
|
2422
2422
|
* @param {string} type 'market', 'limit' or 'trailing' for swap markets only
|
|
2423
2423
|
* @param {string} side 'buy' or 'sell'
|
|
2424
2424
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
2425
|
-
* @param {float} [price] the price at which the order is to be
|
|
2425
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2426
2426
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2427
2427
|
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
2428
2428
|
* @param {string} [params.leverage] *swap only* leverage level
|
|
@@ -2567,7 +2567,7 @@ export default class bitmart extends Exchange {
|
|
|
2567
2567
|
* @param {string} type 'market', 'limit' or 'trailing'
|
|
2568
2568
|
* @param {string} side 'buy' or 'sell'
|
|
2569
2569
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
2570
|
-
* @param {float} [price] the price at which the order is to be
|
|
2570
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2571
2571
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2572
2572
|
* @param {int} [params.leverage] leverage level
|
|
2573
2573
|
* @param {boolean} [params.reduceOnly] *swap only* reduce only
|
|
@@ -2683,7 +2683,7 @@ export default class bitmart extends Exchange {
|
|
|
2683
2683
|
* @param {string} type 'market' or 'limit'
|
|
2684
2684
|
* @param {string} side 'buy' or 'sell'
|
|
2685
2685
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
2686
|
-
* @param {float} [price] the price at which the order is to be
|
|
2686
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2687
2687
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2688
2688
|
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
2689
2689
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/bitmex.js
CHANGED
|
@@ -1865,7 +1865,7 @@ export default class bitmex extends Exchange {
|
|
|
1865
1865
|
* @param {string} type 'market' or 'limit'
|
|
1866
1866
|
* @param {string} side 'buy' or 'sell'
|
|
1867
1867
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1868
|
-
* @param {float} [price] the price at which the order is to be
|
|
1868
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1869
1869
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1870
1870
|
* @param {object} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
1871
1871
|
* @param {object} [params.triggerDirection] the direction whenever the trigger happens with relation to price - 'above' or 'below'
|
package/js/src/bitopro.d.ts
CHANGED
|
@@ -25,8 +25,9 @@ export default class bitopro extends Exchange {
|
|
|
25
25
|
parseOrder(order: Dict, market?: Market): Order;
|
|
26
26
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
27
27
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
parseCancelOrders(data: any): any[];
|
|
29
|
+
cancelOrders(ids: any, symbol?: Str, params?: {}): Promise<any[]>;
|
|
30
|
+
cancelAllOrders(symbol?: Str, params?: {}): Promise<any[]>;
|
|
30
31
|
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
31
32
|
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
32
33
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|