ccxt 4.4.69 → 4.4.71
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 +5 -8
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +1 -6
- package/dist/cjs/src/abstract/poloniexfutures.js +1 -1
- package/dist/cjs/src/base/Exchange.js +22 -1
- package/dist/cjs/src/binance.js +107 -102
- package/dist/cjs/src/bingx.js +64 -42
- package/dist/cjs/src/bitget.js +50 -340
- package/dist/cjs/src/bitmart.js +15 -1
- package/dist/cjs/src/bitopro.js +1 -0
- package/dist/cjs/src/bitrue.js +1 -0
- package/dist/cjs/src/bybit.js +7 -0
- package/dist/cjs/src/cex.js +1 -0
- package/dist/cjs/src/coinbase.js +24 -4
- package/dist/cjs/src/coinbaseexchange.js +1 -0
- package/dist/cjs/src/deribit.js +1 -0
- package/dist/cjs/src/hashkey.js +4 -2
- package/dist/cjs/src/hyperliquid.js +18 -7
- package/dist/cjs/src/kraken.js +83 -6
- package/dist/cjs/src/kucoin.js +4 -2
- package/dist/cjs/src/mexc.js +8 -4
- package/dist/cjs/src/okx.js +62 -46
- package/dist/cjs/src/poloniex.js +1311 -81
- package/dist/cjs/src/poloniexfutures.js +1 -1
- package/dist/cjs/src/pro/binance.js +94 -94
- package/dist/cjs/src/pro/bingx.js +63 -52
- package/dist/cjs/src/pro/bitget.js +40 -7
- package/dist/cjs/src/pro/bybit.js +86 -38
- package/dist/cjs/src/pro/poloniexfutures.js +1 -1
- package/dist/cjs/src/tradeogre.js +22 -4
- package/dist/cjs/src/whitebit.js +4 -2
- package/js/ccxt.d.ts +3 -9
- package/js/ccxt.js +2 -6
- package/js/src/abstract/bingx.d.ts +1 -0
- package/js/src/abstract/bitmart.d.ts +1 -0
- package/js/src/abstract/bybit.d.ts +4 -0
- package/js/src/abstract/myokx.d.ts +3 -0
- package/js/src/abstract/okx.d.ts +3 -0
- package/js/src/abstract/poloniex.d.ts +36 -0
- package/js/src/abstract/poloniexfutures.js +6 -0
- package/js/src/abstract/tradeogre.d.ts +1 -1
- package/js/src/base/Exchange.d.ts +11 -2
- package/js/src/base/Exchange.js +22 -1
- package/js/src/base/types.d.ts +33 -2
- package/js/src/binance.d.ts +98 -97
- package/js/src/binance.js +107 -102
- package/js/src/bingx.js +64 -42
- package/js/src/bitget.d.ts +0 -1
- package/js/src/bitget.js +50 -340
- package/js/src/bitmart.d.ts +1 -0
- package/js/src/bitmart.js +15 -1
- package/js/src/bitopro.js +1 -0
- package/js/src/bitrue.js +1 -0
- package/js/src/bybit.js +7 -0
- package/js/src/cex.js +1 -0
- package/js/src/coinbase.js +24 -4
- package/js/src/coinbaseexchange.js +1 -0
- package/js/src/deribit.js +1 -0
- package/js/src/hashkey.js +4 -2
- package/js/src/hyperliquid.js +18 -7
- package/js/src/kraken.d.ts +1 -0
- package/js/src/kraken.js +83 -6
- package/js/src/kucoin.js +4 -2
- package/js/src/mexc.js +8 -4
- package/js/src/okx.d.ts +1 -0
- package/js/src/okx.js +62 -46
- package/js/src/poloniex.d.ts +109 -1
- package/js/src/poloniex.js +1311 -81
- package/js/src/poloniexfutures.js +6 -0
- package/js/src/pro/binance.d.ts +94 -94
- package/js/src/pro/binance.js +94 -94
- package/js/src/pro/bingx.js +63 -52
- package/js/src/pro/bitget.js +40 -7
- package/js/src/pro/bybit.d.ts +1 -0
- package/js/src/pro/bybit.js +86 -38
- package/js/src/pro/poloniexfutures.js +6 -0
- package/js/src/tradeogre.d.ts +1 -0
- package/js/src/tradeogre.js +22 -4
- package/js/src/whitebit.js +4 -2
- package/package.json +1 -1
package/js/src/poloniex.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/poloniex.js';
|
|
2
|
-
import type { TransferEntry, Int, OrderSide, OrderType, OHLCV, Trade, OrderBook, Order, Balances, Str, Transaction, Ticker, Tickers, Market, Strings, Currency, Num, Currencies, TradingFees, Dict, int, DepositAddress } from './base/types.js';
|
|
2
|
+
import type { TransferEntry, Int, Leverage, OrderSide, OrderType, OHLCV, Trade, OrderBook, Order, Balances, Str, MarginModification, Transaction, Ticker, Tickers, Market, Strings, Currency, Num, Currencies, TradingFees, Dict, int, DepositAddress } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class poloniex
|
|
5
5
|
* @augments Exchange
|
|
@@ -12,6 +12,7 @@ export default class poloniex extends Exchange {
|
|
|
12
12
|
* @name poloniex#fetchOHLCV
|
|
13
13
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
14
14
|
* @see https://api-docs.poloniex.com/spot/api/public/market-data#candles
|
|
15
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/market/get-kline-data
|
|
15
16
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
16
17
|
* @param {string} timeframe the length of time each candle represents
|
|
17
18
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -28,11 +29,16 @@ export default class poloniex extends Exchange {
|
|
|
28
29
|
* @name poloniex#fetchMarkets
|
|
29
30
|
* @description retrieves data on all markets for poloniex
|
|
30
31
|
* @see https://api-docs.poloniex.com/spot/api/public/reference-data#symbol-information
|
|
32
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/market/get-all-product-info
|
|
31
33
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
32
34
|
* @returns {object[]} an array of objects representing market data
|
|
33
35
|
*/
|
|
34
36
|
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
37
|
+
fetchSpotMarkets(params?: {}): Promise<Market[]>;
|
|
38
|
+
fetchSwapMarkets(params?: {}): Promise<Market[]>;
|
|
35
39
|
parseMarket(market: Dict): Market;
|
|
40
|
+
parseSpotMarket(market: Dict): Market;
|
|
41
|
+
parseSwapMarket(market: Dict): Market;
|
|
36
42
|
/**
|
|
37
43
|
* @method
|
|
38
44
|
* @name poloniex#fetchTime
|
|
@@ -48,6 +54,7 @@ export default class poloniex extends Exchange {
|
|
|
48
54
|
* @name poloniex#fetchTickers
|
|
49
55
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
50
56
|
* @see https://api-docs.poloniex.com/spot/api/public/market-data#ticker
|
|
57
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/market/get-market-info
|
|
51
58
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
52
59
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
53
60
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -67,6 +74,7 @@ export default class poloniex extends Exchange {
|
|
|
67
74
|
* @name poloniex#fetchTicker
|
|
68
75
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
69
76
|
* @see https://api-docs.poloniex.com/spot/api/public/market-data#ticker
|
|
77
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/market/get-market-info
|
|
70
78
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
71
79
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
72
80
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -78,6 +86,7 @@ export default class poloniex extends Exchange {
|
|
|
78
86
|
* @name poloniex#fetchTrades
|
|
79
87
|
* @description get the list of most recent trades for a particular symbol
|
|
80
88
|
* @see https://api-docs.poloniex.com/spot/api/public/market-data#trades
|
|
89
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/market/get-execution-info
|
|
81
90
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
82
91
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
83
92
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -90,6 +99,7 @@ export default class poloniex extends Exchange {
|
|
|
90
99
|
* @name poloniex#fetchMyTrades
|
|
91
100
|
* @description fetch all trades made by the user
|
|
92
101
|
* @see https://api-docs.poloniex.com/spot/api/private/trade#trade-history
|
|
102
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/trade/get-execution-details
|
|
93
103
|
* @param {string} symbol unified market symbol
|
|
94
104
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
95
105
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -109,6 +119,7 @@ export default class poloniex extends Exchange {
|
|
|
109
119
|
* @description fetch all unfilled currently open orders
|
|
110
120
|
* @see https://api-docs.poloniex.com/spot/api/private/order#open-orders
|
|
111
121
|
* @see https://api-docs.poloniex.com/spot/api/private/smart-order#open-orders // trigger orders
|
|
122
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/trade/get-current-orders
|
|
112
123
|
* @param {string} symbol unified market symbol
|
|
113
124
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
114
125
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -117,6 +128,19 @@ export default class poloniex extends Exchange {
|
|
|
117
128
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
118
129
|
*/
|
|
119
130
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
131
|
+
/**
|
|
132
|
+
* @method
|
|
133
|
+
* @name poloniex#fetchClosedOrders
|
|
134
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/trade/get-order-history
|
|
135
|
+
* @description fetches information on multiple closed orders made by the user
|
|
136
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
137
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
138
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
139
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
140
|
+
* @param {int} [params.until] timestamp in ms of the latest entry
|
|
141
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
142
|
+
*/
|
|
143
|
+
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
120
144
|
/**
|
|
121
145
|
* @method
|
|
122
146
|
* @name poloniex#createOrder
|
|
@@ -159,6 +183,7 @@ export default class poloniex extends Exchange {
|
|
|
159
183
|
* @description cancel all open orders
|
|
160
184
|
* @see https://api-docs.poloniex.com/spot/api/private/order#cancel-all-orders
|
|
161
185
|
* @see https://api-docs.poloniex.com/spot/api/private/smart-order#cancel-all-orders // trigger orders
|
|
186
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/trade/cancel-all-orders - contract markets
|
|
162
187
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
163
188
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
164
189
|
* @param {boolean} [params.trigger] true if canceling trigger orders
|
|
@@ -198,6 +223,7 @@ export default class poloniex extends Exchange {
|
|
|
198
223
|
* @name poloniex#fetchBalance
|
|
199
224
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
200
225
|
* @see https://api-docs.poloniex.com/spot/api/private/account#all-account-balances
|
|
226
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/account/balance
|
|
201
227
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
202
228
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
203
229
|
*/
|
|
@@ -216,6 +242,7 @@ export default class poloniex extends Exchange {
|
|
|
216
242
|
* @name poloniex#fetchOrderBook
|
|
217
243
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
218
244
|
* @see https://api-docs.poloniex.com/spot/api/public/market-data#order-book
|
|
245
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/market/get-order-book
|
|
219
246
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
220
247
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
221
248
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -326,6 +353,87 @@ export default class poloniex extends Exchange {
|
|
|
326
353
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
327
354
|
parseTransactionStatus(status: Str): string;
|
|
328
355
|
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
|
356
|
+
/**
|
|
357
|
+
* @method
|
|
358
|
+
* @name poloniex#setLeverage
|
|
359
|
+
* @description set the level of leverage for a market
|
|
360
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/positions/set-leverage
|
|
361
|
+
* @param {int} leverage the rate of leverage
|
|
362
|
+
* @param {string} symbol unified market symbol
|
|
363
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
364
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
365
|
+
* @returns {object} response from the exchange
|
|
366
|
+
*/
|
|
367
|
+
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
|
|
368
|
+
/**
|
|
369
|
+
* @method
|
|
370
|
+
* @name poloniex#fetchLeverage
|
|
371
|
+
* @description fetch the set leverage for a market
|
|
372
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/positions/get-leverages
|
|
373
|
+
* @param {string} symbol unified market symbol
|
|
374
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
375
|
+
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
376
|
+
*/
|
|
377
|
+
fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
|
|
378
|
+
parseLeverage(leverage: Dict, market?: Market): Leverage;
|
|
379
|
+
/**
|
|
380
|
+
* @method
|
|
381
|
+
* @name poloniex#fetchPositionMode
|
|
382
|
+
* @description fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
|
|
383
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/positions/position-mode-switch
|
|
384
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
385
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
386
|
+
* @returns {object} an object detailing whether the market is in hedged or one-way mode
|
|
387
|
+
*/
|
|
388
|
+
fetchPositionMode(symbol?: Str, params?: {}): Promise<{
|
|
389
|
+
info: any;
|
|
390
|
+
hedged: boolean;
|
|
391
|
+
}>;
|
|
392
|
+
/**
|
|
393
|
+
* @method
|
|
394
|
+
* @name poloniex#setPositionMode
|
|
395
|
+
* @description set hedged to true or false for a market
|
|
396
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/positions/position-mode-switch
|
|
397
|
+
* @param {bool} hedged set to true to use dualSidePosition
|
|
398
|
+
* @param {string} symbol not used by binance setPositionMode ()
|
|
399
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
400
|
+
* @returns {object} response from the exchange
|
|
401
|
+
*/
|
|
402
|
+
setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
|
|
403
|
+
/**
|
|
404
|
+
* @method
|
|
405
|
+
* @name poloniex#fetchPositions
|
|
406
|
+
* @description fetch all open positions
|
|
407
|
+
* @see https://api-docs.poloniex.com/v3/futures/api/positions/get-current-position
|
|
408
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
409
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
410
|
+
* @param {boolean} [params.standard] whether to fetch standard contract positions
|
|
411
|
+
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
412
|
+
*/
|
|
413
|
+
fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
|
|
414
|
+
parsePosition(position: Dict, market?: Market): import("./base/types.js").Position;
|
|
415
|
+
modifyMarginHelper(symbol: string, amount: any, type: any, params?: {}): Promise<MarginModification>;
|
|
416
|
+
parseMarginModification(data: Dict, market?: Market): MarginModification;
|
|
417
|
+
/**
|
|
418
|
+
* @method
|
|
419
|
+
* @name poloniex#reduceMargin
|
|
420
|
+
* @description remove margin from a position
|
|
421
|
+
* @param {string} symbol unified market symbol
|
|
422
|
+
* @param {float} amount the amount of margin to remove
|
|
423
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
424
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
425
|
+
*/
|
|
426
|
+
reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
427
|
+
/**
|
|
428
|
+
* @method
|
|
429
|
+
* @name poloniex#addMargin
|
|
430
|
+
* @description add margin
|
|
431
|
+
* @param {string} symbol unified market symbol
|
|
432
|
+
* @param {float} amount amount of margin to add
|
|
433
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
434
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
435
|
+
*/
|
|
436
|
+
addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
329
437
|
nonce(): number;
|
|
330
438
|
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
331
439
|
url: any;
|