ccxt 4.0.78 → 4.0.79
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 +143 -146
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/binance.js +78 -67
- package/dist/cjs/src/bithumb.js +1 -1
- package/dist/cjs/src/mexc.js +1 -0
- package/dist/cjs/src/phemex.js +8 -3
- package/dist/cjs/src/poloniex.js +54 -74
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/binance.d.ts +12 -1
- package/js/src/abstract/binancecoinm.d.ts +12 -1
- package/js/src/abstract/binanceus.d.ts +12 -1
- package/js/src/abstract/binanceusdm.d.ts +12 -1
- package/js/src/abstract/mexc.d.ts +1 -0
- package/js/src/abstract/mexc3.d.ts +1 -0
- package/js/src/binance.js +78 -67
- package/js/src/bithumb.js +1 -1
- package/js/src/mexc.js +1 -0
- package/js/src/phemex.js +8 -3
- package/js/src/poloniex.js +54 -74
- package/package.json +1 -1
package/js/src/poloniex.js
CHANGED
|
@@ -1207,25 +1207,21 @@ export default class poloniex extends Exchange {
|
|
|
1207
1207
|
return this.parseOrders(response, market, since, limit, extension);
|
|
1208
1208
|
}
|
|
1209
1209
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
// =======
|
|
1226
|
-
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1227
|
-
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1228
|
-
//
|
|
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
|
+
* @param {float} [params.triggerPrice] *spot only* The price at which a trigger order is triggered at
|
|
1223
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1224
|
+
*/
|
|
1229
1225
|
await this.loadMarkets();
|
|
1230
1226
|
const market = this.market(symbol);
|
|
1231
1227
|
if (!market['spot']) {
|
|
@@ -1294,26 +1290,22 @@ export default class poloniex extends Exchange {
|
|
|
1294
1290
|
return [request, params];
|
|
1295
1291
|
}
|
|
1296
1292
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
// =======
|
|
1314
|
-
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1315
|
-
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1316
|
-
//
|
|
1293
|
+
/**
|
|
1294
|
+
* @method
|
|
1295
|
+
* @name poloniex#editOrder
|
|
1296
|
+
* @description edit a trade order
|
|
1297
|
+
* @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
|
|
1298
|
+
* @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-replace-order
|
|
1299
|
+
* @param {string} id order id
|
|
1300
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
1301
|
+
* @param {string} type 'market' or 'limit'
|
|
1302
|
+
* @param {string} side 'buy' or 'sell'
|
|
1303
|
+
* @param {float} [amount] how much of the currency you want to trade in units of the base currency
|
|
1304
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1305
|
+
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1306
|
+
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
1307
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1308
|
+
*/
|
|
1317
1309
|
await this.loadMarkets();
|
|
1318
1310
|
const market = this.market(symbol);
|
|
1319
1311
|
if (!market['spot']) {
|
|
@@ -1353,12 +1345,8 @@ export default class poloniex extends Exchange {
|
|
|
1353
1345
|
// @param {string} id order id
|
|
1354
1346
|
// @param {string} symbol unified symbol of the market the order was made in
|
|
1355
1347
|
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1356
|
-
// <<<<<<< HEAD
|
|
1357
1348
|
// @param {boolean} [params.trigger] true if canceling a trigger order
|
|
1358
1349
|
// @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
1350
|
//
|
|
1363
1351
|
await this.loadMarkets();
|
|
1364
1352
|
const request = {};
|
|
@@ -1388,21 +1376,17 @@ export default class poloniex extends Exchange {
|
|
|
1388
1376
|
return this.parseOrder(response);
|
|
1389
1377
|
}
|
|
1390
1378
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
// =======
|
|
1403
|
-
// @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1404
|
-
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1405
|
-
//
|
|
1379
|
+
/**
|
|
1380
|
+
* @method
|
|
1381
|
+
* @name poloniex#cancelAllOrders
|
|
1382
|
+
* @description cancel all open orders
|
|
1383
|
+
* @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
|
|
1384
|
+
* @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-all-orders // trigger orders
|
|
1385
|
+
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1386
|
+
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1387
|
+
* @param {boolean} [params.trigger] true if canceling trigger orders
|
|
1388
|
+
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1389
|
+
*/
|
|
1406
1390
|
await this.loadMarkets();
|
|
1407
1391
|
const request = {
|
|
1408
1392
|
// 'accountTypes': 'SPOT',
|
|
@@ -1444,22 +1428,18 @@ export default class poloniex extends Exchange {
|
|
|
1444
1428
|
return this.parseOrders(response, market);
|
|
1445
1429
|
}
|
|
1446
1430
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
// =======
|
|
1460
|
-
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1461
|
-
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1462
|
-
//
|
|
1431
|
+
/**
|
|
1432
|
+
* @method
|
|
1433
|
+
* @name poloniex#fetchOrder
|
|
1434
|
+
* @description fetch an order by it's id
|
|
1435
|
+
* @see https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
|
|
1436
|
+
* @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
|
|
1437
|
+
* @param {string} id order id
|
|
1438
|
+
* @param {string} symbol unified market symbol, default is undefined
|
|
1439
|
+
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1440
|
+
* @param {boolean} [params.trigger] true if fetching a trigger order
|
|
1441
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1442
|
+
*/
|
|
1463
1443
|
await this.loadMarkets();
|
|
1464
1444
|
id = id.toString();
|
|
1465
1445
|
const request = {
|
package/package.json
CHANGED