ccxt 4.4.77 → 4.4.80
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 +8 -10
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +8 -4
- package/dist/cjs/src/abstract/ace.js +1 -1
- package/dist/cjs/src/abstract/apex.js +9 -0
- package/dist/cjs/src/ace.js +1 -1
- package/dist/cjs/src/apex.js +1949 -0
- package/dist/cjs/src/ascendex.js +25 -4
- package/dist/cjs/src/base/Exchange.js +42 -2
- package/dist/cjs/src/binance.js +9 -1
- package/dist/cjs/src/bingx.js +3 -3
- package/dist/cjs/src/bitfinex.js +64 -36
- package/dist/cjs/src/bitget.js +191 -138
- package/dist/cjs/src/bitmart.js +7 -2
- package/dist/cjs/src/bitmex.js +16 -8
- package/dist/cjs/src/bitopro.js +5 -1
- package/dist/cjs/src/bitrue.js +2 -1
- package/dist/cjs/src/bitso.js +1 -1
- package/dist/cjs/src/bitteam.js +2 -0
- package/dist/cjs/src/bitvavo.js +28 -10
- package/dist/cjs/src/btcalpha.js +1 -1
- package/dist/cjs/src/btcmarkets.js +1 -1
- package/dist/cjs/src/btcturk.js +1 -1
- package/dist/cjs/src/bybit.js +32 -16
- package/dist/cjs/src/cex.js +1 -1
- package/dist/cjs/src/coinbase.js +18 -2
- package/dist/cjs/src/coincatch.js +68 -0
- package/dist/cjs/src/coinex.js +1 -0
- package/dist/cjs/src/coinlist.js +1 -0
- package/dist/cjs/src/coinone.js +1 -0
- package/dist/cjs/src/delta.js +4 -0
- package/dist/cjs/src/deribit.js +1 -0
- package/dist/cjs/src/hitbtc.js +3 -0
- package/dist/cjs/src/hollaex.js +1 -0
- package/dist/cjs/src/htx.js +7 -3
- package/dist/cjs/src/huobijp.js +1 -0
- package/dist/cjs/src/hyperliquid.js +14 -4
- package/dist/cjs/src/kraken.js +2 -0
- package/dist/cjs/src/mexc.js +50 -57
- package/dist/cjs/src/okx.js +1 -1
- package/dist/cjs/src/phemex.js +2 -1
- package/dist/cjs/src/poloniex.js +2 -1
- package/dist/cjs/src/pro/apex.js +1043 -0
- package/dist/cjs/src/pro/binance.js +3 -3
- package/dist/cjs/src/pro/coinbase.js +45 -68
- package/dist/cjs/src/pro/gate.js +27 -2
- package/dist/cjs/src/pro/hollaex.js +2 -2
- package/dist/cjs/src/pro/p2b.js +2 -2
- package/dist/cjs/src/pro/tradeogre.js +283 -0
- package/dist/cjs/src/pro/upbit.js +43 -0
- package/dist/cjs/src/probit.js +1 -0
- package/dist/cjs/src/static_dependencies/zklink/zklink-sdk-web.js +2639 -0
- package/dist/cjs/src/timex.js +2 -2
- package/dist/cjs/src/tradeogre.js +2 -1
- package/dist/cjs/src/upbit.js +277 -67
- package/dist/cjs/src/whitebit.js +66 -12
- package/dist/cjs/src/woo.js +3 -1
- package/dist/cjs/src/xt.js +9 -0
- package/js/ccxt.d.ts +11 -5
- package/js/ccxt.js +8 -4
- package/js/src/abstract/apex.d.ts +34 -0
- package/js/src/abstract/bitmart.d.ts +1 -0
- package/js/src/apex.d.ts +333 -0
- package/js/src/apex.js +1945 -0
- package/js/src/ascendex.d.ts +3 -3
- package/js/src/ascendex.js +25 -4
- package/js/src/base/Exchange.d.ts +2 -0
- package/js/src/base/Exchange.js +42 -1
- package/js/src/binance.d.ts +7 -7
- package/js/src/binance.js +9 -1
- package/js/src/bingx.js +3 -3
- package/js/src/bitfinex.d.ts +3 -3
- package/js/src/bitfinex.js +64 -36
- package/js/src/bitflyer.d.ts +2 -2
- package/js/src/bitget.d.ts +2 -0
- package/js/src/bitget.js +191 -138
- package/js/src/bitmart.d.ts +5 -4
- package/js/src/bitmart.js +7 -2
- package/js/src/bitmex.d.ts +3 -3
- package/js/src/bitmex.js +16 -8
- package/js/src/bitopro.js +5 -1
- package/js/src/bitrue.js +2 -1
- package/js/src/bitso.js +1 -1
- package/js/src/bitteam.js +2 -0
- package/js/src/bitvavo.js +28 -10
- package/js/src/btcalpha.js +1 -1
- package/js/src/btcmarkets.js +1 -1
- package/js/src/btcturk.js +1 -1
- package/js/src/bybit.js +32 -16
- package/js/src/cex.js +1 -1
- package/js/src/coinbase.d.ts +4 -4
- package/js/src/coinbase.js +18 -2
- package/js/src/coinbaseexchange.d.ts +1 -1
- package/js/src/coincatch.d.ts +11 -0
- package/js/src/coincatch.js +68 -0
- package/js/src/coinex.js +1 -0
- package/js/src/coinlist.js +1 -0
- package/js/src/coinone.js +1 -0
- package/js/src/cryptocom.d.ts +4 -4
- package/js/src/delta.js +4 -0
- package/js/src/deribit.d.ts +4 -4
- package/js/src/deribit.js +1 -0
- package/js/src/derive.d.ts +3 -3
- package/js/src/digifinex.d.ts +4 -4
- package/js/src/hitbtc.js +3 -0
- package/js/src/hollaex.js +1 -0
- package/js/src/htx.d.ts +4 -4
- package/js/src/htx.js +7 -3
- package/js/src/huobijp.js +1 -0
- package/js/src/hyperliquid.d.ts +1 -0
- package/js/src/hyperliquid.js +14 -4
- package/js/src/kraken.d.ts +3 -3
- package/js/src/kraken.js +2 -0
- package/js/src/krakenfutures.d.ts +2 -2
- package/js/src/kucoinfutures.d.ts +5 -5
- package/js/src/mexc.d.ts +1 -0
- package/js/src/mexc.js +50 -57
- package/js/src/okx.js +1 -1
- package/js/src/oxfun.d.ts +3 -3
- package/js/src/phemex.d.ts +3 -3
- package/js/src/phemex.js +2 -1
- package/js/src/poloniex.d.ts +3 -3
- package/js/src/poloniex.js +2 -1
- package/js/src/pro/apex.d.ts +160 -0
- package/js/src/pro/apex.js +1038 -0
- package/js/src/pro/binance.js +3 -3
- package/js/src/pro/coinbase.d.ts +4 -3
- package/js/src/pro/coinbase.js +45 -66
- package/js/src/pro/gate.js +27 -2
- package/js/src/pro/hollaex.js +2 -2
- package/js/src/pro/p2b.js +2 -2
- package/js/src/pro/tradeogre.d.ts +49 -0
- package/js/src/pro/tradeogre.js +278 -0
- package/js/src/pro/upbit.d.ts +16 -1
- package/js/src/pro/upbit.js +43 -0
- package/js/src/probit.js +1 -0
- package/js/src/static_dependencies/zklink/zklink-sdk-web.d.ts +1279 -0
- package/js/src/static_dependencies/zklink/zklink-sdk-web.js +4276 -0
- package/js/src/timex.js +2 -2
- package/js/src/tradeogre.js +2 -1
- package/js/src/upbit.d.ts +75 -23
- package/js/src/upbit.js +277 -67
- package/js/src/vertex.d.ts +3 -3
- package/js/src/whitebit.js +66 -12
- package/js/src/woo.d.ts +4 -4
- package/js/src/woo.js +3 -1
- package/js/src/woofipro.d.ts +4 -4
- package/js/src/xt.d.ts +4 -4
- package/js/src/xt.js +9 -0
- package/package.json +2 -2
- package/js/src/abstract/ace.d.ts +0 -18
- package/js/src/ace.d.ts +0 -158
- package/js/src/ace.js +0 -1175
- /package/js/src/abstract/{ace.js → apex.js} +0 -0
package/js/src/poloniex.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/poloniex.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';
|
|
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, Position } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class poloniex
|
|
5
5
|
* @augments Exchange
|
|
@@ -404,8 +404,8 @@ export default class poloniex extends Exchange {
|
|
|
404
404
|
* @param {boolean} [params.standard] whether to fetch standard contract positions
|
|
405
405
|
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
406
406
|
*/
|
|
407
|
-
fetchPositions(symbols?: Strings, params?: {}): Promise<
|
|
408
|
-
parsePosition(position: Dict, market?: Market):
|
|
407
|
+
fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
|
|
408
|
+
parsePosition(position: Dict, market?: Market): Position;
|
|
409
409
|
modifyMarginHelper(symbol: string, amount: any, type: any, params?: {}): Promise<MarginModification>;
|
|
410
410
|
parseMarginModification(data: Dict, market?: Market): MarginModification;
|
|
411
411
|
/**
|
package/js/src/poloniex.js
CHANGED
|
@@ -1201,6 +1201,7 @@ export default class poloniex extends Exchange {
|
|
|
1201
1201
|
'withdraw': withdrawEnabled,
|
|
1202
1202
|
'fee': this.parseNumber(feeString),
|
|
1203
1203
|
'precision': undefined,
|
|
1204
|
+
'type': 'crypto',
|
|
1204
1205
|
'limits': {
|
|
1205
1206
|
'amount': {
|
|
1206
1207
|
'min': undefined,
|
|
@@ -1849,7 +1850,7 @@ export default class poloniex extends Exchange {
|
|
|
1849
1850
|
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
1850
1851
|
params = this.omit(params, ['trigger', 'stop']);
|
|
1851
1852
|
let response = undefined;
|
|
1852
|
-
if (
|
|
1853
|
+
if (marketType !== 'spot') {
|
|
1853
1854
|
const raw = await this.swapPrivateGetV3TradeOrderOpens(this.extend(request, params));
|
|
1854
1855
|
//
|
|
1855
1856
|
// {
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import apexRest from '../apex.js';
|
|
2
|
+
import type { Int, Trade, OrderBook, Ticker, Strings, Tickers } from '../base/types.js';
|
|
3
|
+
import Client from '../base/ws/Client.js';
|
|
4
|
+
import { OHLCV, Order, Position, Str } from '../base/types.js';
|
|
5
|
+
export default class apex extends apexRest {
|
|
6
|
+
describe(): any;
|
|
7
|
+
/**
|
|
8
|
+
* @method
|
|
9
|
+
* @name apex#watchTrades
|
|
10
|
+
* @description watches information on multiple trades made in a market
|
|
11
|
+
* @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
|
12
|
+
* @param {string} symbol unified market symbol of the market trades were made in
|
|
13
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
14
|
+
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
15
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
16
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
17
|
+
*/
|
|
18
|
+
watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
19
|
+
/**
|
|
20
|
+
* @method
|
|
21
|
+
* @name apex#watchTradesForSymbols
|
|
22
|
+
* @description get the list of most recent trades for a list of symbols
|
|
23
|
+
* @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
|
24
|
+
* @param {string[]} symbols unified symbol of the market to fetch trades for
|
|
25
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
26
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
27
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
28
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
29
|
+
*/
|
|
30
|
+
watchTradesForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
31
|
+
handleTrades(client: Client, message: any): void;
|
|
32
|
+
parseWsTrade(trade: any, market?: any): Trade;
|
|
33
|
+
/**
|
|
34
|
+
* @method
|
|
35
|
+
* @name apex#watchOrderBook
|
|
36
|
+
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
37
|
+
* @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
|
38
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
39
|
+
* @param {int} [limit] the maximum amount of order book entries to return.
|
|
40
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
41
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
42
|
+
*/
|
|
43
|
+
watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
44
|
+
/**
|
|
45
|
+
* @method
|
|
46
|
+
* @name apex#watchOrderBookForSymbols
|
|
47
|
+
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
48
|
+
* @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
|
49
|
+
* @param {string[]} symbols unified array of symbols
|
|
50
|
+
* @param {int} [limit] the maximum amount of order book entries to return.
|
|
51
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
52
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
53
|
+
*/
|
|
54
|
+
watchOrderBookForSymbols(symbols: string[], limit?: Int, params?: {}): Promise<OrderBook>;
|
|
55
|
+
watchTopics(url: any, messageHashes: any, topics: any, params?: {}): Promise<any>;
|
|
56
|
+
handleOrderBook(client: Client, message: any): void;
|
|
57
|
+
handleDelta(bookside: any, delta: any): void;
|
|
58
|
+
handleDeltas(bookside: any, deltas: any): void;
|
|
59
|
+
/**
|
|
60
|
+
* @method
|
|
61
|
+
* @name apex#watchTicker
|
|
62
|
+
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
63
|
+
* @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
|
64
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
65
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
66
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
67
|
+
*/
|
|
68
|
+
watchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
69
|
+
/**
|
|
70
|
+
* @method
|
|
71
|
+
* @name apex#watchTickers
|
|
72
|
+
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
|
73
|
+
* @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
|
74
|
+
* @param {string[]} symbols unified symbol of the market to fetch the ticker for
|
|
75
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
76
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
77
|
+
*/
|
|
78
|
+
watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
79
|
+
handleTicker(client: Client, message: any): void;
|
|
80
|
+
/**
|
|
81
|
+
* @method
|
|
82
|
+
* @name apex#watchOHLCV
|
|
83
|
+
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
84
|
+
* @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
|
85
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
86
|
+
* @param {string} timeframe the length of time each candle represents
|
|
87
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
88
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
89
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
90
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
91
|
+
*/
|
|
92
|
+
watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
93
|
+
/**
|
|
94
|
+
* @method
|
|
95
|
+
* @name apex#watchOHLCVForSymbols
|
|
96
|
+
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
97
|
+
* @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
|
98
|
+
* @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
|
|
99
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
100
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
101
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
102
|
+
* @returns {object} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
103
|
+
*/
|
|
104
|
+
watchOHLCVForSymbols(symbolsAndTimeframes: string[][], since?: Int, limit?: Int, params?: {}): Promise<import("../base/types.js").Dictionary<import("../base/types.js").Dictionary<OHLCV[]>>>;
|
|
105
|
+
handleOHLCV(client: Client, message: any): void;
|
|
106
|
+
parseWsOHLCV(ohlcv: any, market?: any): OHLCV;
|
|
107
|
+
/**
|
|
108
|
+
* @method
|
|
109
|
+
* @name apex#watchMyTrades
|
|
110
|
+
* @description watches information on multiple trades made by the user
|
|
111
|
+
* @see https://api-docs.pro.apex.exchange/#private-websocket
|
|
112
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
113
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
114
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
115
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
116
|
+
* @param {boolean} [params.unifiedMargin] use unified margin account
|
|
117
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
118
|
+
*/
|
|
119
|
+
watchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
120
|
+
/**
|
|
121
|
+
* @method
|
|
122
|
+
* @name apex#watchPositions
|
|
123
|
+
* @see https://api-docs.pro.apex.exchange/#private-websocket
|
|
124
|
+
* @description watch all open positions
|
|
125
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
126
|
+
* @param {int} [since] the earliest time in ms to fetch positions for
|
|
127
|
+
* @param {int} [limit] the maximum number of positions to retrieve
|
|
128
|
+
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
129
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure}
|
|
130
|
+
*/
|
|
131
|
+
watchPositions(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
|
|
132
|
+
/**
|
|
133
|
+
* @method
|
|
134
|
+
* @name apex#watchOrders
|
|
135
|
+
* @description watches information on multiple orders made by the user
|
|
136
|
+
* @see https://api-docs.pro.apex.exchange/#private-websocket
|
|
137
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
138
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
139
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
140
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
141
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
142
|
+
*/
|
|
143
|
+
watchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
144
|
+
handleMyTrades(client: Client, lists: any): void;
|
|
145
|
+
handleOrder(client: Client, lists: any): void;
|
|
146
|
+
setPositionsCache(client: Client, symbols?: Strings): void;
|
|
147
|
+
loadPositionsSnapshot(client: any, messageHash: any): Promise<void>;
|
|
148
|
+
handlePositions(client: any, lists: any): void;
|
|
149
|
+
authenticate(url: any, params?: {}): Promise<any>;
|
|
150
|
+
handleErrorMessage(client: Client, message: any): boolean;
|
|
151
|
+
handleMessage(client: Client, message: any): void;
|
|
152
|
+
ping(client: Client): {
|
|
153
|
+
args: string[];
|
|
154
|
+
op: string;
|
|
155
|
+
};
|
|
156
|
+
handlePong(client: Client, message: any): any;
|
|
157
|
+
handleAccount(client: Client, message: any): void;
|
|
158
|
+
handleAuthenticate(client: Client, message: any): any;
|
|
159
|
+
handleSubscriptionStatus(client: Client, message: any): any;
|
|
160
|
+
}
|