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
@@ -328,6 +328,20 @@ interface htx {
328
328
  contractPrivateGetLinearSwapApiV3FixPositionMarginChangeRecord(params?: {}): Promise<implicitReturnType>;
329
329
  contractPrivateGetLinearSwapApiV3SwapUnifiedAccountType(params?: {}): Promise<implicitReturnType>;
330
330
  contractPrivateGetLinearSwapApiV3LinearSwapOverviewAccountInfo(params?: {}): Promise<implicitReturnType>;
331
+ contractPrivateGetV5AccountBalance(params?: {}): Promise<implicitReturnType>;
332
+ contractPrivateGetV5AccountAssetMode(params?: {}): Promise<implicitReturnType>;
333
+ contractPrivateGetV5TradePositionOpens(params?: {}): Promise<implicitReturnType>;
334
+ contractPrivateGetV5TradeOrderOpens(params?: {}): Promise<implicitReturnType>;
335
+ contractPrivateGetV5TradeOrderDetails(params?: {}): Promise<implicitReturnType>;
336
+ contractPrivateGetV5TradeOrderHistory(params?: {}): Promise<implicitReturnType>;
337
+ contractPrivateGetV5TradeOrder(params?: {}): Promise<implicitReturnType>;
338
+ contractPrivateGetV5PositionLever(params?: {}): Promise<implicitReturnType>;
339
+ contractPrivateGetV5PositionMode(params?: {}): Promise<implicitReturnType>;
340
+ contractPrivateGetV5PositionRiskLimit(params?: {}): Promise<implicitReturnType>;
341
+ contractPrivateGetV5PositionRiskLimitTier(params?: {}): Promise<implicitReturnType>;
342
+ contractPrivateGetV5MarketRiskLimit(params?: {}): Promise<implicitReturnType>;
343
+ contractPrivateGetV5MarketAssetsDeductionCurrency(params?: {}): Promise<implicitReturnType>;
344
+ contractPrivateGetV5MarketMultiAssetsMargin(params?: {}): Promise<implicitReturnType>;
331
345
  contractPrivatePostApiV1ContractBalanceValuation(params?: {}): Promise<implicitReturnType>;
332
346
  contractPrivatePostApiV1ContractAccountInfo(params?: {}): Promise<implicitReturnType>;
333
347
  contractPrivatePostApiV1ContractPositionInfo(params?: {}): Promise<implicitReturnType>;
@@ -545,6 +559,17 @@ interface htx {
545
559
  contractPrivatePostLinearSwapApiV1SwapCrossTrackOpenorders(params?: {}): Promise<implicitReturnType>;
546
560
  contractPrivatePostLinearSwapApiV1SwapTrackHisorders(params?: {}): Promise<implicitReturnType>;
547
561
  contractPrivatePostLinearSwapApiV1SwapCrossTrackHisorders(params?: {}): Promise<implicitReturnType>;
562
+ contractPrivatePostV5AccountAssetMode(params?: {}): Promise<implicitReturnType>;
563
+ contractPrivatePostV5TradeOrder(params?: {}): Promise<implicitReturnType>;
564
+ contractPrivatePostV5TradeBatchOrders(params?: {}): Promise<implicitReturnType>;
565
+ contractPrivatePostV5TradeCancelOrder(params?: {}): Promise<implicitReturnType>;
566
+ contractPrivatePostV5TradeCancelBatchOrders(params?: {}): Promise<implicitReturnType>;
567
+ contractPrivatePostV5TradeCancelAllOrders(params?: {}): Promise<implicitReturnType>;
568
+ contractPrivatePostV5TradePosition(params?: {}): Promise<implicitReturnType>;
569
+ contractPrivatePostV5TradePositionAll(params?: {}): Promise<implicitReturnType>;
570
+ contractPrivatePostV5PositionLever(params?: {}): Promise<implicitReturnType>;
571
+ contractPrivatePostV5PositionMode(params?: {}): Promise<implicitReturnType>;
572
+ contractPrivatePostV5AccountFeeDeductionCurrency(params?: {}): Promise<implicitReturnType>;
548
573
  }
549
574
  declare abstract class htx extends _htx {
550
575
  }
@@ -1,16 +1,16 @@
1
- import Exchange from './abstract/btcalpha.js';
1
+ import Exchange from './abstract/alp.js';
2
2
  import type { IndexType, Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, Num, Dict, int } from './base/types.js';
3
3
  /**
4
- * @class btcalpha
4
+ * @class alp
5
5
  * @augments Exchange
6
6
  */
7
- export default class btcalpha extends Exchange {
7
+ export default class alp extends Exchange {
8
8
  describe(): any;
9
9
  /**
10
10
  * @method
11
- * @name btcalpha#fetchMarkets
12
- * @description retrieves data on all markets for btcalpha
13
- * @see https://btc-alpha.github.io/api-docs/#list-all-currencies
11
+ * @name alp#fetchMarkets
12
+ * @description retrieves data on all markets for alp
13
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-all-currencies
14
14
  * @param {object} [params] extra parameters specific to the exchange API endpoint
15
15
  * @returns {object[]} an array of objects representing market data
16
16
  */
@@ -18,8 +18,8 @@ export default class btcalpha extends Exchange {
18
18
  parseMarket(market: Dict): Market;
19
19
  /**
20
20
  * @method
21
- * @name btcalpha#fetchTickers
22
- * @see https://btc-alpha.github.io/api-docs/#tickers
21
+ * @name alp#fetchTickers
22
+ * @see https://alpcomdev.github.io/alp-api-docs/#tickers
23
23
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
24
24
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
25
25
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -28,8 +28,8 @@ export default class btcalpha extends Exchange {
28
28
  fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
29
29
  /**
30
30
  * @method
31
- * @name btcalpha#fetchTicker
32
- * @see https://btc-alpha.github.io/api-docs/#tickers
31
+ * @name alp#fetchTicker
32
+ * @see https://alpcomdev.github.io/alp-api-docs/#tickers
33
33
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
34
34
  * @param {string} symbol unified symbol of the market to fetch the ticker for
35
35
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -39,8 +39,8 @@ export default class btcalpha extends Exchange {
39
39
  parseTicker(ticker: Dict, market?: Market): Ticker;
40
40
  /**
41
41
  * @method
42
- * @name btcalpha#fetchOrderBook
43
- * @see https://btc-alpha.github.io/api-docs/#get-orderbook
42
+ * @name alp#fetchOrderBook
43
+ * @see https://alpcomdev.github.io/alp-api-docs/#get-orderbook
44
44
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
45
45
  * @param {string} symbol unified symbol of the market to fetch the order book for
46
46
  * @param {int} [limit] the maximum amount of order book entries to return
@@ -52,9 +52,9 @@ export default class btcalpha extends Exchange {
52
52
  parseTrade(trade: Dict, market?: Market): Trade;
53
53
  /**
54
54
  * @method
55
- * @name btcalpha#fetchTrades
55
+ * @name alp#fetchTrades
56
56
  * @description get the list of most recent trades for a particular symbol
57
- * @see https://btc-alpha.github.io/api-docs/#list-all-exchanges
57
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-all-exchanges
58
58
  * @param {string} symbol unified symbol of the market to fetch trades for
59
59
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
60
60
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -64,9 +64,9 @@ export default class btcalpha extends Exchange {
64
64
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
65
65
  /**
66
66
  * @method
67
- * @name btcalpha#fetchDeposits
67
+ * @name alp#fetchDeposits
68
68
  * @description fetch all deposits made to an account
69
- * @see https://btc-alpha.github.io/api-docs/#list-own-deposits
69
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-own-deposits
70
70
  * @param {string} code unified currency code
71
71
  * @param {int} [since] the earliest time in ms to fetch deposits for
72
72
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -76,9 +76,9 @@ export default class btcalpha extends Exchange {
76
76
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
77
77
  /**
78
78
  * @method
79
- * @name btcalpha#fetchWithdrawals
79
+ * @name alp#fetchWithdrawals
80
80
  * @description fetch all withdrawals made from an account
81
- * @see https://btc-alpha.github.io/api-docs/#list-own-made-withdraws
81
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-own-made-withdraws
82
82
  * @param {string} code unified currency code
83
83
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
84
84
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -91,9 +91,9 @@ export default class btcalpha extends Exchange {
91
91
  parseOHLCV(ohlcv: any, market?: Market): OHLCV;
92
92
  /**
93
93
  * @method
94
- * @name btcalpha#fetchOHLCV
94
+ * @name alp#fetchOHLCV
95
95
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
96
- * @see https://btc-alpha.github.io/api-docs/#charts
96
+ * @see https://alpcomdev.github.io/alp-api-docs/#charts
97
97
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
98
98
  * @param {string} timeframe the length of time each candle represents
99
99
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -105,9 +105,9 @@ export default class btcalpha extends Exchange {
105
105
  parseBalance(response: any): Balances;
106
106
  /**
107
107
  * @method
108
- * @name btcalpha#fetchBalance
108
+ * @name alp#fetchBalance
109
109
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
110
- * @see https://btc-alpha.github.io/api-docs/#list-own-wallets
110
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-own-wallets
111
111
  * @param {object} [params] extra parameters specific to the exchange API endpoint
112
112
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
113
113
  */
@@ -116,8 +116,8 @@ export default class btcalpha extends Exchange {
116
116
  parseOrder(order: Dict, market?: Market): Order;
117
117
  /**
118
118
  * @method
119
- * @name btcalpha#createOrder
120
- * @see https://btc-alpha.github.io/api-docs/#create-order
119
+ * @name alp#createOrder
120
+ * @see https://alpcomdev.github.io/alp-api-docs/#create-order
121
121
  * @description create a trade order
122
122
  * @param {string} symbol unified symbol of the market to create an order in
123
123
  * @param {string} type 'limit'
@@ -130,8 +130,8 @@ export default class btcalpha extends Exchange {
130
130
  createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
131
131
  /**
132
132
  * @method
133
- * @name btcalpha#cancelOrder
134
- * @see https://btc-alpha.github.io/api-docs/#cancel-order
133
+ * @name alp#cancelOrder
134
+ * @see https://alpcomdev.github.io/alp-api-docs/#cancel-order
135
135
  * @description cancels an open order
136
136
  * @param {string} id order id
137
137
  * @param {string} symbol unified symbol of the market the order was made in
@@ -141,19 +141,19 @@ export default class btcalpha extends Exchange {
141
141
  cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
142
142
  /**
143
143
  * @method
144
- * @name btcalpha#fetchOrder
145
- * @see https://btc-alpha.github.io/api-docs/#retrieve-single-order
144
+ * @name alp#fetchOrder
145
+ * @see https://alpcomdev.github.io/alp-api-docs/#retrieve-single-order
146
146
  * @description fetches information on an order made by the user
147
147
  * @param {string} id the order id
148
- * @param {string} symbol not used by btcalpha fetchOrder
148
+ * @param {string} symbol not used by alp fetchOrder
149
149
  * @param {object} [params] extra parameters specific to the exchange API endpoint
150
150
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
151
151
  */
152
152
  fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
153
153
  /**
154
154
  * @method
155
- * @name btcalpha#fetchOrders
156
- * @see https://btc-alpha.github.io/api-docs/#list-own-orders
155
+ * @name alp#fetchOrders
156
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-own-orders
157
157
  * @description fetches information on multiple orders made by the user
158
158
  * @param {string} symbol unified market symbol of the market orders were made in
159
159
  * @param {int} [since] the earliest time in ms to fetch orders for
@@ -164,9 +164,9 @@ export default class btcalpha extends Exchange {
164
164
  fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
165
165
  /**
166
166
  * @method
167
- * @name btcalpha#fetchOpenOrders
167
+ * @name alp#fetchOpenOrders
168
168
  * @description fetch all unfilled currently open orders
169
- * @see https://btc-alpha.github.io/api-docs/#list-own-orders
169
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-own-orders
170
170
  * @param {string} symbol unified market symbol
171
171
  * @param {int} [since] the earliest time in ms to fetch open orders for
172
172
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -176,9 +176,9 @@ export default class btcalpha extends Exchange {
176
176
  fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
177
177
  /**
178
178
  * @method
179
- * @name btcalpha#fetchClosedOrders
179
+ * @name alp#fetchClosedOrders
180
180
  * @description fetches information on multiple closed orders made by the user
181
- * @see https://btc-alpha.github.io/api-docs/#list-own-orders
181
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-own-orders
182
182
  * @param {string} symbol unified market symbol of the market orders were made in
183
183
  * @param {int} [since] the earliest time in ms to fetch orders for
184
184
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -188,9 +188,9 @@ export default class btcalpha extends Exchange {
188
188
  fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
189
189
  /**
190
190
  * @method
191
- * @name btcalpha#fetchMyTrades
191
+ * @name alp#fetchMyTrades
192
192
  * @description fetch all trades made by the user
193
- * @see https://btc-alpha.github.io/api-docs/#list-own-exchanges
193
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-own-exchanges
194
194
  * @param {string} symbol unified market symbol
195
195
  * @param {int} [since] the earliest time in ms to fetch trades for
196
196
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -1,19 +1,19 @@
1
1
  // ---------------------------------------------------------------------------
2
- import Exchange from './abstract/btcalpha.js';
2
+ import Exchange from './abstract/alp.js';
3
3
  import { ExchangeError, InvalidOrder, InsufficientFunds } from './base/errors.js';
4
4
  import { Precise } from './base/Precise.js';
5
5
  import { TICK_SIZE } from './base/functions/number.js';
6
6
  import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
7
7
  // ---------------------------------------------------------------------------
8
8
  /**
9
- * @class btcalpha
9
+ * @class alp
10
10
  * @augments Exchange
11
11
  */
12
- export default class btcalpha extends Exchange {
12
+ export default class alp extends Exchange {
13
13
  describe() {
14
14
  return this.deepExtend(super.describe(), {
15
- 'id': 'btcalpha',
16
- 'name': 'BTC-Alpha',
15
+ 'id': 'alp',
16
+ 'name': 'Alp',
17
17
  'countries': ['US'],
18
18
  'version': 'v1',
19
19
  'rateLimit': 10,
@@ -135,12 +135,12 @@ export default class btcalpha extends Exchange {
135
135
  'urls': {
136
136
  'logo': 'https://github.com/user-attachments/assets/dce49f3a-61e5-4ba0-a2fe-41d192fd0e5d',
137
137
  'api': {
138
- 'rest': 'https://btc-alpha.com/api',
138
+ 'rest': 'https://alp.com/api',
139
139
  },
140
- 'www': 'https://btc-alpha.com',
141
- 'doc': 'https://btc-alpha.github.io/api-docs',
142
- 'fees': 'https://btc-alpha.com/fees/',
143
- 'referral': 'https://btc-alpha.com/?r=123788',
140
+ 'www': 'https://alp.com',
141
+ 'doc': 'https://alpcomdev.github.io/alp-api-docs/',
142
+ 'fees': 'https://alp.com/fees/',
143
+ 'referral': 'https://alp.com/?r=123788',
144
144
  },
145
145
  'api': {
146
146
  'public': {
@@ -269,9 +269,9 @@ export default class btcalpha extends Exchange {
269
269
  }
270
270
  /**
271
271
  * @method
272
- * @name btcalpha#fetchMarkets
273
- * @description retrieves data on all markets for btcalpha
274
- * @see https://btc-alpha.github.io/api-docs/#list-all-currencies
272
+ * @name alp#fetchMarkets
273
+ * @description retrieves data on all markets for alp
274
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-all-currencies
275
275
  * @param {object} [params] extra parameters specific to the exchange API endpoint
276
276
  * @returns {object[]} an array of objects representing market data
277
277
  */
@@ -355,8 +355,8 @@ export default class btcalpha extends Exchange {
355
355
  }
356
356
  /**
357
357
  * @method
358
- * @name btcalpha#fetchTickers
359
- * @see https://btc-alpha.github.io/api-docs/#tickers
358
+ * @name alp#fetchTickers
359
+ * @see https://alpcomdev.github.io/alp-api-docs/#tickers
360
360
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
361
361
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
362
362
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -385,8 +385,8 @@ export default class btcalpha extends Exchange {
385
385
  }
386
386
  /**
387
387
  * @method
388
- * @name btcalpha#fetchTicker
389
- * @see https://btc-alpha.github.io/api-docs/#tickers
388
+ * @name alp#fetchTicker
389
+ * @see https://alpcomdev.github.io/alp-api-docs/#tickers
390
390
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
391
391
  * @param {string} symbol unified symbol of the market to fetch the ticker for
392
392
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -458,8 +458,8 @@ export default class btcalpha extends Exchange {
458
458
  }
459
459
  /**
460
460
  * @method
461
- * @name btcalpha#fetchOrderBook
462
- * @see https://btc-alpha.github.io/api-docs/#get-orderbook
461
+ * @name alp#fetchOrderBook
462
+ * @see https://alpcomdev.github.io/alp-api-docs/#get-orderbook
463
463
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
464
464
  * @param {string} symbol unified symbol of the market to fetch the order book for
465
465
  * @param {int} [limit] the maximum amount of order book entries to return
@@ -540,9 +540,9 @@ export default class btcalpha extends Exchange {
540
540
  }
541
541
  /**
542
542
  * @method
543
- * @name btcalpha#fetchTrades
543
+ * @name alp#fetchTrades
544
544
  * @description get the list of most recent trades for a particular symbol
545
- * @see https://btc-alpha.github.io/api-docs/#list-all-exchanges
545
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-all-exchanges
546
546
  * @param {string} symbol unified symbol of the market to fetch trades for
547
547
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
548
548
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -565,9 +565,9 @@ export default class btcalpha extends Exchange {
565
565
  }
566
566
  /**
567
567
  * @method
568
- * @name btcalpha#fetchDeposits
568
+ * @name alp#fetchDeposits
569
569
  * @description fetch all deposits made to an account
570
- * @see https://btc-alpha.github.io/api-docs/#list-own-deposits
570
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-own-deposits
571
571
  * @param {string} code unified currency code
572
572
  * @param {int} [since] the earliest time in ms to fetch deposits for
573
573
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -595,9 +595,9 @@ export default class btcalpha extends Exchange {
595
595
  }
596
596
  /**
597
597
  * @method
598
- * @name btcalpha#fetchWithdrawals
598
+ * @name alp#fetchWithdrawals
599
599
  * @description fetch all withdrawals made from an account
600
- * @see https://btc-alpha.github.io/api-docs/#list-own-made-withdraws
600
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-own-made-withdraws
601
601
  * @param {string} code unified currency code
602
602
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
603
603
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -703,9 +703,9 @@ export default class btcalpha extends Exchange {
703
703
  }
704
704
  /**
705
705
  * @method
706
- * @name btcalpha#fetchOHLCV
706
+ * @name alp#fetchOHLCV
707
707
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
708
- * @see https://btc-alpha.github.io/api-docs/#charts
708
+ * @see https://alpcomdev.github.io/alp-api-docs/#charts
709
709
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
710
710
  * @param {string} timeframe the length of time each candle represents
711
711
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -751,9 +751,9 @@ export default class btcalpha extends Exchange {
751
751
  }
752
752
  /**
753
753
  * @method
754
- * @name btcalpha#fetchBalance
754
+ * @name alp#fetchBalance
755
755
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
756
- * @see https://btc-alpha.github.io/api-docs/#list-own-wallets
756
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-own-wallets
757
757
  * @param {object} [params] extra parameters specific to the exchange API endpoint
758
758
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
759
759
  */
@@ -844,8 +844,8 @@ export default class btcalpha extends Exchange {
844
844
  }
845
845
  /**
846
846
  * @method
847
- * @name btcalpha#createOrder
848
- * @see https://btc-alpha.github.io/api-docs/#create-order
847
+ * @name alp#createOrder
848
+ * @see https://alpcomdev.github.io/alp-api-docs/#create-order
849
849
  * @description create a trade order
850
850
  * @param {string} symbol unified symbol of the market to create an order in
851
851
  * @param {string} type 'limit'
@@ -879,8 +879,8 @@ export default class btcalpha extends Exchange {
879
879
  }
880
880
  /**
881
881
  * @method
882
- * @name btcalpha#cancelOrder
883
- * @see https://btc-alpha.github.io/api-docs/#cancel-order
882
+ * @name alp#cancelOrder
883
+ * @see https://alpcomdev.github.io/alp-api-docs/#cancel-order
884
884
  * @description cancels an open order
885
885
  * @param {string} id order id
886
886
  * @param {string} symbol unified symbol of the market the order was made in
@@ -901,11 +901,11 @@ export default class btcalpha extends Exchange {
901
901
  }
902
902
  /**
903
903
  * @method
904
- * @name btcalpha#fetchOrder
905
- * @see https://btc-alpha.github.io/api-docs/#retrieve-single-order
904
+ * @name alp#fetchOrder
905
+ * @see https://alpcomdev.github.io/alp-api-docs/#retrieve-single-order
906
906
  * @description fetches information on an order made by the user
907
907
  * @param {string} id the order id
908
- * @param {string} symbol not used by btcalpha fetchOrder
908
+ * @param {string} symbol not used by alp fetchOrder
909
909
  * @param {object} [params] extra parameters specific to the exchange API endpoint
910
910
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
911
911
  */
@@ -919,8 +919,8 @@ export default class btcalpha extends Exchange {
919
919
  }
920
920
  /**
921
921
  * @method
922
- * @name btcalpha#fetchOrders
923
- * @see https://btc-alpha.github.io/api-docs/#list-own-orders
922
+ * @name alp#fetchOrders
923
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-own-orders
924
924
  * @description fetches information on multiple orders made by the user
925
925
  * @param {string} symbol unified market symbol of the market orders were made in
926
926
  * @param {int} [since] the earliest time in ms to fetch orders for
@@ -944,9 +944,9 @@ export default class btcalpha extends Exchange {
944
944
  }
945
945
  /**
946
946
  * @method
947
- * @name btcalpha#fetchOpenOrders
947
+ * @name alp#fetchOpenOrders
948
948
  * @description fetch all unfilled currently open orders
949
- * @see https://btc-alpha.github.io/api-docs/#list-own-orders
949
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-own-orders
950
950
  * @param {string} symbol unified market symbol
951
951
  * @param {int} [since] the earliest time in ms to fetch open orders for
952
952
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -961,9 +961,9 @@ export default class btcalpha extends Exchange {
961
961
  }
962
962
  /**
963
963
  * @method
964
- * @name btcalpha#fetchClosedOrders
964
+ * @name alp#fetchClosedOrders
965
965
  * @description fetches information on multiple closed orders made by the user
966
- * @see https://btc-alpha.github.io/api-docs/#list-own-orders
966
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-own-orders
967
967
  * @param {string} symbol unified market symbol of the market orders were made in
968
968
  * @param {int} [since] the earliest time in ms to fetch orders for
969
969
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -978,9 +978,9 @@ export default class btcalpha extends Exchange {
978
978
  }
979
979
  /**
980
980
  * @method
981
- * @name btcalpha#fetchMyTrades
981
+ * @name alp#fetchMyTrades
982
982
  * @description fetch all trades made by the user
983
- * @see https://btc-alpha.github.io/api-docs/#list-own-exchanges
983
+ * @see https://alpcomdev.github.io/alp-api-docs/#list-own-exchanges
984
984
  * @param {string} symbol unified market symbol
985
985
  * @param {int} [since] the earliest time in ms to fetch trades for
986
986
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -300,7 +300,7 @@ export default class ascendex extends Exchange {
300
300
  * @param {string} symbol unified market symbol
301
301
  * @param {float} amount the amount of margin to remove
302
302
  * @param {object} [params] extra parameters specific to the exchange API endpoint
303
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=reduce-margin-structure}
303
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
304
304
  */
305
305
  reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
306
306
  /**
@@ -310,7 +310,7 @@ export default class ascendex extends Exchange {
310
310
  * @param {string} symbol unified market symbol
311
311
  * @param {float} amount amount of margin to add
312
312
  * @param {object} [params] extra parameters specific to the exchange API endpoint
313
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=add-margin-structure}
313
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
314
314
  */
315
315
  addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
316
316
  /**
@@ -3077,7 +3077,7 @@ export default class ascendex extends Exchange {
3077
3077
  * @param {string} symbol unified market symbol
3078
3078
  * @param {float} amount the amount of margin to remove
3079
3079
  * @param {object} [params] extra parameters specific to the exchange API endpoint
3080
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=reduce-margin-structure}
3080
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
3081
3081
  */
3082
3082
  async reduceMargin(symbol, amount, params = {}) {
3083
3083
  return await this.modifyMarginHelper(symbol, -amount, 'reduce', params);
@@ -3089,7 +3089,7 @@ export default class ascendex extends Exchange {
3089
3089
  * @param {string} symbol unified market symbol
3090
3090
  * @param {float} amount amount of margin to add
3091
3091
  * @param {object} [params] extra parameters specific to the exchange API endpoint
3092
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=add-margin-structure}
3092
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
3093
3093
  */
3094
3094
  async addMargin(symbol, amount, params = {}) {
3095
3095
  return await this.modifyMarginHelper(symbol, amount, 'add', params);
package/js/src/aster.js CHANGED
@@ -209,15 +209,6 @@ export default class aster extends Exchange {
209
209
  'v1/adlQuantile',
210
210
  'v1/forceOrders',
211
211
  ],
212
- 'post': [
213
- 'v1/listenKey',
214
- ],
215
- 'put': [
216
- 'v1/listenKey',
217
- ],
218
- 'delete': [
219
- 'v1/listenKey',
220
- ],
221
212
  },
222
213
  'fapiPrivate': {
223
214
  'get': [
@@ -250,11 +241,16 @@ export default class aster extends Exchange {
250
241
  'v1/leverage',
251
242
  'v1/marginType',
252
243
  'v1/positionMargin',
244
+ 'v1/listenKey',
245
+ ],
246
+ 'put': [
247
+ 'v1/listenKey',
253
248
  ],
254
249
  'delete': [
255
250
  'v1/order',
256
251
  'v1/allOpenOrders',
257
252
  'v1/batchOrders',
253
+ 'v1/listenKey',
258
254
  ],
259
255
  },
260
256
  'sapiPublic': {
@@ -272,17 +268,6 @@ export default class aster extends Exchange {
272
268
  'v1/ticker/bookTicker',
273
269
  'v1/aster/withdraw/estimateFee',
274
270
  ],
275
- 'post': [
276
- 'v1/getNonce',
277
- 'v1/createApiKey',
278
- 'v1/listenKey',
279
- ],
280
- 'put': [
281
- 'v1/listenKey',
282
- ],
283
- 'delete': [
284
- 'v1/listenKey',
285
- ],
286
271
  },
287
272
  'sapiPrivate': {
288
273
  'get': [
@@ -299,10 +284,15 @@ export default class aster extends Exchange {
299
284
  'v1/asset/wallet/transfer',
300
285
  'v1/asset/sendToAddress',
301
286
  'v1/aster/user-withdraw',
287
+ 'v1/listenKey',
288
+ ],
289
+ 'put': [
290
+ 'v1/listenKey',
302
291
  ],
303
292
  'delete': [
304
293
  'v1/order',
305
294
  'v1/allOpenOrders',
295
+ 'v1/listenKey',
306
296
  ],
307
297
  },
308
298
  },
@@ -337,6 +327,7 @@ export default class aster extends Exchange {
337
327
  },
338
328
  },
339
329
  'options': {
330
+ 'defaultType': 'spot',
340
331
  'recvWindow': 10 * 1000,
341
332
  'defaultTimeInForce': 'GTC',
342
333
  'zeroAddress': '0x0000000000000000000000000000000000000000',
@@ -3705,10 +3696,12 @@ export default class aster extends Exchange {
3705
3696
  headers = {
3706
3697
  'X-MBX-APIKEY': this.apiKey,
3707
3698
  };
3708
- const nonce = this.milliseconds();
3699
+ const timestamp = this.milliseconds();
3700
+ // Nonce is in microseconds
3701
+ const nonce = this.microseconds();
3709
3702
  const defaultRecvWindow = this.safeInteger(this.options, 'recvWindow');
3710
3703
  let extendedParams = this.extend({
3711
- 'timestamp': nonce,
3704
+ 'timestamp': timestamp,
3712
3705
  }, params);
3713
3706
  if (defaultRecvWindow !== undefined) {
3714
3707
  extendedParams['recvWindow'] = defaultRecvWindow;
@@ -1216,12 +1216,12 @@ export default class backpack extends Exchange {
1216
1216
  //
1217
1217
  // fetchTrades
1218
1218
  // {
1219
- // "id": 8721564,
1219
+ // "id": 8721563,
1220
1220
  // "isBuyerMaker": false,
1221
1221
  // "price": "117427.6",
1222
1222
  // "quantity": "0.00016",
1223
1223
  // "quoteQuantity": "18.788416",
1224
- // "timestamp": 1753123916818
1224
+ // "timestamp": 1753123916819
1225
1225
  // }
1226
1226
  //
1227
1227
  // fetchMyTrades
@@ -1161,7 +1161,7 @@ export default class binance extends Exchange {
1161
1161
  * @param {string} id the identification number of the ledger entry
1162
1162
  * @param {string} code unified currency code
1163
1163
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1164
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
1164
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
1165
1165
  */
1166
1166
  fetchLedgerEntry(id: string, code?: Str, params?: {}): Promise<LedgerEntry>;
1167
1167
  /**
@@ -1181,7 +1181,7 @@ export default class binance extends Exchange {
1181
1181
  * @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)
1182
1182
  * @param {boolean} [params.portfolioMargin] set to true if you would like to fetch the ledger for a portfolio margin account
1183
1183
  * @param {string} [params.subType] "linear" or "inverse"
1184
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger}
1184
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
1185
1185
  */
1186
1186
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
1187
1187
  parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
@@ -1209,7 +1209,7 @@ export default class binance extends Exchange {
1209
1209
  * @param {string} symbol unified market symbol
1210
1210
  * @param {float} amount the amount of margin to remove
1211
1211
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1212
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=reduce-margin-structure}
1212
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
1213
1213
  */
1214
1214
  reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
1215
1215
  /**
@@ -1221,7 +1221,7 @@ export default class binance extends Exchange {
1221
1221
  * @param {string} symbol unified market symbol
1222
1222
  * @param {float} amount amount of margin to add
1223
1223
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1224
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=add-margin-structure}
1224
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
1225
1225
  */
1226
1226
  addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
1227
1227
  /**