ccxt 4.0.75 → 4.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/ccxt.browser.js +594 -457
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +2 -2
- package/dist/cjs/src/alpaca.js +1 -1
- package/dist/cjs/src/ascendex.js +3 -3
- package/dist/cjs/src/base/Exchange.js +2 -2
- package/dist/cjs/src/bigone.js +2 -2
- package/dist/cjs/src/binance.js +5 -5
- package/dist/cjs/src/bingx.js +64 -19
- package/dist/cjs/src/bit2c.js +2 -2
- package/dist/cjs/src/bitbank.js +2 -2
- package/dist/cjs/src/bitbns.js +2 -2
- package/dist/cjs/src/bitfinex.js +2 -2
- package/dist/cjs/src/bitfinex2.js +4 -4
- package/dist/cjs/src/bitflyer.js +2 -2
- package/dist/cjs/src/bitforex.js +2 -2
- package/dist/cjs/src/bitget.js +5 -5
- package/dist/cjs/src/bithumb.js +2 -2
- package/dist/cjs/src/bitmart.js +2 -2
- package/dist/cjs/src/bitmex.js +5 -5
- package/dist/cjs/src/bitopro.js +3 -3
- package/dist/cjs/src/bitpanda.js +2 -2
- package/dist/cjs/src/bitrue.js +3 -3
- package/dist/cjs/src/bitso.js +2 -2
- package/dist/cjs/src/bitstamp.js +2 -2
- package/dist/cjs/src/bitstamp1.js +2 -2
- package/dist/cjs/src/bittrex.js +3 -3
- package/dist/cjs/src/bitvavo.js +3 -3
- package/dist/cjs/src/bkex.js +4 -4
- package/dist/cjs/src/bl3p.js +2 -2
- package/dist/cjs/src/blockchaincom.js +1 -1
- package/dist/cjs/src/btcalpha.js +2 -2
- package/dist/cjs/src/btcbox.js +2 -2
- package/dist/cjs/src/btcmarkets.js +2 -2
- package/dist/cjs/src/btctradeua.js +2 -2
- package/dist/cjs/src/btcturk.js +2 -2
- package/dist/cjs/src/bybit.js +5 -5
- package/dist/cjs/src/cex.js +2 -2
- package/dist/cjs/src/coinbase.js +3 -3
- package/dist/cjs/src/coinbasepro.js +2 -2
- package/dist/cjs/src/coincheck.js +2 -2
- package/dist/cjs/src/coinex.js +6 -6
- package/dist/cjs/src/coinfalcon.js +2 -2
- package/dist/cjs/src/coinmate.js +2 -2
- package/dist/cjs/src/coinone.js +2 -2
- package/dist/cjs/src/coinsph.js +7 -2
- package/dist/cjs/src/coinspot.js +2 -2
- package/dist/cjs/src/cryptocom.js +5 -5
- package/dist/cjs/src/currencycom.js +2 -2
- package/dist/cjs/src/delta.js +2 -2
- package/dist/cjs/src/deribit.js +3 -3
- package/dist/cjs/src/digifinex.js +4 -4
- package/dist/cjs/src/exmo.js +2 -2
- package/dist/cjs/src/gate.js +4 -4
- package/dist/cjs/src/gemini.js +3 -3
- package/dist/cjs/src/hitbtc.js +4 -4
- package/dist/cjs/src/hollaex.js +3 -3
- package/dist/cjs/src/huobi.js +5 -5
- package/dist/cjs/src/huobijp.js +2 -2
- package/dist/cjs/src/idex.js +2 -2
- package/dist/cjs/src/independentreserve.js +2 -2
- package/dist/cjs/src/indodax.js +2 -2
- package/dist/cjs/src/kraken.js +2 -2
- package/dist/cjs/src/kucoin.js +4 -4
- package/dist/cjs/src/kucoinfutures.js +5 -5
- package/dist/cjs/src/kuna.js +2 -2
- package/dist/cjs/src/latoken.js +2 -2
- package/dist/cjs/src/lbank.js +2 -2
- package/dist/cjs/src/lbank2.js +2 -2
- package/dist/cjs/src/luno.js +2 -2
- package/dist/cjs/src/lykke.js +2 -2
- package/dist/cjs/src/mercado.js +2 -2
- package/dist/cjs/src/mexc.js +6 -4
- package/dist/cjs/src/ndax.js +2 -2
- package/dist/cjs/src/novadax.js +2 -2
- package/dist/cjs/src/oceanex.js +2 -2
- package/dist/cjs/src/okcoin.js +2 -2
- package/dist/cjs/src/okx.js +4 -4
- package/dist/cjs/src/paymium.js +2 -2
- package/dist/cjs/src/phemex.js +2 -2
- package/dist/cjs/src/poloniex.js +165 -81
- package/dist/cjs/src/poloniexfutures.js +2 -2
- package/dist/cjs/src/pro/ascendex.js +2 -2
- package/dist/cjs/src/pro/binance.js +6 -6
- package/dist/cjs/src/pro/bitfinex.js +1 -1
- package/dist/cjs/src/pro/bitfinex2.js +2 -2
- package/dist/cjs/src/pro/bitget.js +2 -2
- package/dist/cjs/src/pro/bitmart.js +1 -1
- package/dist/cjs/src/pro/bitmex.js +2 -2
- package/dist/cjs/src/pro/bitopro.js +2 -2
- package/dist/cjs/src/pro/bitpanda.js +6 -6
- package/dist/cjs/src/pro/bitrue.js +1 -1
- package/dist/cjs/src/pro/bitstamp.js +1 -1
- package/dist/cjs/src/pro/bittrex.js +2 -2
- package/dist/cjs/src/pro/bitvavo.js +1 -1
- package/dist/cjs/src/pro/blockchaincom.js +5 -5
- package/dist/cjs/src/pro/bybit.js +1 -1
- package/dist/cjs/src/pro/cex.js +4 -4
- package/dist/cjs/src/pro/coinbase.js +5 -5
- package/dist/cjs/src/pro/coinbasepro.js +1 -1
- package/dist/cjs/src/pro/coinex.js +2 -2
- package/dist/cjs/src/pro/cryptocom.js +3 -3
- package/dist/cjs/src/pro/currencycom.js +2 -2
- package/dist/cjs/src/pro/deribit.js +3 -3
- package/dist/cjs/src/pro/exmo.js +3 -3
- package/dist/cjs/src/pro/gate.js +2 -2
- package/dist/cjs/src/pro/gemini.js +1 -1
- package/dist/cjs/src/pro/hitbtc.js +1 -1
- package/dist/cjs/src/pro/hollaex.js +2 -2
- package/dist/cjs/src/pro/huobi.js +2 -2
- package/dist/cjs/src/pro/huobijp.js +1 -1
- package/dist/cjs/src/pro/idex.js +1 -1
- package/dist/cjs/src/pro/independentreserve.js +1 -1
- package/dist/cjs/src/pro/kraken.js +6 -6
- package/dist/cjs/src/pro/krakenfutures.js +5 -5
- package/dist/cjs/src/pro/kucoin.js +2 -2
- package/dist/cjs/src/pro/kucoinfutures.js +3 -2
- package/dist/cjs/src/pro/luno.js +1 -1
- package/dist/cjs/src/pro/mexc.js +6 -6
- package/dist/cjs/src/pro/ndax.js +1 -1
- package/dist/cjs/src/pro/okcoin.js +2 -2
- package/dist/cjs/src/pro/okx.js +7 -7
- package/dist/cjs/src/pro/phemex.js +2 -2
- package/dist/cjs/src/pro/poloniex.js +6 -6
- package/dist/cjs/src/pro/poloniexfutures.js +5 -5
- package/dist/cjs/src/pro/probit.js +6 -6
- package/dist/cjs/src/pro/upbit.js +1 -1
- package/dist/cjs/src/pro/wazirx.js +3 -3
- package/dist/cjs/src/pro/whitebit.js +2 -2
- package/dist/cjs/src/probit.js +2 -2
- package/dist/cjs/src/tidex.js +2 -2
- package/dist/cjs/src/timex.js +2 -2
- package/dist/cjs/src/tokocrypto.js +2 -2
- package/dist/cjs/src/upbit.js +2 -2
- package/dist/cjs/src/wavesexchange.js +3 -3
- package/dist/cjs/src/wazirx.js +2 -2
- package/dist/cjs/src/whitebit.js +3 -3
- package/dist/cjs/src/woo.js +2 -2
- package/dist/cjs/src/yobit.js +2 -2
- package/dist/cjs/src/zaif.js +2 -2
- package/dist/cjs/src/zonda.js +2 -2
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bingx.d.ts +2 -0
- package/js/src/abstract/coinsph.d.ts +5 -0
- package/js/src/ace.js +2 -2
- package/js/src/alpaca.js +1 -1
- package/js/src/ascendex.js +3 -3
- package/js/src/base/Exchange.js +2 -2
- package/js/src/bigone.js +2 -2
- package/js/src/binance.js +5 -5
- package/js/src/bingx.d.ts +1 -0
- package/js/src/bingx.js +64 -19
- package/js/src/bit2c.js +2 -2
- package/js/src/bitbank.js +2 -2
- package/js/src/bitbns.js +2 -2
- package/js/src/bitfinex.js +2 -2
- package/js/src/bitfinex2.js +4 -4
- package/js/src/bitflyer.js +2 -2
- package/js/src/bitforex.js +2 -2
- package/js/src/bitget.js +5 -5
- package/js/src/bithumb.js +2 -2
- package/js/src/bitmart.js +2 -2
- package/js/src/bitmex.js +5 -5
- package/js/src/bitopro.js +3 -3
- package/js/src/bitpanda.js +2 -2
- package/js/src/bitrue.js +3 -3
- package/js/src/bitso.js +2 -2
- package/js/src/bitstamp.js +2 -2
- package/js/src/bitstamp1.js +2 -2
- package/js/src/bittrex.js +3 -3
- package/js/src/bitvavo.js +3 -3
- package/js/src/bkex.js +4 -4
- package/js/src/bl3p.js +2 -2
- package/js/src/blockchaincom.js +1 -1
- package/js/src/btcalpha.js +2 -2
- package/js/src/btcbox.js +2 -2
- package/js/src/btcmarkets.js +2 -2
- package/js/src/btctradeua.js +2 -2
- package/js/src/btcturk.js +2 -2
- package/js/src/bybit.js +5 -5
- package/js/src/cex.js +2 -2
- package/js/src/coinbase.js +3 -3
- package/js/src/coinbasepro.js +2 -2
- package/js/src/coincheck.js +2 -2
- package/js/src/coinex.js +6 -6
- package/js/src/coinfalcon.js +2 -2
- package/js/src/coinmate.js +2 -2
- package/js/src/coinone.js +2 -2
- package/js/src/coinsph.js +7 -2
- package/js/src/coinspot.js +2 -2
- package/js/src/cryptocom.js +5 -5
- package/js/src/currencycom.js +2 -2
- package/js/src/delta.js +2 -2
- package/js/src/deribit.js +3 -3
- package/js/src/digifinex.js +4 -4
- package/js/src/exmo.js +2 -2
- package/js/src/gate.js +4 -4
- package/js/src/gemini.js +3 -3
- package/js/src/hitbtc.js +4 -4
- package/js/src/hollaex.js +3 -3
- package/js/src/huobi.js +5 -5
- package/js/src/huobijp.js +2 -2
- package/js/src/idex.js +2 -2
- package/js/src/independentreserve.js +2 -2
- package/js/src/indodax.js +2 -2
- package/js/src/kraken.js +2 -2
- package/js/src/kucoin.js +4 -4
- package/js/src/kucoinfutures.js +5 -5
- package/js/src/kuna.js +2 -2
- package/js/src/latoken.js +2 -2
- package/js/src/lbank.js +2 -2
- package/js/src/lbank2.js +2 -2
- package/js/src/luno.js +2 -2
- package/js/src/lykke.js +2 -2
- package/js/src/mercado.js +2 -2
- package/js/src/mexc.js +7 -5
- package/js/src/ndax.js +2 -2
- package/js/src/novadax.js +2 -2
- package/js/src/oceanex.js +2 -2
- package/js/src/okcoin.js +2 -2
- package/js/src/okx.js +4 -4
- package/js/src/paymium.js +2 -2
- package/js/src/phemex.js +2 -2
- package/js/src/poloniex.d.ts +1 -1
- package/js/src/poloniex.js +165 -81
- package/js/src/poloniexfutures.js +2 -2
- package/js/src/pro/ascendex.js +2 -2
- package/js/src/pro/binance.js +6 -6
- package/js/src/pro/bitfinex.js +1 -1
- package/js/src/pro/bitfinex2.js +2 -2
- package/js/src/pro/bitget.js +2 -2
- package/js/src/pro/bitmart.js +1 -1
- package/js/src/pro/bitmex.js +2 -2
- package/js/src/pro/bitopro.js +2 -2
- package/js/src/pro/bitpanda.js +6 -6
- package/js/src/pro/bitrue.js +1 -1
- package/js/src/pro/bitstamp.js +1 -1
- package/js/src/pro/bittrex.js +2 -2
- package/js/src/pro/bitvavo.js +1 -1
- package/js/src/pro/blockchaincom.js +5 -5
- package/js/src/pro/bybit.js +1 -1
- package/js/src/pro/cex.js +4 -4
- package/js/src/pro/coinbase.js +5 -5
- package/js/src/pro/coinbasepro.js +1 -1
- package/js/src/pro/coinex.js +2 -2
- package/js/src/pro/cryptocom.js +3 -3
- package/js/src/pro/currencycom.js +2 -2
- package/js/src/pro/deribit.js +3 -3
- package/js/src/pro/exmo.js +3 -3
- package/js/src/pro/gate.js +2 -2
- package/js/src/pro/gemini.js +1 -1
- package/js/src/pro/hitbtc.js +1 -1
- package/js/src/pro/hollaex.js +2 -2
- package/js/src/pro/huobi.js +2 -2
- package/js/src/pro/huobijp.js +1 -1
- package/js/src/pro/idex.js +1 -1
- package/js/src/pro/independentreserve.js +1 -1
- package/js/src/pro/kraken.js +6 -6
- package/js/src/pro/krakenfutures.js +5 -5
- package/js/src/pro/kucoin.js +2 -2
- package/js/src/pro/kucoinfutures.js +3 -2
- package/js/src/pro/luno.js +1 -1
- package/js/src/pro/mexc.js +6 -6
- package/js/src/pro/ndax.js +1 -1
- package/js/src/pro/okcoin.js +2 -2
- package/js/src/pro/okx.js +7 -7
- package/js/src/pro/phemex.js +2 -2
- package/js/src/pro/poloniex.js +6 -6
- package/js/src/pro/poloniexfutures.js +5 -5
- package/js/src/pro/probit.js +6 -6
- package/js/src/pro/upbit.js +1 -1
- package/js/src/pro/wazirx.js +3 -3
- package/js/src/pro/whitebit.js +2 -2
- package/js/src/probit.js +2 -2
- package/js/src/tidex.js +2 -2
- package/js/src/timex.js +2 -2
- package/js/src/tokocrypto.js +2 -2
- package/js/src/upbit.js +2 -2
- package/js/src/wavesexchange.js +3 -3
- package/js/src/wazirx.js +2 -2
- package/js/src/whitebit.js +3 -3
- package/js/src/woo.js +2 -2
- package/js/src/yobit.js +2 -2
- package/js/src/zaif.js +2 -2
- package/js/src/zonda.js +2 -2
- package/package.json +1 -1
- package/skip-tests.json +2 -0
package/js/src/poloniex.js
CHANGED
|
@@ -29,9 +29,9 @@ export default class poloniex extends Exchange {
|
|
|
29
29
|
'CORS': undefined,
|
|
30
30
|
'spot': true,
|
|
31
31
|
'margin': undefined,
|
|
32
|
-
'swap':
|
|
33
|
-
'future':
|
|
34
|
-
'option':
|
|
32
|
+
'swap': false,
|
|
33
|
+
'future': false,
|
|
34
|
+
'option': false,
|
|
35
35
|
'cancelAllOrders': true,
|
|
36
36
|
'cancelOrder': true,
|
|
37
37
|
'createDepositAddress': true,
|
|
@@ -918,7 +918,7 @@ export default class poloniex extends Exchange {
|
|
|
918
918
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
919
919
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
920
920
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
921
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
921
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
922
922
|
*/
|
|
923
923
|
await this.loadMarkets();
|
|
924
924
|
const market = this.market(symbol);
|
|
@@ -1099,6 +1099,7 @@ export default class poloniex extends Exchange {
|
|
|
1099
1099
|
};
|
|
1100
1100
|
}
|
|
1101
1101
|
const clientOrderId = this.safeString(order, 'clientOrderId');
|
|
1102
|
+
const triggerPrice = this.safeString2(order, 'triggerPrice', 'stopPrice');
|
|
1102
1103
|
return this.safeOrder({
|
|
1103
1104
|
'info': order,
|
|
1104
1105
|
'id': id,
|
|
@@ -1113,8 +1114,8 @@ export default class poloniex extends Exchange {
|
|
|
1113
1114
|
'postOnly': undefined,
|
|
1114
1115
|
'side': side,
|
|
1115
1116
|
'price': price,
|
|
1116
|
-
'stopPrice':
|
|
1117
|
-
'triggerPrice':
|
|
1117
|
+
'stopPrice': triggerPrice,
|
|
1118
|
+
'triggerPrice': triggerPrice,
|
|
1118
1119
|
'cost': undefined,
|
|
1119
1120
|
'average': this.safeString(order, 'avgPrice'),
|
|
1120
1121
|
'amount': amount,
|
|
@@ -1152,10 +1153,12 @@ export default class poloniex extends Exchange {
|
|
|
1152
1153
|
* @name poloniex#fetchOpenOrders
|
|
1153
1154
|
* @description fetch all unfilled currently open orders
|
|
1154
1155
|
* @see https://docs.poloniex.com/#authenticated-endpoints-orders-open-orders
|
|
1156
|
+
* @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
|
|
1155
1157
|
* @param {string} symbol unified market symbol
|
|
1156
1158
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1157
1159
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1158
1160
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1161
|
+
* @param {boolean} [params.stop] set true to fetch trigger orders instead of regular orders
|
|
1159
1162
|
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1160
1163
|
*/
|
|
1161
1164
|
await this.loadMarkets();
|
|
@@ -1168,7 +1171,15 @@ export default class poloniex extends Exchange {
|
|
|
1168
1171
|
if (limit !== undefined) {
|
|
1169
1172
|
request['limit'] = limit;
|
|
1170
1173
|
}
|
|
1171
|
-
const
|
|
1174
|
+
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
1175
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
1176
|
+
let response = undefined;
|
|
1177
|
+
if (isTrigger) {
|
|
1178
|
+
response = await this.privateGetSmartorders(this.extend(request, params));
|
|
1179
|
+
}
|
|
1180
|
+
else {
|
|
1181
|
+
response = await this.privateGetOrders(this.extend(request, params));
|
|
1182
|
+
}
|
|
1172
1183
|
//
|
|
1173
1184
|
// [
|
|
1174
1185
|
// {
|
|
@@ -1186,6 +1197,7 @@ export default class poloniex extends Exchange {
|
|
|
1186
1197
|
// "amount" : "0",
|
|
1187
1198
|
// "filledQuantity" : "0",
|
|
1188
1199
|
// "filledAmount" : "0",
|
|
1200
|
+
// "stopPrice": "3750.00", // for trigger orders
|
|
1189
1201
|
// "createTime" : 16xxxxxxxxx26,
|
|
1190
1202
|
// "updateTime" : 16xxxxxxxxx36
|
|
1191
1203
|
// }
|
|
@@ -1195,36 +1207,46 @@ export default class poloniex extends Exchange {
|
|
|
1195
1207
|
return this.parseOrders(response, market, since, limit, extension);
|
|
1196
1208
|
}
|
|
1197
1209
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
//
|
|
1212
|
-
//
|
|
1213
|
-
//
|
|
1210
|
+
//
|
|
1211
|
+
// @method
|
|
1212
|
+
// @name poloniex#createOrder
|
|
1213
|
+
// @description create a trade order
|
|
1214
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
|
|
1215
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-create-order // trigger orders
|
|
1216
|
+
// @param {string} symbol unified symbol of the market to create an order in
|
|
1217
|
+
// @param {string} type 'market' or 'limit'
|
|
1218
|
+
// @param {string} side 'buy' or 'sell'
|
|
1219
|
+
// @param {float} amount how much of currency you want to trade in units of base currency
|
|
1220
|
+
// @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1221
|
+
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1222
|
+
// <<<<<<< HEAD
|
|
1223
|
+
// @param {float} [params.triggerPrice] *spot only* The price at which a trigger order is triggered at
|
|
1224
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1225
|
+
// =======
|
|
1226
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1227
|
+
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1228
|
+
//
|
|
1214
1229
|
await this.loadMarkets();
|
|
1215
1230
|
const market = this.market(symbol);
|
|
1216
1231
|
if (!market['spot']) {
|
|
1217
1232
|
throw new NotSupported(this.id + ' createOrder() does not support ' + market['type'] + ' orders, only spot orders are accepted');
|
|
1218
1233
|
}
|
|
1219
|
-
|
|
1234
|
+
let request = {
|
|
1220
1235
|
'symbol': market['id'],
|
|
1221
1236
|
'side': side,
|
|
1222
1237
|
// 'timeInForce': timeInForce,
|
|
1223
1238
|
// 'accountType': 'SPOT',
|
|
1224
1239
|
// 'amount': amount,
|
|
1225
1240
|
};
|
|
1226
|
-
const
|
|
1227
|
-
|
|
1241
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
1242
|
+
[request, params] = this.orderRequest(symbol, type, side, amount, request, price, params);
|
|
1243
|
+
let response = undefined;
|
|
1244
|
+
if (triggerPrice !== undefined) {
|
|
1245
|
+
response = await this.privatePostSmartorders(this.extend(request, params));
|
|
1246
|
+
}
|
|
1247
|
+
else {
|
|
1248
|
+
response = await this.privatePostOrders(this.extend(request, params));
|
|
1249
|
+
}
|
|
1228
1250
|
//
|
|
1229
1251
|
// {
|
|
1230
1252
|
// "id" : "78923648051920896",
|
|
@@ -1241,9 +1263,14 @@ export default class poloniex extends Exchange {
|
|
|
1241
1263
|
let upperCaseType = type.toUpperCase();
|
|
1242
1264
|
const isMarket = upperCaseType === 'MARKET';
|
|
1243
1265
|
const isPostOnly = this.isPostOnly(isMarket, upperCaseType === 'LIMIT_MAKER', params);
|
|
1244
|
-
|
|
1266
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
1267
|
+
params = this.omit(params, ['postOnly', 'triggerPrice', 'stopPrice']);
|
|
1268
|
+
if (triggerPrice !== undefined) {
|
|
1269
|
+
upperCaseType = (price === undefined) ? 'STOP' : 'STOP_LIMIT';
|
|
1270
|
+
request['stopPrice'] = triggerPrice;
|
|
1271
|
+
}
|
|
1272
|
+
else if (isPostOnly) {
|
|
1245
1273
|
upperCaseType = 'LIMIT_MAKER';
|
|
1246
|
-
params = this.omit(params, 'postOnly');
|
|
1247
1274
|
}
|
|
1248
1275
|
request['type'] = upperCaseType;
|
|
1249
1276
|
if (isMarket) {
|
|
@@ -1267,31 +1294,44 @@ export default class poloniex extends Exchange {
|
|
|
1267
1294
|
return [request, params];
|
|
1268
1295
|
}
|
|
1269
1296
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1297
|
+
//
|
|
1298
|
+
// @method
|
|
1299
|
+
// @name poloniex#editOrder
|
|
1300
|
+
// @description edit a trade order
|
|
1301
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
|
|
1302
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-replace-order
|
|
1303
|
+
// @param {string} id order id
|
|
1304
|
+
// @param {string} symbol unified symbol of the market to create an order in
|
|
1305
|
+
// @param {string} type 'market' or 'limit'
|
|
1306
|
+
// @param {string} side 'buy' or 'sell'
|
|
1307
|
+
// @param {float} [amount] how much of the currency you want to trade in units of the base currency
|
|
1308
|
+
// @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1309
|
+
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1310
|
+
// <<<<<<< HEAD
|
|
1311
|
+
// @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
1312
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1313
|
+
// =======
|
|
1314
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1315
|
+
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1316
|
+
//
|
|
1284
1317
|
await this.loadMarkets();
|
|
1285
1318
|
const market = this.market(symbol);
|
|
1286
1319
|
if (!market['spot']) {
|
|
1287
1320
|
throw new NotSupported(this.id + ' editOrder() does not support ' + market['type'] + ' orders, only spot orders are accepted');
|
|
1288
1321
|
}
|
|
1289
|
-
|
|
1322
|
+
let request = {
|
|
1290
1323
|
'id': id,
|
|
1291
1324
|
// 'timeInForce': timeInForce,
|
|
1292
1325
|
};
|
|
1293
|
-
const
|
|
1294
|
-
|
|
1326
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
1327
|
+
[request, params] = this.orderRequest(symbol, type, side, amount, request, price, params);
|
|
1328
|
+
let response = undefined;
|
|
1329
|
+
if (triggerPrice !== undefined) {
|
|
1330
|
+
response = await this.privatePutSmartordersId(this.extend(request, params));
|
|
1331
|
+
}
|
|
1332
|
+
else {
|
|
1333
|
+
response = await this.privatePutOrdersId(this.extend(request, params));
|
|
1334
|
+
}
|
|
1295
1335
|
//
|
|
1296
1336
|
// {
|
|
1297
1337
|
// "id" : "78923648051920896",
|
|
@@ -1304,16 +1344,22 @@ export default class poloniex extends Exchange {
|
|
|
1304
1344
|
return this.parseOrder(response, market);
|
|
1305
1345
|
}
|
|
1306
1346
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1347
|
+
//
|
|
1348
|
+
// @method
|
|
1349
|
+
// @name poloniex#cancelOrder
|
|
1350
|
+
// @description cancels an open order
|
|
1351
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-order-by-id
|
|
1352
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-order-by-id // trigger orders
|
|
1353
|
+
// @param {string} id order id
|
|
1354
|
+
// @param {string} symbol unified symbol of the market the order was made in
|
|
1355
|
+
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1356
|
+
// <<<<<<< HEAD
|
|
1357
|
+
// @param {boolean} [params.trigger] true if canceling a trigger order
|
|
1358
|
+
// @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1359
|
+
// =======
|
|
1360
|
+
// @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1361
|
+
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1362
|
+
//
|
|
1317
1363
|
await this.loadMarkets();
|
|
1318
1364
|
const request = {};
|
|
1319
1365
|
const clientOrderId = this.safeValue(params, 'clientOrderId');
|
|
@@ -1321,8 +1367,15 @@ export default class poloniex extends Exchange {
|
|
|
1321
1367
|
id = clientOrderId;
|
|
1322
1368
|
}
|
|
1323
1369
|
request['id'] = id;
|
|
1324
|
-
|
|
1325
|
-
|
|
1370
|
+
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
1371
|
+
params = this.omit(params, ['clientOrderId', 'trigger', 'stop']);
|
|
1372
|
+
let response = undefined;
|
|
1373
|
+
if (isTrigger) {
|
|
1374
|
+
response = await this.privateDeleteSmartordersId(this.extend(request, params));
|
|
1375
|
+
}
|
|
1376
|
+
else {
|
|
1377
|
+
response = await this.privateDeleteOrdersId(this.extend(request, params));
|
|
1378
|
+
}
|
|
1326
1379
|
//
|
|
1327
1380
|
// {
|
|
1328
1381
|
// "orderId":"210832697138888704",
|
|
@@ -1335,18 +1388,25 @@ export default class poloniex extends Exchange {
|
|
|
1335
1388
|
return this.parseOrder(response);
|
|
1336
1389
|
}
|
|
1337
1390
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1391
|
+
//
|
|
1392
|
+
// @method
|
|
1393
|
+
// @name poloniex#cancelAllOrders
|
|
1394
|
+
// @description cancel all open orders
|
|
1395
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
|
|
1396
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-all-orders // trigger orders
|
|
1397
|
+
// @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1398
|
+
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1399
|
+
// <<<<<<< HEAD
|
|
1400
|
+
// @param {boolean} [params.trigger] true if canceling trigger orders
|
|
1401
|
+
// @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1402
|
+
// =======
|
|
1403
|
+
// @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1404
|
+
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1405
|
+
//
|
|
1347
1406
|
await this.loadMarkets();
|
|
1348
1407
|
const request = {
|
|
1349
|
-
|
|
1408
|
+
// 'accountTypes': 'SPOT',
|
|
1409
|
+
'symbols': [],
|
|
1350
1410
|
};
|
|
1351
1411
|
let market = undefined;
|
|
1352
1412
|
if (symbol !== undefined) {
|
|
@@ -1355,7 +1415,15 @@ export default class poloniex extends Exchange {
|
|
|
1355
1415
|
market['id'],
|
|
1356
1416
|
];
|
|
1357
1417
|
}
|
|
1358
|
-
const
|
|
1418
|
+
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
1419
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
1420
|
+
let response = undefined;
|
|
1421
|
+
if (isTrigger) {
|
|
1422
|
+
response = await this.privateDeleteSmartorders(this.extend(request, params));
|
|
1423
|
+
}
|
|
1424
|
+
else {
|
|
1425
|
+
response = await this.privateDeleteOrders(this.extend(request, params));
|
|
1426
|
+
}
|
|
1359
1427
|
//
|
|
1360
1428
|
// [
|
|
1361
1429
|
// {
|
|
@@ -1373,25 +1441,40 @@ export default class poloniex extends Exchange {
|
|
|
1373
1441
|
// }
|
|
1374
1442
|
// ]
|
|
1375
1443
|
//
|
|
1376
|
-
return response;
|
|
1444
|
+
return this.parseOrders(response, market);
|
|
1377
1445
|
}
|
|
1378
1446
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1447
|
+
//
|
|
1448
|
+
// @method
|
|
1449
|
+
// @name poloniex#fetchOrder
|
|
1450
|
+
// @description fetch an order by it's id
|
|
1451
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
|
|
1452
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
|
|
1453
|
+
// @param {string} id order id
|
|
1454
|
+
// @param {string} symbol unified market symbol, default is undefined
|
|
1455
|
+
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1456
|
+
// <<<<<<< HEAD
|
|
1457
|
+
// @param {boolean} [params.trigger] true if fetching a trigger order
|
|
1458
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1459
|
+
// =======
|
|
1460
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1461
|
+
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1462
|
+
//
|
|
1389
1463
|
await this.loadMarkets();
|
|
1390
1464
|
id = id.toString();
|
|
1391
1465
|
const request = {
|
|
1392
1466
|
'id': id,
|
|
1393
1467
|
};
|
|
1394
|
-
const
|
|
1468
|
+
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
1469
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
1470
|
+
let response = undefined;
|
|
1471
|
+
if (isTrigger) {
|
|
1472
|
+
response = await this.privateGetSmartordersId(this.extend(request, params));
|
|
1473
|
+
response = this.safeValue(response, 0);
|
|
1474
|
+
}
|
|
1475
|
+
else {
|
|
1476
|
+
response = await this.privateGetOrdersId(this.extend(request, params));
|
|
1477
|
+
}
|
|
1395
1478
|
//
|
|
1396
1479
|
// {
|
|
1397
1480
|
// "id": "21934611974062080",
|
|
@@ -1408,6 +1491,7 @@ export default class poloniex extends Exchange {
|
|
|
1408
1491
|
// "amount": "0.00",
|
|
1409
1492
|
// "filledQuantity": "0.00",
|
|
1410
1493
|
// "filledAmount": "0.00",
|
|
1494
|
+
// "stopPrice": "3750.00", // for trigger orders
|
|
1411
1495
|
// "createTime": 1646196019020,
|
|
1412
1496
|
// "updateTime": 1646196019020
|
|
1413
1497
|
// }
|
|
@@ -1491,7 +1575,7 @@ export default class poloniex extends Exchange {
|
|
|
1491
1575
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1492
1576
|
* @see https://docs.poloniex.com/#authenticated-endpoints-accounts-all-account-balances
|
|
1493
1577
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1494
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1578
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1495
1579
|
*/
|
|
1496
1580
|
await this.loadMarkets();
|
|
1497
1581
|
const request = {
|
|
@@ -648,7 +648,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
648
648
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
649
649
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
650
650
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
651
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
651
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
652
652
|
*/
|
|
653
653
|
await this.loadMarkets();
|
|
654
654
|
const market = this.market(symbol);
|
|
@@ -770,7 +770,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
770
770
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
771
771
|
* @see https://futures-docs.poloniex.com/#get-account-overview
|
|
772
772
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
773
|
-
* @returns {object} a [balance structure]{@link https://
|
|
773
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
774
774
|
*/
|
|
775
775
|
await this.loadMarkets();
|
|
776
776
|
const currencyId = this.safeString(params, 'currency');
|
package/js/src/pro/ascendex.js
CHANGED
|
@@ -147,7 +147,7 @@ export default class ascendex extends ascendexRest {
|
|
|
147
147
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
148
148
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
149
149
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
150
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
150
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
151
151
|
*/
|
|
152
152
|
await this.loadMarkets();
|
|
153
153
|
const market = this.market(symbol);
|
|
@@ -352,7 +352,7 @@ export default class ascendex extends ascendexRest {
|
|
|
352
352
|
* @name ascendex#watchBalance
|
|
353
353
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
354
354
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
355
|
-
* @returns {object} a [balance structure]{@link https://
|
|
355
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
356
356
|
*/
|
|
357
357
|
await this.loadMarkets();
|
|
358
358
|
const [type, query] = this.handleMarketTypeAndParams('watchBalance', undefined, params);
|
package/js/src/pro/binance.js
CHANGED
|
@@ -422,7 +422,7 @@ export default class binance extends binanceRest {
|
|
|
422
422
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
423
423
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
424
424
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
425
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
425
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
426
426
|
*/
|
|
427
427
|
await this.loadMarkets();
|
|
428
428
|
const market = this.market(symbol);
|
|
@@ -1186,7 +1186,7 @@ export default class binance extends binanceRest {
|
|
|
1186
1186
|
* @param {string|undefined} [params.type] 'future', 'delivery', 'savings', 'funding', or 'spot'
|
|
1187
1187
|
* @param {string|undefined} [params.marginMode] 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
|
|
1188
1188
|
* @param {string[]|undefined} [params.symbols] unified market symbols, only used in isolated margin mode
|
|
1189
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1189
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1190
1190
|
*/
|
|
1191
1191
|
await this.loadMarkets();
|
|
1192
1192
|
const url = this.urls['api']['ws']['ws'];
|
|
@@ -1263,7 +1263,7 @@ export default class binance extends binanceRest {
|
|
|
1263
1263
|
* @name binance#watchBalance
|
|
1264
1264
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
1265
1265
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1266
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1266
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1267
1267
|
*/
|
|
1268
1268
|
await this.loadMarkets();
|
|
1269
1269
|
await this.authenticate(params);
|
|
@@ -1427,7 +1427,7 @@ export default class binance extends binanceRest {
|
|
|
1427
1427
|
* @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1428
1428
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1429
1429
|
* @param {boolean} params.test test order, default false
|
|
1430
|
-
* @returns {object} an [order structure]{@link https://
|
|
1430
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1431
1431
|
*/
|
|
1432
1432
|
await this.loadMarkets();
|
|
1433
1433
|
this.checkIsSpot('createOrderWs', symbol, params);
|
|
@@ -1561,7 +1561,7 @@ export default class binance extends binanceRest {
|
|
|
1561
1561
|
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
1562
1562
|
* @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1563
1563
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1564
|
-
* @returns {object} an [order structure]{@link https://
|
|
1564
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1565
1565
|
*/
|
|
1566
1566
|
await this.loadMarkets();
|
|
1567
1567
|
this.checkIsSpot('editOrderWs', symbol, params);
|
|
@@ -1665,7 +1665,7 @@ export default class binance extends binanceRest {
|
|
|
1665
1665
|
* @param {string} symbol unified market symbol, default is undefined
|
|
1666
1666
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1667
1667
|
* @param {string|undefined} [params.cancelRestrictions] Supported values: ONLY_NEW - Cancel will succeed if the order status is NEW. ONLY_PARTIALLY_FILLED - Cancel will succeed if order status is PARTIALLY_FILLED.
|
|
1668
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
1668
|
+
* @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1669
1669
|
*/
|
|
1670
1670
|
await this.loadMarkets();
|
|
1671
1671
|
if (symbol === undefined) {
|
package/js/src/pro/bitfinex.js
CHANGED
|
@@ -64,7 +64,7 @@ export default class bitfinex extends bitfinexRest {
|
|
|
64
64
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
65
65
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
66
66
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
67
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
67
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
68
68
|
*/
|
|
69
69
|
await this.loadMarkets();
|
|
70
70
|
symbol = this.symbol(symbol);
|
package/js/src/pro/bitfinex2.js
CHANGED
|
@@ -196,7 +196,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
196
196
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
197
197
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
198
198
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
199
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
199
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
200
200
|
*/
|
|
201
201
|
const trades = await this.subscribe('trades', symbol, params);
|
|
202
202
|
if (this.newUpdates) {
|
|
@@ -686,7 +686,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
686
686
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
687
687
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
688
688
|
* @param {str} [params.type] spot or contract if not provided this.options['defaultType'] is used
|
|
689
|
-
* @returns {object} a [balance structure]{@link https://
|
|
689
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
690
690
|
*/
|
|
691
691
|
await this.loadMarkets();
|
|
692
692
|
const balanceType = this.safeString(params, 'wallet', 'exchange'); // exchange, margin
|
package/js/src/pro/bitget.js
CHANGED
|
@@ -481,7 +481,7 @@ export default class bitget extends bitgetRest {
|
|
|
481
481
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
482
482
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
483
483
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
484
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
484
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
485
485
|
*/
|
|
486
486
|
await this.loadMarkets();
|
|
487
487
|
const market = this.market(symbol);
|
|
@@ -1011,7 +1011,7 @@ export default class bitget extends bitgetRest {
|
|
|
1011
1011
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
1012
1012
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
1013
1013
|
* @param {str} [params.type] spot or contract if not provided this.options['defaultType'] is used
|
|
1014
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1014
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1015
1015
|
*/
|
|
1016
1016
|
let type = undefined;
|
|
1017
1017
|
[type, params] = this.handleMarketTypeAndParams('watchOrders', undefined, params);
|
package/js/src/pro/bitmart.js
CHANGED
|
@@ -90,7 +90,7 @@ export default class bitmart extends bitmartRest {
|
|
|
90
90
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
91
91
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
92
92
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
93
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
93
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
94
94
|
*/
|
|
95
95
|
await this.loadMarkets();
|
|
96
96
|
symbol = this.symbol(symbol);
|
package/js/src/pro/bitmex.js
CHANGED
|
@@ -321,7 +321,7 @@ export default class bitmex extends bitmexRest {
|
|
|
321
321
|
* @name bitmex#watchBalance
|
|
322
322
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
323
323
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
324
|
-
* @returns {object} a [balance structure]{@link https://
|
|
324
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
325
325
|
*/
|
|
326
326
|
await this.loadMarkets();
|
|
327
327
|
await this.authenticate();
|
|
@@ -531,7 +531,7 @@ export default class bitmex extends bitmexRest {
|
|
|
531
531
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
532
532
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
533
533
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
534
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
534
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
535
535
|
*/
|
|
536
536
|
await this.loadMarkets();
|
|
537
537
|
const market = this.market(symbol);
|
package/js/src/pro/bitopro.js
CHANGED
|
@@ -125,7 +125,7 @@ export default class bitopro extends bitoproRest {
|
|
|
125
125
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
126
126
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
127
127
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
128
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
128
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
129
129
|
*/
|
|
130
130
|
await this.loadMarkets();
|
|
131
131
|
const market = this.market(symbol);
|
|
@@ -260,7 +260,7 @@ export default class bitopro extends bitoproRest {
|
|
|
260
260
|
* @name bitopro#watchBalance
|
|
261
261
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
262
262
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
263
|
-
* @returns {object} a [balance structure]{@link https://
|
|
263
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
264
264
|
*/
|
|
265
265
|
this.checkRequiredCredentials();
|
|
266
266
|
await this.loadMarkets();
|