ccxt-ir 4.9.13 → 4.9.14

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 (82) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.min.js +2 -2
  3. package/dist/cjs/ccxt.js +229 -229
  4. package/dist/cjs/package.json +1 -1
  5. package/dist/cjs/src/abantether.js +344 -344
  6. package/dist/cjs/src/abstract/bitbarg.js +1 -1
  7. package/dist/cjs/src/abstract/bydfi.js +1 -1
  8. package/dist/cjs/src/abstract/cafearz.js +1 -1
  9. package/dist/cjs/src/abstract/hamtapay.js +1 -1
  10. package/dist/cjs/src/abstract/kifpoolme.js +1 -1
  11. package/dist/cjs/src/abstract/mazdax.js +1 -1
  12. package/dist/cjs/src/abstract/pingi.js +1 -1
  13. package/dist/cjs/src/abstract/pooleno.js +1 -1
  14. package/dist/cjs/src/afratether.js +347 -347
  15. package/dist/cjs/src/arzplus.js +572 -572
  16. package/dist/cjs/src/bitbarg.js +303 -303
  17. package/dist/cjs/src/bydfi.js +425 -425
  18. package/dist/cjs/src/cafearz.js +337 -337
  19. package/dist/cjs/src/hamtapay.js +291 -291
  20. package/dist/cjs/src/kifpoolme.js +401 -401
  21. package/dist/cjs/src/mazdax.js +525 -526
  22. package/dist/cjs/src/pingi.js +437 -438
  23. package/dist/cjs/src/pooleno.js +338 -338
  24. package/dist/cjs/src/tetherland.js +358 -358
  25. package/dist/cjs/src/twox.js +362 -362
  26. package/js/ccxt.d.ts +673 -673
  27. package/js/ccxt.js +491 -491
  28. package/js/src/abantether.js +347 -347
  29. package/js/src/abstract/abantether.d.ts +8 -8
  30. package/js/src/abstract/arzplus.d.ts +11 -11
  31. package/js/src/abstract/bitbarg.d.ts +8 -8
  32. package/js/src/abstract/bitbarg.js +5 -5
  33. package/js/src/abstract/bydfi.d.ts +11 -11
  34. package/js/src/abstract/bydfi.js +5 -5
  35. package/js/src/abstract/cafearz.d.ts +8 -8
  36. package/js/src/abstract/cafearz.js +5 -5
  37. package/js/src/abstract/hamtapay.d.ts +9 -9
  38. package/js/src/abstract/hamtapay.js +5 -5
  39. package/js/src/abstract/kifpoolme.d.ts +9 -9
  40. package/js/src/abstract/kifpoolme.js +5 -5
  41. package/js/src/abstract/mazdax.d.ts +11 -11
  42. package/js/src/abstract/mazdax.js +5 -5
  43. package/js/src/abstract/pingi.d.ts +9 -9
  44. package/js/src/abstract/pingi.js +5 -5
  45. package/js/src/abstract/pooleno.d.ts +8 -8
  46. package/js/src/abstract/pooleno.js +5 -5
  47. package/js/src/afratether.js +350 -350
  48. package/js/src/arzplus.d.ts +26 -26
  49. package/js/src/arzplus.js +575 -575
  50. package/js/src/base/Exchange.d.ts +926 -926
  51. package/js/src/base/types.d.ts +586 -586
  52. package/js/src/bitbarg.d.ts +21 -21
  53. package/js/src/bitbarg.js +306 -306
  54. package/js/src/bydfi.d.ts +23 -23
  55. package/js/src/bydfi.js +428 -428
  56. package/js/src/cafearz.d.ts +21 -21
  57. package/js/src/cafearz.js +340 -340
  58. package/js/src/coinbaseexchange.d.ts +334 -334
  59. package/js/src/hamtapay.d.ts +21 -21
  60. package/js/src/hamtapay.js +294 -294
  61. package/js/src/kifpoolme.d.ts +23 -23
  62. package/js/src/kifpoolme.js +404 -404
  63. package/js/src/mazdax.d.ts +23 -23
  64. package/js/src/mazdax.js +528 -529
  65. package/js/src/pingi.d.ts +22 -22
  66. package/js/src/pingi.js +440 -441
  67. package/js/src/pooleno.d.ts +21 -21
  68. package/js/src/pooleno.js +341 -341
  69. package/js/src/protobuf/mexc/compiled.d.cts +2 -2
  70. package/js/src/static_dependencies/fflake/browser.d.ts +222 -222
  71. package/js/src/static_dependencies/jsencrypt/lib/asn1js/asn1.d.ts +51 -51
  72. package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +101 -101
  73. package/js/src/static_dependencies/noble-curves/abstract/weierstrass.d.ts +204 -204
  74. package/js/src/static_dependencies/qs/formats.d.cts +8 -8
  75. package/js/src/static_dependencies/qs/index.d.cts +4 -4
  76. package/js/src/static_dependencies/qs/parse.d.cts +2 -2
  77. package/js/src/static_dependencies/qs/stringify.d.cts +2 -2
  78. package/js/src/static_dependencies/qs/utils.d.cts +9 -9
  79. package/js/src/static_dependencies/starknet/utils/calldata/parser/index.d.ts +5 -5
  80. package/js/src/tetherland.js +361 -361
  81. package/js/src/twox.js +365 -365
  82. package/package.json +1 -1
@@ -1,334 +1,334 @@
1
- import Exchange from './abstract/coinbaseexchange.js';
2
- import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Strings, Market, Currency, Num, Account, Currencies, TradingFees, Dict, int, LedgerEntry, DepositAddress } from './base/types.js';
3
- /**
4
- * @class coinbaseexchange
5
- * @augments Exchange
6
- */
7
- export default class coinbaseexchange extends Exchange {
8
- describe(): any;
9
- /**
10
- * @method
11
- * @name coinbaseexchange#fetchCurrencies
12
- * @description fetches all available currencies on an exchange
13
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getcurrencies
14
- * @param {object} [params] extra parameters specific to the exchange API endpoint
15
- * @returns {object} an associative dictionary of currencies
16
- */
17
- fetchCurrencies(params?: {}): Promise<Currencies>;
18
- /**
19
- * @method
20
- * @name coinbaseexchange#fetchMarkets
21
- * @description retrieves data on all markets for coinbaseexchange
22
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproducts
23
- * @param {object} [params] extra parameters specific to the exchange API endpoint
24
- * @returns {object[]} an array of objects representing market data
25
- */
26
- fetchMarkets(params?: {}): Promise<Market[]>;
27
- /**
28
- * @method
29
- * @name coinbaseexchange#fetchAccounts
30
- * @description fetch all the accounts associated with a profile
31
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounts
32
- * @param {object} [params] extra parameters specific to the exchange API endpoint
33
- * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
34
- */
35
- fetchAccounts(params?: {}): Promise<Account[]>;
36
- parseAccount(account: any): {
37
- id: string;
38
- type: any;
39
- code: string;
40
- info: any;
41
- };
42
- parseBalance(response: any): Balances;
43
- /**
44
- * @method
45
- * @name coinbaseexchange#fetchBalance
46
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
47
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounts
48
- * @param {object} [params] extra parameters specific to the exchange API endpoint
49
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
50
- */
51
- fetchBalance(params?: {}): Promise<Balances>;
52
- /**
53
- * @method
54
- * @name coinbaseexchange#fetchOrderBook
55
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproductbook
56
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
57
- * @param {string} symbol unified symbol of the market to fetch the order book for
58
- * @param {int} [limit] the maximum amount of order book entries to return
59
- * @param {object} [params] extra parameters specific to the exchange API endpoint
60
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
61
- */
62
- fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
63
- parseTicker(ticker: Dict, market?: Market): Ticker;
64
- /**
65
- * @method
66
- * @name coinbaseexchange#fetchTickers
67
- * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
68
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproduct
69
- * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
70
- * @param {object} [params] extra parameters specific to the exchange API endpoint
71
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
72
- */
73
- fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
74
- /**
75
- * @method
76
- * @name coinbaseexchange#fetchTicker
77
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproductticker
78
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
79
- * @param {string} symbol unified symbol of the market to fetch the ticker for
80
- * @param {object} [params] extra parameters specific to the exchange API endpoint
81
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
82
- */
83
- fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
84
- parseTrade(trade: Dict, market?: Market): Trade;
85
- /**
86
- * @method
87
- * @name coinbaseexchange#fetchMyTrades
88
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getfills
89
- * @description fetch all trades made by the user
90
- * @param {string} symbol unified market symbol
91
- * @param {int} [since] the earliest time in ms to fetch trades for
92
- * @param {int} [limit] the maximum number of trades structures to retrieve
93
- * @param {object} [params] extra parameters specific to the exchange API endpoint
94
- * @param {int} [params.until] the latest time in ms to fetch trades for
95
- * @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)
96
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
97
- */
98
- fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
99
- /**
100
- * @method
101
- * @name coinbaseexchange#fetchTrades
102
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproducttrades
103
- * @description get the list of most recent trades for a particular symbol
104
- * @param {string} symbol unified symbol of the market to fetch trades for
105
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
106
- * @param {int} [limit] the maximum amount of trades to fetch
107
- * @param {object} [params] extra parameters specific to the exchange API endpoint
108
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
109
- */
110
- fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
111
- /**
112
- * @method
113
- * @name coinbaseexchange#fetchTradingFees
114
- * @description fetch the trading fees for multiple markets
115
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getfees
116
- * @param {object} [params] extra parameters specific to the exchange API endpoint
117
- * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
118
- */
119
- fetchTradingFees(params?: {}): Promise<TradingFees>;
120
- parseOHLCV(ohlcv: any, market?: Market): OHLCV;
121
- /**
122
- * @method
123
- * @name coinbaseexchange#fetchOHLCV
124
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproductcandles
125
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
126
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
127
- * @param {string} timeframe the length of time each candle represents
128
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
129
- * @param {int} [limit] the maximum amount of candles to fetch
130
- * @param {object} [params] extra parameters specific to the exchange API endpoint
131
- * @param {int} [params.until] the latest time in ms to fetch trades for
132
- * @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)
133
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
134
- */
135
- fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
136
- /**
137
- * @method
138
- * @name coinbaseexchange#fetchTime
139
- * @description fetches the current integer timestamp in milliseconds from the exchange server
140
- * @param {object} [params] extra parameters specific to the exchange API endpoint
141
- * @returns {int} the current integer timestamp in milliseconds from the exchange server
142
- */
143
- fetchTime(params?: {}): Promise<Int>;
144
- parseOrderStatus(status: Str): string;
145
- parseOrder(order: Dict, market?: Market): Order;
146
- /**
147
- * @method
148
- * @name coinbaseexchange#fetchOrder
149
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorder
150
- * @description fetches information on an order made by the user
151
- * @param {string} id the order id
152
- * @param {string} symbol not used by coinbaseexchange fetchOrder
153
- * @param {object} [params] extra parameters specific to the exchange API endpoint
154
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
155
- */
156
- fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
157
- /**
158
- * @method
159
- * @name coinbaseexchange#fetchOrderTrades
160
- * @description fetch all the trades made from a single order
161
- * @param {string} id order id
162
- * @param {string} symbol unified market symbol
163
- * @param {int} [since] the earliest time in ms to fetch trades for
164
- * @param {int} [limit] the maximum number of trades to retrieve
165
- * @param {object} [params] extra parameters specific to the exchange API endpoint
166
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
167
- */
168
- fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
169
- /**
170
- * @method
171
- * @name coinbaseexchange#fetchOrders
172
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorders
173
- * @description fetches information on multiple orders made by the user
174
- * @param {string} symbol unified market symbol of the market orders were made in
175
- * @param {int} [since] the earliest time in ms to fetch orders for
176
- * @param {int} [limit] the maximum number of order structures to retrieve
177
- * @param {object} [params] extra parameters specific to the exchange API endpoint
178
- * @param {int} [params.until] the latest time in ms to fetch open orders for
179
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
180
- */
181
- fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
182
- /**
183
- * @method
184
- * @name coinbaseexchange#fetchOpenOrders
185
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorders
186
- * @description fetch all unfilled currently open orders
187
- * @param {string} symbol unified market symbol
188
- * @param {int} [since] the earliest time in ms to fetch open orders for
189
- * @param {int} [limit] the maximum number of open orders structures to retrieve
190
- * @param {object} [params] extra parameters specific to the exchange API endpoint
191
- * @param {int} [params.until] the latest time in ms to fetch open orders for
192
- * @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)
193
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
194
- */
195
- fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
196
- /**
197
- * @method
198
- * @name coinbaseexchange#fetchClosedOrders
199
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorders
200
- * @description fetches information on multiple closed orders made by the user
201
- * @param {string} symbol unified market symbol of the market orders were made in
202
- * @param {int} [since] the earliest time in ms to fetch orders for
203
- * @param {int} [limit] the maximum number of order structures to retrieve
204
- * @param {object} [params] extra parameters specific to the exchange API endpoint
205
- * @param {int} [params.until] the latest time in ms to fetch open orders for
206
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
207
- */
208
- fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
209
- /**
210
- * @method
211
- * @name coinbaseexchange#createOrder
212
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postorders
213
- * @description create a trade order
214
- * @param {string} symbol unified symbol of the market to create an order in
215
- * @param {string} type 'market' or 'limit'
216
- * @param {string} side 'buy' or 'sell'
217
- * @param {float} amount how much of currency you want to trade in units of base currency
218
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
219
- * @param {object} [params] extra parameters specific to the exchange API endpoint
220
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
221
- */
222
- createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
223
- /**
224
- * @method
225
- * @name coinbaseexchange#cancelOrder
226
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_deleteorder
227
- * @description cancels an open order
228
- * @param {string} id order id
229
- * @param {string} symbol unified symbol of the market the order was made in
230
- * @param {object} [params] extra parameters specific to the exchange API endpoint
231
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
232
- */
233
- cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
234
- /**
235
- * @method
236
- * @name coinbaseexchange#cancelAllOrders
237
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_deleteorders
238
- * @description cancel all open orders
239
- * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
240
- * @param {object} [params] extra parameters specific to the exchange API endpoint
241
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
242
- */
243
- cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
244
- fetchPaymentMethods(params?: {}): Promise<any>;
245
- /**
246
- * @method
247
- * @name coinbaseexchange#withdraw
248
- * @description make a withdrawal
249
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawpaymentmethod
250
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawcoinbaseaccount
251
- * @param {string} code unified currency code
252
- * @param {float} amount the amount to withdraw
253
- * @param {string} address the address to withdraw to
254
- * @param {string} tag
255
- * @param {object} [params] extra parameters specific to the exchange API endpoint
256
- * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
257
- */
258
- withdraw(code: string, amount: number, address: string, tag?: Str, params?: {}): Promise<Transaction>;
259
- parseLedgerEntryType(type: any): string;
260
- parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
261
- /**
262
- * @method
263
- * @name coinbaseexchange#fetchLedger
264
- * @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
265
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccountledger
266
- * @param {string} code unified currency code, default is undefined
267
- * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
268
- * @param {int} [limit] max number of ledger entries to return, default is undefined
269
- * @param {object} [params] extra parameters specific to the exchange API endpoint
270
- * @param {int} [params.until] the latest time in ms to fetch trades for
271
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
272
- */
273
- fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
274
- /**
275
- * @method
276
- * @name coinbaseexchange#fetchDepositsWithdrawals
277
- * @description fetch history of deposits and withdrawals
278
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_gettransfers
279
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounttransfers
280
- * @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
281
- * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
282
- * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
283
- * @param {object} [params] extra parameters specific to the exchange API endpoint
284
- * @param {string} [params.id] account id, when defined, the endpoint used is '/accounts/{account_id}/transfers/' instead of '/transfers/'
285
- * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
286
- */
287
- fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
288
- /**
289
- * @method
290
- * @name coinbaseexchange#fetchDeposits
291
- * @description fetch all deposits made to an account
292
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_gettransfers
293
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounttransfers
294
- * @param {string} code unified currency code
295
- * @param {int} [since] the earliest time in ms to fetch deposits for
296
- * @param {int} [limit] the maximum number of deposits structures to retrieve
297
- * @param {object} [params] extra parameters specific to the exchange API endpoint
298
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
299
- */
300
- fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
301
- /**
302
- * @method
303
- * @name coinbaseexchange#fetchWithdrawals
304
- * @description fetch all withdrawals made from an account
305
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_gettransfers
306
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounttransfers
307
- * @param {string} code unified currency code
308
- * @param {int} [since] the earliest time in ms to fetch withdrawals for
309
- * @param {int} [limit] the maximum number of withdrawals structures to retrieve
310
- * @param {object} [params] extra parameters specific to the exchange API endpoint
311
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
312
- */
313
- fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
314
- parseTransactionStatus(transaction: any): "pending" | "ok" | "failed" | "canceled";
315
- parseTransaction(transaction: Dict, currency?: Currency): Transaction;
316
- /**
317
- * @method
318
- * @name coinbaseexchange#createDepositAddress
319
- * @description create a currency deposit address
320
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postcoinbaseaccountaddresses
321
- * @param {string} code unified currency code of the currency for the deposit address
322
- * @param {object} [params] extra parameters specific to the exchange API endpoint
323
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
324
- */
325
- createDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
326
- sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
327
- url: string;
328
- method: string;
329
- body: any;
330
- headers: any;
331
- };
332
- handleErrors(code: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
333
- request(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any, config?: {}): Promise<any>;
334
- }
1
+ import Exchange from './abstract/coinbaseexchange.js';
2
+ import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Strings, Market, Currency, Num, Account, Currencies, TradingFees, Dict, int, LedgerEntry, DepositAddress } from './base/types.js';
3
+ /**
4
+ * @class coinbaseexchange
5
+ * @augments Exchange
6
+ */
7
+ export default class coinbaseexchange extends Exchange {
8
+ describe(): any;
9
+ /**
10
+ * @method
11
+ * @name coinbaseexchange#fetchCurrencies
12
+ * @description fetches all available currencies on an exchange
13
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getcurrencies
14
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
15
+ * @returns {object} an associative dictionary of currencies
16
+ */
17
+ fetchCurrencies(params?: {}): Promise<Currencies>;
18
+ /**
19
+ * @method
20
+ * @name coinbaseexchange#fetchMarkets
21
+ * @description retrieves data on all markets for coinbaseexchange
22
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproducts
23
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
24
+ * @returns {object[]} an array of objects representing market data
25
+ */
26
+ fetchMarkets(params?: {}): Promise<Market[]>;
27
+ /**
28
+ * @method
29
+ * @name coinbaseexchange#fetchAccounts
30
+ * @description fetch all the accounts associated with a profile
31
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounts
32
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
33
+ * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
34
+ */
35
+ fetchAccounts(params?: {}): Promise<Account[]>;
36
+ parseAccount(account: any): {
37
+ id: string;
38
+ type: any;
39
+ code: string;
40
+ info: any;
41
+ };
42
+ parseBalance(response: any): Balances;
43
+ /**
44
+ * @method
45
+ * @name coinbaseexchange#fetchBalance
46
+ * @description query for balance and get the amount of funds available for trading or funds locked in orders
47
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounts
48
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
49
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
50
+ */
51
+ fetchBalance(params?: {}): Promise<Balances>;
52
+ /**
53
+ * @method
54
+ * @name coinbaseexchange#fetchOrderBook
55
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproductbook
56
+ * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
57
+ * @param {string} symbol unified symbol of the market to fetch the order book for
58
+ * @param {int} [limit] the maximum amount of order book entries to return
59
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
60
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
61
+ */
62
+ fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
63
+ parseTicker(ticker: Dict, market?: Market): Ticker;
64
+ /**
65
+ * @method
66
+ * @name coinbaseexchange#fetchTickers
67
+ * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
68
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproduct
69
+ * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
70
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
71
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
72
+ */
73
+ fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
74
+ /**
75
+ * @method
76
+ * @name coinbaseexchange#fetchTicker
77
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproductticker
78
+ * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
79
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
80
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
81
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
82
+ */
83
+ fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
84
+ parseTrade(trade: Dict, market?: Market): Trade;
85
+ /**
86
+ * @method
87
+ * @name coinbaseexchange#fetchMyTrades
88
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getfills
89
+ * @description fetch all trades made by the user
90
+ * @param {string} symbol unified market symbol
91
+ * @param {int} [since] the earliest time in ms to fetch trades for
92
+ * @param {int} [limit] the maximum number of trades structures to retrieve
93
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
94
+ * @param {int} [params.until] the latest time in ms to fetch trades for
95
+ * @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)
96
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
97
+ */
98
+ fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
99
+ /**
100
+ * @method
101
+ * @name coinbaseexchange#fetchTrades
102
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproducttrades
103
+ * @description get the list of most recent trades for a particular symbol
104
+ * @param {string} symbol unified symbol of the market to fetch trades for
105
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
106
+ * @param {int} [limit] the maximum amount of trades to fetch
107
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
108
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
109
+ */
110
+ fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
111
+ /**
112
+ * @method
113
+ * @name coinbaseexchange#fetchTradingFees
114
+ * @description fetch the trading fees for multiple markets
115
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getfees
116
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
117
+ * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
118
+ */
119
+ fetchTradingFees(params?: {}): Promise<TradingFees>;
120
+ parseOHLCV(ohlcv: any, market?: Market): OHLCV;
121
+ /**
122
+ * @method
123
+ * @name coinbaseexchange#fetchOHLCV
124
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproductcandles
125
+ * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
126
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
127
+ * @param {string} timeframe the length of time each candle represents
128
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
129
+ * @param {int} [limit] the maximum amount of candles to fetch
130
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
131
+ * @param {int} [params.until] the latest time in ms to fetch trades for
132
+ * @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)
133
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
134
+ */
135
+ fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
136
+ /**
137
+ * @method
138
+ * @name coinbaseexchange#fetchTime
139
+ * @description fetches the current integer timestamp in milliseconds from the exchange server
140
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
141
+ * @returns {int} the current integer timestamp in milliseconds from the exchange server
142
+ */
143
+ fetchTime(params?: {}): Promise<Int>;
144
+ parseOrderStatus(status: Str): string;
145
+ parseOrder(order: Dict, market?: Market): Order;
146
+ /**
147
+ * @method
148
+ * @name coinbaseexchange#fetchOrder
149
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorder
150
+ * @description fetches information on an order made by the user
151
+ * @param {string} id the order id
152
+ * @param {string} symbol not used by coinbaseexchange fetchOrder
153
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
154
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
155
+ */
156
+ fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
157
+ /**
158
+ * @method
159
+ * @name coinbaseexchange#fetchOrderTrades
160
+ * @description fetch all the trades made from a single order
161
+ * @param {string} id order id
162
+ * @param {string} symbol unified market symbol
163
+ * @param {int} [since] the earliest time in ms to fetch trades for
164
+ * @param {int} [limit] the maximum number of trades to retrieve
165
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
166
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
167
+ */
168
+ fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
169
+ /**
170
+ * @method
171
+ * @name coinbaseexchange#fetchOrders
172
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorders
173
+ * @description fetches information on multiple orders made by the user
174
+ * @param {string} symbol unified market symbol of the market orders were made in
175
+ * @param {int} [since] the earliest time in ms to fetch orders for
176
+ * @param {int} [limit] the maximum number of order structures to retrieve
177
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
178
+ * @param {int} [params.until] the latest time in ms to fetch open orders for
179
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
180
+ */
181
+ fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
182
+ /**
183
+ * @method
184
+ * @name coinbaseexchange#fetchOpenOrders
185
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorders
186
+ * @description fetch all unfilled currently open orders
187
+ * @param {string} symbol unified market symbol
188
+ * @param {int} [since] the earliest time in ms to fetch open orders for
189
+ * @param {int} [limit] the maximum number of open orders structures to retrieve
190
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
191
+ * @param {int} [params.until] the latest time in ms to fetch open orders for
192
+ * @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)
193
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
194
+ */
195
+ fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
196
+ /**
197
+ * @method
198
+ * @name coinbaseexchange#fetchClosedOrders
199
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorders
200
+ * @description fetches information on multiple closed orders made by the user
201
+ * @param {string} symbol unified market symbol of the market orders were made in
202
+ * @param {int} [since] the earliest time in ms to fetch orders for
203
+ * @param {int} [limit] the maximum number of order structures to retrieve
204
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
205
+ * @param {int} [params.until] the latest time in ms to fetch open orders for
206
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
207
+ */
208
+ fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
209
+ /**
210
+ * @method
211
+ * @name coinbaseexchange#createOrder
212
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postorders
213
+ * @description create a trade order
214
+ * @param {string} symbol unified symbol of the market to create an order in
215
+ * @param {string} type 'market' or 'limit'
216
+ * @param {string} side 'buy' or 'sell'
217
+ * @param {float} amount how much of currency you want to trade in units of base currency
218
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
219
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
220
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
221
+ */
222
+ createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
223
+ /**
224
+ * @method
225
+ * @name coinbaseexchange#cancelOrder
226
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_deleteorder
227
+ * @description cancels an open order
228
+ * @param {string} id order id
229
+ * @param {string} symbol unified symbol of the market the order was made in
230
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
231
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
232
+ */
233
+ cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
234
+ /**
235
+ * @method
236
+ * @name coinbaseexchange#cancelAllOrders
237
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_deleteorders
238
+ * @description cancel all open orders
239
+ * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
240
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
241
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
242
+ */
243
+ cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
244
+ fetchPaymentMethods(params?: {}): Promise<any>;
245
+ /**
246
+ * @method
247
+ * @name coinbaseexchange#withdraw
248
+ * @description make a withdrawal
249
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawpaymentmethod
250
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawcoinbaseaccount
251
+ * @param {string} code unified currency code
252
+ * @param {float} amount the amount to withdraw
253
+ * @param {string} address the address to withdraw to
254
+ * @param {string} tag
255
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
256
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
257
+ */
258
+ withdraw(code: string, amount: number, address: string, tag?: Str, params?: {}): Promise<Transaction>;
259
+ parseLedgerEntryType(type: any): string;
260
+ parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
261
+ /**
262
+ * @method
263
+ * @name coinbaseexchange#fetchLedger
264
+ * @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
265
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccountledger
266
+ * @param {string} code unified currency code, default is undefined
267
+ * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
268
+ * @param {int} [limit] max number of ledger entries to return, default is undefined
269
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
270
+ * @param {int} [params.until] the latest time in ms to fetch trades for
271
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
272
+ */
273
+ fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
274
+ /**
275
+ * @method
276
+ * @name coinbaseexchange#fetchDepositsWithdrawals
277
+ * @description fetch history of deposits and withdrawals
278
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_gettransfers
279
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounttransfers
280
+ * @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
281
+ * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
282
+ * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
283
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
284
+ * @param {string} [params.id] account id, when defined, the endpoint used is '/accounts/{account_id}/transfers/' instead of '/transfers/'
285
+ * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
286
+ */
287
+ fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
288
+ /**
289
+ * @method
290
+ * @name coinbaseexchange#fetchDeposits
291
+ * @description fetch all deposits made to an account
292
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_gettransfers
293
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounttransfers
294
+ * @param {string} code unified currency code
295
+ * @param {int} [since] the earliest time in ms to fetch deposits for
296
+ * @param {int} [limit] the maximum number of deposits structures to retrieve
297
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
298
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
299
+ */
300
+ fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
301
+ /**
302
+ * @method
303
+ * @name coinbaseexchange#fetchWithdrawals
304
+ * @description fetch all withdrawals made from an account
305
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_gettransfers
306
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounttransfers
307
+ * @param {string} code unified currency code
308
+ * @param {int} [since] the earliest time in ms to fetch withdrawals for
309
+ * @param {int} [limit] the maximum number of withdrawals structures to retrieve
310
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
311
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
312
+ */
313
+ fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
314
+ parseTransactionStatus(transaction: any): "pending" | "ok" | "failed" | "canceled";
315
+ parseTransaction(transaction: Dict, currency?: Currency): Transaction;
316
+ /**
317
+ * @method
318
+ * @name coinbaseexchange#createDepositAddress
319
+ * @description create a currency deposit address
320
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postcoinbaseaccountaddresses
321
+ * @param {string} code unified currency code of the currency for the deposit address
322
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
323
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
324
+ */
325
+ createDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
326
+ sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
327
+ url: string;
328
+ method: string;
329
+ body: any;
330
+ headers: any;
331
+ };
332
+ handleErrors(code: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
333
+ request(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any, config?: {}): Promise<any>;
334
+ }