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/dist/cjs/src/poloniex.js
CHANGED
|
@@ -26,9 +26,9 @@ class poloniex extends poloniex$1 {
|
|
|
26
26
|
'CORS': undefined,
|
|
27
27
|
'spot': true,
|
|
28
28
|
'margin': undefined,
|
|
29
|
-
'swap':
|
|
30
|
-
'future':
|
|
31
|
-
'option':
|
|
29
|
+
'swap': false,
|
|
30
|
+
'future': false,
|
|
31
|
+
'option': false,
|
|
32
32
|
'cancelAllOrders': true,
|
|
33
33
|
'cancelOrder': true,
|
|
34
34
|
'createDepositAddress': true,
|
|
@@ -915,7 +915,7 @@ class poloniex extends poloniex$1 {
|
|
|
915
915
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
916
916
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
917
917
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
918
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
918
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
919
919
|
*/
|
|
920
920
|
await this.loadMarkets();
|
|
921
921
|
const market = this.market(symbol);
|
|
@@ -1096,6 +1096,7 @@ class poloniex extends poloniex$1 {
|
|
|
1096
1096
|
};
|
|
1097
1097
|
}
|
|
1098
1098
|
const clientOrderId = this.safeString(order, 'clientOrderId');
|
|
1099
|
+
const triggerPrice = this.safeString2(order, 'triggerPrice', 'stopPrice');
|
|
1099
1100
|
return this.safeOrder({
|
|
1100
1101
|
'info': order,
|
|
1101
1102
|
'id': id,
|
|
@@ -1110,8 +1111,8 @@ class poloniex extends poloniex$1 {
|
|
|
1110
1111
|
'postOnly': undefined,
|
|
1111
1112
|
'side': side,
|
|
1112
1113
|
'price': price,
|
|
1113
|
-
'stopPrice':
|
|
1114
|
-
'triggerPrice':
|
|
1114
|
+
'stopPrice': triggerPrice,
|
|
1115
|
+
'triggerPrice': triggerPrice,
|
|
1115
1116
|
'cost': undefined,
|
|
1116
1117
|
'average': this.safeString(order, 'avgPrice'),
|
|
1117
1118
|
'amount': amount,
|
|
@@ -1149,10 +1150,12 @@ class poloniex extends poloniex$1 {
|
|
|
1149
1150
|
* @name poloniex#fetchOpenOrders
|
|
1150
1151
|
* @description fetch all unfilled currently open orders
|
|
1151
1152
|
* @see https://docs.poloniex.com/#authenticated-endpoints-orders-open-orders
|
|
1153
|
+
* @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
|
|
1152
1154
|
* @param {string} symbol unified market symbol
|
|
1153
1155
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1154
1156
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1155
1157
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1158
|
+
* @param {boolean} [params.stop] set true to fetch trigger orders instead of regular orders
|
|
1156
1159
|
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1157
1160
|
*/
|
|
1158
1161
|
await this.loadMarkets();
|
|
@@ -1165,7 +1168,15 @@ class poloniex extends poloniex$1 {
|
|
|
1165
1168
|
if (limit !== undefined) {
|
|
1166
1169
|
request['limit'] = limit;
|
|
1167
1170
|
}
|
|
1168
|
-
const
|
|
1171
|
+
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
1172
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
1173
|
+
let response = undefined;
|
|
1174
|
+
if (isTrigger) {
|
|
1175
|
+
response = await this.privateGetSmartorders(this.extend(request, params));
|
|
1176
|
+
}
|
|
1177
|
+
else {
|
|
1178
|
+
response = await this.privateGetOrders(this.extend(request, params));
|
|
1179
|
+
}
|
|
1169
1180
|
//
|
|
1170
1181
|
// [
|
|
1171
1182
|
// {
|
|
@@ -1183,6 +1194,7 @@ class poloniex extends poloniex$1 {
|
|
|
1183
1194
|
// "amount" : "0",
|
|
1184
1195
|
// "filledQuantity" : "0",
|
|
1185
1196
|
// "filledAmount" : "0",
|
|
1197
|
+
// "stopPrice": "3750.00", // for trigger orders
|
|
1186
1198
|
// "createTime" : 16xxxxxxxxx26,
|
|
1187
1199
|
// "updateTime" : 16xxxxxxxxx36
|
|
1188
1200
|
// }
|
|
@@ -1192,36 +1204,46 @@ class poloniex extends poloniex$1 {
|
|
|
1192
1204
|
return this.parseOrders(response, market, since, limit, extension);
|
|
1193
1205
|
}
|
|
1194
1206
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
//
|
|
1209
|
-
//
|
|
1210
|
-
//
|
|
1207
|
+
//
|
|
1208
|
+
// @method
|
|
1209
|
+
// @name poloniex#createOrder
|
|
1210
|
+
// @description create a trade order
|
|
1211
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
|
|
1212
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-create-order // trigger orders
|
|
1213
|
+
// @param {string} symbol unified symbol of the market to create an order in
|
|
1214
|
+
// @param {string} type 'market' or 'limit'
|
|
1215
|
+
// @param {string} side 'buy' or 'sell'
|
|
1216
|
+
// @param {float} amount how much of currency you want to trade in units of base currency
|
|
1217
|
+
// @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1218
|
+
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1219
|
+
// <<<<<<< HEAD
|
|
1220
|
+
// @param {float} [params.triggerPrice] *spot only* The price at which a trigger order is triggered at
|
|
1221
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1222
|
+
// =======
|
|
1223
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1224
|
+
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1225
|
+
//
|
|
1211
1226
|
await this.loadMarkets();
|
|
1212
1227
|
const market = this.market(symbol);
|
|
1213
1228
|
if (!market['spot']) {
|
|
1214
1229
|
throw new errors.NotSupported(this.id + ' createOrder() does not support ' + market['type'] + ' orders, only spot orders are accepted');
|
|
1215
1230
|
}
|
|
1216
|
-
|
|
1231
|
+
let request = {
|
|
1217
1232
|
'symbol': market['id'],
|
|
1218
1233
|
'side': side,
|
|
1219
1234
|
// 'timeInForce': timeInForce,
|
|
1220
1235
|
// 'accountType': 'SPOT',
|
|
1221
1236
|
// 'amount': amount,
|
|
1222
1237
|
};
|
|
1223
|
-
const
|
|
1224
|
-
|
|
1238
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
1239
|
+
[request, params] = this.orderRequest(symbol, type, side, amount, request, price, params);
|
|
1240
|
+
let response = undefined;
|
|
1241
|
+
if (triggerPrice !== undefined) {
|
|
1242
|
+
response = await this.privatePostSmartorders(this.extend(request, params));
|
|
1243
|
+
}
|
|
1244
|
+
else {
|
|
1245
|
+
response = await this.privatePostOrders(this.extend(request, params));
|
|
1246
|
+
}
|
|
1225
1247
|
//
|
|
1226
1248
|
// {
|
|
1227
1249
|
// "id" : "78923648051920896",
|
|
@@ -1238,9 +1260,14 @@ class poloniex extends poloniex$1 {
|
|
|
1238
1260
|
let upperCaseType = type.toUpperCase();
|
|
1239
1261
|
const isMarket = upperCaseType === 'MARKET';
|
|
1240
1262
|
const isPostOnly = this.isPostOnly(isMarket, upperCaseType === 'LIMIT_MAKER', params);
|
|
1241
|
-
|
|
1263
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
1264
|
+
params = this.omit(params, ['postOnly', 'triggerPrice', 'stopPrice']);
|
|
1265
|
+
if (triggerPrice !== undefined) {
|
|
1266
|
+
upperCaseType = (price === undefined) ? 'STOP' : 'STOP_LIMIT';
|
|
1267
|
+
request['stopPrice'] = triggerPrice;
|
|
1268
|
+
}
|
|
1269
|
+
else if (isPostOnly) {
|
|
1242
1270
|
upperCaseType = 'LIMIT_MAKER';
|
|
1243
|
-
params = this.omit(params, 'postOnly');
|
|
1244
1271
|
}
|
|
1245
1272
|
request['type'] = upperCaseType;
|
|
1246
1273
|
if (isMarket) {
|
|
@@ -1264,31 +1291,44 @@ class poloniex extends poloniex$1 {
|
|
|
1264
1291
|
return [request, params];
|
|
1265
1292
|
}
|
|
1266
1293
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1294
|
+
//
|
|
1295
|
+
// @method
|
|
1296
|
+
// @name poloniex#editOrder
|
|
1297
|
+
// @description edit a trade order
|
|
1298
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
|
|
1299
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-replace-order
|
|
1300
|
+
// @param {string} id order id
|
|
1301
|
+
// @param {string} symbol unified symbol of the market to create an order in
|
|
1302
|
+
// @param {string} type 'market' or 'limit'
|
|
1303
|
+
// @param {string} side 'buy' or 'sell'
|
|
1304
|
+
// @param {float} [amount] how much of the currency you want to trade in units of the base currency
|
|
1305
|
+
// @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1306
|
+
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1307
|
+
// <<<<<<< HEAD
|
|
1308
|
+
// @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
1309
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1310
|
+
// =======
|
|
1311
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1312
|
+
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1313
|
+
//
|
|
1281
1314
|
await this.loadMarkets();
|
|
1282
1315
|
const market = this.market(symbol);
|
|
1283
1316
|
if (!market['spot']) {
|
|
1284
1317
|
throw new errors.NotSupported(this.id + ' editOrder() does not support ' + market['type'] + ' orders, only spot orders are accepted');
|
|
1285
1318
|
}
|
|
1286
|
-
|
|
1319
|
+
let request = {
|
|
1287
1320
|
'id': id,
|
|
1288
1321
|
// 'timeInForce': timeInForce,
|
|
1289
1322
|
};
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1323
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
1324
|
+
[request, params] = this.orderRequest(symbol, type, side, amount, request, price, params);
|
|
1325
|
+
let response = undefined;
|
|
1326
|
+
if (triggerPrice !== undefined) {
|
|
1327
|
+
response = await this.privatePutSmartordersId(this.extend(request, params));
|
|
1328
|
+
}
|
|
1329
|
+
else {
|
|
1330
|
+
response = await this.privatePutOrdersId(this.extend(request, params));
|
|
1331
|
+
}
|
|
1292
1332
|
//
|
|
1293
1333
|
// {
|
|
1294
1334
|
// "id" : "78923648051920896",
|
|
@@ -1301,16 +1341,22 @@ class poloniex extends poloniex$1 {
|
|
|
1301
1341
|
return this.parseOrder(response, market);
|
|
1302
1342
|
}
|
|
1303
1343
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1344
|
+
//
|
|
1345
|
+
// @method
|
|
1346
|
+
// @name poloniex#cancelOrder
|
|
1347
|
+
// @description cancels an open order
|
|
1348
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-order-by-id
|
|
1349
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-order-by-id // trigger orders
|
|
1350
|
+
// @param {string} id order id
|
|
1351
|
+
// @param {string} symbol unified symbol of the market the order was made in
|
|
1352
|
+
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1353
|
+
// <<<<<<< HEAD
|
|
1354
|
+
// @param {boolean} [params.trigger] true if canceling a trigger order
|
|
1355
|
+
// @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1356
|
+
// =======
|
|
1357
|
+
// @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1358
|
+
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1359
|
+
//
|
|
1314
1360
|
await this.loadMarkets();
|
|
1315
1361
|
const request = {};
|
|
1316
1362
|
const clientOrderId = this.safeValue(params, 'clientOrderId');
|
|
@@ -1318,8 +1364,15 @@ class poloniex extends poloniex$1 {
|
|
|
1318
1364
|
id = clientOrderId;
|
|
1319
1365
|
}
|
|
1320
1366
|
request['id'] = id;
|
|
1321
|
-
|
|
1322
|
-
|
|
1367
|
+
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
1368
|
+
params = this.omit(params, ['clientOrderId', 'trigger', 'stop']);
|
|
1369
|
+
let response = undefined;
|
|
1370
|
+
if (isTrigger) {
|
|
1371
|
+
response = await this.privateDeleteSmartordersId(this.extend(request, params));
|
|
1372
|
+
}
|
|
1373
|
+
else {
|
|
1374
|
+
response = await this.privateDeleteOrdersId(this.extend(request, params));
|
|
1375
|
+
}
|
|
1323
1376
|
//
|
|
1324
1377
|
// {
|
|
1325
1378
|
// "orderId":"210832697138888704",
|
|
@@ -1332,18 +1385,25 @@ class poloniex extends poloniex$1 {
|
|
|
1332
1385
|
return this.parseOrder(response);
|
|
1333
1386
|
}
|
|
1334
1387
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1388
|
+
//
|
|
1389
|
+
// @method
|
|
1390
|
+
// @name poloniex#cancelAllOrders
|
|
1391
|
+
// @description cancel all open orders
|
|
1392
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
|
|
1393
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-all-orders // trigger orders
|
|
1394
|
+
// @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1395
|
+
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1396
|
+
// <<<<<<< HEAD
|
|
1397
|
+
// @param {boolean} [params.trigger] true if canceling trigger orders
|
|
1398
|
+
// @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1399
|
+
// =======
|
|
1400
|
+
// @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1401
|
+
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1402
|
+
//
|
|
1344
1403
|
await this.loadMarkets();
|
|
1345
1404
|
const request = {
|
|
1346
|
-
|
|
1405
|
+
// 'accountTypes': 'SPOT',
|
|
1406
|
+
'symbols': [],
|
|
1347
1407
|
};
|
|
1348
1408
|
let market = undefined;
|
|
1349
1409
|
if (symbol !== undefined) {
|
|
@@ -1352,7 +1412,15 @@ class poloniex extends poloniex$1 {
|
|
|
1352
1412
|
market['id'],
|
|
1353
1413
|
];
|
|
1354
1414
|
}
|
|
1355
|
-
const
|
|
1415
|
+
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
1416
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
1417
|
+
let response = undefined;
|
|
1418
|
+
if (isTrigger) {
|
|
1419
|
+
response = await this.privateDeleteSmartorders(this.extend(request, params));
|
|
1420
|
+
}
|
|
1421
|
+
else {
|
|
1422
|
+
response = await this.privateDeleteOrders(this.extend(request, params));
|
|
1423
|
+
}
|
|
1356
1424
|
//
|
|
1357
1425
|
// [
|
|
1358
1426
|
// {
|
|
@@ -1370,25 +1438,40 @@ class poloniex extends poloniex$1 {
|
|
|
1370
1438
|
// }
|
|
1371
1439
|
// ]
|
|
1372
1440
|
//
|
|
1373
|
-
return response;
|
|
1441
|
+
return this.parseOrders(response, market);
|
|
1374
1442
|
}
|
|
1375
1443
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1444
|
+
//
|
|
1445
|
+
// @method
|
|
1446
|
+
// @name poloniex#fetchOrder
|
|
1447
|
+
// @description fetch an order by it's id
|
|
1448
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
|
|
1449
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
|
|
1450
|
+
// @param {string} id order id
|
|
1451
|
+
// @param {string} symbol unified market symbol, default is undefined
|
|
1452
|
+
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1453
|
+
// <<<<<<< HEAD
|
|
1454
|
+
// @param {boolean} [params.trigger] true if fetching a trigger order
|
|
1455
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1456
|
+
// =======
|
|
1457
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1458
|
+
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1459
|
+
//
|
|
1386
1460
|
await this.loadMarkets();
|
|
1387
1461
|
id = id.toString();
|
|
1388
1462
|
const request = {
|
|
1389
1463
|
'id': id,
|
|
1390
1464
|
};
|
|
1391
|
-
const
|
|
1465
|
+
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
1466
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
1467
|
+
let response = undefined;
|
|
1468
|
+
if (isTrigger) {
|
|
1469
|
+
response = await this.privateGetSmartordersId(this.extend(request, params));
|
|
1470
|
+
response = this.safeValue(response, 0);
|
|
1471
|
+
}
|
|
1472
|
+
else {
|
|
1473
|
+
response = await this.privateGetOrdersId(this.extend(request, params));
|
|
1474
|
+
}
|
|
1392
1475
|
//
|
|
1393
1476
|
// {
|
|
1394
1477
|
// "id": "21934611974062080",
|
|
@@ -1405,6 +1488,7 @@ class poloniex extends poloniex$1 {
|
|
|
1405
1488
|
// "amount": "0.00",
|
|
1406
1489
|
// "filledQuantity": "0.00",
|
|
1407
1490
|
// "filledAmount": "0.00",
|
|
1491
|
+
// "stopPrice": "3750.00", // for trigger orders
|
|
1408
1492
|
// "createTime": 1646196019020,
|
|
1409
1493
|
// "updateTime": 1646196019020
|
|
1410
1494
|
// }
|
|
@@ -1488,7 +1572,7 @@ class poloniex extends poloniex$1 {
|
|
|
1488
1572
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1489
1573
|
* @see https://docs.poloniex.com/#authenticated-endpoints-accounts-all-account-balances
|
|
1490
1574
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1491
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1575
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1492
1576
|
*/
|
|
1493
1577
|
await this.loadMarkets();
|
|
1494
1578
|
const request = {
|
|
@@ -645,7 +645,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
645
645
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
646
646
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
647
647
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
648
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
648
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
649
649
|
*/
|
|
650
650
|
await this.loadMarkets();
|
|
651
651
|
const market = this.market(symbol);
|
|
@@ -767,7 +767,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
767
767
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
768
768
|
* @see https://futures-docs.poloniex.com/#get-account-overview
|
|
769
769
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
770
|
-
* @returns {object} a [balance structure]{@link https://
|
|
770
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
771
771
|
*/
|
|
772
772
|
await this.loadMarkets();
|
|
773
773
|
const currencyId = this.safeString(params, 'currency');
|
|
@@ -144,7 +144,7 @@ class ascendex extends ascendex$1 {
|
|
|
144
144
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
145
145
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
146
146
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
147
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
147
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
148
148
|
*/
|
|
149
149
|
await this.loadMarkets();
|
|
150
150
|
const market = this.market(symbol);
|
|
@@ -349,7 +349,7 @@ class ascendex extends ascendex$1 {
|
|
|
349
349
|
* @name ascendex#watchBalance
|
|
350
350
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
351
351
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
352
|
-
* @returns {object} a [balance structure]{@link https://
|
|
352
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
353
353
|
*/
|
|
354
354
|
await this.loadMarkets();
|
|
355
355
|
const [type, query] = this.handleMarketTypeAndParams('watchBalance', undefined, params);
|
|
@@ -419,7 +419,7 @@ class binance extends binance$1 {
|
|
|
419
419
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
420
420
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
421
421
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
422
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
422
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
423
423
|
*/
|
|
424
424
|
await this.loadMarkets();
|
|
425
425
|
const market = this.market(symbol);
|
|
@@ -1183,7 +1183,7 @@ class binance extends binance$1 {
|
|
|
1183
1183
|
* @param {string|undefined} [params.type] 'future', 'delivery', 'savings', 'funding', or 'spot'
|
|
1184
1184
|
* @param {string|undefined} [params.marginMode] 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
|
|
1185
1185
|
* @param {string[]|undefined} [params.symbols] unified market symbols, only used in isolated margin mode
|
|
1186
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1186
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1187
1187
|
*/
|
|
1188
1188
|
await this.loadMarkets();
|
|
1189
1189
|
const url = this.urls['api']['ws']['ws'];
|
|
@@ -1260,7 +1260,7 @@ class binance extends binance$1 {
|
|
|
1260
1260
|
* @name binance#watchBalance
|
|
1261
1261
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
1262
1262
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1263
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1263
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1264
1264
|
*/
|
|
1265
1265
|
await this.loadMarkets();
|
|
1266
1266
|
await this.authenticate(params);
|
|
@@ -1424,7 +1424,7 @@ class binance extends binance$1 {
|
|
|
1424
1424
|
* @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1425
1425
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1426
1426
|
* @param {boolean} params.test test order, default false
|
|
1427
|
-
* @returns {object} an [order structure]{@link https://
|
|
1427
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1428
1428
|
*/
|
|
1429
1429
|
await this.loadMarkets();
|
|
1430
1430
|
this.checkIsSpot('createOrderWs', symbol, params);
|
|
@@ -1558,7 +1558,7 @@ class binance extends binance$1 {
|
|
|
1558
1558
|
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
1559
1559
|
* @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1560
1560
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1561
|
-
* @returns {object} an [order structure]{@link https://
|
|
1561
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1562
1562
|
*/
|
|
1563
1563
|
await this.loadMarkets();
|
|
1564
1564
|
this.checkIsSpot('editOrderWs', symbol, params);
|
|
@@ -1662,7 +1662,7 @@ class binance extends binance$1 {
|
|
|
1662
1662
|
* @param {string} symbol unified market symbol, default is undefined
|
|
1663
1663
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1664
1664
|
* @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.
|
|
1665
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
1665
|
+
* @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1666
1666
|
*/
|
|
1667
1667
|
await this.loadMarkets();
|
|
1668
1668
|
if (symbol === undefined) {
|
|
@@ -61,7 +61,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
61
61
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
62
62
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
63
63
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
64
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
64
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
65
65
|
*/
|
|
66
66
|
await this.loadMarkets();
|
|
67
67
|
symbol = this.symbol(symbol);
|
|
@@ -193,7 +193,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
193
193
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
194
194
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
195
195
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
196
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
196
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
197
197
|
*/
|
|
198
198
|
const trades = await this.subscribe('trades', symbol, params);
|
|
199
199
|
if (this.newUpdates) {
|
|
@@ -683,7 +683,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
683
683
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
684
684
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
685
685
|
* @param {str} [params.type] spot or contract if not provided this.options['defaultType'] is used
|
|
686
|
-
* @returns {object} a [balance structure]{@link https://
|
|
686
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
687
687
|
*/
|
|
688
688
|
await this.loadMarkets();
|
|
689
689
|
const balanceType = this.safeString(params, 'wallet', 'exchange'); // exchange, margin
|
|
@@ -478,7 +478,7 @@ class bitget extends bitget$1 {
|
|
|
478
478
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
479
479
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
480
480
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
481
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
481
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
482
482
|
*/
|
|
483
483
|
await this.loadMarkets();
|
|
484
484
|
const market = this.market(symbol);
|
|
@@ -1008,7 +1008,7 @@ class bitget extends bitget$1 {
|
|
|
1008
1008
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
1009
1009
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
1010
1010
|
* @param {str} [params.type] spot or contract if not provided this.options['defaultType'] is used
|
|
1011
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1011
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1012
1012
|
*/
|
|
1013
1013
|
let type = undefined;
|
|
1014
1014
|
[type, params] = this.handleMarketTypeAndParams('watchOrders', undefined, params);
|
|
@@ -87,7 +87,7 @@ class bitmart extends bitmart$1 {
|
|
|
87
87
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
88
88
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
89
89
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
90
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
90
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
91
91
|
*/
|
|
92
92
|
await this.loadMarkets();
|
|
93
93
|
symbol = this.symbol(symbol);
|
|
@@ -318,7 +318,7 @@ class bitmex extends bitmex$1 {
|
|
|
318
318
|
* @name bitmex#watchBalance
|
|
319
319
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
320
320
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
321
|
-
* @returns {object} a [balance structure]{@link https://
|
|
321
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
322
322
|
*/
|
|
323
323
|
await this.loadMarkets();
|
|
324
324
|
await this.authenticate();
|
|
@@ -528,7 +528,7 @@ class bitmex extends bitmex$1 {
|
|
|
528
528
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
529
529
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
530
530
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
531
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
531
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
532
532
|
*/
|
|
533
533
|
await this.loadMarkets();
|
|
534
534
|
const market = this.market(symbol);
|
|
@@ -122,7 +122,7 @@ class bitopro extends bitopro$1 {
|
|
|
122
122
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
123
123
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
124
124
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
125
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
125
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
126
126
|
*/
|
|
127
127
|
await this.loadMarkets();
|
|
128
128
|
const market = this.market(symbol);
|
|
@@ -257,7 +257,7 @@ class bitopro extends bitopro$1 {
|
|
|
257
257
|
* @name bitopro#watchBalance
|
|
258
258
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
259
259
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
260
|
-
* @returns {object} a [balance structure]{@link https://
|
|
260
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
261
261
|
*/
|
|
262
262
|
this.checkRequiredCredentials();
|
|
263
263
|
await this.loadMarkets();
|