ccxt 4.4.72 → 4.4.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -6
- package/dist/cjs/src/ace.js +42 -7
- package/dist/cjs/src/alpaca.js +46 -0
- package/dist/cjs/src/ascendex.js +1 -1
- package/dist/cjs/src/base/Exchange.js +6 -16
- package/dist/cjs/src/binance.js +20 -15
- package/dist/cjs/src/bit2c.js +11 -0
- package/dist/cjs/src/bitget.js +7 -5
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bybit.js +9 -0
- package/dist/cjs/src/defx.js +1 -1
- package/dist/cjs/src/derive.js +2 -0
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/js/ccxt.d.ts +2 -8
- package/js/ccxt.js +2 -6
- package/js/src/ace.js +42 -7
- package/js/src/alpaca.js +46 -0
- package/js/src/ascendex.js +1 -1
- package/js/src/base/Exchange.d.ts +1 -1
- package/js/src/base/Exchange.js +6 -16
- package/js/src/binance.js +20 -15
- package/js/src/bit2c.js +11 -0
- package/js/src/bitget.js +7 -5
- package/js/src/bitrue.js +1 -1
- package/js/src/bybit.d.ts +4 -20
- package/js/src/bybit.js +9 -0
- package/js/src/defx.js +1 -1
- package/js/src/derive.js +2 -0
- package/js/src/pro/bitget.d.ts +1 -1
- package/js/src/pro/bitget.js +1 -1
- package/package.json +1 -1
- package/js/src/bitfinex1.d.ts +0 -297
- package/js/src/bitfinex1.js +0 -1770
- package/js/src/pro/bitfinex1.d.ts +0 -67
- package/js/src/pro/bitfinex1.js +0 -676
- package/js/src/pro/bitfinex2.d.ts +0 -99
- package/js/src/pro/bitfinex2.js +0 -1165
package/package.json
CHANGED
package/js/src/bitfinex1.d.ts
DELETED
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
import Exchange from './abstract/bitfinex1.js';
|
|
2
|
-
import type { TransferEntry, Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, Num, TradingFees, Dict, int, DepositAddress } from './base/types.js';
|
|
3
|
-
/**
|
|
4
|
-
* @class bitfinex1
|
|
5
|
-
* @augments Exchange
|
|
6
|
-
*/
|
|
7
|
-
export default class bitfinex1 extends Exchange {
|
|
8
|
-
describe(): any;
|
|
9
|
-
/**
|
|
10
|
-
* @method
|
|
11
|
-
* @name bitfinex1#fetchTransactionFees
|
|
12
|
-
* @deprecated
|
|
13
|
-
* @description please use fetchDepositWithdrawFees instead
|
|
14
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-fees
|
|
15
|
-
* @param {string[]|undefined} codes list of unified currency codes
|
|
16
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
17
|
-
* @returns {object[]} a list of [fees structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
18
|
-
*/
|
|
19
|
-
fetchTransactionFees(codes?: Strings, params?: {}): Promise<Dict>;
|
|
20
|
-
/**
|
|
21
|
-
* @method
|
|
22
|
-
* @name bitfinex1#fetchDepositWithdrawFees
|
|
23
|
-
* @description fetch deposit and withdraw fees
|
|
24
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-fees
|
|
25
|
-
* @param {string[]|undefined} codes list of unified currency codes
|
|
26
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
27
|
-
* @returns {object[]} a list of [fees structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
28
|
-
*/
|
|
29
|
-
fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<any>;
|
|
30
|
-
parseDepositWithdrawFee(fee: any, currency?: Currency): {
|
|
31
|
-
withdraw: {
|
|
32
|
-
fee: number;
|
|
33
|
-
percentage: any;
|
|
34
|
-
};
|
|
35
|
-
deposit: {
|
|
36
|
-
fee: any;
|
|
37
|
-
percentage: any;
|
|
38
|
-
};
|
|
39
|
-
networks: {};
|
|
40
|
-
info: any;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* @method
|
|
44
|
-
* @name bitfinex1#fetchTradingFees
|
|
45
|
-
* @description fetch the trading fees for multiple markets
|
|
46
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-summary
|
|
47
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
48
|
-
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
49
|
-
*/
|
|
50
|
-
fetchTradingFees(params?: {}): Promise<TradingFees>;
|
|
51
|
-
/**
|
|
52
|
-
* @method
|
|
53
|
-
* @name bitfinex1#fetchMarkets
|
|
54
|
-
* @description retrieves data on all markets for bitfinex
|
|
55
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-public-symbols
|
|
56
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-public-symbol-details
|
|
57
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
58
|
-
* @returns {object[]} an array of objects representing market data
|
|
59
|
-
*/
|
|
60
|
-
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
61
|
-
amountToPrecision(symbol: any, amount: any): string;
|
|
62
|
-
priceToPrecision(symbol: any, price: any): string;
|
|
63
|
-
/**
|
|
64
|
-
* @method
|
|
65
|
-
* @name bitfinex1#fetchBalance
|
|
66
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
67
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-wallet-balances
|
|
68
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
69
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
70
|
-
*/
|
|
71
|
-
fetchBalance(params?: {}): Promise<Balances>;
|
|
72
|
-
/**
|
|
73
|
-
* @method
|
|
74
|
-
* @name bitfinex1#transfer
|
|
75
|
-
* @description transfer currency internally between wallets on the same account
|
|
76
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-transfer-between-wallets
|
|
77
|
-
* @param {string} code unified currency code
|
|
78
|
-
* @param {float} amount amount to transfer
|
|
79
|
-
* @param {string} fromAccount account to transfer from
|
|
80
|
-
* @param {string} toAccount account to transfer to
|
|
81
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
82
|
-
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
83
|
-
*/
|
|
84
|
-
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
85
|
-
parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
|
|
86
|
-
parseTransferStatus(status: Str): Str;
|
|
87
|
-
convertDerivativesId(currencyId: any, type: any): any;
|
|
88
|
-
/**
|
|
89
|
-
* @method
|
|
90
|
-
* @name bitfinex1#fetchOrderBook
|
|
91
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
92
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-public-orderbook
|
|
93
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
94
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
95
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
96
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
97
|
-
*/
|
|
98
|
-
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
99
|
-
/**
|
|
100
|
-
* @method
|
|
101
|
-
* @name bitfinex1#fetchTickers
|
|
102
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
103
|
-
* @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
104
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
105
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
106
|
-
*/
|
|
107
|
-
fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
108
|
-
/**
|
|
109
|
-
* @method
|
|
110
|
-
* @name bitfinex1#fetchTicker
|
|
111
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
112
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-public-ticker
|
|
113
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
114
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
115
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
116
|
-
*/
|
|
117
|
-
fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
118
|
-
parseTicker(ticker: Dict, market?: Market): Ticker;
|
|
119
|
-
parseTrade(trade: Dict, market?: Market): Trade;
|
|
120
|
-
/**
|
|
121
|
-
* @method
|
|
122
|
-
* @name bitfinex1#fetchTrades
|
|
123
|
-
* @description get the list of most recent trades for a particular symbol
|
|
124
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-public-trades
|
|
125
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
126
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
127
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
128
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
129
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
130
|
-
*/
|
|
131
|
-
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
132
|
-
/**
|
|
133
|
-
* @method
|
|
134
|
-
* @name bitfinex1#fetchMyTrades
|
|
135
|
-
* @description fetch all trades made by the user
|
|
136
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-past-trades
|
|
137
|
-
* @param {string} symbol unified market symbol
|
|
138
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
139
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
140
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
141
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
142
|
-
*/
|
|
143
|
-
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
144
|
-
/**
|
|
145
|
-
* @method
|
|
146
|
-
* @name bitfinex1#createOrder
|
|
147
|
-
* @description create a trade order
|
|
148
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-new-order
|
|
149
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
150
|
-
* @param {string} type 'market' or 'limit'
|
|
151
|
-
* @param {string} side 'buy' or 'sell'
|
|
152
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
153
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
154
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
155
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
156
|
-
*/
|
|
157
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
158
|
-
editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
|
|
159
|
-
/**
|
|
160
|
-
* @method
|
|
161
|
-
* @name bitfinex1#cancelOrder
|
|
162
|
-
* @description cancels an open order
|
|
163
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-cancel-order
|
|
164
|
-
* @param {string} id order id
|
|
165
|
-
* @param {string} symbol not used by bitfinex cancelOrder ()
|
|
166
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
167
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
168
|
-
*/
|
|
169
|
-
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
170
|
-
/**
|
|
171
|
-
* @method
|
|
172
|
-
* @name bitfinex1#cancelAllOrders
|
|
173
|
-
* @description cancel all open orders
|
|
174
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-cancel-all-orders
|
|
175
|
-
* @param {string} symbol not used by bitfinex cancelAllOrders
|
|
176
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
177
|
-
* @returns {object} response from exchange
|
|
178
|
-
*/
|
|
179
|
-
cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
|
|
180
|
-
parseOrder(order: Dict, market?: Market): Order;
|
|
181
|
-
/**
|
|
182
|
-
* @method
|
|
183
|
-
* @name bitfinex1#fetchOpenOrders
|
|
184
|
-
* @description fetch all unfilled currently open orders
|
|
185
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-active-orders
|
|
186
|
-
* @param {string} symbol unified market symbol
|
|
187
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
188
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
189
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
190
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
191
|
-
*/
|
|
192
|
-
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
193
|
-
/**
|
|
194
|
-
* @method
|
|
195
|
-
* @name bitfinex1#fetchClosedOrders
|
|
196
|
-
* @description fetches information on multiple closed orders made by the user
|
|
197
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-orders-history
|
|
198
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
199
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
200
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
201
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
202
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
203
|
-
*/
|
|
204
|
-
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
205
|
-
/**
|
|
206
|
-
* @method
|
|
207
|
-
* @name bitfinex1#fetchOrder
|
|
208
|
-
* @description fetches information on an order made by the user
|
|
209
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-order-status
|
|
210
|
-
* @param {string} id the order id
|
|
211
|
-
* @param {string} symbol not used by bitfinex fetchOrder
|
|
212
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
213
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
214
|
-
*/
|
|
215
|
-
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
216
|
-
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
217
|
-
/**
|
|
218
|
-
* @method
|
|
219
|
-
* @name bitfinex1#fetchOHLCV
|
|
220
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
221
|
-
* @see https://docs.bitfinex.com/reference/rest-public-candles#aggregate-funding-currency-candles
|
|
222
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
223
|
-
* @param {string} timeframe the length of time each candle represents
|
|
224
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
225
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
226
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
227
|
-
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
228
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
229
|
-
*/
|
|
230
|
-
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
231
|
-
getCurrencyName(code: any): any;
|
|
232
|
-
/**
|
|
233
|
-
* @method
|
|
234
|
-
* @name bitfinex1#createDepositAddress
|
|
235
|
-
* @description create a currency deposit address
|
|
236
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-deposit
|
|
237
|
-
* @param {string} code unified currency code of the currency for the deposit address
|
|
238
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
239
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
240
|
-
*/
|
|
241
|
-
createDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
|
|
242
|
-
/**
|
|
243
|
-
* @method
|
|
244
|
-
* @name bitfinex1#fetchDepositAddress
|
|
245
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
246
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-deposit
|
|
247
|
-
* @param {string} code unified currency code
|
|
248
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
249
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
250
|
-
*/
|
|
251
|
-
fetchDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
|
|
252
|
-
/**
|
|
253
|
-
* @method
|
|
254
|
-
* @name bitfinex1#fetchDepositsWithdrawals
|
|
255
|
-
* @description fetch history of deposits and withdrawals
|
|
256
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-deposit-withdrawal-history
|
|
257
|
-
* @param {string} code unified currency code for the currency of the deposit/withdrawals
|
|
258
|
-
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
259
|
-
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
260
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
261
|
-
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
262
|
-
*/
|
|
263
|
-
fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
264
|
-
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
|
265
|
-
parseTransactionStatus(status: Str): string;
|
|
266
|
-
/**
|
|
267
|
-
* @method
|
|
268
|
-
* @name bitfinex1#withdraw
|
|
269
|
-
* @description make a withdrawal
|
|
270
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-withdrawal
|
|
271
|
-
* @param {string} code unified currency code
|
|
272
|
-
* @param {float} amount the amount to withdraw
|
|
273
|
-
* @param {string} address the address to withdraw to
|
|
274
|
-
* @param {string} tag
|
|
275
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
276
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
277
|
-
*/
|
|
278
|
-
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
279
|
-
/**
|
|
280
|
-
* @method
|
|
281
|
-
* @name bitfinex1#fetchPositions
|
|
282
|
-
* @description fetch all open positions
|
|
283
|
-
* @see https://docs.bitfinex.com/v1/reference/rest-auth-active-positions
|
|
284
|
-
* @param {string[]|undefined} symbols list of unified market symbols
|
|
285
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
286
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
287
|
-
*/
|
|
288
|
-
fetchPositions(symbols?: Strings, params?: {}): Promise<any>;
|
|
289
|
-
nonce(): number;
|
|
290
|
-
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
291
|
-
url: string;
|
|
292
|
-
method: string;
|
|
293
|
-
body: any;
|
|
294
|
-
headers: any;
|
|
295
|
-
};
|
|
296
|
-
handleErrors(code: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
|
|
297
|
-
}
|