ccxt 4.3.88 → 4.3.90
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.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +1 -0
- package/dist/cjs/src/alpaca.js +3 -2
- package/dist/cjs/src/ascendex.js +102 -116
- package/dist/cjs/src/bigone.js +1 -0
- package/dist/cjs/src/bingx.js +32 -17
- package/dist/cjs/src/bit2c.js +1 -0
- package/dist/cjs/src/bitbank.js +1 -0
- package/dist/cjs/src/bitfinex.js +1 -0
- package/dist/cjs/src/bitfinex2.js +21 -22
- package/dist/cjs/src/bitflyer.js +1 -0
- package/dist/cjs/src/bitget.js +3 -2
- package/dist/cjs/src/bitmart.js +6 -9
- package/dist/cjs/src/bitmex.js +1 -0
- package/dist/cjs/src/bitopro.js +1 -0
- package/dist/cjs/src/bitrue.js +62 -71
- package/dist/cjs/src/bitso.js +1 -0
- package/dist/cjs/src/bitstamp.js +1 -0
- package/dist/cjs/src/bitvavo.js +1 -0
- package/dist/cjs/src/blockchaincom.js +1 -0
- package/dist/cjs/src/btcalpha.js +1 -0
- package/dist/cjs/src/btcbox.js +1 -0
- package/dist/cjs/src/btcmarkets.js +1 -0
- package/dist/cjs/src/bybit.js +2 -0
- package/dist/cjs/src/cex.js +1 -0
- package/dist/cjs/src/coinbaseexchange.js +1 -0
- package/dist/cjs/src/coinbaseinternational.js +2 -1
- package/dist/cjs/src/coinex.js +1 -17
- package/dist/cjs/src/cryptocom.js +0 -12
- package/dist/cjs/src/hitbtc.js +1 -0
- package/dist/cjs/src/htx.js +49 -49
- package/dist/cjs/src/huobijp.js +0 -9
- package/dist/cjs/src/kraken.js +48 -48
- package/dist/cjs/src/latoken.js +1 -0
- package/dist/cjs/src/mexc.js +1 -61
- package/dist/cjs/src/okcoin.js +4 -9
- package/dist/cjs/src/okx.js +1 -8
- package/dist/cjs/src/onetrading.js +1 -0
- package/dist/cjs/src/phemex.js +1 -0
- package/dist/cjs/src/poloniexfutures.js +1 -0
- package/dist/cjs/src/pro/binance.js +323 -0
- package/dist/cjs/src/pro/bingx.js +263 -91
- package/dist/cjs/src/pro/bithumb.js +5 -1
- package/dist/cjs/src/pro/bitvavo.js +1 -0
- package/dist/cjs/src/pro/bybit.js +291 -2
- package/dist/cjs/src/pro/cex.js +1 -0
- package/dist/cjs/src/pro/coinex.js +994 -679
- package/dist/cjs/src/pro/lbank.js +2 -3
- package/dist/cjs/src/pro/okx.js +159 -3
- package/dist/cjs/src/probit.js +1 -0
- package/dist/cjs/src/vertex.js +1 -0
- package/dist/cjs/src/whitebit.js +5 -3
- package/dist/cjs/src/woo.js +1 -0
- package/dist/cjs/src/woofipro.js +1 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/ace.js +1 -0
- package/js/src/alpaca.js +3 -2
- package/js/src/ascendex.d.ts +0 -1
- package/js/src/ascendex.js +102 -116
- package/js/src/bigone.js +1 -0
- package/js/src/bingx.js +32 -17
- package/js/src/bit2c.js +1 -0
- package/js/src/bitbank.js +1 -0
- package/js/src/bitfinex.js +1 -0
- package/js/src/bitfinex2.d.ts +0 -1
- package/js/src/bitfinex2.js +21 -22
- package/js/src/bitflyer.js +1 -0
- package/js/src/bitget.js +3 -2
- package/js/src/bitmart.d.ts +0 -1
- package/js/src/bitmart.js +6 -9
- package/js/src/bitmex.js +1 -0
- package/js/src/bitopro.js +1 -0
- package/js/src/bitrue.d.ts +0 -1
- package/js/src/bitrue.js +62 -71
- package/js/src/bitso.js +1 -0
- package/js/src/bitstamp.js +1 -0
- package/js/src/bitvavo.js +1 -0
- package/js/src/blockchaincom.js +1 -0
- package/js/src/btcalpha.js +1 -0
- package/js/src/btcbox.js +1 -0
- package/js/src/btcmarkets.js +1 -0
- package/js/src/bybit.js +2 -0
- package/js/src/cex.js +1 -0
- package/js/src/coinbaseexchange.js +1 -0
- package/js/src/coinbaseinternational.js +2 -1
- package/js/src/coinex.d.ts +0 -2
- package/js/src/coinex.js +1 -17
- package/js/src/cryptocom.d.ts +0 -1
- package/js/src/cryptocom.js +0 -12
- package/js/src/hitbtc.js +1 -0
- package/js/src/htx.js +49 -49
- package/js/src/huobijp.d.ts +0 -1
- package/js/src/huobijp.js +0 -9
- package/js/src/kraken.js +48 -48
- package/js/src/latoken.js +1 -0
- package/js/src/mexc.js +1 -61
- package/js/src/okcoin.d.ts +0 -1
- package/js/src/okcoin.js +4 -9
- package/js/src/okx.d.ts +0 -1
- package/js/src/okx.js +1 -8
- package/js/src/onetrading.js +1 -0
- package/js/src/phemex.js +1 -0
- package/js/src/poloniexfutures.js +1 -0
- package/js/src/pro/binance.d.ts +9 -1
- package/js/src/pro/binance.js +327 -1
- package/js/src/pro/bingx.d.ts +2 -2
- package/js/src/pro/bingx.js +263 -91
- package/js/src/pro/bithumb.js +5 -1
- package/js/src/pro/bitvavo.js +1 -0
- package/js/src/pro/bybit.d.ts +12 -1
- package/js/src/pro/bybit.js +292 -3
- package/js/src/pro/cex.js +1 -0
- package/js/src/pro/coinex.d.ts +12 -6
- package/js/src/pro/coinex.js +996 -681
- package/js/src/pro/lbank.js +2 -3
- package/js/src/pro/okx.d.ts +7 -0
- package/js/src/pro/okx.js +162 -4
- package/js/src/probit.js +1 -0
- package/js/src/vertex.js +1 -0
- package/js/src/whitebit.js +5 -3
- package/js/src/woo.js +1 -0
- package/js/src/woofipro.js +1 -0
- package/package.json +1 -1
package/js/src/bingx.js
CHANGED
|
@@ -1062,8 +1062,7 @@ export default class bingx extends Exchange {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
parseTrade(trade, market = undefined) {
|
|
1064
1064
|
//
|
|
1065
|
-
// spot
|
|
1066
|
-
// fetchTrades
|
|
1065
|
+
// spot fetchTrades
|
|
1067
1066
|
//
|
|
1068
1067
|
// {
|
|
1069
1068
|
// "id": 43148253,
|
|
@@ -1073,8 +1072,8 @@ export default class bingx extends Exchange {
|
|
|
1073
1072
|
// "buyerMaker": false
|
|
1074
1073
|
// }
|
|
1075
1074
|
//
|
|
1076
|
-
// spot
|
|
1077
|
-
//
|
|
1075
|
+
// spot fetchMyTrades
|
|
1076
|
+
//
|
|
1078
1077
|
// {
|
|
1079
1078
|
// "symbol": "LTC-USDT",
|
|
1080
1079
|
// "id": 36237072,
|
|
@@ -1089,8 +1088,7 @@ export default class bingx extends Exchange {
|
|
|
1089
1088
|
// "isMaker": false
|
|
1090
1089
|
// }
|
|
1091
1090
|
//
|
|
1092
|
-
// swap
|
|
1093
|
-
// fetchTrades
|
|
1091
|
+
// swap fetchTrades
|
|
1094
1092
|
//
|
|
1095
1093
|
// {
|
|
1096
1094
|
// "time": 1672025549368,
|
|
@@ -1100,8 +1098,7 @@ export default class bingx extends Exchange {
|
|
|
1100
1098
|
// "quoteQty": "55723.87"
|
|
1101
1099
|
// }
|
|
1102
1100
|
//
|
|
1103
|
-
// swap
|
|
1104
|
-
// fetchMyTrades
|
|
1101
|
+
// swap fetchMyTrades
|
|
1105
1102
|
//
|
|
1106
1103
|
// {
|
|
1107
1104
|
// "volume": "0.1",
|
|
@@ -1115,10 +1112,7 @@ export default class bingx extends Exchange {
|
|
|
1115
1112
|
// "filledTime": "2023-07-04T20:56:01.000+0800"
|
|
1116
1113
|
// }
|
|
1117
1114
|
//
|
|
1118
|
-
//
|
|
1119
|
-
// ws
|
|
1120
|
-
//
|
|
1121
|
-
// spot
|
|
1115
|
+
// ws spot
|
|
1122
1116
|
//
|
|
1123
1117
|
// {
|
|
1124
1118
|
// "E": 1690214529432,
|
|
@@ -1131,7 +1125,7 @@ export default class bingx extends Exchange {
|
|
|
1131
1125
|
// "t": "57903921"
|
|
1132
1126
|
// }
|
|
1133
1127
|
//
|
|
1134
|
-
// swap
|
|
1128
|
+
// ws linear swap
|
|
1135
1129
|
//
|
|
1136
1130
|
// {
|
|
1137
1131
|
// "q": "0.0421",
|
|
@@ -1141,6 +1135,19 @@ export default class bingx extends Exchange {
|
|
|
1141
1135
|
// "s": "BTC-USDT"
|
|
1142
1136
|
// }
|
|
1143
1137
|
//
|
|
1138
|
+
// ws inverse swap
|
|
1139
|
+
//
|
|
1140
|
+
// {
|
|
1141
|
+
// "e": "trade",
|
|
1142
|
+
// "E": 1722920589665,
|
|
1143
|
+
// "s": "BTC-USD",
|
|
1144
|
+
// "t": "39125001",
|
|
1145
|
+
// "p": "55360.0",
|
|
1146
|
+
// "q": "1",
|
|
1147
|
+
// "T": 1722920589582,
|
|
1148
|
+
// "m": false
|
|
1149
|
+
// }
|
|
1150
|
+
//
|
|
1144
1151
|
// inverse swap fetchMyTrades
|
|
1145
1152
|
//
|
|
1146
1153
|
// {
|
|
@@ -2550,16 +2557,22 @@ export default class bingx extends Exchange {
|
|
|
2550
2557
|
}
|
|
2551
2558
|
}
|
|
2552
2559
|
let positionSide = undefined;
|
|
2553
|
-
|
|
2554
|
-
|
|
2560
|
+
const hedged = this.safeBool(params, 'hedged', false);
|
|
2561
|
+
if (hedged) {
|
|
2562
|
+
if (reduceOnly) {
|
|
2563
|
+
positionSide = (side === 'buy') ? 'SHORT' : 'LONG';
|
|
2564
|
+
}
|
|
2565
|
+
else {
|
|
2566
|
+
positionSide = (side === 'buy') ? 'LONG' : 'SHORT';
|
|
2567
|
+
}
|
|
2555
2568
|
}
|
|
2556
2569
|
else {
|
|
2557
|
-
positionSide =
|
|
2570
|
+
positionSide = 'BOTH';
|
|
2558
2571
|
}
|
|
2559
2572
|
request['positionSide'] = positionSide;
|
|
2560
2573
|
request['quantity'] = (market['inverse']) ? amount : this.parseToNumeric(this.amountToPrecision(symbol, amount)); // precision not available for inverse contracts
|
|
2561
2574
|
}
|
|
2562
|
-
params = this.omit(params, ['reduceOnly', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'trailingType', 'takeProfit', 'stopLoss', 'clientOrderId']);
|
|
2575
|
+
params = this.omit(params, ['hedged', 'reduceOnly', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'trailingType', 'takeProfit', 'stopLoss', 'clientOrderId']);
|
|
2563
2576
|
return this.extend(request, params);
|
|
2564
2577
|
}
|
|
2565
2578
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
@@ -2591,6 +2604,7 @@ export default class bingx extends Exchange {
|
|
|
2591
2604
|
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
|
|
2592
2605
|
* @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
|
|
2593
2606
|
* @param {boolean} [params.test] *swap only* whether to use the test endpoint or not, default is false
|
|
2607
|
+
* @param {boolean} [params.hedged] *swap only* whether the order is in hedged mode or one way mode
|
|
2594
2608
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2595
2609
|
*/
|
|
2596
2610
|
await this.loadMarkets();
|
|
@@ -3649,6 +3663,7 @@ export default class bingx extends Exchange {
|
|
|
3649
3663
|
* @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20details
|
|
3650
3664
|
* @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20details
|
|
3651
3665
|
* @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order
|
|
3666
|
+
* @param {string} id the order id
|
|
3652
3667
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
3653
3668
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3654
3669
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/bit2c.js
CHANGED
|
@@ -502,6 +502,7 @@ export default class bit2c extends Exchange {
|
|
|
502
502
|
* @name bit2c#fetchOrder
|
|
503
503
|
* @description fetches information on an order made by the user
|
|
504
504
|
* @see https://bit2c.co.il/home/api#getoid
|
|
505
|
+
* @param {string} id the order id
|
|
505
506
|
* @param {string} symbol unified market symbol
|
|
506
507
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
507
508
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/bitbank.js
CHANGED
|
@@ -720,6 +720,7 @@ export default class bitbank extends Exchange {
|
|
|
720
720
|
* @name bitbank#fetchOrder
|
|
721
721
|
* @description fetches information on an order made by the user
|
|
722
722
|
* @see https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#fetch-order-information
|
|
723
|
+
* @param {string} id the order id
|
|
723
724
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
724
725
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
725
726
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/bitfinex.js
CHANGED
|
@@ -1336,6 +1336,7 @@ export default class bitfinex extends Exchange {
|
|
|
1336
1336
|
* @name bitfinex#fetchOrder
|
|
1337
1337
|
* @description fetches information on an order made by the user
|
|
1338
1338
|
* @see https://docs.bitfinex.com/v1/reference/rest-auth-order-status
|
|
1339
|
+
* @param {string} id the order id
|
|
1339
1340
|
* @param {string} symbol not used by bitfinex fetchOrder
|
|
1340
1341
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1341
1342
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/bitfinex2.d.ts
CHANGED
|
@@ -20,7 +20,6 @@ export default class bitfinex2 extends Exchange {
|
|
|
20
20
|
}>;
|
|
21
21
|
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
22
22
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
23
|
-
safeNetwork(networkId: any): string;
|
|
24
23
|
fetchBalance(params?: {}): Promise<Balances>;
|
|
25
24
|
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
26
25
|
parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
|
package/js/src/bitfinex2.js
CHANGED
|
@@ -381,6 +381,25 @@ export default class bitfinex2 extends Exchange {
|
|
|
381
381
|
'withdraw': {
|
|
382
382
|
'includeFee': false,
|
|
383
383
|
},
|
|
384
|
+
'networks': {
|
|
385
|
+
'BTC': 'BITCOIN',
|
|
386
|
+
'LTC': 'LITECOIN',
|
|
387
|
+
'ERC20': 'ETHEREUM',
|
|
388
|
+
'OMNI': 'TETHERUSO',
|
|
389
|
+
'LIQUID': 'TETHERUSL',
|
|
390
|
+
'TRC20': 'TETHERUSX',
|
|
391
|
+
'EOS': 'TETHERUSS',
|
|
392
|
+
'AVAX': 'TETHERUSDTAVAX',
|
|
393
|
+
'SOL': 'TETHERUSDTSOL',
|
|
394
|
+
'ALGO': 'TETHERUSDTALG',
|
|
395
|
+
'BCH': 'TETHERUSDTBCH',
|
|
396
|
+
'KSM': 'TETHERUSDTKSM',
|
|
397
|
+
'DVF': 'TETHERUSDTDVF',
|
|
398
|
+
'OMG': 'TETHERUSDTOMG',
|
|
399
|
+
},
|
|
400
|
+
'networksById': {
|
|
401
|
+
'TETHERUSE': 'ERC20',
|
|
402
|
+
},
|
|
384
403
|
},
|
|
385
404
|
'exceptions': {
|
|
386
405
|
'exact': {
|
|
@@ -789,7 +808,7 @@ export default class bitfinex2 extends Exchange {
|
|
|
789
808
|
const networkId = this.safeString(pair, 0);
|
|
790
809
|
const currencyId = this.safeString(this.safeValue(pair, 1, []), 0);
|
|
791
810
|
if (currencyId === cleanId) {
|
|
792
|
-
const network = this.
|
|
811
|
+
const network = this.networkIdToCode(networkId);
|
|
793
812
|
networks[network] = {
|
|
794
813
|
'info': networkId,
|
|
795
814
|
'id': networkId.toLowerCase(),
|
|
@@ -816,26 +835,6 @@ export default class bitfinex2 extends Exchange {
|
|
|
816
835
|
}
|
|
817
836
|
return result;
|
|
818
837
|
}
|
|
819
|
-
safeNetwork(networkId) {
|
|
820
|
-
const networksById = {
|
|
821
|
-
'BITCOIN': 'BTC',
|
|
822
|
-
'LITECOIN': 'LTC',
|
|
823
|
-
'ETHEREUM': 'ERC20',
|
|
824
|
-
'TETHERUSE': 'ERC20',
|
|
825
|
-
'TETHERUSO': 'OMNI',
|
|
826
|
-
'TETHERUSL': 'LIQUID',
|
|
827
|
-
'TETHERUSX': 'TRC20',
|
|
828
|
-
'TETHERUSS': 'EOS',
|
|
829
|
-
'TETHERUSDTAVAX': 'AVAX',
|
|
830
|
-
'TETHERUSDTSOL': 'SOL',
|
|
831
|
-
'TETHERUSDTALG': 'ALGO',
|
|
832
|
-
'TETHERUSDTBCH': 'BCH',
|
|
833
|
-
'TETHERUSDTKSM': 'KSM',
|
|
834
|
-
'TETHERUSDTDVF': 'DVF',
|
|
835
|
-
'TETHERUSDTOMG': 'OMG',
|
|
836
|
-
};
|
|
837
|
-
return this.safeString(networksById, networkId, networkId);
|
|
838
|
-
}
|
|
839
838
|
async fetchBalance(params = {}) {
|
|
840
839
|
/**
|
|
841
840
|
* @method
|
|
@@ -2374,7 +2373,7 @@ export default class bitfinex2 extends Exchange {
|
|
|
2374
2373
|
const currencyId = this.safeString(transaction, 1);
|
|
2375
2374
|
code = this.safeCurrencyCode(currencyId, currency);
|
|
2376
2375
|
const networkId = this.safeString(transaction, 2);
|
|
2377
|
-
network = this.
|
|
2376
|
+
network = this.networkIdToCode(networkId);
|
|
2378
2377
|
timestamp = this.safeInteger(transaction, 5);
|
|
2379
2378
|
updated = this.safeInteger(transaction, 6);
|
|
2380
2379
|
status = this.parseTransactionStatus(this.safeString(transaction, 9));
|
package/js/src/bitflyer.js
CHANGED
|
@@ -728,6 +728,7 @@ export default class bitflyer extends Exchange {
|
|
|
728
728
|
* @name bitflyer#fetchOrder
|
|
729
729
|
* @description fetches information on an order made by the user
|
|
730
730
|
* @see https://lightning.bitflyer.com/docs?lang=en#list-orders
|
|
731
|
+
* @param {string} id the order id
|
|
731
732
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
732
733
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
733
734
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/bitget.js
CHANGED
|
@@ -4004,7 +4004,7 @@ export default class bitget extends Exchange {
|
|
|
4004
4004
|
if (feeCostString !== undefined) {
|
|
4005
4005
|
// swap
|
|
4006
4006
|
fee = {
|
|
4007
|
-
'cost': this.parseNumber(Precise.
|
|
4007
|
+
'cost': this.parseNumber(Precise.stringNeg(feeCostString)),
|
|
4008
4008
|
'currency': market['settle'],
|
|
4009
4009
|
};
|
|
4010
4010
|
}
|
|
@@ -4021,7 +4021,7 @@ export default class bitget extends Exchange {
|
|
|
4021
4021
|
}
|
|
4022
4022
|
}
|
|
4023
4023
|
fee = {
|
|
4024
|
-
'cost': this.parseNumber(Precise.
|
|
4024
|
+
'cost': this.parseNumber(Precise.stringNeg(this.safeString(feeObject, 'totalFee'))),
|
|
4025
4025
|
'currency': this.safeCurrencyCode(this.safeString(feeObject, 'feeCoinCode')),
|
|
4026
4026
|
};
|
|
4027
4027
|
}
|
|
@@ -5104,6 +5104,7 @@ export default class bitget extends Exchange {
|
|
|
5104
5104
|
* @description fetches information on an order made by the user
|
|
5105
5105
|
* @see https://www.bitget.com/api-doc/spot/trade/Get-Order-Info
|
|
5106
5106
|
* @see https://www.bitget.com/api-doc/contract/trade/Get-Order-Details
|
|
5107
|
+
* @param {string} id the order id
|
|
5107
5108
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
5108
5109
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5109
5110
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/bitmart.d.ts
CHANGED
|
@@ -81,7 +81,6 @@ export default class bitmart extends Exchange {
|
|
|
81
81
|
tag: string;
|
|
82
82
|
network: any;
|
|
83
83
|
};
|
|
84
|
-
safeNetworkCode(networkId: any, currency?: any): string;
|
|
85
84
|
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<any>;
|
|
86
85
|
fetchTransactionsByType(type: any, code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
87
86
|
fetchDeposit(id: string, code?: Str, params?: {}): Promise<Transaction>;
|
package/js/src/bitmart.js
CHANGED
|
@@ -3438,7 +3438,12 @@ export default class bitmart extends Exchange {
|
|
|
3438
3438
|
const parts = chain.split('-');
|
|
3439
3439
|
const partsLength = parts.length;
|
|
3440
3440
|
const networkId = this.safeString(parts, partsLength - 1);
|
|
3441
|
-
|
|
3441
|
+
if (networkId === this.safeString(currency, 'name')) {
|
|
3442
|
+
network = this.safeString(currency, 'code');
|
|
3443
|
+
}
|
|
3444
|
+
else {
|
|
3445
|
+
network = this.networkIdToCode(networkId);
|
|
3446
|
+
}
|
|
3442
3447
|
}
|
|
3443
3448
|
this.checkAddress(address);
|
|
3444
3449
|
return {
|
|
@@ -3449,14 +3454,6 @@ export default class bitmart extends Exchange {
|
|
|
3449
3454
|
'network': network,
|
|
3450
3455
|
};
|
|
3451
3456
|
}
|
|
3452
|
-
safeNetworkCode(networkId, currency = undefined) {
|
|
3453
|
-
const name = this.safeString(currency, 'name');
|
|
3454
|
-
if (networkId === name) {
|
|
3455
|
-
const code = this.safeString(currency, 'code');
|
|
3456
|
-
return code;
|
|
3457
|
-
}
|
|
3458
|
-
return this.networkIdToCode(networkId);
|
|
3459
|
-
}
|
|
3460
3457
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
3461
3458
|
/**
|
|
3462
3459
|
* @method
|
package/js/src/bitmex.js
CHANGED
|
@@ -887,6 +887,7 @@ export default class bitmex extends Exchange {
|
|
|
887
887
|
* @name bitmex#fetchOrder
|
|
888
888
|
* @description fetches information on an order made by the user
|
|
889
889
|
* @see https://www.bitmex.com/api/explorer/#!/Order/Order_getOrders
|
|
890
|
+
* @param {string} id the order id
|
|
890
891
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
891
892
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
892
893
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/bitopro.js
CHANGED
|
@@ -1179,6 +1179,7 @@ export default class bitopro extends Exchange {
|
|
|
1179
1179
|
* @name bitopro#fetchOrder
|
|
1180
1180
|
* @description fetches information on an order made by the user
|
|
1181
1181
|
* @see https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_an_order_data.md
|
|
1182
|
+
* @param {string} id the order id
|
|
1182
1183
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1183
1184
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1184
1185
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/bitrue.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ export default class bitrue extends Exchange {
|
|
|
16
16
|
info: any;
|
|
17
17
|
}>;
|
|
18
18
|
fetchTime(params?: {}): Promise<number>;
|
|
19
|
-
safeNetwork(networkId: any): string;
|
|
20
19
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
21
20
|
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
22
21
|
parseMarket(market: Dict): Market;
|
package/js/src/bitrue.js
CHANGED
|
@@ -338,6 +338,67 @@ export default class bitrue extends Exchange {
|
|
|
338
338
|
'networks': {
|
|
339
339
|
'ERC20': 'ETH',
|
|
340
340
|
'TRC20': 'TRX',
|
|
341
|
+
'AETERNITY': 'Aeternity',
|
|
342
|
+
'AION': 'AION',
|
|
343
|
+
'ALGO': 'Algorand',
|
|
344
|
+
'ASK': 'ASK',
|
|
345
|
+
'ATOM': 'ATOM',
|
|
346
|
+
'AVAXC': 'AVAX C-Chain',
|
|
347
|
+
'BCH': 'BCH',
|
|
348
|
+
'BEP2': 'BEP2',
|
|
349
|
+
'BEP20': 'BEP20',
|
|
350
|
+
'Bitcoin': 'Bitcoin',
|
|
351
|
+
'BRP20': 'BRP20',
|
|
352
|
+
'ADA': 'Cardano',
|
|
353
|
+
'CASINOCOIN': 'CasinoCoin',
|
|
354
|
+
'CASINOCOIN-XRPL': 'CasinoCoin XRPL',
|
|
355
|
+
'CONTENTOS': 'Contentos',
|
|
356
|
+
'DASH': 'Dash',
|
|
357
|
+
'DECOIN': 'Decoin',
|
|
358
|
+
'DFI': 'DeFiChain',
|
|
359
|
+
'DGB': 'DGB',
|
|
360
|
+
'DIVI': 'Divi',
|
|
361
|
+
'DOGE': 'dogecoin',
|
|
362
|
+
'EOS': 'EOS',
|
|
363
|
+
'ETC': 'ETC',
|
|
364
|
+
'FILECOIN': 'Filecoin',
|
|
365
|
+
'FREETON': 'FREETON',
|
|
366
|
+
'HBAR': 'HBAR',
|
|
367
|
+
'HEDERA': 'Hedera Hashgraph',
|
|
368
|
+
'HRC20': 'HRC20',
|
|
369
|
+
'ICON': 'ICON',
|
|
370
|
+
'ICP': 'ICP',
|
|
371
|
+
'IGNIS': 'Ignis',
|
|
372
|
+
'INTERNETCOMPUTER': 'Internet Computer',
|
|
373
|
+
'IOTA': 'IOTA',
|
|
374
|
+
'KAVA': 'KAVA',
|
|
375
|
+
'KSM': 'KSM',
|
|
376
|
+
'LTC': 'LiteCoin',
|
|
377
|
+
'LUNA': 'Luna',
|
|
378
|
+
'MATIC': 'MATIC',
|
|
379
|
+
'MOBILECOIN': 'Mobile Coin',
|
|
380
|
+
'MONACOIN': 'MonaCoin',
|
|
381
|
+
'XMR': 'Monero',
|
|
382
|
+
'NEM': 'NEM',
|
|
383
|
+
'NEP5': 'NEP5',
|
|
384
|
+
'OMNI': 'OMNI',
|
|
385
|
+
'PAC': 'PAC',
|
|
386
|
+
'DOT': 'Polkadot',
|
|
387
|
+
'RAVEN': 'Ravencoin',
|
|
388
|
+
'SAFEX': 'Safex',
|
|
389
|
+
'SOL': 'SOLANA',
|
|
390
|
+
'SGB': 'Songbird',
|
|
391
|
+
'XML': 'Stellar Lumens',
|
|
392
|
+
'XYM': 'Symbol',
|
|
393
|
+
'XTZ': 'Tezos',
|
|
394
|
+
'theta': 'theta',
|
|
395
|
+
'THETA': 'THETA',
|
|
396
|
+
'VECHAIN': 'VeChain',
|
|
397
|
+
'WANCHAIN': 'Wanchain',
|
|
398
|
+
'XINFIN': 'XinFin Network',
|
|
399
|
+
'XRP': 'XRP',
|
|
400
|
+
'XRPL': 'XRPL',
|
|
401
|
+
'ZIL': 'ZIL',
|
|
341
402
|
},
|
|
342
403
|
'defaultType': 'spot',
|
|
343
404
|
'timeframes': {
|
|
@@ -510,77 +571,6 @@ export default class bitrue extends Exchange {
|
|
|
510
571
|
//
|
|
511
572
|
return this.safeInteger(response, 'serverTime');
|
|
512
573
|
}
|
|
513
|
-
safeNetwork(networkId) {
|
|
514
|
-
const uppercaseNetworkId = networkId.toUpperCase();
|
|
515
|
-
const networksById = {
|
|
516
|
-
'Aeternity': 'Aeternity',
|
|
517
|
-
'AION': 'AION',
|
|
518
|
-
'Algorand': 'Algorand',
|
|
519
|
-
'ASK': 'ASK',
|
|
520
|
-
'ATOM': 'ATOM',
|
|
521
|
-
'AVAX C-Chain': 'AVAX C-Chain',
|
|
522
|
-
'bch': 'bch',
|
|
523
|
-
'BCH': 'BCH',
|
|
524
|
-
'BEP2': 'BEP2',
|
|
525
|
-
'BEP20': 'BEP20',
|
|
526
|
-
'Bitcoin': 'Bitcoin',
|
|
527
|
-
'BRP20': 'BRP20',
|
|
528
|
-
'Cardano': 'ADA',
|
|
529
|
-
'CasinoCoin': 'CasinoCoin',
|
|
530
|
-
'CasinoCoin XRPL': 'CasinoCoin XRPL',
|
|
531
|
-
'Contentos': 'Contentos',
|
|
532
|
-
'Dash': 'Dash',
|
|
533
|
-
'Decoin': 'Decoin',
|
|
534
|
-
'DeFiChain': 'DeFiChain',
|
|
535
|
-
'DGB': 'DGB',
|
|
536
|
-
'Divi': 'Divi',
|
|
537
|
-
'dogecoin': 'DOGE',
|
|
538
|
-
'EOS': 'EOS',
|
|
539
|
-
'ERC20': 'ERC20',
|
|
540
|
-
'ETC': 'ETC',
|
|
541
|
-
'Filecoin': 'Filecoin',
|
|
542
|
-
'FREETON': 'FREETON',
|
|
543
|
-
'HBAR': 'HBAR',
|
|
544
|
-
'Hedera Hashgraph': 'Hedera Hashgraph',
|
|
545
|
-
'HRC20': 'HRC20',
|
|
546
|
-
'ICON': 'ICON',
|
|
547
|
-
'ICP': 'ICP',
|
|
548
|
-
'Ignis': 'Ignis',
|
|
549
|
-
'Internet Computer': 'Internet Computer',
|
|
550
|
-
'IOTA': 'IOTA',
|
|
551
|
-
'KAVA': 'KAVA',
|
|
552
|
-
'KSM': 'KSM',
|
|
553
|
-
'LiteCoin': 'LiteCoin',
|
|
554
|
-
'Luna': 'Luna',
|
|
555
|
-
'MATIC': 'MATIC',
|
|
556
|
-
'Mobile Coin': 'Mobile Coin',
|
|
557
|
-
'MonaCoin': 'MonaCoin',
|
|
558
|
-
'Monero': 'Monero',
|
|
559
|
-
'NEM': 'NEM',
|
|
560
|
-
'NEP5': 'NEP5',
|
|
561
|
-
'OMNI': 'OMNI',
|
|
562
|
-
'PAC': 'PAC',
|
|
563
|
-
'Polkadot': 'Polkadot',
|
|
564
|
-
'Ravencoin': 'Ravencoin',
|
|
565
|
-
'Safex': 'Safex',
|
|
566
|
-
'SOLANA': 'SOL',
|
|
567
|
-
'Songbird': 'Songbird',
|
|
568
|
-
'Stellar Lumens': 'Stellar Lumens',
|
|
569
|
-
'Symbol': 'Symbol',
|
|
570
|
-
'Tezos': 'XTZ',
|
|
571
|
-
'theta': 'theta',
|
|
572
|
-
'THETA': 'THETA',
|
|
573
|
-
'TRC20': 'TRC20',
|
|
574
|
-
'VeChain': 'VeChain',
|
|
575
|
-
'VECHAIN': 'VECHAIN',
|
|
576
|
-
'Wanchain': 'Wanchain',
|
|
577
|
-
'XinFin Network': 'XinFin Network',
|
|
578
|
-
'XRP': 'XRP',
|
|
579
|
-
'XRPL': 'XRPL',
|
|
580
|
-
'ZIL': 'ZIL',
|
|
581
|
-
};
|
|
582
|
-
return this.safeString2(networksById, networkId, uppercaseNetworkId, networkId);
|
|
583
|
-
}
|
|
584
574
|
async fetchCurrencies(params = {}) {
|
|
585
575
|
/**
|
|
586
576
|
* @method
|
|
@@ -2047,6 +2037,7 @@ export default class bitrue extends Exchange {
|
|
|
2047
2037
|
* @see https://github.com/Bitrue-exchange/Spot-official-api-docs#query-order-user_data
|
|
2048
2038
|
* @see https://www.bitrue.com/api-docs#query-order-user_data-hmac-sha256
|
|
2049
2039
|
* @see https://www.bitrue.com/api_docs_includes_file/delivery.html#query-order-user_data-hmac-sha256
|
|
2040
|
+
* @param {string} id the order id
|
|
2050
2041
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2051
2042
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2052
2043
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/bitso.js
CHANGED
|
@@ -1189,6 +1189,7 @@ export default class bitso extends Exchange {
|
|
|
1189
1189
|
* @name bitso#fetchOrder
|
|
1190
1190
|
* @description fetches information on an order made by the user
|
|
1191
1191
|
* @see https://docs.bitso.com/bitso-api/docs/look-up-orders
|
|
1192
|
+
* @param {string} id the order id
|
|
1192
1193
|
* @param {string} symbol not used by bitso fetchOrder
|
|
1193
1194
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1194
1195
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/bitstamp.js
CHANGED
|
@@ -1544,6 +1544,7 @@ export default class bitstamp extends Exchange {
|
|
|
1544
1544
|
* @name bitstamp#fetchOrder
|
|
1545
1545
|
* @description fetches information on an order made by the user
|
|
1546
1546
|
* @see https://www.bitstamp.net/api/#tag/Orders/operation/GetOrderStatus
|
|
1547
|
+
* @param {string} id the order id
|
|
1547
1548
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1548
1549
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1549
1550
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/bitvavo.js
CHANGED
|
@@ -1310,6 +1310,7 @@ export default class bitvavo extends Exchange {
|
|
|
1310
1310
|
* @name bitvavo#fetchOrder
|
|
1311
1311
|
* @description fetches information on an order made by the user
|
|
1312
1312
|
* @see https://docs.bitvavo.com/#tag/Trading-endpoints/paths/~1order/get
|
|
1313
|
+
* @param {string} id the order id
|
|
1313
1314
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1314
1315
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1315
1316
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/blockchaincom.js
CHANGED
|
@@ -1108,6 +1108,7 @@ export default class blockchaincom extends Exchange {
|
|
|
1108
1108
|
* @name blockchaincom#fetchOrder
|
|
1109
1109
|
* @description fetches information on an order made by the user
|
|
1110
1110
|
* @see https://api.blockchain.com/v3/#getorderbyid
|
|
1111
|
+
* @param {string} id the order id
|
|
1111
1112
|
* @param {string} symbol not used by blockchaincom fetchOrder
|
|
1112
1113
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1113
1114
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/btcalpha.js
CHANGED
|
@@ -797,6 +797,7 @@ export default class btcalpha extends Exchange {
|
|
|
797
797
|
* @name btcalpha#fetchOrder
|
|
798
798
|
* @see https://btc-alpha.github.io/api-docs/#retrieve-single-order
|
|
799
799
|
* @description fetches information on an order made by the user
|
|
800
|
+
* @param {string} id the order id
|
|
800
801
|
* @param {string} symbol not used by btcalpha fetchOrder
|
|
801
802
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
802
803
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/btcbox.js
CHANGED
|
@@ -571,6 +571,7 @@ export default class btcbox extends Exchange {
|
|
|
571
571
|
* @name btcbox#fetchOrder
|
|
572
572
|
* @description fetches information on an order made by the user
|
|
573
573
|
* @see https://blog.btcbox.jp/en/archives/8762#toc16
|
|
574
|
+
* @param {string} id the order id
|
|
574
575
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
575
576
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
576
577
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/btcmarkets.js
CHANGED
|
@@ -1072,6 +1072,7 @@ export default class btcmarkets extends Exchange {
|
|
|
1072
1072
|
* @name btcmarkets#fetchOrder
|
|
1073
1073
|
* @description fetches information on an order made by the user
|
|
1074
1074
|
* @see https://docs.btcmarkets.net/v3/#operation/getOrderById
|
|
1075
|
+
* @param {string} id the order id
|
|
1075
1076
|
* @param {string} symbol not used by btcmarkets fetchOrder
|
|
1076
1077
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1077
1078
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/bybit.js
CHANGED
|
@@ -4838,6 +4838,7 @@ export default class bybit extends Exchange {
|
|
|
4838
4838
|
* @name bybit#fetchOrderClassic
|
|
4839
4839
|
* @description fetches information on an order made by the user *classic accounts only*
|
|
4840
4840
|
* @see https://bybit-exchange.github.io/docs/v5/order/order-list
|
|
4841
|
+
* @param {string} id the order id
|
|
4841
4842
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
4842
4843
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4843
4844
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -4871,6 +4872,7 @@ export default class bybit extends Exchange {
|
|
|
4871
4872
|
* @name bybit#fetchOrderClassic
|
|
4872
4873
|
* @description *classic accounts only/ spot not supported* fetches information on an order made by the user *classic accounts only*
|
|
4873
4874
|
* @see https://bybit-exchange.github.io/docs/v5/order/order-list
|
|
4875
|
+
* @param {string} id the order id
|
|
4874
4876
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
4875
4877
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4876
4878
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/cex.js
CHANGED
|
@@ -1219,6 +1219,7 @@ export default class cex extends Exchange {
|
|
|
1219
1219
|
* @name cex#fetchOrder
|
|
1220
1220
|
* @see https://docs.cex.io/?python#get-order-details
|
|
1221
1221
|
* @description fetches information on an order made by the user
|
|
1222
|
+
* @param {string} id the order id
|
|
1222
1223
|
* @param {string} symbol not used by cex fetchOrder
|
|
1223
1224
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1224
1225
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -1093,6 +1093,7 @@ export default class coinbaseexchange extends Exchange {
|
|
|
1093
1093
|
* @name coinbaseexchange#fetchOrder
|
|
1094
1094
|
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorder
|
|
1095
1095
|
* @description fetches information on an order made by the user
|
|
1096
|
+
* @param {string} id the order id
|
|
1096
1097
|
* @param {string} symbol not used by coinbaseexchange fetchOrder
|
|
1097
1098
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1098
1099
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -805,11 +805,12 @@ export default class coinbaseinternational extends Exchange {
|
|
|
805
805
|
const currencyId = this.safeString(network, 'asset_name');
|
|
806
806
|
const currencyCode = this.safeCurrencyCode(currencyId);
|
|
807
807
|
const networkId = this.safeString(network, 'network_arn_id');
|
|
808
|
+
const networkIdForCode = this.safeStringN(network, ['network_name', 'display_name', 'network_arn_id'], '');
|
|
808
809
|
return this.safeNetwork({
|
|
809
810
|
'info': network,
|
|
810
811
|
'id': networkId,
|
|
811
812
|
'name': this.safeString(network, 'display_name'),
|
|
812
|
-
'network': this.networkIdToCode(
|
|
813
|
+
'network': this.networkIdToCode(networkIdForCode, currencyCode),
|
|
813
814
|
'active': undefined,
|
|
814
815
|
'deposit': undefined,
|
|
815
816
|
'withdraw': undefined,
|
package/js/src/coinex.d.ts
CHANGED
|
@@ -55,8 +55,6 @@ export default class coinex extends Exchange {
|
|
|
55
55
|
tag: any;
|
|
56
56
|
network: any;
|
|
57
57
|
}>;
|
|
58
|
-
safeNetwork(networkId: any, currency?: Currency): any;
|
|
59
|
-
safeNetworkCode(networkId: any, currency?: Currency): any;
|
|
60
58
|
parseDepositAddress(depositAddress: any, currency?: Currency): {
|
|
61
59
|
info: any;
|
|
62
60
|
currency: string;
|
package/js/src/coinex.js
CHANGED
|
@@ -3769,26 +3769,10 @@ export default class coinex extends Exchange {
|
|
|
3769
3769
|
const options = this.safeDict(this.options, 'fetchDepositAddress', {});
|
|
3770
3770
|
const fillResponseFromRequest = this.safeBool(options, 'fillResponseFromRequest', true);
|
|
3771
3771
|
if (fillResponseFromRequest) {
|
|
3772
|
-
depositAddress['network'] = this.
|
|
3772
|
+
depositAddress['network'] = this.networkIdToCode(network, currency).toUpperCase();
|
|
3773
3773
|
}
|
|
3774
3774
|
return depositAddress;
|
|
3775
3775
|
}
|
|
3776
|
-
safeNetwork(networkId, currency = undefined) {
|
|
3777
|
-
const networks = this.safeValue(currency, 'networks', {});
|
|
3778
|
-
const networksCodes = Object.keys(networks);
|
|
3779
|
-
const networksCodesLength = networksCodes.length;
|
|
3780
|
-
if (networkId === undefined && networksCodesLength === 1) {
|
|
3781
|
-
return networks[networksCodes[0]];
|
|
3782
|
-
}
|
|
3783
|
-
return {
|
|
3784
|
-
'id': networkId,
|
|
3785
|
-
'network': (networkId === undefined) ? undefined : networkId.toUpperCase(),
|
|
3786
|
-
};
|
|
3787
|
-
}
|
|
3788
|
-
safeNetworkCode(networkId, currency = undefined) {
|
|
3789
|
-
const network = this.safeNetwork(networkId, currency);
|
|
3790
|
-
return network['network'];
|
|
3791
|
-
}
|
|
3792
3776
|
parseDepositAddress(depositAddress, currency = undefined) {
|
|
3793
3777
|
//
|
|
3794
3778
|
// {
|