ccxt 4.4.77 → 4.4.80

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 (154) hide show
  1. package/README.md +8 -10
  2. package/dist/ccxt.browser.min.js +7 -7
  3. package/dist/cjs/ccxt.js +8 -4
  4. package/dist/cjs/src/abstract/ace.js +1 -1
  5. package/dist/cjs/src/abstract/apex.js +9 -0
  6. package/dist/cjs/src/ace.js +1 -1
  7. package/dist/cjs/src/apex.js +1949 -0
  8. package/dist/cjs/src/ascendex.js +25 -4
  9. package/dist/cjs/src/base/Exchange.js +42 -2
  10. package/dist/cjs/src/binance.js +9 -1
  11. package/dist/cjs/src/bingx.js +3 -3
  12. package/dist/cjs/src/bitfinex.js +64 -36
  13. package/dist/cjs/src/bitget.js +191 -138
  14. package/dist/cjs/src/bitmart.js +7 -2
  15. package/dist/cjs/src/bitmex.js +16 -8
  16. package/dist/cjs/src/bitopro.js +5 -1
  17. package/dist/cjs/src/bitrue.js +2 -1
  18. package/dist/cjs/src/bitso.js +1 -1
  19. package/dist/cjs/src/bitteam.js +2 -0
  20. package/dist/cjs/src/bitvavo.js +28 -10
  21. package/dist/cjs/src/btcalpha.js +1 -1
  22. package/dist/cjs/src/btcmarkets.js +1 -1
  23. package/dist/cjs/src/btcturk.js +1 -1
  24. package/dist/cjs/src/bybit.js +32 -16
  25. package/dist/cjs/src/cex.js +1 -1
  26. package/dist/cjs/src/coinbase.js +18 -2
  27. package/dist/cjs/src/coincatch.js +68 -0
  28. package/dist/cjs/src/coinex.js +1 -0
  29. package/dist/cjs/src/coinlist.js +1 -0
  30. package/dist/cjs/src/coinone.js +1 -0
  31. package/dist/cjs/src/delta.js +4 -0
  32. package/dist/cjs/src/deribit.js +1 -0
  33. package/dist/cjs/src/hitbtc.js +3 -0
  34. package/dist/cjs/src/hollaex.js +1 -0
  35. package/dist/cjs/src/htx.js +7 -3
  36. package/dist/cjs/src/huobijp.js +1 -0
  37. package/dist/cjs/src/hyperliquid.js +14 -4
  38. package/dist/cjs/src/kraken.js +2 -0
  39. package/dist/cjs/src/mexc.js +50 -57
  40. package/dist/cjs/src/okx.js +1 -1
  41. package/dist/cjs/src/phemex.js +2 -1
  42. package/dist/cjs/src/poloniex.js +2 -1
  43. package/dist/cjs/src/pro/apex.js +1043 -0
  44. package/dist/cjs/src/pro/binance.js +3 -3
  45. package/dist/cjs/src/pro/coinbase.js +45 -68
  46. package/dist/cjs/src/pro/gate.js +27 -2
  47. package/dist/cjs/src/pro/hollaex.js +2 -2
  48. package/dist/cjs/src/pro/p2b.js +2 -2
  49. package/dist/cjs/src/pro/tradeogre.js +283 -0
  50. package/dist/cjs/src/pro/upbit.js +43 -0
  51. package/dist/cjs/src/probit.js +1 -0
  52. package/dist/cjs/src/static_dependencies/zklink/zklink-sdk-web.js +2639 -0
  53. package/dist/cjs/src/timex.js +2 -2
  54. package/dist/cjs/src/tradeogre.js +2 -1
  55. package/dist/cjs/src/upbit.js +277 -67
  56. package/dist/cjs/src/whitebit.js +66 -12
  57. package/dist/cjs/src/woo.js +3 -1
  58. package/dist/cjs/src/xt.js +9 -0
  59. package/js/ccxt.d.ts +11 -5
  60. package/js/ccxt.js +8 -4
  61. package/js/src/abstract/apex.d.ts +34 -0
  62. package/js/src/abstract/bitmart.d.ts +1 -0
  63. package/js/src/apex.d.ts +333 -0
  64. package/js/src/apex.js +1945 -0
  65. package/js/src/ascendex.d.ts +3 -3
  66. package/js/src/ascendex.js +25 -4
  67. package/js/src/base/Exchange.d.ts +2 -0
  68. package/js/src/base/Exchange.js +42 -1
  69. package/js/src/binance.d.ts +7 -7
  70. package/js/src/binance.js +9 -1
  71. package/js/src/bingx.js +3 -3
  72. package/js/src/bitfinex.d.ts +3 -3
  73. package/js/src/bitfinex.js +64 -36
  74. package/js/src/bitflyer.d.ts +2 -2
  75. package/js/src/bitget.d.ts +2 -0
  76. package/js/src/bitget.js +191 -138
  77. package/js/src/bitmart.d.ts +5 -4
  78. package/js/src/bitmart.js +7 -2
  79. package/js/src/bitmex.d.ts +3 -3
  80. package/js/src/bitmex.js +16 -8
  81. package/js/src/bitopro.js +5 -1
  82. package/js/src/bitrue.js +2 -1
  83. package/js/src/bitso.js +1 -1
  84. package/js/src/bitteam.js +2 -0
  85. package/js/src/bitvavo.js +28 -10
  86. package/js/src/btcalpha.js +1 -1
  87. package/js/src/btcmarkets.js +1 -1
  88. package/js/src/btcturk.js +1 -1
  89. package/js/src/bybit.js +32 -16
  90. package/js/src/cex.js +1 -1
  91. package/js/src/coinbase.d.ts +4 -4
  92. package/js/src/coinbase.js +18 -2
  93. package/js/src/coinbaseexchange.d.ts +1 -1
  94. package/js/src/coincatch.d.ts +11 -0
  95. package/js/src/coincatch.js +68 -0
  96. package/js/src/coinex.js +1 -0
  97. package/js/src/coinlist.js +1 -0
  98. package/js/src/coinone.js +1 -0
  99. package/js/src/cryptocom.d.ts +4 -4
  100. package/js/src/delta.js +4 -0
  101. package/js/src/deribit.d.ts +4 -4
  102. package/js/src/deribit.js +1 -0
  103. package/js/src/derive.d.ts +3 -3
  104. package/js/src/digifinex.d.ts +4 -4
  105. package/js/src/hitbtc.js +3 -0
  106. package/js/src/hollaex.js +1 -0
  107. package/js/src/htx.d.ts +4 -4
  108. package/js/src/htx.js +7 -3
  109. package/js/src/huobijp.js +1 -0
  110. package/js/src/hyperliquid.d.ts +1 -0
  111. package/js/src/hyperliquid.js +14 -4
  112. package/js/src/kraken.d.ts +3 -3
  113. package/js/src/kraken.js +2 -0
  114. package/js/src/krakenfutures.d.ts +2 -2
  115. package/js/src/kucoinfutures.d.ts +5 -5
  116. package/js/src/mexc.d.ts +1 -0
  117. package/js/src/mexc.js +50 -57
  118. package/js/src/okx.js +1 -1
  119. package/js/src/oxfun.d.ts +3 -3
  120. package/js/src/phemex.d.ts +3 -3
  121. package/js/src/phemex.js +2 -1
  122. package/js/src/poloniex.d.ts +3 -3
  123. package/js/src/poloniex.js +2 -1
  124. package/js/src/pro/apex.d.ts +160 -0
  125. package/js/src/pro/apex.js +1038 -0
  126. package/js/src/pro/binance.js +3 -3
  127. package/js/src/pro/coinbase.d.ts +4 -3
  128. package/js/src/pro/coinbase.js +45 -66
  129. package/js/src/pro/gate.js +27 -2
  130. package/js/src/pro/hollaex.js +2 -2
  131. package/js/src/pro/p2b.js +2 -2
  132. package/js/src/pro/tradeogre.d.ts +49 -0
  133. package/js/src/pro/tradeogre.js +278 -0
  134. package/js/src/pro/upbit.d.ts +16 -1
  135. package/js/src/pro/upbit.js +43 -0
  136. package/js/src/probit.js +1 -0
  137. package/js/src/static_dependencies/zklink/zklink-sdk-web.d.ts +1279 -0
  138. package/js/src/static_dependencies/zklink/zklink-sdk-web.js +4276 -0
  139. package/js/src/timex.js +2 -2
  140. package/js/src/tradeogre.js +2 -1
  141. package/js/src/upbit.d.ts +75 -23
  142. package/js/src/upbit.js +277 -67
  143. package/js/src/vertex.d.ts +3 -3
  144. package/js/src/whitebit.js +66 -12
  145. package/js/src/woo.d.ts +4 -4
  146. package/js/src/woo.js +3 -1
  147. package/js/src/woofipro.d.ts +4 -4
  148. package/js/src/xt.d.ts +4 -4
  149. package/js/src/xt.js +9 -0
  150. package/package.json +2 -2
  151. package/js/src/abstract/ace.d.ts +0 -18
  152. package/js/src/ace.d.ts +0 -158
  153. package/js/src/ace.js +0 -1175
  154. /package/js/src/abstract/{ace.js → apex.js} +0 -0
@@ -541,18 +541,69 @@ export default class whitebit extends Exchange {
541
541
  async fetchCurrencies(params = {}) {
542
542
  const response = await this.v4PublicGetAssets(params);
543
543
  //
544
- // "BTC": {
545
- // "name": "Bitcoin",
546
- // "unified_cryptoasset_id": 1,
547
- // "can_withdraw": true,
548
- // "can_deposit": true,
549
- // "min_withdraw": "0.001",
550
- // "max_withdraw": "2",
551
- // "maker_fee": "0.1",
552
- // "taker_fee": "0.1",
553
- // "min_deposit": "0.0001",
554
- // "max_deposit": "0",
555
- // },
544
+ // {
545
+ // BTC: {
546
+ // name: "Bitcoin",
547
+ // unified_cryptoasset_id: "1",
548
+ // can_withdraw: true,
549
+ // can_deposit: true,
550
+ // min_withdraw: "0.0003",
551
+ // max_withdraw: "0",
552
+ // maker_fee: "0.1",
553
+ // taker_fee: "0.1",
554
+ // min_deposit: "0.0001",
555
+ // max_deposit: "0",
556
+ // networks: {
557
+ // deposits: [ "BTC", ],
558
+ // withdraws: [ "BTC", ],
559
+ // default: "BTC",
560
+ // },
561
+ // confirmations: {
562
+ // BTC: "2",
563
+ // },
564
+ // limits: {
565
+ // deposit: {
566
+ // BTC: { min: "0.0001", },
567
+ // },
568
+ // withdraw: {
569
+ // BTC: { min: "0.0003", },
570
+ // },
571
+ // },
572
+ // currency_precision: "8",
573
+ // is_memo: false,
574
+ // },
575
+ // USD: {
576
+ // name: "United States Dollar",
577
+ // unified_cryptoasset_id: "6955",
578
+ // can_withdraw: true,
579
+ // can_deposit: true,
580
+ // min_withdraw: "10",
581
+ // max_withdraw: "10000",
582
+ // maker_fee: "0.1",
583
+ // taker_fee: "0.1",
584
+ // min_deposit: "10",
585
+ // max_deposit: "10000",
586
+ // networks: {
587
+ // deposits: [ "USD", ],
588
+ // withdraws: [ "USD", ],
589
+ // default: "USD",
590
+ // },
591
+ // providers: {
592
+ // deposits: [ "ADVCASH", ],
593
+ // withdraws: [ "ADVCASH", ],
594
+ // },
595
+ // limits: {
596
+ // deposit: {
597
+ // USD: { max: "10000", min: "10", },
598
+ // },
599
+ // withdraw: {
600
+ // USD: { max: "10000", min: "10", },
601
+ // },
602
+ // },
603
+ // currency_precision: "2",
604
+ // is_memo: false,
605
+ // }
606
+ // }
556
607
  //
557
608
  const ids = Object.keys(response);
558
609
  const result = {};
@@ -565,6 +616,7 @@ export default class whitebit extends Exchange {
565
616
  const canWithdraw = this.safeBool(currency, 'can_withdraw', true);
566
617
  const active = canDeposit && canWithdraw;
567
618
  const code = this.safeCurrencyCode(id);
619
+ const hasProvider = ('providers' in currency);
568
620
  result[code] = {
569
621
  'id': id,
570
622
  'code': code,
@@ -574,6 +626,8 @@ export default class whitebit extends Exchange {
574
626
  'deposit': canDeposit,
575
627
  'withdraw': canWithdraw,
576
628
  'fee': undefined,
629
+ 'networks': undefined,
630
+ 'type': hasProvider ? 'fiat' : 'crypto',
577
631
  'precision': undefined,
578
632
  'limits': {
579
633
  'amount': {
package/js/src/woo.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/woo.js';
2
- import type { TransferEntry, Balances, Conversion, Currency, FundingRateHistory, Int, Market, MarginModification, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Dict, Strings, Trade, Transaction, Leverage, Account, Currencies, TradingFees, int, FundingHistory, LedgerEntry, FundingRate, FundingRates, DepositAddress } from './base/types.js';
2
+ import type { TransferEntry, Balances, Conversion, Currency, FundingRateHistory, Int, Market, MarginModification, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Dict, Strings, Trade, Transaction, Leverage, Account, Currencies, TradingFees, int, FundingHistory, LedgerEntry, FundingRate, FundingRates, DepositAddress, Position } from './base/types.js';
3
3
  /**
4
4
  * @class woo
5
5
  * @augments Exchange
@@ -628,9 +628,9 @@ export default class woo extends Exchange {
628
628
  */
629
629
  reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
630
630
  modifyMarginHelper(symbol: string, amount: any, type: any, params?: {}): Promise<MarginModification>;
631
- fetchPosition(symbol: Str, params?: {}): Promise<import("./base/types.js").Position>;
632
- fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
633
- parsePosition(position: Dict, market?: Market): import("./base/types.js").Position;
631
+ fetchPosition(symbol: Str, params?: {}): Promise<Position>;
632
+ fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
633
+ parsePosition(position: Dict, market?: Market): Position;
634
634
  /**
635
635
  * @method
636
636
  * @name woo#fetchConvertQuote
package/js/src/woo.js CHANGED
@@ -568,6 +568,7 @@ export default class woo extends Exchange {
568
568
  linear = true;
569
569
  inverse = false;
570
570
  }
571
+ const active = this.safeString(market, 'is_trading') === '1';
571
572
  return {
572
573
  'id': marketId,
573
574
  'symbol': symbol,
@@ -583,7 +584,7 @@ export default class woo extends Exchange {
583
584
  'swap': swap,
584
585
  'future': false,
585
586
  'option': false,
586
- 'active': this.safeString(market, 'is_trading') === '1',
587
+ 'active': active,
587
588
  'contract': contract,
588
589
  'linear': linear,
589
590
  'inverse': inverse,
@@ -927,6 +928,7 @@ export default class woo extends Exchange {
927
928
  'networks': resultingNetworks,
928
929
  'deposit': undefined,
929
930
  'withdraw': undefined,
931
+ 'type': 'crypto',
930
932
  'limits': {
931
933
  'deposit': {
932
934
  'min': undefined,
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/woofipro.js';
2
- import type { Balances, Currency, FundingRateHistory, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Trade, Transaction, Leverage, Currencies, TradingFees, OrderRequest, Dict, int, LedgerEntry, FundingRate, FundingRates } from './base/types.js';
2
+ import type { Balances, Currency, FundingRateHistory, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Trade, Transaction, Leverage, Currencies, TradingFees, OrderRequest, Dict, int, LedgerEntry, FundingRate, FundingRates, Position } from './base/types.js';
3
3
  /**
4
4
  * @class woofipro
5
5
  * @augments Exchange
@@ -443,7 +443,7 @@ export default class woofipro extends Exchange {
443
443
  * @returns {object} response from the exchange
444
444
  */
445
445
  setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
446
- parsePosition(position: Dict, market?: Market): import("./base/types.js").Position;
446
+ parsePosition(position: Dict, market?: Market): Position;
447
447
  /**
448
448
  * @method
449
449
  * @name woofipro#fetchPosition
@@ -453,7 +453,7 @@ export default class woofipro extends Exchange {
453
453
  * @param {object} [params] extra parameters specific to the exchange API endpoint
454
454
  * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
455
455
  */
456
- fetchPosition(symbol: Str, params?: {}): Promise<import("./base/types.js").Position>;
456
+ fetchPosition(symbol: Str, params?: {}): Promise<Position>;
457
457
  /**
458
458
  * @method
459
459
  * @name woofipro#fetchPositions
@@ -463,7 +463,7 @@ export default class woofipro extends Exchange {
463
463
  * @param {object} [params] extra parameters specific to the exchange API endpoint
464
464
  * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
465
465
  */
466
- fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
466
+ fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
467
467
  nonce(): number;
468
468
  sign(path: any, section?: string, method?: string, params?: {}, headers?: any, body?: any): {
469
469
  url: string;
package/js/src/xt.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/xt.js';
2
- import { Currencies, Currency, Dict, FundingHistory, FundingRateHistory, Int, LeverageTier, MarginModification, Market, Num, OHLCV, Order, OrderSide, OrderType, Str, Tickers, Transaction, TransferEntry, LedgerEntry, FundingRate, DepositAddress, LeverageTiers } from './base/types.js';
2
+ import { Currencies, Currency, Dict, FundingHistory, FundingRateHistory, Int, LeverageTier, MarginModification, Market, Num, OHLCV, Order, OrderSide, OrderType, Str, Tickers, Transaction, TransferEntry, LedgerEntry, FundingRate, DepositAddress, LeverageTiers, Position } from './base/types.js';
3
3
  /**
4
4
  * @class xt
5
5
  * @augments Exchange
@@ -491,7 +491,7 @@ export default class xt extends Exchange {
491
491
  * @param {object} params extra parameters specific to the xt api endpoint
492
492
  * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
493
493
  */
494
- fetchPosition(symbol: string, params?: {}): Promise<import("./base/types.js").Position>;
494
+ fetchPosition(symbol: string, params?: {}): Promise<Position>;
495
495
  /**
496
496
  * @method
497
497
  * @name xt#fetchPositions
@@ -501,8 +501,8 @@ export default class xt extends Exchange {
501
501
  * @param {object} params extra parameters specific to the xt api endpoint
502
502
  * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
503
503
  */
504
- fetchPositions(symbols?: string[], params?: {}): Promise<import("./base/types.js").Position[]>;
505
- parsePosition(position: any, market?: any): import("./base/types.js").Position;
504
+ fetchPositions(symbols?: string[], params?: {}): Promise<Position[]>;
505
+ parsePosition(position: any, market?: any): Position;
506
506
  /**
507
507
  * @method
508
508
  * @name xt#transfer
package/js/src/xt.js CHANGED
@@ -947,6 +947,14 @@ export default class xt extends Exchange {
947
947
  },
948
948
  };
949
949
  }
950
+ const typeRaw = this.safeString(entry, 'type');
951
+ let type = undefined;
952
+ if (typeRaw === 'FT') {
953
+ type = 'crypto';
954
+ }
955
+ else {
956
+ type = 'other';
957
+ }
950
958
  result[code] = {
951
959
  'info': entry,
952
960
  'id': currencyId,
@@ -958,6 +966,7 @@ export default class xt extends Exchange {
958
966
  'deposit': deposit,
959
967
  'withdraw': withdraw,
960
968
  'networks': networks,
969
+ 'type': type,
961
970
  'limits': {
962
971
  'amount': {
963
972
  'min': undefined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.4.77",
3
+ "version": "4.4.80",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.min.js",
6
6
  "type": "module",
@@ -199,7 +199,7 @@
199
199
  "as-table": "^1.0.55",
200
200
  "asciichart": "^1.5.25",
201
201
  "assert": "^2.0.0",
202
- "ast-transpiler": "^0.0.65",
202
+ "ast-transpiler": "^0.0.66",
203
203
  "docsify": "^4.11.4",
204
204
  "eslint": "8.22.0",
205
205
  "eslint-config-airbnb-base": "15.0.0",
@@ -1,18 +0,0 @@
1
- import { implicitReturnType } from '../base/types.js';
2
- import { Exchange as _Exchange } from '../base/Exchange.js';
3
- interface Exchange {
4
- publicGetOapiV2ListTradePrice(params?: {}): Promise<implicitReturnType>;
5
- publicGetOapiV2ListMarketPair(params?: {}): Promise<implicitReturnType>;
6
- publicGetOpenV2PublicGetOrderBook(params?: {}): Promise<implicitReturnType>;
7
- privatePostV2CoinCustomerAccount(params?: {}): Promise<implicitReturnType>;
8
- privatePostV2KlineGetKline(params?: {}): Promise<implicitReturnType>;
9
- privatePostV2OrderOrder(params?: {}): Promise<implicitReturnType>;
10
- privatePostV2OrderCancel(params?: {}): Promise<implicitReturnType>;
11
- privatePostV2OrderGetOrderList(params?: {}): Promise<implicitReturnType>;
12
- privatePostV2OrderShowOrderStatus(params?: {}): Promise<implicitReturnType>;
13
- privatePostV2OrderShowOrderHistory(params?: {}): Promise<implicitReturnType>;
14
- privatePostV2OrderGetTradeList(params?: {}): Promise<implicitReturnType>;
15
- }
16
- declare abstract class Exchange extends _Exchange {
17
- }
18
- export default Exchange;
package/js/src/ace.d.ts DELETED
@@ -1,158 +0,0 @@
1
- import Exchange from './abstract/ace.js';
2
- import type { Balances, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, int } from './base/types.js';
3
- /**
4
- * @class ace
5
- * @augments Exchange
6
- */
7
- export default class ace extends Exchange {
8
- describe(): any;
9
- /**
10
- * @method
11
- * @name ace#fetchMarkets
12
- * @description retrieves data on all markets for ace
13
- * @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---market-pair
14
- * @param {object} [params] extra parameters specific to the exchange API endpoint
15
- * @returns {object[]} an array of objects representing market data
16
- */
17
- fetchMarkets(params?: {}): Promise<Market[]>;
18
- parseMarket(market: Dict): Market;
19
- parseTicker(ticker: Dict, market?: Market): Ticker;
20
- /**
21
- * @method
22
- * @name ace#fetchTicker
23
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
24
- * @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---trade-data
25
- * @param {string} symbol unified symbol of the market to fetch the ticker for
26
- * @param {object} [params] extra parameters specific to the exchange API endpoint
27
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
28
- */
29
- fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
30
- /**
31
- * @method
32
- * @name ace#fetchTickers
33
- * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
34
- * @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---trade-data
35
- * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
36
- * @param {object} [params] extra parameters specific to the exchange API endpoint
37
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
38
- */
39
- fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
40
- /**
41
- * @method
42
- * @name ace#fetchOrderBook
43
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
44
- * @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-books
45
- * @param {string} symbol unified symbol of the market to fetch the order book for
46
- * @param {int} [limit] the maximum amount of order book entries to return
47
- * @param {object} [params] extra parameters specific to the exchange API endpoint
48
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
49
- */
50
- fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
51
- parseOHLCV(ohlcv: any, market?: Market): OHLCV;
52
- /**
53
- * @method
54
- * @name ace#fetchOHLCV
55
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
56
- * @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---klinecandlestick-data
57
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
58
- * @param {string} timeframe the length of time each candle represents
59
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
60
- * @param {int} [limit] the maximum amount of candles to fetch
61
- * @param {object} [params] extra parameters specific to the exchange API endpoint
62
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
63
- */
64
- fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
65
- parseOrderStatus(status: Str): string;
66
- parseOrder(order: Dict, market?: Market): Order;
67
- /**
68
- * @method
69
- * @name ace#createOrder
70
- * @description create a trade order
71
- * @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---new-order
72
- * @param {string} symbol unified symbol of the market to create an order in
73
- * @param {string} type 'market' or 'limit'
74
- * @param {string} side 'buy' or 'sell'
75
- * @param {float} amount how much of currency you want to trade in units of base currency
76
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
77
- * @param {object} [params] extra parameters specific to the exchange API endpoint
78
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
79
- */
80
- createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
81
- /**
82
- * @method
83
- * @name ace#cancelOrder
84
- * @description cancels an open order
85
- * @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---cancel-order
86
- * @param {string} id order id
87
- * @param {string} symbol unified symbol of the market the order was made in
88
- * @param {object} [params] extra parameters specific to the exchange API endpoint
89
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
90
- */
91
- cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
92
- /**
93
- * @method
94
- * @name ace#fetchOrder
95
- * @description fetches information on an order made by the user
96
- * @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-status
97
- * @param {string} id the order id
98
- * @param {string} symbol unified symbol of the market the order was made in
99
- * @param {object} [params] extra parameters specific to the exchange API endpoint
100
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
101
- */
102
- fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
103
- /**
104
- * @method
105
- * @name ace#fetchOpenOrders
106
- * @description fetch all unfilled currently open orders
107
- * @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-list
108
- * @param {string} symbol unified market symbol of the market orders were made in
109
- * @param {int} [since] the earliest time in ms to fetch orders for
110
- * @param {int} [limit] the maximum number of order structures to retrieve
111
- * @param {object} [params] extra parameters specific to the exchange API endpoint
112
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
113
- */
114
- fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
115
- parseTrade(trade: Dict, market?: Market): Trade;
116
- /**
117
- * @method
118
- * @name ace#fetchOrderTrades
119
- * @description fetch all the trades made from a single order
120
- * @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-history
121
- * @param {string} id order id
122
- * @param {string} symbol unified market symbol
123
- * @param {int} [since] the earliest time in ms to fetch trades for
124
- * @param {int} [limit] the maximum number of trades to retrieve
125
- * @param {object} [params] extra parameters specific to the exchange API endpoint
126
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
127
- */
128
- fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
129
- /**
130
- * @method
131
- * @name ace#fetchMyTrades
132
- * @description fetch all trades made by the user
133
- * @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---trade-list
134
- * @param {string} symbol unified symbol of the market to fetch trades for
135
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
136
- * @param {int} [limit] the maximum amount of trades to fetch
137
- * @param {object} [params] extra parameters specific to the exchange API endpoint
138
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
139
- */
140
- fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
141
- parseBalance(response: any): Balances;
142
- /**
143
- * @method
144
- * @name ace#fetchBalance
145
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
146
- * @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---account-balance
147
- * @param {object} [params] extra parameters specific to the exchange API endpoint
148
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
149
- */
150
- fetchBalance(params?: {}): Promise<Balances>;
151
- sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
152
- url: string;
153
- method: string;
154
- body: any;
155
- headers: any;
156
- };
157
- handleErrors(code: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
158
- }