ccxt 4.4.57 → 4.4.59

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 (109) hide show
  1. package/README.md +29 -32
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -6
  4. package/dist/cjs/src/alpaca.js +1 -1
  5. package/dist/cjs/src/ascendex.js +2 -0
  6. package/dist/cjs/src/base/Exchange.js +4 -3
  7. package/dist/cjs/src/bigone.js +2 -2
  8. package/dist/cjs/src/binance.js +22 -3
  9. package/dist/cjs/src/bit2c.js +7 -7
  10. package/dist/cjs/src/bitget.js +7 -0
  11. package/dist/cjs/src/bitmart.js +161 -97
  12. package/dist/cjs/src/blofin.js +1 -2
  13. package/dist/cjs/src/bybit.js +16 -3
  14. package/dist/cjs/src/coinbase.js +9 -2
  15. package/dist/cjs/src/coinbaseinternational.js +1 -1
  16. package/dist/cjs/src/hitbtc.js +1 -1
  17. package/dist/cjs/src/hyperliquid.js +96 -4
  18. package/dist/cjs/src/pro/binanceus.js +1 -1
  19. package/dist/cjs/src/pro/bybit.js +6 -1
  20. package/dist/cjs/src/pro/mexc.js +4 -1
  21. package/dist/cjs/src/timex.js +15 -2
  22. package/dist/cjs/src/vertex.js +2 -2
  23. package/dist/cjs/src/whitebit.js +2 -1
  24. package/dist/cjs/src/xt.js +62 -3
  25. package/js/ccxt.d.ts +2 -8
  26. package/js/ccxt.js +2 -6
  27. package/js/src/abstract/xt.d.ts +1 -0
  28. package/js/src/alpaca.d.ts +1 -1
  29. package/js/src/alpaca.js +1 -1
  30. package/js/src/ascendex.d.ts +1 -1
  31. package/js/src/ascendex.js +2 -0
  32. package/js/src/base/Exchange.d.ts +1 -331
  33. package/js/src/base/Exchange.js +4 -3
  34. package/js/src/base/types.d.ts +2 -2
  35. package/js/src/bigone.d.ts +1 -1
  36. package/js/src/bigone.js +2 -2
  37. package/js/src/binance.d.ts +1 -1
  38. package/js/src/binance.js +22 -3
  39. package/js/src/bingx.d.ts +1 -1
  40. package/js/src/bit2c.js +7 -7
  41. package/js/src/bitget.d.ts +1 -1
  42. package/js/src/bitget.js +7 -0
  43. package/js/src/bitmart.d.ts +5 -1
  44. package/js/src/bitmart.js +161 -97
  45. package/js/src/bitrue.d.ts +1 -1
  46. package/js/src/bitvavo.d.ts +1 -1
  47. package/js/src/blofin.js +1 -2
  48. package/js/src/btcmarkets.d.ts +1 -1
  49. package/js/src/bybit.d.ts +1 -1
  50. package/js/src/bybit.js +16 -3
  51. package/js/src/cex.d.ts +1 -1
  52. package/js/src/coinbase.d.ts +1 -1
  53. package/js/src/coinbase.js +9 -2
  54. package/js/src/coinbaseexchange.d.ts +2 -2
  55. package/js/src/coinbaseinternational.js +1 -1
  56. package/js/src/coincatch.d.ts +1 -1
  57. package/js/src/coinex.d.ts +1 -1
  58. package/js/src/coinlist.d.ts +1 -1
  59. package/js/src/coinsph.d.ts +1 -1
  60. package/js/src/currencycom.d.ts +1 -1
  61. package/js/src/defx.d.ts +1 -1
  62. package/js/src/delta.d.ts +1 -1
  63. package/js/src/deribit.d.ts +1 -1
  64. package/js/src/digifinex.d.ts +1 -1
  65. package/js/src/gate.d.ts +1 -1
  66. package/js/src/hitbtc.js +1 -1
  67. package/js/src/htx.d.ts +1 -1
  68. package/js/src/huobijp.d.ts +1 -1
  69. package/js/src/hyperliquid.d.ts +21 -0
  70. package/js/src/hyperliquid.js +96 -4
  71. package/js/src/idex.d.ts +1 -1
  72. package/js/src/indodax.d.ts +1 -1
  73. package/js/src/kraken.d.ts +1 -1
  74. package/js/src/kucoin.d.ts +1 -1
  75. package/js/src/kucoinfutures.d.ts +1 -1
  76. package/js/src/kuna.d.ts +1 -1
  77. package/js/src/latoken.d.ts +1 -1
  78. package/js/src/lbank.d.ts +1 -1
  79. package/js/src/mexc.d.ts +1 -1
  80. package/js/src/novadax.d.ts +1 -1
  81. package/js/src/oceanex.d.ts +1 -1
  82. package/js/src/okcoin.d.ts +1 -1
  83. package/js/src/okx.d.ts +1 -1
  84. package/js/src/onetrading.d.ts +1 -1
  85. package/js/src/paradex.d.ts +1 -1
  86. package/js/src/poloniex.d.ts +1 -1
  87. package/js/src/poloniexfutures.d.ts +1 -1
  88. package/js/src/pro/binanceus.js +1 -1
  89. package/js/src/pro/bybit.js +6 -1
  90. package/js/src/pro/mexc.js +4 -1
  91. package/js/src/probit.d.ts +1 -1
  92. package/js/src/timex.d.ts +2 -1
  93. package/js/src/timex.js +15 -2
  94. package/js/src/tokocrypto.d.ts +1 -1
  95. package/js/src/vertex.d.ts +1 -1
  96. package/js/src/vertex.js +2 -2
  97. package/js/src/whitebit.d.ts +1 -1
  98. package/js/src/whitebit.js +2 -1
  99. package/js/src/woo.d.ts +1 -1
  100. package/js/src/woofipro.d.ts +1 -1
  101. package/js/src/xt.d.ts +13 -1
  102. package/js/src/xt.js +62 -3
  103. package/package.json +1 -1
  104. package/js/src/bitbay.d.ts +0 -4
  105. package/js/src/bitbay.js +0 -18
  106. package/js/src/bitfinex2.d.ts +0 -506
  107. package/js/src/bitfinex2.js +0 -3778
  108. package/js/src/wazirx.d.ts +0 -216
  109. package/js/src/wazirx.js +0 -1368
@@ -1,506 +0,0 @@
1
- import Exchange from './abstract/bitfinex2.js';
2
- import type { TransferEntry, Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderBook, Str, Transaction, Ticker, Balances, Tickers, Strings, Currency, Market, OpenInterest, Liquidation, OrderRequest, Num, MarginModification, Currencies, TradingFees, Dict, LedgerEntry, FundingRate, FundingRates, DepositAddress } from './base/types.js';
3
- /**
4
- * @class bitfinex2
5
- * @augments Exchange
6
- */
7
- export default class bitfinex2 extends Exchange {
8
- describe(): any;
9
- isFiat(code: any): boolean;
10
- getCurrencyId(code: any): string;
11
- getCurrencyName(code: any): any;
12
- amountToPrecision(symbol: any, amount: any): string;
13
- priceToPrecision(symbol: any, price: any): string;
14
- /**
15
- * @method
16
- * @name bitfinex2#fetchStatus
17
- * @description the latest known information on the availability of the exchange API
18
- * @see https://docs.bitfinex.com/reference/rest-public-platform-status
19
- * @param {object} [params] extra parameters specific to the exchange API endpoint
20
- * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
21
- */
22
- fetchStatus(params?: {}): Promise<{
23
- status: string;
24
- updated: any;
25
- eta: any;
26
- url: any;
27
- info: any;
28
- }>;
29
- /**
30
- * @method
31
- * @name bitfinex2#fetchMarkets
32
- * @description retrieves data on all markets for bitfinex2
33
- * @see https://docs.bitfinex.com/reference/rest-public-conf
34
- * @param {object} [params] extra parameters specific to the exchange API endpoint
35
- * @returns {object[]} an array of objects representing market data
36
- */
37
- fetchMarkets(params?: {}): Promise<Market[]>;
38
- /**
39
- * @method
40
- * @name bitfinex2#fetchCurrencies
41
- * @description fetches all available currencies on an exchange
42
- * @see https://docs.bitfinex.com/reference/rest-public-conf
43
- * @param {object} [params] extra parameters specific to the exchange API endpoint
44
- * @returns {object} an associative dictionary of currencies
45
- */
46
- fetchCurrencies(params?: {}): Promise<Currencies>;
47
- /**
48
- * @method
49
- * @name bitfinex2#fetchBalance
50
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
51
- * @see https://docs.bitfinex.com/reference/rest-auth-wallets
52
- * @param {object} [params] extra parameters specific to the exchange API endpoint
53
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
54
- */
55
- fetchBalance(params?: {}): Promise<Balances>;
56
- /**
57
- * @method
58
- * @name bitfinex2#transfer
59
- * @description transfer currency internally between wallets on the same account
60
- * @see https://docs.bitfinex.com/reference/rest-auth-transfer
61
- * @param {string} code unified currency code
62
- * @param {float} amount amount to transfer
63
- * @param {string} fromAccount account to transfer from
64
- * @param {string} toAccount account to transfer to
65
- * @param {object} [params] extra parameters specific to the exchange API endpoint
66
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
67
- */
68
- transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
69
- parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
70
- parseTransferStatus(status: Str): Str;
71
- convertDerivativesId(currency: any, type: any): any;
72
- /**
73
- * @method
74
- * @name bitfinex2#fetchOrderBook
75
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
76
- * @see https://docs.bitfinex.com/reference/rest-public-book
77
- * @param {string} symbol unified symbol of the market to fetch the order book for
78
- * @param {int} [limit] the maximum amount of order book entries to return, bitfinex only allows 1, 25, or 100
79
- * @param {object} [params] extra parameters specific to the exchange API endpoint
80
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
81
- */
82
- fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
83
- parseTicker(ticker: Dict, market?: Market): Ticker;
84
- /**
85
- * @method
86
- * @name bitfinex2#fetchTickers
87
- * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
88
- * @see https://docs.bitfinex.com/reference/rest-public-tickers
89
- * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
90
- * @param {object} [params] extra parameters specific to the exchange API endpoint
91
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
92
- */
93
- fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
94
- /**
95
- * @method
96
- * @name bitfinex2#fetchTicker
97
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
98
- * @see https://docs.bitfinex.com/reference/rest-public-ticker
99
- * @param {string} symbol unified symbol of the market to fetch the ticker for
100
- * @param {object} [params] extra parameters specific to the exchange API endpoint
101
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
102
- */
103
- fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
104
- parseTrade(trade: Dict, market?: Market): Trade;
105
- /**
106
- * @method
107
- * @name bitfinex2#fetchTrades
108
- * @description get the list of most recent trades for a particular symbol
109
- * @see https://docs.bitfinex.com/reference/rest-public-trades
110
- * @param {string} symbol unified symbol of the market to fetch trades for
111
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
112
- * @param {int} [limit] the maximum amount of trades to fetch, default 120, max 10000
113
- * @param {object} [params] extra parameters specific to the exchange API endpoint
114
- * @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)
115
- * @param {int} [params.until] the latest time in ms to fetch entries for
116
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
117
- */
118
- fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
119
- /**
120
- * @method
121
- * @name bitfinex2#fetchOHLCV
122
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
123
- * @see https://docs.bitfinex.com/reference/rest-public-candles
124
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
125
- * @param {string} timeframe the length of time each candle represents
126
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
127
- * @param {int} [limit] the maximum amount of candles to fetch, default 100 max 10000
128
- * @param {object} [params] extra parameters specific to the exchange API endpoint
129
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
130
- * @param {int} [params.until] timestamp in ms of the latest candle to fetch
131
- * @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)
132
- */
133
- fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
134
- parseOHLCV(ohlcv: any, market?: Market): OHLCV;
135
- parseOrderStatus(status: Str): string;
136
- parseOrderFlags(flags: any): any;
137
- parseTimeInForce(orderType: any): string;
138
- parseOrder(order: Dict, market?: Market): Order;
139
- createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
140
- /**
141
- * @method
142
- * @name bitfinex2#createOrder
143
- * @description create an order on the exchange
144
- * @see https://docs.bitfinex.com/reference/rest-auth-submit-order
145
- * @param {string} symbol unified CCXT market symbol
146
- * @param {string} type 'limit' or 'market'
147
- * @param {string} side 'buy' or 'sell'
148
- * @param {float} amount the amount of currency to trade
149
- * @param {float} [price] price of the order
150
- * @param {object} [params] extra parameters specific to the exchange API endpoint
151
- * @param {float} [params.stopPrice] the price that triggers a trigger order
152
- * @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
153
- * @param {boolean} [params.postOnly] set to true if you want to make a post only order
154
- * @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
155
- * @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
156
- * @param {int} [params.lev] leverage for a derivative order, supported by derivative symbol orders only. The value should be between 1 and 100 inclusive.
157
- * @param {string} [params.price_aux_limit] order price for stop limit orders
158
- * @param {string} [params.price_oco_stop] OCO stop price
159
- * @param {string} [params.trailingAmount] *swap only* the quote amount to trail away from the current market price
160
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
161
- */
162
- createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
163
- /**
164
- * @method
165
- * @name bitfinex2#createOrders
166
- * @description create a list of trade orders
167
- * @see https://docs.bitfinex.com/reference/rest-auth-order-multi
168
- * @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
169
- * @param {object} [params] extra parameters specific to the exchange API endpoint
170
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
171
- */
172
- createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
173
- /**
174
- * @method
175
- * @name bitfinex2#cancelAllOrders
176
- * @description cancel all open orders
177
- * @see https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
178
- * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
179
- * @param {object} [params] extra parameters specific to the exchange API endpoint
180
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
181
- */
182
- cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
183
- /**
184
- * @method
185
- * @name bitfinex2#cancelOrder
186
- * @description cancels an open order
187
- * @see https://docs.bitfinex.com/reference/rest-auth-cancel-order
188
- * @param {string} id order id
189
- * @param {string} symbol Not used by bitfinex2 cancelOrder ()
190
- * @param {object} [params] extra parameters specific to the exchange API endpoint
191
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
192
- */
193
- cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
194
- /**
195
- * @method
196
- * @name bitfinex2#cancelOrders
197
- * @description cancel multiple orders at the same time
198
- * @see https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
199
- * @param {string[]} ids order ids
200
- * @param {string} symbol unified market symbol, default is undefined
201
- * @param {object} [params] extra parameters specific to the exchange API endpoint
202
- * @returns {object} an array of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
203
- */
204
- cancelOrders(ids: any, symbol?: Str, params?: {}): Promise<Order[]>;
205
- /**
206
- * @method
207
- * @name bitfinex2#fetchOpenOrder
208
- * @description fetch an open order by it's id
209
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
210
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
211
- * @param {string} id order id
212
- * @param {string} symbol unified market symbol, default is undefined
213
- * @param {object} [params] extra parameters specific to the exchange API endpoint
214
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
215
- */
216
- fetchOpenOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
217
- /**
218
- * @method
219
- * @name bitfinex2#fetchClosedOrder
220
- * @description fetch an open order by it's id
221
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
222
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
223
- * @param {string} id order id
224
- * @param {string} symbol unified market symbol, default is undefined
225
- * @param {object} [params] extra parameters specific to the exchange API endpoint
226
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
227
- */
228
- fetchClosedOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
229
- /**
230
- * @method
231
- * @name bitfinex2#fetchOpenOrders
232
- * @description fetch all unfilled currently open orders
233
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
234
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
235
- * @param {string} symbol unified market symbol
236
- * @param {int} [since] the earliest time in ms to fetch open orders for
237
- * @param {int} [limit] the maximum number of open orders structures to retrieve
238
- * @param {object} [params] extra parameters specific to the exchange API endpoint
239
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
240
- */
241
- fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
242
- /**
243
- * @method
244
- * @name bitfinex2#fetchClosedOrders
245
- * @description fetches information on multiple closed orders made by the user
246
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
247
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
248
- * @param {string} symbol unified market symbol of the market orders were made in
249
- * @param {int} [since] the earliest time in ms to fetch orders for
250
- * @param {int} [limit] the maximum number of order structures to retrieve
251
- * @param {object} [params] extra parameters specific to the exchange API endpoint
252
- * @param {int} [params.until] the latest time in ms to fetch entries for
253
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
254
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
255
- */
256
- fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
257
- /**
258
- * @method
259
- * @name bitfinex2#fetchOrderTrades
260
- * @description fetch all the trades made from a single order
261
- * @see https://docs.bitfinex.com/reference/rest-auth-order-trades
262
- * @param {string} id order id
263
- * @param {string} symbol unified market symbol
264
- * @param {int} [since] the earliest time in ms to fetch trades for
265
- * @param {int} [limit] the maximum number of trades to retrieve
266
- * @param {object} [params] extra parameters specific to the exchange API endpoint
267
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
268
- */
269
- fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
270
- /**
271
- * @method
272
- * @name bitfinex2#fetchMyTrades
273
- * @description fetch all trades made by the user
274
- * @see https://docs.bitfinex.com/reference/rest-auth-trades
275
- * @see https://docs.bitfinex.com/reference/rest-auth-trades-by-symbol
276
- * @param {string} symbol unified market symbol
277
- * @param {int} [since] the earliest time in ms to fetch trades for
278
- * @param {int} [limit] the maximum number of trades structures to retrieve
279
- * @param {object} [params] extra parameters specific to the exchange API endpoint
280
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
281
- */
282
- fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
283
- /**
284
- * @method
285
- * @name bitfinex2#createDepositAddress
286
- * @description create a currency deposit address
287
- * @see https://docs.bitfinex.com/reference/rest-auth-deposit-address
288
- * @param {string} code unified currency code of the currency for the deposit address
289
- * @param {object} [params] extra parameters specific to the exchange API endpoint
290
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
291
- */
292
- createDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
293
- /**
294
- * @method
295
- * @name bitfinex2#fetchDepositAddress
296
- * @description fetch the deposit address for a currency associated with this account
297
- * @see https://docs.bitfinex.com/reference/rest-auth-deposit-address
298
- * @param {string} code unified currency code
299
- * @param {object} [params] extra parameters specific to the exchange API endpoint
300
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
301
- */
302
- fetchDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
303
- parseTransactionStatus(status: Str): string;
304
- parseTransaction(transaction: Dict, currency?: Currency): Transaction;
305
- /**
306
- * @method
307
- * @name bitfinex2#fetchTradingFees
308
- * @description fetch the trading fees for multiple markets
309
- * @see https://docs.bitfinex.com/reference/rest-auth-summary
310
- * @param {object} [params] extra parameters specific to the exchange API endpoint
311
- * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
312
- */
313
- fetchTradingFees(params?: {}): Promise<TradingFees>;
314
- /**
315
- * @method
316
- * @name bitfinex2#fetchDepositsWithdrawals
317
- * @description fetch history of deposits and withdrawals
318
- * @see https://docs.bitfinex.com/reference/movement-info
319
- * @see https://docs.bitfinex.com/reference/rest-auth-movements
320
- * @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
321
- * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
322
- * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
323
- * @param {object} [params] extra parameters specific to the exchange API endpoint
324
- * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
325
- */
326
- fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
327
- /**
328
- * @method
329
- * @name bitfinex2#withdraw
330
- * @description make a withdrawal
331
- * @see https://docs.bitfinex.com/reference/rest-auth-withdraw
332
- * @param {string} code unified currency code
333
- * @param {float} amount the amount to withdraw
334
- * @param {string} address the address to withdraw to
335
- * @param {string} tag
336
- * @param {object} [params] extra parameters specific to the exchange API endpoint
337
- * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
338
- */
339
- withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
340
- /**
341
- * @method
342
- * @name bitfinex2#fetchPositions
343
- * @description fetch all open positions
344
- * @see https://docs.bitfinex.com/reference/rest-auth-positions
345
- * @param {string[]|undefined} symbols list of unified market symbols
346
- * @param {object} [params] extra parameters specific to the exchange API endpoint
347
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
348
- */
349
- fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
350
- parsePosition(position: Dict, market?: Market): import("./base/types.js").Position;
351
- nonce(): number;
352
- sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
353
- url: string;
354
- method: string;
355
- body: any;
356
- headers: any;
357
- };
358
- handleErrors(statusCode: any, statusText: any, url: any, method: any, headers: any, body: any, response: any, requestHeaders: any, requestBody: any): any;
359
- parseLedgerEntryType(type: Str): string;
360
- parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
361
- /**
362
- * @method
363
- * @name bitfinex2#fetchLedger
364
- * @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
365
- * @see https://docs.bitfinex.com/reference/rest-auth-ledgers
366
- * @param {string} [code] unified currency code, default is undefined
367
- * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
368
- * @param {int} [limit] max number of ledger entries to return, default is undefined, max is 2500
369
- * @param {object} [params] extra parameters specific to the exchange API endpoint
370
- * @param {int} [params.until] timestamp in ms of the latest ledger entry
371
- * @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-structure}
373
- */
374
- fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
375
- /**
376
- * @method
377
- * @name bitfinex2#fetchFundingRates
378
- * @description fetch the current funding rate for multiple symbols
379
- * @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
380
- * @param {string[]} symbols list of unified market symbols
381
- * @param {object} [params] extra parameters specific to the exchange API endpoint
382
- * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
383
- */
384
- fetchFundingRates(symbols?: Strings, params?: {}): Promise<FundingRates>;
385
- /**
386
- * @method
387
- * @name bitfinex2#fetchFundingRateHistory
388
- * @description fetches historical funding rate prices
389
- * @see https://docs.bitfinex.com/reference/rest-public-derivatives-status-history
390
- * @param {string} symbol unified market symbol
391
- * @param {int} [since] timestamp in ms of the earliest funding rate entry
392
- * @param {int} [limit] max number of funding rate entrys to return
393
- * @param {object} [params] extra parameters specific to the exchange API endpoint
394
- * @param {int} [params.until] timestamp in ms of the latest funding rate
395
- * @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)
396
- * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
397
- */
398
- fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
399
- parseFundingRate(contract: any, market?: Market): FundingRate;
400
- parseFundingRateHistory(contract: any, market?: Market): {
401
- info: any;
402
- symbol: string;
403
- markPrice: number;
404
- indexPrice: number;
405
- interestRate: any;
406
- estimatedSettlePrice: any;
407
- timestamp: number;
408
- datetime: string;
409
- fundingRate: number;
410
- fundingTimestamp: any;
411
- fundingDatetime: any;
412
- nextFundingRate: number;
413
- nextFundingTimestamp: number;
414
- nextFundingDatetime: string;
415
- previousFundingRate: any;
416
- previousFundingTimestamp: any;
417
- previousFundingDatetime: any;
418
- };
419
- /**
420
- * @method
421
- * @name bitfinex2#fetchOpenInterest
422
- * @description retrieves the open interest of a contract trading pair
423
- * @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
424
- * @param {string} symbol unified CCXT market symbol
425
- * @param {object} [params] exchange specific parameters
426
- * @returns {object} an [open interest structure]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
427
- */
428
- fetchOpenInterest(symbol: string, params?: {}): Promise<OpenInterest>;
429
- /**
430
- * @method
431
- * @name bitfinex2#fetchOpenInterestHistory
432
- * @description retrieves the open interest history of a currency
433
- * @see https://docs.bitfinex.com/reference/rest-public-derivatives-status-history
434
- * @param {string} symbol unified CCXT market symbol
435
- * @param {string} timeframe the time period of each row of data, not used by bitfinex2
436
- * @param {int} [since] the time in ms of the earliest record to retrieve as a unix timestamp
437
- * @param {int} [limit] the number of records in the response
438
- * @param {object} [params] exchange specific parameters
439
- * @param {int} [params.until] the time in ms of the latest record to retrieve as a unix timestamp
440
- * @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)
441
- * @returns An array of [open interest structures]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
442
- */
443
- fetchOpenInterestHistory(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OpenInterest[]>;
444
- parseOpenInterest(interest: any, market?: Market): OpenInterest;
445
- /**
446
- * @method
447
- * @name bitfinex2#fetchLiquidations
448
- * @description retrieves the public liquidations of a trading pair
449
- * @see https://docs.bitfinex.com/reference/rest-public-liquidations
450
- * @param {string} symbol unified CCXT market symbol
451
- * @param {int} [since] the earliest time in ms to fetch liquidations for
452
- * @param {int} [limit] the maximum number of liquidation structures to retrieve
453
- * @param {object} [params] exchange specific parameters
454
- * @param {int} [params.until] timestamp in ms of the latest liquidation
455
- * @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)
456
- * @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
457
- */
458
- fetchLiquidations(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Liquidation[]>;
459
- parseLiquidation(liquidation: any, market?: Market): Liquidation;
460
- /**
461
- * @method
462
- * @name bitfinex2#setMargin
463
- * @description either adds or reduces margin in a swap position in order to set the margin to a specific value
464
- * @see https://docs.bitfinex.com/reference/rest-auth-deriv-pos-collateral-set
465
- * @param {string} symbol unified market symbol of the market to set margin in
466
- * @param {float} amount the amount to set the margin to
467
- * @param {object} [params] parameters specific to the exchange API endpoint
468
- * @returns {object} A [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#add-margin-structure}
469
- */
470
- setMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
471
- parseMarginModification(data: any, market?: any): MarginModification;
472
- /**
473
- * @method
474
- * @name bitfinex2#fetchOrder
475
- * @description fetches information on an order made by the user
476
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
477
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
478
- * @param {string} id the order id
479
- * @param {string} [symbol] unified symbol of the market the order was made in
480
- * @param {object} [params] extra parameters specific to the exchange API endpoint
481
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
482
- */
483
- fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
484
- /**
485
- * @method
486
- * @name bitfinex2#editOrder
487
- * @description edit a trade order
488
- * @see https://docs.bitfinex.com/reference/rest-auth-update-order
489
- * @param {string} id edit order id
490
- * @param {string} symbol unified symbol of the market to edit an order in
491
- * @param {string} type 'market' or 'limit'
492
- * @param {string} side 'buy' or 'sell'
493
- * @param {float} amount how much you want to trade in units of the base currency
494
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
495
- * @param {object} [params] extra parameters specific to the exchange API endpoint
496
- * @param {float} [params.stopPrice] the price that triggers a trigger order
497
- * @param {boolean} [params.postOnly] set to true if you want to make a post only order
498
- * @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
499
- * @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
500
- * @param {int} [params.leverage] leverage for a derivative order, supported by derivative symbol orders only, the value should be between 1 and 100 inclusive
501
- * @param {int} [params.clientOrderId] a unique client order id for the order
502
- * @param {float} [params.trailingAmount] *swap only* the quote amount to trail away from the current market price
503
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
504
- */
505
- editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
506
- }