ccxt 4.5.33 → 4.5.34

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.
Files changed (184) hide show
  1. package/README.md +19 -5
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +4 -4
  4. package/dist/cjs/src/{btcalpha.js → alp.js} +45 -45
  5. package/dist/cjs/src/ascendex.js +2 -2
  6. package/dist/cjs/src/aster.js +15 -22
  7. package/dist/cjs/src/backpack.js +2 -2
  8. package/dist/cjs/src/binance.js +6 -4
  9. package/dist/cjs/src/bingx.js +2 -1
  10. package/dist/cjs/src/bitfinex.js +6 -11
  11. package/dist/cjs/src/bitget.js +4 -4
  12. package/dist/cjs/src/bitmart.js +1 -1
  13. package/dist/cjs/src/bitmex.js +1 -1
  14. package/dist/cjs/src/bitso.js +1 -1
  15. package/dist/cjs/src/bitstamp.js +1 -1
  16. package/dist/cjs/src/blofin.js +1 -1
  17. package/dist/cjs/src/bybit.js +49 -26
  18. package/dist/cjs/src/cex.js +1 -1
  19. package/dist/cjs/src/coinbase.js +7 -6
  20. package/dist/cjs/src/coinbaseexchange.js +1 -1
  21. package/dist/cjs/src/coincatch.js +3 -3
  22. package/dist/cjs/src/coinex.js +2 -2
  23. package/dist/cjs/src/coinmetro.js +1 -1
  24. package/dist/cjs/src/cryptocom.js +4 -1
  25. package/dist/cjs/src/deepcoin.js +1 -1
  26. package/dist/cjs/src/defx.js +1 -1
  27. package/dist/cjs/src/delta.js +3 -3
  28. package/dist/cjs/src/digifinex.js +1 -1
  29. package/dist/cjs/src/dydx.js +1 -1
  30. package/dist/cjs/src/exmo.js +2 -2
  31. package/dist/cjs/src/foxbit.js +1 -1
  32. package/dist/cjs/src/gate.js +23 -3
  33. package/dist/cjs/src/hashkey.js +1 -1
  34. package/dist/cjs/src/hibachi.js +1 -1
  35. package/dist/cjs/src/hitbtc.js +2 -2
  36. package/dist/cjs/src/htx.js +26 -1
  37. package/dist/cjs/src/hyperliquid.js +5 -4
  38. package/dist/cjs/src/kraken.js +1 -1
  39. package/dist/cjs/src/kucoin.js +1 -1
  40. package/dist/cjs/src/kucoinfutures.js +1 -1
  41. package/dist/cjs/src/luno.js +1 -1
  42. package/dist/cjs/src/mexc.js +2 -2
  43. package/dist/cjs/src/modetrade.js +1 -1
  44. package/dist/cjs/src/ndax.js +1 -1
  45. package/dist/cjs/src/okx.js +4 -4
  46. package/dist/cjs/src/paradex.js +1 -1
  47. package/dist/cjs/src/phemex.js +1 -1
  48. package/dist/cjs/src/poloniex.js +2 -2
  49. package/dist/cjs/src/pro/apex.js +5 -4
  50. package/dist/cjs/src/pro/arkham.js +1 -1
  51. package/dist/cjs/src/pro/aster.js +905 -33
  52. package/dist/cjs/src/pro/bitget.js +14 -1
  53. package/dist/cjs/src/pro/okx.js +1 -1
  54. package/dist/cjs/src/toobit.js +1 -1
  55. package/dist/cjs/src/whitebit.js +1 -1
  56. package/dist/cjs/src/woo.js +3 -3
  57. package/dist/cjs/src/woofipro.js +1 -1
  58. package/dist/cjs/src/xt.js +2 -2
  59. package/dist/cjs/src/zebpay.js +2 -2
  60. package/dist/cjs/src/zonda.js +1 -1
  61. package/js/ccxt.d.ts +5 -5
  62. package/js/ccxt.js +4 -4
  63. package/js/src/abstract/aster.d.ts +6 -8
  64. package/js/src/abstract/binance.d.ts +2 -0
  65. package/js/src/abstract/binancecoinm.d.ts +2 -0
  66. package/js/src/abstract/binanceus.d.ts +2 -0
  67. package/js/src/abstract/binanceusdm.d.ts +2 -0
  68. package/js/src/abstract/bingx.d.ts +1 -0
  69. package/js/src/abstract/bybit.d.ts +15 -0
  70. package/js/src/abstract/cryptocom.d.ts +3 -0
  71. package/js/src/abstract/gate.d.ts +13 -0
  72. package/js/src/abstract/gateio.d.ts +13 -0
  73. package/js/src/abstract/htx.d.ts +25 -0
  74. package/js/src/abstract/huobi.d.ts +25 -0
  75. package/js/src/{btcalpha.d.ts → alp.d.ts} +37 -37
  76. package/js/src/{btcalpha.js → alp.js} +44 -44
  77. package/js/src/ascendex.d.ts +2 -2
  78. package/js/src/ascendex.js +2 -2
  79. package/js/src/aster.js +15 -22
  80. package/js/src/backpack.js +2 -2
  81. package/js/src/binance.d.ts +4 -4
  82. package/js/src/binance.js +6 -4
  83. package/js/src/bingx.d.ts +1 -1
  84. package/js/src/bingx.js +2 -1
  85. package/js/src/bitfinex.d.ts +1 -2
  86. package/js/src/bitfinex.js +6 -11
  87. package/js/src/bitget.d.ts +3 -3
  88. package/js/src/bitget.js +4 -4
  89. package/js/src/bitmart.d.ts +1 -1
  90. package/js/src/bitmart.js +1 -1
  91. package/js/src/bitmex.d.ts +1 -1
  92. package/js/src/bitmex.js +1 -1
  93. package/js/src/bitso.d.ts +1 -1
  94. package/js/src/bitso.js +1 -1
  95. package/js/src/bitstamp.d.ts +1 -1
  96. package/js/src/bitstamp.js +1 -1
  97. package/js/src/blofin.d.ts +1 -1
  98. package/js/src/blofin.js +1 -1
  99. package/js/src/bybit.d.ts +1 -1
  100. package/js/src/bybit.js +49 -26
  101. package/js/src/cex.d.ts +1 -1
  102. package/js/src/cex.js +1 -1
  103. package/js/src/coinbase.d.ts +1 -1
  104. package/js/src/coinbase.js +7 -6
  105. package/js/src/coinbaseexchange.d.ts +1 -1
  106. package/js/src/coinbaseexchange.js +1 -1
  107. package/js/src/coincatch.d.ts +3 -3
  108. package/js/src/coincatch.js +3 -3
  109. package/js/src/coinex.d.ts +2 -2
  110. package/js/src/coinex.js +2 -2
  111. package/js/src/coinmetro.d.ts +1 -1
  112. package/js/src/coinmetro.js +1 -1
  113. package/js/src/cryptocom.d.ts +1 -1
  114. package/js/src/cryptocom.js +4 -1
  115. package/js/src/deepcoin.d.ts +1 -1
  116. package/js/src/deepcoin.js +1 -1
  117. package/js/src/defx.d.ts +1 -1
  118. package/js/src/defx.js +1 -1
  119. package/js/src/delta.d.ts +3 -3
  120. package/js/src/delta.js +3 -3
  121. package/js/src/digifinex.d.ts +1 -1
  122. package/js/src/digifinex.js +1 -1
  123. package/js/src/dydx.d.ts +1 -1
  124. package/js/src/dydx.js +1 -1
  125. package/js/src/exmo.d.ts +2 -2
  126. package/js/src/exmo.js +2 -2
  127. package/js/src/foxbit.js +1 -1
  128. package/js/src/gate.d.ts +3 -3
  129. package/js/src/gate.js +23 -3
  130. package/js/src/hashkey.d.ts +1 -1
  131. package/js/src/hashkey.js +1 -1
  132. package/js/src/hibachi.d.ts +1 -1
  133. package/js/src/hibachi.js +1 -1
  134. package/js/src/hitbtc.d.ts +2 -2
  135. package/js/src/hitbtc.js +2 -2
  136. package/js/src/htx.d.ts +1 -1
  137. package/js/src/htx.js +26 -1
  138. package/js/src/hyperliquid.d.ts +3 -3
  139. package/js/src/hyperliquid.js +5 -4
  140. package/js/src/kraken.d.ts +1 -1
  141. package/js/src/kraken.js +1 -1
  142. package/js/src/kucoin.d.ts +1 -1
  143. package/js/src/kucoin.js +1 -1
  144. package/js/src/kucoinfutures.d.ts +1 -1
  145. package/js/src/kucoinfutures.js +1 -1
  146. package/js/src/luno.d.ts +1 -1
  147. package/js/src/luno.js +1 -1
  148. package/js/src/mexc.d.ts +2 -2
  149. package/js/src/mexc.js +2 -2
  150. package/js/src/modetrade.d.ts +1 -1
  151. package/js/src/modetrade.js +1 -1
  152. package/js/src/ndax.d.ts +1 -1
  153. package/js/src/ndax.js +1 -1
  154. package/js/src/okx.d.ts +3 -3
  155. package/js/src/okx.js +4 -4
  156. package/js/src/paradex.js +1 -1
  157. package/js/src/phemex.d.ts +1 -1
  158. package/js/src/phemex.js +1 -1
  159. package/js/src/poloniex.d.ts +2 -2
  160. package/js/src/poloniex.js +2 -2
  161. package/js/src/pro/apex.js +5 -4
  162. package/js/src/pro/arkham.js +1 -1
  163. package/js/src/pro/aster.d.ts +68 -2
  164. package/js/src/pro/aster.js +906 -34
  165. package/js/src/pro/bitget.js +14 -1
  166. package/js/src/pro/okx.d.ts +1 -1
  167. package/js/src/pro/okx.js +1 -1
  168. package/js/src/toobit.d.ts +1 -1
  169. package/js/src/toobit.js +1 -1
  170. package/js/src/whitebit.js +1 -1
  171. package/js/src/woo.d.ts +3 -3
  172. package/js/src/woo.js +3 -3
  173. package/js/src/woofipro.d.ts +1 -1
  174. package/js/src/woofipro.js +1 -1
  175. package/js/src/xt.d.ts +2 -2
  176. package/js/src/xt.js +2 -2
  177. package/js/src/zebpay.d.ts +2 -2
  178. package/js/src/zebpay.js +2 -2
  179. package/js/src/zonda.d.ts +1 -1
  180. package/js/src/zonda.js +1 -1
  181. package/package.json +1 -1
  182. /package/dist/cjs/src/abstract/{btcalpha.js → alp.js} +0 -0
  183. /package/js/src/abstract/{btcalpha.d.ts → alp.d.ts} +0 -0
  184. /package/js/src/abstract/{btcalpha.js → alp.js} +0 -0
package/js/src/binance.js CHANGED
@@ -495,6 +495,7 @@ export default class binance extends Exchange {
495
495
  'portfolio/negative-balance-exchange-record': 2,
496
496
  'portfolio/pmloan-history': 5,
497
497
  'portfolio/earn-asset-balance': 150,
498
+ 'portfolio/delta-mode': 150,
498
499
  // staking
499
500
  'staking/productList': 0.1,
500
501
  'staking/position': 0.1,
@@ -654,6 +655,7 @@ export default class binance extends Exchange {
654
655
  'portfolio/mint': 20,
655
656
  'portfolio/redeem': 20,
656
657
  'portfolio/earn-asset-transfer': 150,
658
+ 'portfolio/delta-mode': 150,
657
659
  'lending/auto-invest/plan/add': 0.1,
658
660
  'lending/auto-invest/plan/edit': 0.1,
659
661
  'lending/auto-invest/plan/edit-status': 0.1,
@@ -11931,7 +11933,7 @@ export default class binance extends Exchange {
11931
11933
  * @param {string} id the identification number of the ledger entry
11932
11934
  * @param {string} code unified currency code
11933
11935
  * @param {object} [params] extra parameters specific to the exchange API endpoint
11934
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
11936
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
11935
11937
  */
11936
11938
  async fetchLedgerEntry(id, code = undefined, params = {}) {
11937
11939
  await this.loadMarkets();
@@ -11978,7 +11980,7 @@ export default class binance extends Exchange {
11978
11980
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
11979
11981
  * @param {boolean} [params.portfolioMargin] set to true if you would like to fetch the ledger for a portfolio margin account
11980
11982
  * @param {string} [params.subType] "linear" or "inverse"
11981
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
11983
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
11982
11984
  */
11983
11985
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
11984
11986
  await this.loadMarkets();
@@ -12566,7 +12568,7 @@ export default class binance extends Exchange {
12566
12568
  * @param {string} symbol unified market symbol
12567
12569
  * @param {float} amount the amount of margin to remove
12568
12570
  * @param {object} [params] extra parameters specific to the exchange API endpoint
12569
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=reduce-margin-structure}
12571
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
12570
12572
  */
12571
12573
  async reduceMargin(symbol, amount, params = {}) {
12572
12574
  return await this.modifyMarginHelper(symbol, amount, 2, params);
@@ -12580,7 +12582,7 @@ export default class binance extends Exchange {
12580
12582
  * @param {string} symbol unified market symbol
12581
12583
  * @param {float} amount amount of margin to add
12582
12584
  * @param {object} [params] extra parameters specific to the exchange API endpoint
12583
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=add-margin-structure}
12585
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
12584
12586
  */
12585
12587
  async addMargin(symbol, amount, params = {}) {
12586
12588
  return await this.modifyMarginHelper(symbol, amount, 1, params);
package/js/src/bingx.d.ts CHANGED
@@ -572,7 +572,7 @@ export default class bingx extends Exchange {
572
572
  * @param {string} symbol unified market symbol of the market to set margin in
573
573
  * @param {float} amount the amount to set the margin to
574
574
  * @param {object} [params] parameters specific to the bingx api endpoint
575
- * @returns {object} A [margin structure]{@link https://docs.ccxt.com/?id=add-margin-structure}
575
+ * @returns {object} A [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
576
576
  */
577
577
  setMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
578
578
  parseMarginModification(data: Dict, market?: Market): MarginModification;
package/js/src/bingx.js CHANGED
@@ -304,6 +304,7 @@ export default class bingx extends Exchange {
304
304
  'quote/bookTicker': 1,
305
305
  },
306
306
  'post': {
307
+ 'trade/getVst': 5,
307
308
  'trade/order': 2,
308
309
  'trade/batchOrders': 2,
309
310
  'trade/closeAllPositions': 2,
@@ -5502,7 +5503,7 @@ export default class bingx extends Exchange {
5502
5503
  * @param {string} symbol unified market symbol of the market to set margin in
5503
5504
  * @param {float} amount the amount to set the margin to
5504
5505
  * @param {object} [params] parameters specific to the bingx api endpoint
5505
- * @returns {object} A [margin structure]{@link https://docs.ccxt.com/?id=add-margin-structure}
5506
+ * @returns {object} A [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
5506
5507
  */
5507
5508
  async setMargin(symbol, amount, params = {}) {
5508
5509
  const type = this.safeInteger(params, 'type'); // 1 increase margin 2 decrease margin
@@ -7,7 +7,6 @@ import type { TransferEntry, Int, OrderSide, OrderType, Trade, OHLCV, Order, Fun
7
7
  export default class bitfinex extends Exchange {
8
8
  describe(): any;
9
9
  isFiat(code: any): boolean;
10
- getCurrencyId(code: any): string;
11
10
  getCurrencyName(code: any): any;
12
11
  amountToPrecision(symbol: any, amount: any): string;
13
12
  priceToPrecision(symbol: any, price: any): string;
@@ -369,7 +368,7 @@ export default class bitfinex extends Exchange {
369
368
  * @param {object} [params] extra parameters specific to the exchange API endpoint
370
369
  * @param {int} [params.until] timestamp in ms of the latest ledger entry
371
370
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
372
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
371
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
373
372
  */
374
373
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
375
374
  /**
@@ -543,9 +543,6 @@ export default class bitfinex extends Exchange {
543
543
  isFiat(code) {
544
544
  return (code in this.options['fiat']);
545
545
  }
546
- getCurrencyId(code) {
547
- return 'f' + code;
548
- }
549
546
  getCurrencyName(code) {
550
547
  // temporary fix for transpiler recognition, even though this is in parent class
551
548
  if (code in this.options['currencyNames']) {
@@ -656,8 +653,8 @@ export default class bitfinex extends Exchange {
656
653
  base = this.safeString(splitBase, 0);
657
654
  quote = this.safeString(splitQuote, 0);
658
655
  let symbol = base + '/' + quote;
659
- baseId = this.getCurrencyId(baseId);
660
- quoteId = this.getCurrencyId(quoteId);
656
+ // baseId = 'f' + baseId;
657
+ // quoteId = 'f' + quoteId;
661
658
  let settle = undefined;
662
659
  let settleId = undefined;
663
660
  if (swap) {
@@ -877,7 +874,6 @@ export default class bitfinex extends Exchange {
877
874
  const fee = this.safeNumber(fees, 1);
878
875
  const undl = this.safeList(indexed['undl'], id, []);
879
876
  const precision = '8'; // default precision, todo: fix "magic constants"
880
- const fid = 'f' + id;
881
877
  const dwStatuses = this.safeList(indexed['statuses'], id, []);
882
878
  const depositEnabled = this.safeInteger(dwStatuses, 1) === 1;
883
879
  const withdrawEnabled = this.safeInteger(dwStatuses, 2) === 1;
@@ -904,8 +900,7 @@ export default class bitfinex extends Exchange {
904
900
  };
905
901
  }
906
902
  result[code] = this.safeCurrencyStructure({
907
- 'id': fid,
908
- 'uppercaseId': id,
903
+ 'id': id,
909
904
  'code': code,
910
905
  'info': [id, label, pool, feeValues, undl],
911
906
  'type': type,
@@ -2693,7 +2688,7 @@ export default class bitfinex extends Exchange {
2693
2688
  let response = undefined;
2694
2689
  if (code !== undefined) {
2695
2690
  currency = this.currency(code);
2696
- request['currency'] = currency['uppercaseId'];
2691
+ request['currency'] = currency['id'];
2697
2692
  response = await this.privatePostAuthRMovementsCurrencyHist(this.extend(request, params));
2698
2693
  }
2699
2694
  else {
@@ -3087,7 +3082,7 @@ export default class bitfinex extends Exchange {
3087
3082
  * @param {object} [params] extra parameters specific to the exchange API endpoint
3088
3083
  * @param {int} [params.until] timestamp in ms of the latest ledger entry
3089
3084
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
3090
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
3085
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
3091
3086
  */
3092
3087
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
3093
3088
  await this.loadMarkets();
@@ -3108,7 +3103,7 @@ export default class bitfinex extends Exchange {
3108
3103
  let response = undefined;
3109
3104
  if (code !== undefined) {
3110
3105
  currency = this.currency(code);
3111
- request['currency'] = currency['uppercaseId'];
3106
+ request['currency'] = currency['id'];
3112
3107
  response = await this.privatePostAuthRLedgersCurrencyHist(this.extend(request, params));
3113
3108
  }
3114
3109
  else {
@@ -584,7 +584,7 @@ export default class bitget extends Exchange {
584
584
  * @param {string} [params.symbol] *contract only* unified market symbol
585
585
  * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
586
586
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
587
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
587
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
588
588
  */
589
589
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
590
590
  parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
@@ -727,7 +727,7 @@ export default class bitget extends Exchange {
727
727
  * @param {string} symbol unified market symbol
728
728
  * @param {float} amount the amount of margin to remove
729
729
  * @param {object} [params] extra parameters specific to the exchange API endpoint
730
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=reduce-margin-structure}
730
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
731
731
  */
732
732
  reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
733
733
  /**
@@ -738,7 +738,7 @@ export default class bitget extends Exchange {
738
738
  * @param {string} symbol unified market symbol
739
739
  * @param {float} amount the amount of margin to add
740
740
  * @param {object} [params] extra parameters specific to the exchange API endpoint
741
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=add-margin-structure}
741
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
742
742
  */
743
743
  addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
744
744
  /**
package/js/src/bitget.js CHANGED
@@ -2418,7 +2418,7 @@ export default class bitget extends Exchange {
2418
2418
  'max': undefined,
2419
2419
  },
2420
2420
  'cost': {
2421
- 'min': undefined,
2421
+ 'min': this.safeNumber(market, 'minOrderAmount'),
2422
2422
  'max': undefined,
2423
2423
  },
2424
2424
  },
@@ -7451,7 +7451,7 @@ export default class bitget extends Exchange {
7451
7451
  * @param {string} [params.symbol] *contract only* unified market symbol
7452
7452
  * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
7453
7453
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
7454
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
7454
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
7455
7455
  */
7456
7456
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
7457
7457
  await this.loadMarkets();
@@ -8973,7 +8973,7 @@ export default class bitget extends Exchange {
8973
8973
  * @param {string} symbol unified market symbol
8974
8974
  * @param {float} amount the amount of margin to remove
8975
8975
  * @param {object} [params] extra parameters specific to the exchange API endpoint
8976
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=reduce-margin-structure}
8976
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
8977
8977
  */
8978
8978
  async reduceMargin(symbol, amount, params = {}) {
8979
8979
  if (amount > 0) {
@@ -8993,7 +8993,7 @@ export default class bitget extends Exchange {
8993
8993
  * @param {string} symbol unified market symbol
8994
8994
  * @param {float} amount the amount of margin to add
8995
8995
  * @param {object} [params] extra parameters specific to the exchange API endpoint
8996
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=add-margin-structure}
8996
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
8997
8997
  */
8998
8998
  async addMargin(symbol, amount, params = {}) {
8999
8999
  const holdSide = this.safeString(params, 'holdSide');
@@ -671,7 +671,7 @@ export default class bitmart extends Exchange {
671
671
  * @param {int} [limit] max number of ledger entries to return
672
672
  * @param {object} [params] extra parameters specific to the exchange API endpoint
673
673
  * @param {int} [params.until] timestamp in ms of the latest ledger entry
674
- * @returns {object[]} a list of [ledger structures]{@link https://docs.ccxt.com/?id=ledger}
674
+ * @returns {object[]} a list of [ledger structures]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
675
675
  */
676
676
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
677
677
  parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
package/js/src/bitmart.js CHANGED
@@ -5280,7 +5280,7 @@ export default class bitmart extends Exchange {
5280
5280
  * @param {int} [limit] max number of ledger entries to return
5281
5281
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5282
5282
  * @param {int} [params.until] timestamp in ms of the latest ledger entry
5283
- * @returns {object[]} a list of [ledger structures]{@link https://docs.ccxt.com/?id=ledger}
5283
+ * @returns {object[]} a list of [ledger structures]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
5284
5284
  */
5285
5285
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
5286
5286
  await this.loadMarkets();
@@ -124,7 +124,7 @@ export default class bitmex extends Exchange {
124
124
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
125
125
  * @param {int} [limit] max number of ledger entries to return, default is undefined
126
126
  * @param {object} [params] extra parameters specific to the exchange API endpoint
127
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
127
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
128
128
  */
129
129
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
130
130
  /**
package/js/src/bitmex.js CHANGED
@@ -1323,7 +1323,7 @@ export default class bitmex extends Exchange {
1323
1323
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
1324
1324
  * @param {int} [limit] max number of ledger entries to return, default is undefined
1325
1325
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1326
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
1326
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
1327
1327
  */
1328
1328
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
1329
1329
  await this.loadMarkets();
package/js/src/bitso.d.ts CHANGED
@@ -14,7 +14,7 @@ export default class bitso extends Exchange {
14
14
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
15
15
  * @param {int} [limit] max number of ledger entries to return, default is undefined
16
16
  * @param {object} [params] extra parameters specific to the exchange API endpoint
17
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
17
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
18
18
  */
19
19
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
20
20
  parseLedgerEntryType(type: any): string;
package/js/src/bitso.js CHANGED
@@ -295,7 +295,7 @@ export default class bitso extends Exchange {
295
295
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
296
296
  * @param {int} [limit] max number of ledger entries to return, default is undefined
297
297
  * @param {object} [params] extra parameters specific to the exchange API endpoint
298
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
298
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
299
299
  */
300
300
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
301
301
  const request = {};
@@ -276,7 +276,7 @@ export default class bitstamp extends Exchange {
276
276
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
277
277
  * @param {int} [limit] max number of ledger entries to return, default is undefined
278
278
  * @param {object} [params] extra parameters specific to the exchange API endpoint
279
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
279
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
280
280
  */
281
281
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
282
282
  /**
@@ -2130,7 +2130,7 @@ export default class bitstamp extends Exchange {
2130
2130
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
2131
2131
  * @param {int} [limit] max number of ledger entries to return, default is undefined
2132
2132
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2133
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
2133
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
2134
2134
  */
2135
2135
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
2136
2136
  await this.loadMarkets();
@@ -257,7 +257,7 @@ export default class blofin extends Exchange {
257
257
  * @param {string} [params.marginMode] 'cross' or 'isolated'
258
258
  * @param {int} [params.until] the latest time in ms to fetch entries for
259
259
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
260
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
260
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
261
261
  */
262
262
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
263
263
  parseTransaction(transaction: Dict, currency?: Currency): Transaction;
package/js/src/blofin.js CHANGED
@@ -1711,7 +1711,7 @@ export default class blofin extends Exchange {
1711
1711
  * @param {string} [params.marginMode] 'cross' or 'isolated'
1712
1712
  * @param {int} [params.until] the latest time in ms to fetch entries for
1713
1713
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1714
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
1714
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
1715
1715
  */
1716
1716
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
1717
1717
  await this.loadMarkets();
package/js/src/bybit.d.ts CHANGED
@@ -611,7 +611,7 @@ export default class bybit extends Exchange {
611
611
  * @param {object} [params] extra parameters specific to the exchange API endpoint
612
612
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
613
613
  * @param {string} [params.subType] if inverse will use v5/account/contract-transaction-log
614
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
614
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
615
615
  */
616
616
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
617
617
  parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
package/js/src/bybit.js CHANGED
@@ -373,6 +373,13 @@ export default class bybit extends Exchange {
373
373
  'v5/asset/withdraw/query-record': 10,
374
374
  'v5/asset/withdraw/withdrawable-amount': 5,
375
375
  'v5/asset/withdraw/vasp/list': 5,
376
+ 'v5/asset/convert/small-balance-list': 5,
377
+ 'v5/asset/convert/small-balance-history': 5,
378
+ 'v5/fiat/query-coin-list': 5,
379
+ 'v5/fiat/reference-price': 5,
380
+ 'v5/fiat/trade-query': 5,
381
+ 'v5/fiat/query-trade-history': 5,
382
+ 'v5/fiat/balance-query': 5,
376
383
  // user
377
384
  'v5/user/query-sub-members': 5,
378
385
  'v5/user/query-api': 5,
@@ -392,6 +399,7 @@ export default class bybit extends Exchange {
392
399
  'v5/spot-margin-trade/position-tiers': 5,
393
400
  'v5/spot-margin-trade/coinstate': 5,
394
401
  'v5/spot-margin-trade/repayment-available-amount': 5,
402
+ 'v5/spot-margin-trade/get-auto-repay-mode': 5,
395
403
  'v5/spot-cross-margin-trade/loan-info': 1,
396
404
  'v5/spot-cross-margin-trade/account': 1,
397
405
  'v5/spot-cross-margin-trade/orders': 1,
@@ -540,6 +548,10 @@ export default class bybit extends Exchange {
540
548
  'v5/asset/deposit/deposit-to-account': 5,
541
549
  'v5/asset/withdraw/create': 50,
542
550
  'v5/asset/withdraw/cancel': 50,
551
+ 'v5/asset/covert/get-quote': 10,
552
+ 'v5/asset/covert/small-balance-execute': 10,
553
+ 'v5/fiat/quote-apply': 10,
554
+ 'v5/fiat/trade-execute': 10,
543
555
  // user
544
556
  'v5/user/create-sub-member': 10,
545
557
  'v5/user/create-sub-api': 10,
@@ -554,6 +566,7 @@ export default class bybit extends Exchange {
554
566
  // spot margin trade
555
567
  'v5/spot-margin-trade/switch-mode': 5,
556
568
  'v5/spot-margin-trade/set-leverage': 5,
569
+ 'v5/spot-margin-trade/set-auto-repay-mode': 5,
557
570
  'v5/spot-cross-margin-trade/loan': 2.5,
558
571
  'v5/spot-cross-margin-trade/repay': 2.5,
559
572
  'v5/spot-cross-margin-trade/switch': 2.5,
@@ -563,6 +576,7 @@ export default class bybit extends Exchange {
563
576
  'v5/crypto-loan/adjust-ltv': 5,
564
577
  // crypto loan (new)
565
578
  'v5/crypto-loan-common/adjust-ltv': 50,
579
+ 'v5/crypto-loan-common/max-loan': 10,
566
580
  'v5/crypto-loan-flexible/borrow': 50,
567
581
  'v5/crypto-loan-flexible/repay': 50,
568
582
  'v5/crypto-loan-flexible/repay-collateral': 50,
@@ -575,6 +589,7 @@ export default class bybit extends Exchange {
575
589
  'v5/crypto-loan-fixed/repay-collateral': 50,
576
590
  // institutional lending
577
591
  'v5/ins-loan/association-uid': 5,
592
+ 'v5/ins-loan/repay-loan': 5,
578
593
  // c2c lending
579
594
  'v5/lending/purchase': 5,
580
595
  'v5/lending/redeem': 5,
@@ -1066,6 +1081,7 @@ export default class bybit extends Exchange {
1066
1081
  'enableDemoTrading': false,
1067
1082
  'fetchMarkets': {
1068
1083
  'types': ['spot', 'linear', 'inverse', 'option'],
1084
+ 'options': ['BTC', 'ETH', 'SOL', 'XRP', 'MNT', 'DOGE'],
1069
1085
  },
1070
1086
  'enableUnifiedMargin': undefined,
1071
1087
  'enableUnifiedAccount': undefined,
@@ -1778,26 +1794,34 @@ export default class bybit extends Exchange {
1778
1794
  promisesUnresolved.push(this.fetchFutureMarkets({ 'category': 'inverse' }));
1779
1795
  }
1780
1796
  else if (marketType === 'option') {
1781
- promisesUnresolved.push(this.fetchOptionMarkets({ 'baseCoin': 'BTC' }));
1782
- promisesUnresolved.push(this.fetchOptionMarkets({ 'baseCoin': 'ETH' }));
1783
- promisesUnresolved.push(this.fetchOptionMarkets({ 'baseCoin': 'SOL' }));
1797
+ const optionsCurrencies = this.safeList(fetchMarketsOptions, 'options', ['BTC', 'ETH', 'SOL']);
1798
+ for (let j = 0; j < optionsCurrencies.length; j++) {
1799
+ const currency = optionsCurrencies[j];
1800
+ promisesUnresolved.push(this.fetchOptionMarkets({ 'baseCoin': currency }));
1801
+ }
1784
1802
  }
1785
1803
  else {
1786
1804
  throw new ExchangeError(this.id + ' fetchMarkets() this.options fetchMarkets "' + marketType + '" is not a supported market type');
1787
1805
  }
1788
1806
  }
1789
1807
  const promises = await Promise.all(promisesUnresolved);
1790
- const spotMarkets = this.safeList(promises, 0, []);
1791
- const linearMarkets = this.safeList(promises, 1, []);
1792
- const inverseMarkets = this.safeList(promises, 2, []);
1793
- const btcOptionMarkets = this.safeList(promises, 3, []);
1794
- const ethOptionMarkets = this.safeList(promises, 4, []);
1795
- const solOptionMarkets = this.safeList(promises, 5, []);
1796
- const futureMarkets = this.arrayConcat(linearMarkets, inverseMarkets);
1797
- let optionMarkets = this.arrayConcat(btcOptionMarkets, ethOptionMarkets);
1798
- optionMarkets = this.arrayConcat(optionMarkets, solOptionMarkets);
1799
- const derivativeMarkets = this.arrayConcat(futureMarkets, optionMarkets);
1800
- return this.arrayConcat(spotMarkets, derivativeMarkets);
1808
+ let result = [];
1809
+ for (let i = 0; i < promises.length; i++) {
1810
+ const parsedMarket = promises[i];
1811
+ result = this.arrayConcat(result, parsedMarket);
1812
+ }
1813
+ // const spotMarkets = this.safeList (promises, 0, []);
1814
+ // const linearMarkets = this.safeList (promises, 1, []);
1815
+ // const inverseMarkets = this.safeList (promises, 2, []);
1816
+ // const btcOptionMarkets = this.safeList (promises, 3, []);
1817
+ // const ethOptionMarkets = this.safeList (promises, 4, []);
1818
+ // const solOptionMarkets = this.safeList (promises, 5, []);
1819
+ // const futureMarkets = this.arrayConcat (linearMarkets, inverseMarkets);
1820
+ // let optionMarkets = this.arrayConcat (btcOptionMarkets, ethOptionMarkets);
1821
+ // optionMarkets = this.arrayConcat (optionMarkets, solOptionMarkets);
1822
+ // const derivativeMarkets = this.arrayConcat (futureMarkets, optionMarkets);
1823
+ // return this.arrayConcat (spotMarkets, derivativeMarkets);
1824
+ return result;
1801
1825
  }
1802
1826
  async fetchSpotMarkets(params) {
1803
1827
  const request = {
@@ -6062,7 +6086,7 @@ export default class bybit extends Exchange {
6062
6086
  * @param {object} [params] extra parameters specific to the exchange API endpoint
6063
6087
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
6064
6088
  * @param {string} [params.subType] if inverse will use v5/account/contract-transaction-log
6065
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
6089
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
6066
6090
  */
6067
6091
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
6068
6092
  await this.loadMarkets();
@@ -6736,7 +6760,15 @@ export default class bybit extends Exchange {
6736
6760
  side = undefined;
6737
6761
  }
6738
6762
  }
6739
- const notional = this.safeString2(position, 'positionValue', 'cumExitValue');
6763
+ let notional = undefined;
6764
+ const contractSize = this.safeString(market, 'contractSize');
6765
+ const markPrice = this.safeString(position, 'markPrice');
6766
+ if (market['inverse']) {
6767
+ notional = Precise.stringDiv(Precise.stringMul(size, contractSize), markPrice);
6768
+ }
6769
+ else {
6770
+ notional = this.safeString2(position, 'positionValue', 'cumExitValue');
6771
+ }
6740
6772
  const unrealisedPnl = this.omitZero(this.safeString(position, 'unrealisedPnl'));
6741
6773
  let initialMarginString = this.safeString2(position, 'positionIM', 'cumEntryValue');
6742
6774
  let maintenanceMarginString = this.safeString(position, 'positionMM');
@@ -6745,17 +6777,8 @@ export default class bybit extends Exchange {
6745
6777
  if (lastUpdateTimestamp === undefined) {
6746
6778
  lastUpdateTimestamp = this.safeIntegerN(position, ['updatedTime', 'updatedAt', 'updatedTime']);
6747
6779
  }
6748
- const tradeMode = this.safeInteger(position, 'tradeMode', 0);
6749
- let marginMode = undefined;
6750
- if ((!this.options['enableUnifiedAccount']) || (this.options['enableUnifiedAccount'] && market['inverse'])) {
6751
- // tradeMode would work for classic and UTA(inverse)
6752
- if (!isHistory) { // cannot tell marginMode for fetchPositionsHistory, and closedSize will only be defined for fetchPositionsHistory response
6753
- marginMode = (tradeMode === 1) ? 'isolated' : 'cross';
6754
- }
6755
- }
6756
6780
  let collateralString = this.safeString(position, 'positionBalance');
6757
6781
  const entryPrice = this.omitZero(this.safeStringN(position, ['entryPrice', 'avgPrice', 'avgEntryPrice']));
6758
- const markPrice = this.safeString(position, 'markPrice');
6759
6782
  const liquidationPrice = this.omitZero(this.safeString(position, 'liqPrice'));
6760
6783
  const leverage = this.safeString(position, 'leverage');
6761
6784
  if (liquidationPrice !== undefined) {
@@ -6819,7 +6842,7 @@ export default class bybit extends Exchange {
6819
6842
  'markPrice': this.parseNumber(markPrice),
6820
6843
  'lastPrice': this.safeNumber(position, 'avgExitPrice'),
6821
6844
  'collateral': this.parseNumber(collateralString),
6822
- 'marginMode': marginMode,
6845
+ 'marginMode': undefined,
6823
6846
  'side': side,
6824
6847
  'percentage': undefined,
6825
6848
  'stopLossPrice': this.safeNumber2(position, 'stop_loss', 'stopLoss'),
package/js/src/cex.d.ts CHANGED
@@ -229,7 +229,7 @@ export default class cex extends Exchange {
229
229
  * @param {int} [limit] max number of ledger entries to return
230
230
  * @param {object} [params] extra parameters specific to the exchange API endpoint
231
231
  * @param {int} [params.until] timestamp in ms of the latest ledger entry
232
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
232
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
233
233
  */
234
234
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
235
235
  parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
package/js/src/cex.js CHANGED
@@ -1378,7 +1378,7 @@ export default class cex extends Exchange {
1378
1378
  * @param {int} [limit] max number of ledger entries to return
1379
1379
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1380
1380
  * @param {int} [params.until] timestamp in ms of the latest ledger entry
1381
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
1381
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
1382
1382
  */
1383
1383
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
1384
1384
  await this.loadMarkets();
@@ -205,7 +205,7 @@ export default class coinbase extends Exchange {
205
205
  * @param {int} [limit] max number of ledger entries to return, default is undefined
206
206
  * @param {object} [params] extra parameters specific to the exchange API endpoint
207
207
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
208
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
208
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
209
209
  */
210
210
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
211
211
  parseLedgerEntryStatus(status: any): string;
@@ -665,11 +665,11 @@ export default class coinbase extends Exchange {
665
665
  // }
666
666
  //
667
667
  const accounts = this.safeList(response, 'accounts', []);
668
- const length = accounts.length;
669
- const lastIndex = length - 1;
670
- const last = this.safeDict(accounts, lastIndex);
668
+ const accountsLength = accounts.length;
671
669
  const cursor = this.safeString(response, 'cursor');
672
- if ((cursor !== undefined) && (cursor !== '')) {
670
+ if ((accountsLength > 0) && (cursor !== undefined) && (cursor !== '')) {
671
+ const lastIndex = accountsLength - 1;
672
+ const last = this.safeDict(accounts, lastIndex);
673
673
  last['cursor'] = cursor;
674
674
  accounts[lastIndex] = last;
675
675
  }
@@ -2209,7 +2209,8 @@ export default class coinbase extends Exchange {
2209
2209
  // }
2210
2210
  //
2211
2211
  const data = this.safeList(response, 'trades', []);
2212
- const ticker = this.parseTicker(data[0], market);
2212
+ const first = this.safeDict(data, 0, {});
2213
+ const ticker = this.parseTicker(first, market);
2213
2214
  ticker['bid'] = this.safeNumber(response, 'best_bid');
2214
2215
  ticker['ask'] = this.safeNumber(response, 'best_ask');
2215
2216
  return ticker;
@@ -2518,7 +2519,7 @@ export default class coinbase extends Exchange {
2518
2519
  * @param {int} [limit] max number of ledger entries to return, default is undefined
2519
2520
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2520
2521
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2521
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
2522
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
2522
2523
  */
2523
2524
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
2524
2525
  await this.loadMarkets();
@@ -268,7 +268,7 @@ export default class coinbaseexchange extends Exchange {
268
268
  * @param {int} [limit] max number of ledger entries to return, default is undefined
269
269
  * @param {object} [params] extra parameters specific to the exchange API endpoint
270
270
  * @param {int} [params.until] the latest time in ms to fetch trades for
271
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
271
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
272
272
  */
273
273
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
274
274
  /**
@@ -1759,7 +1759,7 @@ export default class coinbaseexchange extends Exchange {
1759
1759
  * @param {int} [limit] max number of ledger entries to return, default is undefined
1760
1760
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1761
1761
  * @param {int} [params.until] the latest time in ms to fetch trades for
1762
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
1762
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
1763
1763
  */
1764
1764
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
1765
1765
  // https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccountledger