ccxt 4.2.47 → 4.2.49
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/build.sh +7 -0
- package/dist/ccxt.browser.js +681 -84
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/binance.js +10 -4
- package/dist/cjs/src/bitmart.js +30 -4
- package/dist/cjs/src/bitstamp.js +8 -0
- package/dist/cjs/src/btcalpha.js +4 -0
- package/dist/cjs/src/btcmarkets.js +4 -0
- package/dist/cjs/src/btcturk.js +4 -0
- package/dist/cjs/src/bybit.js +138 -6
- package/dist/cjs/src/idex.js +52 -1
- package/dist/cjs/src/independentreserve.js +48 -0
- package/dist/cjs/src/indodax.js +120 -19
- package/dist/cjs/src/latoken.js +16 -0
- package/dist/cjs/src/luno.js +18 -0
- package/dist/cjs/src/lykke.js +19 -0
- package/dist/cjs/src/ndax.js +18 -0
- package/dist/cjs/src/okx.js +32 -5
- package/dist/cjs/src/pro/ascendex.js +22 -7
- package/dist/cjs/src/pro/bitget.js +28 -7
- package/dist/cjs/src/pro/bitstamp.js +1 -1
- package/dist/cjs/src/pro/hitbtc.js +6 -11
- package/dist/cjs/src/pro/mexc.js +2 -1
- package/dist/cjs/src/upbit.js +100 -17
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitstamp.d.ts +8 -0
- package/js/src/abstract/indodax.d.ts +9 -8
- package/js/src/binance.js +10 -4
- package/js/src/bitmart.js +30 -4
- package/js/src/bitstamp.js +8 -0
- package/js/src/btcalpha.js +4 -0
- package/js/src/btcmarkets.js +4 -0
- package/js/src/btcturk.js +4 -0
- package/js/src/bybit.d.ts +3 -1
- package/js/src/bybit.js +138 -6
- package/js/src/idex.d.ts +7 -0
- package/js/src/idex.js +52 -1
- package/js/src/independentreserve.d.ts +15 -1
- package/js/src/independentreserve.js +48 -0
- package/js/src/indodax.d.ts +3 -1
- package/js/src/indodax.js +120 -19
- package/js/src/latoken.js +16 -0
- package/js/src/luno.js +18 -0
- package/js/src/lykke.js +19 -0
- package/js/src/ndax.js +18 -0
- package/js/src/okx.js +32 -5
- package/js/src/pro/ascendex.d.ts +1 -0
- package/js/src/pro/ascendex.js +22 -7
- package/js/src/pro/bitget.js +28 -7
- package/js/src/pro/bitstamp.js +1 -1
- package/js/src/pro/hitbtc.js +6 -11
- package/js/src/pro/mexc.js +2 -1
- package/js/src/upbit.d.ts +2 -0
- package/js/src/upbit.js +100 -17
- package/package.json +3 -1
- package/skip-tests.json +4 -2
package/js/src/indodax.js
CHANGED
|
@@ -100,7 +100,7 @@ export default class indodax extends Exchange {
|
|
|
100
100
|
'urls': {
|
|
101
101
|
'logo': 'https://user-images.githubusercontent.com/51840849/87070508-9358c880-c221-11ea-8dc5-5391afbbb422.jpg',
|
|
102
102
|
'api': {
|
|
103
|
-
'public': 'https://indodax.com
|
|
103
|
+
'public': 'https://indodax.com',
|
|
104
104
|
'private': 'https://indodax.com/tapi',
|
|
105
105
|
},
|
|
106
106
|
'www': 'https://www.indodax.com',
|
|
@@ -110,14 +110,15 @@ export default class indodax extends Exchange {
|
|
|
110
110
|
'api': {
|
|
111
111
|
'public': {
|
|
112
112
|
'get': {
|
|
113
|
-
'server_time': 5,
|
|
114
|
-
'pairs': 5,
|
|
115
|
-
'price_increments': 5,
|
|
116
|
-
'summaries': 5,
|
|
117
|
-
'
|
|
118
|
-
'
|
|
119
|
-
'{pair}
|
|
120
|
-
'{pair}
|
|
113
|
+
'api/server_time': 5,
|
|
114
|
+
'api/pairs': 5,
|
|
115
|
+
'api/price_increments': 5,
|
|
116
|
+
'api/summaries': 5,
|
|
117
|
+
'api/ticker/{pair}': 5,
|
|
118
|
+
'api/ticker_all': 5,
|
|
119
|
+
'api/trades/{pair}': 5,
|
|
120
|
+
'api/depth/{pair}': 5,
|
|
121
|
+
'tradingview/history_v2': 5,
|
|
121
122
|
},
|
|
122
123
|
},
|
|
123
124
|
'private': {
|
|
@@ -182,6 +183,16 @@ export default class indodax extends Exchange {
|
|
|
182
183
|
// 'ETH': 'eth'
|
|
183
184
|
// 'BASE': 'base'
|
|
184
185
|
},
|
|
186
|
+
'timeframes': {
|
|
187
|
+
'1m': '1',
|
|
188
|
+
'15m': '15',
|
|
189
|
+
'30m': '30',
|
|
190
|
+
'1h': '60',
|
|
191
|
+
'4h': '240',
|
|
192
|
+
'1d': '1D',
|
|
193
|
+
'3d': '3D',
|
|
194
|
+
'1w': '1W',
|
|
195
|
+
},
|
|
185
196
|
},
|
|
186
197
|
'commonCurrencies': {
|
|
187
198
|
'STR': 'XLM',
|
|
@@ -201,10 +212,11 @@ export default class indodax extends Exchange {
|
|
|
201
212
|
* @method
|
|
202
213
|
* @name indodax#fetchTime
|
|
203
214
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
215
|
+
* @see https://github.com/btcid/indodax-official-api-docs/blob/master/Public-RestAPI.md#server-time
|
|
204
216
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
205
217
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
206
218
|
*/
|
|
207
|
-
const response = await this.
|
|
219
|
+
const response = await this.publicGetApiServerTime(params);
|
|
208
220
|
//
|
|
209
221
|
// {
|
|
210
222
|
// "timezone": "UTC",
|
|
@@ -218,10 +230,11 @@ export default class indodax extends Exchange {
|
|
|
218
230
|
* @method
|
|
219
231
|
* @name indodax#fetchMarkets
|
|
220
232
|
* @description retrieves data on all markets for indodax
|
|
233
|
+
* @see https://github.com/btcid/indodax-official-api-docs/blob/master/Public-RestAPI.md#pairs
|
|
221
234
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
222
235
|
* @returns {object[]} an array of objects representing market data
|
|
223
236
|
*/
|
|
224
|
-
const response = await this.
|
|
237
|
+
const response = await this.publicGetApiPairs(params);
|
|
225
238
|
//
|
|
226
239
|
// [
|
|
227
240
|
// {
|
|
@@ -338,6 +351,7 @@ export default class indodax extends Exchange {
|
|
|
338
351
|
* @method
|
|
339
352
|
* @name indodax#fetchBalance
|
|
340
353
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
354
|
+
* @see https://github.com/btcid/indodax-official-api-docs/blob/master/Private-RestAPI.md#get-info-endpoint
|
|
341
355
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
342
356
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
343
357
|
*/
|
|
@@ -380,6 +394,7 @@ export default class indodax extends Exchange {
|
|
|
380
394
|
* @method
|
|
381
395
|
* @name indodax#fetchOrderBook
|
|
382
396
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
397
|
+
* @see https://github.com/btcid/indodax-official-api-docs/blob/master/Public-RestAPI.md#depth
|
|
383
398
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
384
399
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
385
400
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -388,9 +403,9 @@ export default class indodax extends Exchange {
|
|
|
388
403
|
await this.loadMarkets();
|
|
389
404
|
const market = this.market(symbol);
|
|
390
405
|
const request = {
|
|
391
|
-
'pair': market['
|
|
406
|
+
'pair': market['base'] + market['quote'],
|
|
392
407
|
};
|
|
393
|
-
const orderbook = await this.
|
|
408
|
+
const orderbook = await this.publicGetApiDepthPair(this.extend(request, params));
|
|
394
409
|
return this.parseOrderBook(orderbook, market['symbol'], undefined, 'buy', 'sell');
|
|
395
410
|
}
|
|
396
411
|
parseTicker(ticker, market = undefined) {
|
|
@@ -439,6 +454,7 @@ export default class indodax extends Exchange {
|
|
|
439
454
|
* @method
|
|
440
455
|
* @name indodax#fetchTicker
|
|
441
456
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
457
|
+
* @see https://github.com/btcid/indodax-official-api-docs/blob/master/Public-RestAPI.md#ticker
|
|
442
458
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
443
459
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
444
460
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -446,9 +462,9 @@ export default class indodax extends Exchange {
|
|
|
446
462
|
await this.loadMarkets();
|
|
447
463
|
const market = this.market(symbol);
|
|
448
464
|
const request = {
|
|
449
|
-
'pair': market['
|
|
465
|
+
'pair': market['base'] + market['quote'],
|
|
450
466
|
};
|
|
451
|
-
const response = await this.
|
|
467
|
+
const response = await this.publicGetApiTickerPair(this.extend(request, params));
|
|
452
468
|
//
|
|
453
469
|
// {
|
|
454
470
|
// "ticker": {
|
|
@@ -493,7 +509,7 @@ export default class indodax extends Exchange {
|
|
|
493
509
|
// }
|
|
494
510
|
// }
|
|
495
511
|
//
|
|
496
|
-
const response = await this.
|
|
512
|
+
const response = await this.publicGetApiTickerAll(params);
|
|
497
513
|
const tickers = this.safeValue(response, 'tickers');
|
|
498
514
|
return this.parseTickers(tickers, symbols);
|
|
499
515
|
}
|
|
@@ -520,6 +536,7 @@ export default class indodax extends Exchange {
|
|
|
520
536
|
* @method
|
|
521
537
|
* @name indodax#fetchTrades
|
|
522
538
|
* @description get the list of most recent trades for a particular symbol
|
|
539
|
+
* @see https://github.com/btcid/indodax-official-api-docs/blob/master/Public-RestAPI.md#trades
|
|
523
540
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
524
541
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
525
542
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -529,11 +546,81 @@ export default class indodax extends Exchange {
|
|
|
529
546
|
await this.loadMarkets();
|
|
530
547
|
const market = this.market(symbol);
|
|
531
548
|
const request = {
|
|
532
|
-
'pair': market['
|
|
549
|
+
'pair': market['base'] + market['quote'],
|
|
533
550
|
};
|
|
534
|
-
const response = await this.
|
|
551
|
+
const response = await this.publicGetApiTradesPair(this.extend(request, params));
|
|
535
552
|
return this.parseTrades(response, market, since, limit);
|
|
536
553
|
}
|
|
554
|
+
parseOHLCV(ohlcv, market = undefined) {
|
|
555
|
+
//
|
|
556
|
+
// {
|
|
557
|
+
// "Time": 1708416900,
|
|
558
|
+
// "Open": 51707.52,
|
|
559
|
+
// "High": 51707.52,
|
|
560
|
+
// "Low": 51707.52,
|
|
561
|
+
// "Close": 51707.52,
|
|
562
|
+
// "Volume": "0"
|
|
563
|
+
// }
|
|
564
|
+
//
|
|
565
|
+
return [
|
|
566
|
+
this.safeTimestamp(ohlcv, 'Time'),
|
|
567
|
+
this.safeNumber(ohlcv, 'Open'),
|
|
568
|
+
this.safeNumber(ohlcv, 'High'),
|
|
569
|
+
this.safeNumber(ohlcv, 'Low'),
|
|
570
|
+
this.safeNumber(ohlcv, 'Close'),
|
|
571
|
+
this.safeNumber(ohlcv, 'Volume'),
|
|
572
|
+
];
|
|
573
|
+
}
|
|
574
|
+
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
575
|
+
/**
|
|
576
|
+
* @method
|
|
577
|
+
* @name indodax#fetchOHLCV
|
|
578
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
579
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
580
|
+
* @param {string} timeframe the length of time each candle represents
|
|
581
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
582
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
583
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
584
|
+
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
585
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
586
|
+
*/
|
|
587
|
+
await this.loadMarkets();
|
|
588
|
+
const market = this.market(symbol);
|
|
589
|
+
const timeframes = this.options['timeframes'];
|
|
590
|
+
const selectedTimeframe = this.safeString(timeframes, timeframe, timeframe);
|
|
591
|
+
const now = this.seconds();
|
|
592
|
+
const until = this.safeInteger2(params, 'until', 'till', now);
|
|
593
|
+
params = this.omit(params, ['until', 'till']);
|
|
594
|
+
const request = {
|
|
595
|
+
'to': until,
|
|
596
|
+
'tf': selectedTimeframe,
|
|
597
|
+
'symbol': market['base'] + market['quote'],
|
|
598
|
+
};
|
|
599
|
+
if (limit === undefined) {
|
|
600
|
+
limit = 1000;
|
|
601
|
+
}
|
|
602
|
+
if (since !== undefined) {
|
|
603
|
+
request['from'] = Math.floor(since / 1000);
|
|
604
|
+
}
|
|
605
|
+
else {
|
|
606
|
+
const duration = this.parseTimeframe(timeframe);
|
|
607
|
+
request['from'] = now - limit * duration - 1;
|
|
608
|
+
}
|
|
609
|
+
const response = await this.publicGetTradingviewHistoryV2(this.extend(request, params));
|
|
610
|
+
//
|
|
611
|
+
// [
|
|
612
|
+
// {
|
|
613
|
+
// "Time": 1708416900,
|
|
614
|
+
// "Open": 51707.52,
|
|
615
|
+
// "High": 51707.52,
|
|
616
|
+
// "Low": 51707.52,
|
|
617
|
+
// "Close": 51707.52,
|
|
618
|
+
// "Volume": "0"
|
|
619
|
+
// }
|
|
620
|
+
// ]
|
|
621
|
+
//
|
|
622
|
+
return this.parseOHLCVs(response, market, timeframe, since, limit);
|
|
623
|
+
}
|
|
537
624
|
parseOrderStatus(status) {
|
|
538
625
|
const statuses = {
|
|
539
626
|
'open': 'open',
|
|
@@ -625,6 +712,7 @@ export default class indodax extends Exchange {
|
|
|
625
712
|
* @method
|
|
626
713
|
* @name indodax#fetchOrder
|
|
627
714
|
* @description fetches information on an order made by the user
|
|
715
|
+
* @see https://github.com/btcid/indodax-official-api-docs/blob/master/Private-RestAPI.md#get-order-endpoints
|
|
628
716
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
629
717
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
630
718
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -649,6 +737,7 @@ export default class indodax extends Exchange {
|
|
|
649
737
|
* @method
|
|
650
738
|
* @name indodax#fetchOpenOrders
|
|
651
739
|
* @description fetch all unfilled currently open orders
|
|
740
|
+
* @see https://github.com/btcid/indodax-official-api-docs/blob/master/Private-RestAPI.md#open-orders-endpoints
|
|
652
741
|
* @param {string} symbol unified market symbol
|
|
653
742
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
654
743
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -689,6 +778,7 @@ export default class indodax extends Exchange {
|
|
|
689
778
|
* @method
|
|
690
779
|
* @name indodax#fetchClosedOrders
|
|
691
780
|
* @description fetches information on multiple closed orders made by the user
|
|
781
|
+
* @see https://github.com/btcid/indodax-official-api-docs/blob/master/Private-RestAPI.md#order-history
|
|
692
782
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
693
783
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
694
784
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -713,6 +803,7 @@ export default class indodax extends Exchange {
|
|
|
713
803
|
* @method
|
|
714
804
|
* @name indodax#createOrder
|
|
715
805
|
* @description create a trade order
|
|
806
|
+
* @see https://github.com/btcid/indodax-official-api-docs/blob/master/Private-RestAPI.md#trade-endpoints
|
|
716
807
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
717
808
|
* @param {string} type 'market' or 'limit'
|
|
718
809
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -752,6 +843,7 @@ export default class indodax extends Exchange {
|
|
|
752
843
|
* @method
|
|
753
844
|
* @name indodax#cancelOrder
|
|
754
845
|
* @description cancels an open order
|
|
846
|
+
* @see https://github.com/btcid/indodax-official-api-docs/blob/master/Private-RestAPI.md#cancel-order-endpoints
|
|
755
847
|
* @param {string} id order id
|
|
756
848
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
757
849
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -778,6 +870,7 @@ export default class indodax extends Exchange {
|
|
|
778
870
|
* @method
|
|
779
871
|
* @name indodax#fetchTransactionFee
|
|
780
872
|
* @description fetch the fee for a transaction
|
|
873
|
+
* @see https://github.com/btcid/indodax-official-api-docs/blob/master/Private-RestAPI.md#withdraw-fee-endpoints
|
|
781
874
|
* @param {string} code unified currency code
|
|
782
875
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
783
876
|
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
@@ -811,6 +904,7 @@ export default class indodax extends Exchange {
|
|
|
811
904
|
* @method
|
|
812
905
|
* @name indodax#fetchDepositsWithdrawals
|
|
813
906
|
* @description fetch history of deposits and withdrawals
|
|
907
|
+
* @see https://github.com/btcid/indodax-official-api-docs/blob/master/Private-RestAPI.md#transaction-history-endpoints
|
|
814
908
|
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
815
909
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
816
910
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
@@ -912,6 +1006,7 @@ export default class indodax extends Exchange {
|
|
|
912
1006
|
* @method
|
|
913
1007
|
* @name indodax#withdraw
|
|
914
1008
|
* @description make a withdrawal
|
|
1009
|
+
* @see https://github.com/btcid/indodax-official-api-docs/blob/master/Private-RestAPI.md#withdraw-coin-endpoints
|
|
915
1010
|
* @param {string} code unified currency code
|
|
916
1011
|
* @param {float} amount the amount to withdraw
|
|
917
1012
|
* @param {string} address the address to withdraw to
|
|
@@ -1045,6 +1140,7 @@ export default class indodax extends Exchange {
|
|
|
1045
1140
|
* @method
|
|
1046
1141
|
* @name indodax#fetchDepositAddresses
|
|
1047
1142
|
* @description fetch deposit addresses for multiple currencies and chain types
|
|
1143
|
+
* @see https://github.com/btcid/indodax-official-api-docs/blob/master/Private-RestAPI.md#general-information-on-endpoints
|
|
1048
1144
|
* @param {string[]} [codes] list of unified currency codes, default is undefined
|
|
1049
1145
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1050
1146
|
* @returns {object} a list of [address structures]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
@@ -1127,7 +1223,12 @@ export default class indodax extends Exchange {
|
|
|
1127
1223
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
1128
1224
|
let url = this.urls['api'][api];
|
|
1129
1225
|
if (api === 'public') {
|
|
1130
|
-
|
|
1226
|
+
const query = this.omit(params, this.extractParams(path));
|
|
1227
|
+
const requestPath = '/' + this.implodeParams(path, params);
|
|
1228
|
+
url = url + requestPath;
|
|
1229
|
+
if (Object.keys(query).length) {
|
|
1230
|
+
url += '?' + this.urlencodeWithArrayRepeat(query);
|
|
1231
|
+
}
|
|
1131
1232
|
}
|
|
1132
1233
|
else {
|
|
1133
1234
|
this.checkRequiredCredentials();
|
package/js/src/latoken.js
CHANGED
|
@@ -235,6 +235,7 @@ export default class latoken extends Exchange {
|
|
|
235
235
|
* @method
|
|
236
236
|
* @name latoken#fetchTime
|
|
237
237
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
238
|
+
* @see https://api.latoken.com/doc/v2/#tag/Time/operation/currentTime
|
|
238
239
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
239
240
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
240
241
|
*/
|
|
@@ -251,6 +252,7 @@ export default class latoken extends Exchange {
|
|
|
251
252
|
* @method
|
|
252
253
|
* @name latoken#fetchMarkets
|
|
253
254
|
* @description retrieves data on all markets for latoken
|
|
255
|
+
* @see https://api.latoken.com/doc/v2/#tag/Pair/operation/getActivePairs
|
|
254
256
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
255
257
|
* @returns {object[]} an array of objects representing market data
|
|
256
258
|
*/
|
|
@@ -487,6 +489,7 @@ export default class latoken extends Exchange {
|
|
|
487
489
|
* @method
|
|
488
490
|
* @name latoken#fetchBalance
|
|
489
491
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
492
|
+
* @see https://api.latoken.com/doc/v2/#tag/Account/operation/getBalancesByUser
|
|
490
493
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
491
494
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
492
495
|
*/
|
|
@@ -553,6 +556,7 @@ export default class latoken extends Exchange {
|
|
|
553
556
|
* @method
|
|
554
557
|
* @name latoken#fetchOrderBook
|
|
555
558
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
559
|
+
* @see https://api.latoken.com/doc/v2/#tag/Order-Book/operation/getOrderBook
|
|
556
560
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
557
561
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
558
562
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -638,6 +642,7 @@ export default class latoken extends Exchange {
|
|
|
638
642
|
* @method
|
|
639
643
|
* @name latoken#fetchTicker
|
|
640
644
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
645
|
+
* @see https://api.latoken.com/doc/v2/#tag/Ticker/operation/getTicker
|
|
641
646
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
642
647
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
643
648
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -676,6 +681,7 @@ export default class latoken extends Exchange {
|
|
|
676
681
|
* @method
|
|
677
682
|
* @name latoken#fetchTickers
|
|
678
683
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
684
|
+
* @see https://api.latoken.com/doc/v2/#tag/Ticker/operation/getAllTickers
|
|
679
685
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
680
686
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
681
687
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -798,6 +804,7 @@ export default class latoken extends Exchange {
|
|
|
798
804
|
* @method
|
|
799
805
|
* @name latoken#fetchTrades
|
|
800
806
|
* @description get the list of most recent trades for a particular symbol
|
|
807
|
+
* @see https://api.latoken.com/doc/v2/#tag/Trade/operation/getTradesByPair
|
|
801
808
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
802
809
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
803
810
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -830,6 +837,8 @@ export default class latoken extends Exchange {
|
|
|
830
837
|
* @method
|
|
831
838
|
* @name latoken#fetchTradingFee
|
|
832
839
|
* @description fetch the trading fees for a market
|
|
840
|
+
* @see https://api.latoken.com/doc/v2/#tag/Trade/operation/getFeeByPair
|
|
841
|
+
* @see https://api.latoken.com/doc/v2/#tag/Trade/operation/getAuthFeeByPair
|
|
833
842
|
* @param {string} symbol unified market symbol
|
|
834
843
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
835
844
|
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
@@ -899,6 +908,8 @@ export default class latoken extends Exchange {
|
|
|
899
908
|
* @method
|
|
900
909
|
* @name latoken#fetchMyTrades
|
|
901
910
|
* @description fetch all trades made by the user
|
|
911
|
+
* @see https://api.latoken.com/doc/v2/#tag/Trade/operation/getTradesByTrader
|
|
912
|
+
* @see https://api.latoken.com/doc/v2/#tag/Trade/operation/getTradesByAssetAndTrader
|
|
902
913
|
* @param {string} symbol unified market symbol
|
|
903
914
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
904
915
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -1406,6 +1417,7 @@ export default class latoken extends Exchange {
|
|
|
1406
1417
|
* @name latoken#fetchTransactions
|
|
1407
1418
|
* @deprecated
|
|
1408
1419
|
* @description use fetchDepositsWithdrawals instead
|
|
1420
|
+
* @see https://api.latoken.com/doc/v2/#tag/Transaction/operation/getUserTransactions
|
|
1409
1421
|
* @param {string} code unified currency code for the currency of the transactions, default is undefined
|
|
1410
1422
|
* @param {int} [since] timestamp in ms of the earliest transaction, default is undefined
|
|
1411
1423
|
* @param {int} [limit] max number of transactions to return, default is undefined
|
|
@@ -1534,6 +1546,7 @@ export default class latoken extends Exchange {
|
|
|
1534
1546
|
* @method
|
|
1535
1547
|
* @name latoken#fetchTransfers
|
|
1536
1548
|
* @description fetch a history of internal transfers made on an account
|
|
1549
|
+
* @see https://api.latoken.com/doc/v2/#tag/Transfer/operation/getUsersTransfers
|
|
1537
1550
|
* @param {string} code unified currency code of the currency transferred
|
|
1538
1551
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
1539
1552
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
@@ -1582,6 +1595,9 @@ export default class latoken extends Exchange {
|
|
|
1582
1595
|
* @method
|
|
1583
1596
|
* @name latoken#transfer
|
|
1584
1597
|
* @description transfer currency internally between wallets on the same account
|
|
1598
|
+
* @see https://api.latoken.com/doc/v2/#tag/Transfer/operation/transferByEmail
|
|
1599
|
+
* @see https://api.latoken.com/doc/v2/#tag/Transfer/operation/transferById
|
|
1600
|
+
* @see https://api.latoken.com/doc/v2/#tag/Transfer/operation/transferByPhone
|
|
1585
1601
|
* @param {string} code unified currency code
|
|
1586
1602
|
* @param {float} amount amount to transfer
|
|
1587
1603
|
* @param {string} fromAccount account to transfer from
|
package/js/src/luno.js
CHANGED
|
@@ -185,6 +185,7 @@ export default class luno extends Exchange {
|
|
|
185
185
|
* @method
|
|
186
186
|
* @name luno#fetchMarkets
|
|
187
187
|
* @description retrieves data on all markets for luno
|
|
188
|
+
* @see https://www.luno.com/en/developers/api#tag/Market/operation/Markets
|
|
188
189
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
189
190
|
* @returns {object[]} an array of objects representing market data
|
|
190
191
|
*/
|
|
@@ -275,6 +276,7 @@ export default class luno extends Exchange {
|
|
|
275
276
|
* @method
|
|
276
277
|
* @name luno#fetchAccounts
|
|
277
278
|
* @description fetch all the accounts associated with a profile
|
|
279
|
+
* @see https://www.luno.com/en/developers/api#tag/Accounts/operation/getBalances
|
|
278
280
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
279
281
|
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
280
282
|
*/
|
|
@@ -329,6 +331,7 @@ export default class luno extends Exchange {
|
|
|
329
331
|
* @method
|
|
330
332
|
* @name luno#fetchBalance
|
|
331
333
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
334
|
+
* @see https://www.luno.com/en/developers/api#tag/Accounts/operation/getBalances
|
|
332
335
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
333
336
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
334
337
|
*/
|
|
@@ -351,6 +354,8 @@ export default class luno extends Exchange {
|
|
|
351
354
|
* @method
|
|
352
355
|
* @name luno#fetchOrderBook
|
|
353
356
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
357
|
+
* @see https://www.luno.com/en/developers/api#tag/Market/operation/GetOrderBookFull
|
|
358
|
+
* @see https://www.luno.com/en/developers/api#tag/Market/operation/GetOrderBook
|
|
354
359
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
355
360
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
356
361
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -459,6 +464,7 @@ export default class luno extends Exchange {
|
|
|
459
464
|
* @method
|
|
460
465
|
* @name luno#fetchOrder
|
|
461
466
|
* @description fetches information on an order made by the user
|
|
467
|
+
* @see https://www.luno.com/en/developers/api#tag/Orders/operation/GetOrder
|
|
462
468
|
* @param {string} symbol not used by luno fetchOrder
|
|
463
469
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
464
470
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -490,6 +496,7 @@ export default class luno extends Exchange {
|
|
|
490
496
|
* @method
|
|
491
497
|
* @name luno#fetchOrders
|
|
492
498
|
* @description fetches information on multiple orders made by the user
|
|
499
|
+
* @see https://www.luno.com/en/developers/api#tag/Orders/operation/ListOrders
|
|
493
500
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
494
501
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
495
502
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -503,6 +510,7 @@ export default class luno extends Exchange {
|
|
|
503
510
|
* @method
|
|
504
511
|
* @name luno#fetchOpenOrders
|
|
505
512
|
* @description fetch all unfilled currently open orders
|
|
513
|
+
* @see https://www.luno.com/en/developers/api#tag/Orders/operation/ListOrders
|
|
506
514
|
* @param {string} symbol unified market symbol
|
|
507
515
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
508
516
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -516,6 +524,7 @@ export default class luno extends Exchange {
|
|
|
516
524
|
* @method
|
|
517
525
|
* @name luno#fetchClosedOrders
|
|
518
526
|
* @description fetches information on multiple closed orders made by the user
|
|
527
|
+
* @see https://www.luno.com/en/developers/api#tag/Orders/operation/ListOrders
|
|
519
528
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
520
529
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
521
530
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -566,6 +575,7 @@ export default class luno extends Exchange {
|
|
|
566
575
|
* @method
|
|
567
576
|
* @name luno#fetchTickers
|
|
568
577
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
578
|
+
* @see https://www.luno.com/en/developers/api#tag/Market/operation/GetTickers
|
|
569
579
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
570
580
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
571
581
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -590,6 +600,7 @@ export default class luno extends Exchange {
|
|
|
590
600
|
* @method
|
|
591
601
|
* @name luno#fetchTicker
|
|
592
602
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
603
|
+
* @see https://www.luno.com/en/developers/api#tag/Market/operation/GetTicker
|
|
593
604
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
594
605
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
595
606
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -711,6 +722,7 @@ export default class luno extends Exchange {
|
|
|
711
722
|
* @method
|
|
712
723
|
* @name luno#fetchTrades
|
|
713
724
|
* @description get the list of most recent trades for a particular symbol
|
|
725
|
+
* @see https://www.luno.com/en/developers/api#tag/Market/operation/ListTrades
|
|
714
726
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
715
727
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
716
728
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -811,6 +823,7 @@ export default class luno extends Exchange {
|
|
|
811
823
|
* @method
|
|
812
824
|
* @name luno#fetchMyTrades
|
|
813
825
|
* @description fetch all trades made by the user
|
|
826
|
+
* @see https://www.luno.com/en/developers/api#tag/Orders/operation/ListUserTrades
|
|
814
827
|
* @param {string} symbol unified market symbol
|
|
815
828
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
816
829
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -861,6 +874,7 @@ export default class luno extends Exchange {
|
|
|
861
874
|
* @method
|
|
862
875
|
* @name luno#fetchTradingFee
|
|
863
876
|
* @description fetch the trading fees for a market
|
|
877
|
+
* @see https://www.luno.com/en/developers/api#tag/Orders/operation/getFeeInfo
|
|
864
878
|
* @param {string} symbol unified market symbol
|
|
865
879
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
866
880
|
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
@@ -890,6 +904,8 @@ export default class luno extends Exchange {
|
|
|
890
904
|
* @method
|
|
891
905
|
* @name luno#createOrder
|
|
892
906
|
* @description create a trade order
|
|
907
|
+
* @see https://www.luno.com/en/developers/api#tag/Orders/operation/PostMarketOrder
|
|
908
|
+
* @see https://www.luno.com/en/developers/api#tag/Orders/operation/PostLimitOrder
|
|
893
909
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
894
910
|
* @param {string} type 'market' or 'limit'
|
|
895
911
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -931,6 +947,7 @@ export default class luno extends Exchange {
|
|
|
931
947
|
* @method
|
|
932
948
|
* @name luno#cancelOrder
|
|
933
949
|
* @description cancels an open order
|
|
950
|
+
* @see https://www.luno.com/en/developers/api#tag/Orders/operation/StopOrder
|
|
934
951
|
* @param {string} id order id
|
|
935
952
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
936
953
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -962,6 +979,7 @@ export default class luno extends Exchange {
|
|
|
962
979
|
* @method
|
|
963
980
|
* @name luno#fetchLedger
|
|
964
981
|
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
982
|
+
* @see https://www.luno.com/en/developers/api#tag/Accounts/operation/ListTransactions
|
|
965
983
|
* @param {string} code unified currency code, default is undefined
|
|
966
984
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
967
985
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|