ccxt 4.5.29 → 4.5.31

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 (85) hide show
  1. package/README.md +4 -4
  2. package/dist/ccxt.browser.min.js +18 -18
  3. package/dist/cjs/ccxt.js +6 -4
  4. package/dist/cjs/src/base/Exchange.js +16 -1
  5. package/dist/cjs/src/base/ws/WsClient.js +1 -0
  6. package/dist/cjs/src/bingx.js +1 -1
  7. package/dist/cjs/src/bullish.js +1 -1
  8. package/dist/cjs/src/bybit.js +2 -0
  9. package/dist/cjs/src/bydfi.js +2907 -0
  10. package/dist/cjs/src/coinbase.js +34 -1
  11. package/dist/cjs/src/dydx.js +3 -3
  12. package/dist/cjs/src/gate.js +55 -8
  13. package/dist/cjs/src/hyperliquid.js +19 -4
  14. package/dist/cjs/src/kucoin.js +175 -68
  15. package/dist/cjs/src/pro/apex.js +7 -5
  16. package/dist/cjs/src/pro/ascendex.js +1 -1
  17. package/dist/cjs/src/pro/binance.js +10 -6
  18. package/dist/cjs/src/pro/bingx.js +6 -4
  19. package/dist/cjs/src/pro/bitmart.js +5 -3
  20. package/dist/cjs/src/pro/bybit.js +6 -4
  21. package/dist/cjs/src/pro/bydfi.js +1077 -0
  22. package/dist/cjs/src/pro/cryptocom.js +6 -4
  23. package/dist/cjs/src/pro/gate.js +5 -3
  24. package/dist/cjs/src/pro/hashkey.js +5 -3
  25. package/dist/cjs/src/pro/htx.js +1 -1
  26. package/dist/cjs/src/pro/hyperliquid.js +1 -1
  27. package/dist/cjs/src/pro/kucoinfutures.js +5 -3
  28. package/dist/cjs/src/pro/modetrade.js +5 -3
  29. package/dist/cjs/src/pro/p2b.js +1 -1
  30. package/dist/cjs/src/pro/toobit.js +12 -8
  31. package/dist/cjs/src/pro/woo.js +5 -3
  32. package/dist/cjs/src/pro/woofipro.js +5 -3
  33. package/dist/cjs/src/pro/xt.js +5 -3
  34. package/dist/cjs/src/toobit.js +2 -1
  35. package/js/ccxt.d.ts +8 -5
  36. package/js/ccxt.js +6 -4
  37. package/js/src/abstract/bydfi.d.ts +52 -0
  38. package/js/src/abstract/kucoin.d.ts +2 -0
  39. package/js/src/abstract/kucoinfutures.d.ts +2 -0
  40. package/js/src/base/Exchange.d.ts +3 -0
  41. package/js/src/base/Exchange.js +16 -1
  42. package/js/src/base/ws/WsClient.js +1 -0
  43. package/js/src/binance.d.ts +1 -1
  44. package/js/src/bingx.js +1 -1
  45. package/js/src/bullish.js +1 -1
  46. package/js/src/bybit.js +2 -0
  47. package/js/src/bydfi.d.ts +472 -0
  48. package/js/src/bydfi.js +2905 -0
  49. package/js/src/coinbase.d.ts +11 -0
  50. package/js/src/coinbase.js +34 -1
  51. package/js/src/dydx.js +3 -3
  52. package/js/src/exmo.d.ts +1 -1
  53. package/js/src/gate.js +55 -8
  54. package/js/src/hyperliquid.d.ts +1 -0
  55. package/js/src/hyperliquid.js +19 -4
  56. package/js/src/kucoin.d.ts +19 -3
  57. package/js/src/kucoin.js +175 -68
  58. package/js/src/pro/apex.js +7 -5
  59. package/js/src/pro/ascendex.js +1 -1
  60. package/js/src/pro/binance.js +10 -6
  61. package/js/src/pro/bingx.js +6 -4
  62. package/js/src/pro/bitmart.js +5 -3
  63. package/js/src/pro/bybit.js +6 -4
  64. package/js/src/pro/bydfi.d.ts +206 -0
  65. package/js/src/pro/bydfi.js +1076 -0
  66. package/js/src/pro/cryptocom.js +6 -4
  67. package/js/src/pro/gate.js +5 -3
  68. package/js/src/pro/hashkey.js +5 -3
  69. package/js/src/pro/htx.js +1 -1
  70. package/js/src/pro/hyperliquid.js +1 -1
  71. package/js/src/pro/kucoinfutures.js +5 -3
  72. package/js/src/pro/modetrade.js +5 -3
  73. package/js/src/pro/p2b.js +1 -1
  74. package/js/src/pro/toobit.js +12 -8
  75. package/js/src/pro/woo.js +5 -3
  76. package/js/src/pro/woofipro.js +5 -3
  77. package/js/src/pro/xt.js +5 -3
  78. package/js/src/toobit.js +2 -1
  79. package/package.json +1 -1
  80. package/dist/cjs/src/oceanex.js +0 -1125
  81. package/js/src/abstract/oceanex.d.ts +0 -30
  82. package/js/src/oceanex.d.ts +0 -231
  83. package/js/src/oceanex.js +0 -1124
  84. /package/dist/cjs/src/abstract/{oceanex.js → bydfi.js} +0 -0
  85. /package/js/src/abstract/{oceanex.js → bydfi.js} +0 -0
@@ -1,30 +0,0 @@
1
- import { implicitReturnType } from '../base/types.js';
2
- import { Exchange as _Exchange } from '../base/Exchange.js';
3
- interface Exchange {
4
- publicGetMarkets(params?: {}): Promise<implicitReturnType>;
5
- publicGetTickersPair(params?: {}): Promise<implicitReturnType>;
6
- publicGetTickersMulti(params?: {}): Promise<implicitReturnType>;
7
- publicGetOrderBook(params?: {}): Promise<implicitReturnType>;
8
- publicGetOrderBookMulti(params?: {}): Promise<implicitReturnType>;
9
- publicGetFeesTrading(params?: {}): Promise<implicitReturnType>;
10
- publicGetTrades(params?: {}): Promise<implicitReturnType>;
11
- publicGetTimestamp(params?: {}): Promise<implicitReturnType>;
12
- publicPostK(params?: {}): Promise<implicitReturnType>;
13
- privateGetKey(params?: {}): Promise<implicitReturnType>;
14
- privateGetMembersMe(params?: {}): Promise<implicitReturnType>;
15
- privateGetOrders(params?: {}): Promise<implicitReturnType>;
16
- privateGetOrdersFilter(params?: {}): Promise<implicitReturnType>;
17
- privatePostOrders(params?: {}): Promise<implicitReturnType>;
18
- privatePostOrdersMulti(params?: {}): Promise<implicitReturnType>;
19
- privatePostOrderDelete(params?: {}): Promise<implicitReturnType>;
20
- privatePostOrderDeleteMulti(params?: {}): Promise<implicitReturnType>;
21
- privatePostOrdersClear(params?: {}): Promise<implicitReturnType>;
22
- privatePostWithdrawsSpecialNew(params?: {}): Promise<implicitReturnType>;
23
- privatePostDepositAddress(params?: {}): Promise<implicitReturnType>;
24
- privatePostDepositAddresses(params?: {}): Promise<implicitReturnType>;
25
- privatePostDepositHistory(params?: {}): Promise<implicitReturnType>;
26
- privatePostWithdrawHistory(params?: {}): Promise<implicitReturnType>;
27
- }
28
- declare abstract class Exchange extends _Exchange {
29
- }
30
- export default Exchange;
@@ -1,231 +0,0 @@
1
- import Exchange from './abstract/oceanex.js';
2
- import type { Balances, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, int, DepositAddress, OrderBooks } from './base/types.js';
3
- /**
4
- * @class oceanex
5
- * @augments Exchange
6
- */
7
- export default class oceanex extends Exchange {
8
- describe(): any;
9
- /**
10
- * @method
11
- * @name oceanex#fetchMarkets
12
- * @description retrieves data on all markets for oceanex
13
- * @see https://api.oceanex.pro/doc/v1/#markets-post
14
- * @param {object} [params] extra parameters specific to the exchange API endpoint
15
- * @returns {object[]} an array of objects representing market data
16
- */
17
- fetchMarkets(params?: {}): Promise<Market[]>;
18
- parseMarket(market: Dict): Market;
19
- /**
20
- * @method
21
- * @name oceanex#fetchTicker
22
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
23
- * @see https://api.oceanex.pro/doc/v1/#ticker-post
24
- * @param {string} symbol unified symbol of the market to fetch the ticker for
25
- * @param {object} [params] extra parameters specific to the exchange API endpoint
26
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
27
- */
28
- fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
29
- /**
30
- * @method
31
- * @name oceanex#fetchTickers
32
- * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
33
- * @see https://api.oceanex.pro/doc/v1/#multiple-tickers-post
34
- * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
35
- * @param {object} [params] extra parameters specific to the exchange API endpoint
36
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
37
- */
38
- fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
39
- parseTicker(data: any, market?: Market): Ticker;
40
- /**
41
- * @method
42
- * @name oceanex#fetchOrderBook
43
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
44
- * @see https://api.oceanex.pro/doc/v1/#order-book-post
45
- * @param {string} symbol unified symbol of the market to fetch the order book for
46
- * @param {int} [limit] the maximum amount of order book entries to return
47
- * @param {object} [params] extra parameters specific to the exchange API endpoint
48
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
49
- */
50
- fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
51
- /**
52
- * @method
53
- * @name oceanex#fetchOrderBooks
54
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets
55
- * @see https://api.oceanex.pro/doc/v1/#multiple-order-books-post
56
- * @param {string[]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined
57
- * @param {int} [limit] max number of entries per orderbook to return, default is undefined
58
- * @param {object} [params] extra parameters specific to the exchange API endpoint
59
- * @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbol
60
- */
61
- fetchOrderBooks(symbols?: Strings, limit?: Int, params?: {}): Promise<OrderBooks>;
62
- /**
63
- * @method
64
- * @name oceanex#fetchTrades
65
- * @description get the list of most recent trades for a particular symbol
66
- * @see https://api.oceanex.pro/doc/v1/#trades-post
67
- * @param {string} symbol unified symbol of the market to fetch trades for
68
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
69
- * @param {int} [limit] the maximum amount of trades to fetch
70
- * @param {object} [params] extra parameters specific to the exchange API endpoint
71
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades}
72
- */
73
- fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
74
- parseTrade(trade: Dict, market?: Market): Trade;
75
- /**
76
- * @method
77
- * @name oceanex#fetchTime
78
- * @description fetches the current integer timestamp in milliseconds from the exchange server
79
- * @see https://api.oceanex.pro/doc/v1/#api-server-time-post
80
- * @param {object} [params] extra parameters specific to the exchange API endpoint
81
- * @returns {int} the current integer timestamp in milliseconds from the exchange server
82
- */
83
- fetchTime(params?: {}): Promise<Int>;
84
- /**
85
- * @method
86
- * @name oceanex#fetchTradingFees
87
- * @description fetch the trading fees for multiple markets
88
- * @see https://api.oceanex.pro/doc/v1/#trading-fees-post
89
- * @param {object} [params] extra parameters specific to the exchange API endpoint
90
- * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/?id=fee-structure} indexed by market symbols
91
- */
92
- fetchTradingFees(params?: {}): Promise<TradingFees>;
93
- fetchKey(params?: {}): Promise<any>;
94
- parseBalance(response: any): Balances;
95
- /**
96
- * @method
97
- * @name oceanex#fetchBalance
98
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
99
- * @see https://api.oceanex.pro/doc/v1/#account-info-post
100
- * @param {object} [params] extra parameters specific to the exchange API endpoint
101
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
102
- */
103
- fetchBalance(params?: {}): Promise<Balances>;
104
- /**
105
- * @method
106
- * @name oceanex#createOrder
107
- * @description create a trade order
108
- * @see https://api.oceanex.pro/doc/v1/#new-order-post
109
- * @param {string} symbol unified symbol of the market to create an order in
110
- * @param {string} type 'market' or 'limit'
111
- * @param {string} side 'buy' or 'sell'
112
- * @param {float} amount how much of currency you want to trade in units of base currency
113
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
114
- * @param {object} [params] extra parameters specific to the exchange API endpoint
115
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
116
- */
117
- createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
118
- /**
119
- * @method
120
- * @name oceanex#fetchOrder
121
- * @description fetches information on an order made by the user
122
- * @see https://api.oceanex.pro/doc/v1/#order-status-get
123
- * @param {string} id order id
124
- * @param {string} symbol unified symbol of the market the order was made in
125
- * @param {object} [params] extra parameters specific to the exchange API endpoint
126
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
127
- */
128
- fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
129
- /**
130
- * @method
131
- * @name oceanex#fetchOpenOrders
132
- * @description fetch all unfilled currently open orders
133
- * @see https://api.oceanex.pro/doc/v1/#order-status-get
134
- * @param {string} symbol unified market symbol
135
- * @param {int} [since] the earliest time in ms to fetch open orders for
136
- * @param {int} [limit] the maximum number of open orders structures to retrieve
137
- * @param {object} [params] extra parameters specific to the exchange API endpoint
138
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
139
- */
140
- fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
141
- /**
142
- * @method
143
- * @name oceanex#fetchClosedOrders
144
- * @description fetches information on multiple closed orders made by the user
145
- * @see https://api.oceanex.pro/doc/v1/#order-status-get
146
- * @param {string} symbol unified market symbol of the market orders were made in
147
- * @param {int} [since] the earliest time in ms to fetch orders for
148
- * @param {int} [limit] the maximum number of order structures to retrieve
149
- * @param {object} [params] extra parameters specific to the exchange API endpoint
150
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
151
- */
152
- fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
153
- /**
154
- * @method
155
- * @name oceanex#fetchOrders
156
- * @description fetches information on multiple orders made by the user
157
- * @see https://api.oceanex.pro/doc/v1/#order-status-with-filters-post
158
- * @param {string} symbol unified market symbol of the market orders were made in
159
- * @param {int} [since] the earliest time in ms to fetch orders for
160
- * @param {int} [limit] the maximum number of order structures to retrieve
161
- * @param {object} [params] extra parameters specific to the exchange API endpoint
162
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
163
- */
164
- fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
165
- parseOHLCV(ohlcv: any, market?: Market): OHLCV;
166
- /**
167
- * @method
168
- * @name oceanex#fetchOHLCV
169
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
170
- * @see https://api.oceanex.pro/doc/v1/#k-line-post
171
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
172
- * @param {string} timeframe the length of time each candle represents
173
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
174
- * @param {int} [limit] the maximum amount of candles to fetch
175
- * @param {object} [params] extra parameters specific to the exchange API endpoint
176
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
177
- */
178
- fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
179
- parseOrder(order: Dict, market?: Market): Order;
180
- parseOrderStatus(status: Str): string;
181
- /**
182
- * @method
183
- * @name oceanex#cancelOrder
184
- * @description cancels an open order
185
- * @see https://api.oceanex.pro/doc/v1/#cancel-order-post
186
- * @param {string} id order id
187
- * @param {string} symbol not used by oceanex cancelOrder ()
188
- * @param {object} [params] extra parameters specific to the exchange API endpoint
189
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
190
- */
191
- cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
192
- /**
193
- * @method
194
- * @name oceanex#cancelOrders
195
- * @description cancel multiple orders
196
- * @see https://api.oceanex.pro/doc/v1/#cancel-multiple-orders-post
197
- * @param {string[]} ids order ids
198
- * @param {string} symbol not used by oceanex cancelOrders ()
199
- * @param {object} [params] extra parameters specific to the exchange API endpoint
200
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
201
- */
202
- cancelOrders(ids: string[], symbol?: Str, params?: {}): Promise<Order[]>;
203
- /**
204
- * @method
205
- * @name oceanex#cancelAllOrders
206
- * @description cancel all open orders
207
- * @see https://api.oceanex.pro/doc/v1/#cancel-all-orders-post
208
- * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
209
- * @param {object} [params] extra parameters specific to the exchange API endpoint
210
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
211
- */
212
- cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
213
- /**
214
- * @method
215
- * @name oceanex#fetchDepositAddressesByNetwork
216
- * @description fetch the deposit addresses for a currency associated with this account
217
- * @see https://api.oceanex.pro/doc/v1/#deposit-addresses-post
218
- * @param {string} code unified currency code
219
- * @param {object} [params] extra parameters specific to the exchange API endpoint
220
- * @returns {object} a dictionary [address structures]{@link https://docs.ccxt.com/?id=address-structure}, indexed by the network
221
- */
222
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<DepositAddress[]>;
223
- parseDepositAddress(depositAddress: any, currency?: Currency): DepositAddress;
224
- sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
225
- url: string;
226
- method: string;
227
- body: any;
228
- headers: any;
229
- };
230
- handleErrors(code: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
231
- }