ccxt 4.5.51 → 4.5.52
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 +10 -9
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/aster.js +1532 -1072
- package/dist/cjs/src/base/Exchange.js +29 -24
- package/dist/cjs/src/bequant.js +3 -0
- package/dist/cjs/src/binance.js +36 -37
- package/dist/cjs/src/binanceusdm.js +1 -0
- package/dist/cjs/src/grvt.js +15 -8
- package/dist/cjs/src/kraken.js +6 -1
- package/dist/cjs/src/pro/aster.js +130 -138
- package/dist/cjs/src/pro/bequant.js +4 -3
- package/dist/cjs/src/pro/binance.js +3 -0
- package/dist/cjs/src/pro/binanceusdm.js +6 -1
- package/dist/cjs/src/pro/grvt.js +3 -3
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/aster.d.ts +43 -9
- package/js/src/aster.d.ts +136 -71
- package/js/src/aster.js +1532 -1072
- package/js/src/base/Exchange.d.ts +3 -4
- package/js/src/base/Exchange.js +29 -24
- package/js/src/bequant.js +3 -0
- package/js/src/binance.js +35 -32
- package/js/src/binanceusdm.js +1 -0
- package/js/src/grvt.js +15 -8
- package/js/src/kraken.js +6 -1
- package/js/src/pro/aster.d.ts +81 -45
- package/js/src/pro/aster.js +130 -138
- package/js/src/pro/bequant.js +4 -3
- package/js/src/pro/binance.js +3 -0
- package/js/src/pro/binanceusdm.js +6 -1
- package/js/src/pro/grvt.js +3 -3
- package/package.json +2 -1
package/js/src/aster.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/aster.js';
|
|
2
|
-
import type { Balances, Currencies, Currency, Dict, FundingRate,
|
|
2
|
+
import type { Balances, Currencies, Currency, Dict, FundingRate, FundingRates, int, Int, LastPrices, LedgerEntry, Leverage, Leverages, MarginMode, MarginModes, MarginModification, Market, Num, OHLCV, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class aster
|
|
5
5
|
* @augments Exchange
|
|
@@ -12,8 +12,8 @@ export default class aster extends Exchange {
|
|
|
12
12
|
* @method
|
|
13
13
|
* @name aster#fetchCurrencies
|
|
14
14
|
* @description fetches all available currencies on an exchange
|
|
15
|
-
* @see https://github.
|
|
16
|
-
* @see https://github.
|
|
15
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/market-data/#trading-specification-information
|
|
16
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#exchange-information
|
|
17
17
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
18
18
|
* @returns {object} an associative dictionary of currencies
|
|
19
19
|
*/
|
|
@@ -22,17 +22,19 @@ export default class aster extends Exchange {
|
|
|
22
22
|
* @method
|
|
23
23
|
* @name aster#fetchMarkets
|
|
24
24
|
* @description retrieves data on all markets for bigone
|
|
25
|
-
* @see https://github.
|
|
26
|
-
* @see https://github.
|
|
25
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/market-data/#trading-specification-information
|
|
26
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#exchange-information
|
|
27
27
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
28
28
|
* @returns {object[]} an array of objects representing market data
|
|
29
29
|
*/
|
|
30
30
|
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
31
|
+
parseMarket(market: Dict): Market;
|
|
31
32
|
/**
|
|
32
33
|
* @method
|
|
33
34
|
* @name aster#fetchTime
|
|
34
35
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
35
|
-
* @see https://github.
|
|
36
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/market-data/#get-server-time
|
|
37
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#check-server-time
|
|
36
38
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
37
39
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
38
40
|
*/
|
|
@@ -42,8 +44,10 @@ export default class aster extends Exchange {
|
|
|
42
44
|
* @method
|
|
43
45
|
* @name aster#fetchOHLCV
|
|
44
46
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
45
|
-
* @see https://github.
|
|
46
|
-
* @see https://github.
|
|
47
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/market-data/#k-line-data
|
|
48
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#klinecandlestick-data
|
|
49
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#index-price-klinecandlestick-data
|
|
50
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#mark-price-klinecandlestick-data
|
|
47
51
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
48
52
|
* @param {string} timeframe the length of time each candle represents
|
|
49
53
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -59,8 +63,10 @@ export default class aster extends Exchange {
|
|
|
59
63
|
* @method
|
|
60
64
|
* @name aster#fetchTrades
|
|
61
65
|
* @description get the list of most recent trades for a particular symbol
|
|
62
|
-
* @see https://github.
|
|
63
|
-
* @see https://github.
|
|
66
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/market-data/#recent-trades-list
|
|
67
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/market-data/#recent-trades-aggregated
|
|
68
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#recent-trades-list
|
|
69
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#compressedaggregate-trades-list
|
|
64
70
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
65
71
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
66
72
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -72,8 +78,8 @@ export default class aster extends Exchange {
|
|
|
72
78
|
* @method
|
|
73
79
|
* @name aster#fetchMyTrades
|
|
74
80
|
* @description fetch all trades made by the user
|
|
75
|
-
* @see https://github.
|
|
76
|
-
* @see https://github.
|
|
81
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#account-trade-history-user_data
|
|
82
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#account-trade-list-user_data
|
|
77
83
|
* @param {string} [symbol] unified market symbol
|
|
78
84
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
79
85
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -86,34 +92,21 @@ export default class aster extends Exchange {
|
|
|
86
92
|
* @method
|
|
87
93
|
* @name aster#fetchOrderBook
|
|
88
94
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
89
|
-
* @see https://github.
|
|
90
|
-
* @see https://github.
|
|
95
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/market-data/#depth-information
|
|
96
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#order-book
|
|
91
97
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
92
98
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
93
99
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
94
100
|
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
95
101
|
*/
|
|
96
102
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
97
|
-
/**
|
|
98
|
-
* @method
|
|
99
|
-
* @name aster#fetchFundingRateHistory
|
|
100
|
-
* @description fetches historical funding rate prices
|
|
101
|
-
* @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#get-funding-rate-history
|
|
102
|
-
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
103
|
-
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
104
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
105
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
106
|
-
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
107
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
108
|
-
*/
|
|
109
|
-
fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
|
|
110
103
|
parseTicker(ticker: Dict, market?: Market): Ticker;
|
|
111
104
|
/**
|
|
112
105
|
* @method
|
|
113
106
|
* @name aster#fetchTicker
|
|
114
107
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
115
|
-
* @see https://github.
|
|
116
|
-
* @see https://github.
|
|
108
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/market-data/#24h-price-change
|
|
109
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#24hr-ticker-price-change-statistics
|
|
117
110
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
118
111
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
119
112
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -123,8 +116,8 @@ export default class aster extends Exchange {
|
|
|
123
116
|
* @method
|
|
124
117
|
* @name aster#fetchTickers
|
|
125
118
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
126
|
-
* @see https://github.
|
|
127
|
-
* @see https://github.
|
|
119
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/market-data/#24h-price-change
|
|
120
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#24hr-ticker-price-change-statistics
|
|
128
121
|
* @param {string[]} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
129
122
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
130
123
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
@@ -132,12 +125,44 @@ export default class aster extends Exchange {
|
|
|
132
125
|
* @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
133
126
|
*/
|
|
134
127
|
fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
128
|
+
/**
|
|
129
|
+
* @method
|
|
130
|
+
* @name aster#fetchLastPrices
|
|
131
|
+
* @description fetches the last price for multiple markets
|
|
132
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/market-data/#latest-price
|
|
133
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#symbol-price-ticker
|
|
134
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the last prices
|
|
135
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
136
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
137
|
+
* @returns {object} a dictionary of lastprices structures
|
|
138
|
+
*/
|
|
139
|
+
fetchLastPrices(symbols?: Strings, params?: {}): Promise<LastPrices>;
|
|
140
|
+
parseLastPrice(entry: any, market?: Market): {
|
|
141
|
+
symbol: string;
|
|
142
|
+
timestamp: number;
|
|
143
|
+
datetime: string;
|
|
144
|
+
price: number;
|
|
145
|
+
side: any;
|
|
146
|
+
info: any;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* @method
|
|
150
|
+
* @name aster#fetchBidsAsks
|
|
151
|
+
* @description fetches the bid and ask price and volume for multiple markets
|
|
152
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/market-data/#current-best-order
|
|
153
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#symbol-order-book-ticker
|
|
154
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
|
155
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
156
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
157
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
158
|
+
*/
|
|
159
|
+
fetchBidsAsks(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
135
160
|
parseFundingRate(contract: any, market?: Market): FundingRate;
|
|
136
161
|
/**
|
|
137
162
|
* @method
|
|
138
163
|
* @name aster#fetchFundingRate
|
|
139
164
|
* @description fetch the current funding rate
|
|
140
|
-
* @see https://github.
|
|
165
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#symbol-price-ticker
|
|
141
166
|
* @param {string} symbol unified market symbol
|
|
142
167
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
143
168
|
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
@@ -147,7 +172,7 @@ export default class aster extends Exchange {
|
|
|
147
172
|
* @method
|
|
148
173
|
* @name aster#fetchFundingRates
|
|
149
174
|
* @description fetch the current funding rate for multiple symbols
|
|
150
|
-
* @see https://github.
|
|
175
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#symbol-price-ticker
|
|
151
176
|
* @param {string[]} [symbols] list of unified market symbols
|
|
152
177
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
153
178
|
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
@@ -157,30 +182,50 @@ export default class aster extends Exchange {
|
|
|
157
182
|
* @method
|
|
158
183
|
* @name aster#fetchFundingIntervals
|
|
159
184
|
* @description fetch the funding rate interval for multiple markets
|
|
160
|
-
* @see https://github.
|
|
185
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#get-funding-rate-config
|
|
161
186
|
* @param {string[]} [symbols] list of unified market symbols
|
|
162
187
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
163
188
|
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
164
189
|
*/
|
|
165
190
|
fetchFundingIntervals(symbols?: Strings, params?: {}): Promise<FundingRates>;
|
|
166
|
-
|
|
191
|
+
/**
|
|
192
|
+
* @method
|
|
193
|
+
* @name aster#fetchFundingRateHistory
|
|
194
|
+
* @description fetches historical funding rate prices
|
|
195
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/market-data/#get-funding-rate-history
|
|
196
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
197
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
198
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
199
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
200
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
201
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
202
|
+
*/
|
|
203
|
+
fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").FundingRateHistory[]>;
|
|
204
|
+
parseFundingRateHistory(contract: any, market?: Market): {
|
|
205
|
+
info: any;
|
|
206
|
+
symbol: string;
|
|
207
|
+
fundingRate: number;
|
|
208
|
+
timestamp: number;
|
|
209
|
+
datetime: string;
|
|
210
|
+
};
|
|
167
211
|
/**
|
|
168
212
|
* @method
|
|
169
213
|
* @name aster#fetchBalance
|
|
170
214
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
171
|
-
* @see https://github.
|
|
172
|
-
* @see https://github.
|
|
215
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#account-information-user_data
|
|
216
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#futures-account-balance-v3-user_data
|
|
173
217
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
174
218
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
175
219
|
* @param {string} [params.type] 'spot', 'option', use params["subType"] for swap and future markets
|
|
176
220
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
177
221
|
*/
|
|
178
222
|
fetchBalance(params?: {}): Promise<Balances>;
|
|
223
|
+
parseBalance(response: any): Balances;
|
|
179
224
|
/**
|
|
180
225
|
* @method
|
|
181
226
|
* @name aster#setMarginMode
|
|
182
227
|
* @description set margin mode to 'cross' or 'isolated'
|
|
183
|
-
* @see https://github.
|
|
228
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#change-margin-type-trade
|
|
184
229
|
* @param {string} marginMode 'cross' or 'isolated'
|
|
185
230
|
* @param {string} symbol unified market symbol
|
|
186
231
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -191,7 +236,7 @@ export default class aster extends Exchange {
|
|
|
191
236
|
* @method
|
|
192
237
|
* @name aster#fetchPositionMode
|
|
193
238
|
* @description fetchs the position mode, hedged or one way, hedged for aster is set identically for all linear markets or all inverse markets
|
|
194
|
-
* @see https://github.
|
|
239
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#get-current-position-modeuser_data
|
|
195
240
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
196
241
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
197
242
|
* @returns {object} an object detailing whether the market is in hedged or one-way mode
|
|
@@ -204,7 +249,7 @@ export default class aster extends Exchange {
|
|
|
204
249
|
* @method
|
|
205
250
|
* @name aster#setPositionMode
|
|
206
251
|
* @description set hedged to true or false for a market
|
|
207
|
-
* @see https://github.
|
|
252
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#change-position-modetrade
|
|
208
253
|
* @param {bool} hedged set to true to use dualSidePosition
|
|
209
254
|
* @param {string} symbol not used by bingx setPositionMode ()
|
|
210
255
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -216,8 +261,8 @@ export default class aster extends Exchange {
|
|
|
216
261
|
* @method
|
|
217
262
|
* @name aster#fetchTradingFee
|
|
218
263
|
* @description fetch the trading fees for a market
|
|
219
|
-
* @see https://github.
|
|
220
|
-
* @see https://github.
|
|
264
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/market-data/#get-symbol-fees
|
|
265
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#user-commission-rate-user_data
|
|
221
266
|
* @param {string} symbol unified market symbol
|
|
222
267
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
223
268
|
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
@@ -230,8 +275,8 @@ export default class aster extends Exchange {
|
|
|
230
275
|
* @method
|
|
231
276
|
* @name aster#fetchOrder
|
|
232
277
|
* @description fetches information on an order made by the user
|
|
233
|
-
* @see https://github.
|
|
234
|
-
* @see https://github.
|
|
278
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#query-order-user_data
|
|
279
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#query-order-user_data
|
|
235
280
|
* @param {string} id the order id
|
|
236
281
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
237
282
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -243,7 +288,8 @@ export default class aster extends Exchange {
|
|
|
243
288
|
* @method
|
|
244
289
|
* @name aster#fetchOpenOrder
|
|
245
290
|
* @description fetch an open order by the id
|
|
246
|
-
* @see https://github.
|
|
291
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#query-current-open-order-user_data
|
|
292
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#query-current-open-order-user_data
|
|
247
293
|
* @param {string} id order id
|
|
248
294
|
* @param {string} symbol unified market symbol
|
|
249
295
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -254,8 +300,8 @@ export default class aster extends Exchange {
|
|
|
254
300
|
* @method
|
|
255
301
|
* @name aster#fetchOrders
|
|
256
302
|
* @description fetches information on multiple orders made by the user
|
|
257
|
-
* @see https://github.
|
|
258
|
-
* @see https://github.
|
|
303
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#query-all-orders-user_data
|
|
304
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#all-orders-user_data
|
|
259
305
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
260
306
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
261
307
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -268,8 +314,8 @@ export default class aster extends Exchange {
|
|
|
268
314
|
* @method
|
|
269
315
|
* @name aster#fetchOpenOrders
|
|
270
316
|
* @description fetch all unfilled currently open orders
|
|
271
|
-
* @see https://github.
|
|
272
|
-
* @see https://github.
|
|
317
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#current-open-orders-user_data
|
|
318
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#current-all-open-orders-user_data
|
|
273
319
|
* @param {string} symbol unified market symbol
|
|
274
320
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
275
321
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -283,8 +329,8 @@ export default class aster extends Exchange {
|
|
|
283
329
|
* @method
|
|
284
330
|
* @name aster#createOrder
|
|
285
331
|
* @description create a trade order
|
|
286
|
-
* @see https://github.
|
|
287
|
-
* @see https://github.
|
|
332
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#place-order-trade
|
|
333
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#new-order-trade
|
|
288
334
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
289
335
|
* @param {string} type 'market' or 'limit' or 'STOP' or 'STOP_MARKET' or 'TAKE_PROFIT' or 'TAKE_PROFIT_MARKET' or 'TRAILING_STOP_MARKET'
|
|
290
336
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -306,7 +352,7 @@ export default class aster extends Exchange {
|
|
|
306
352
|
* @method
|
|
307
353
|
* @name aster#createOrders
|
|
308
354
|
* @description create a list of trade orders
|
|
309
|
-
* @see https://github.
|
|
355
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#new-order-trade
|
|
310
356
|
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
311
357
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
312
358
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -317,8 +363,8 @@ export default class aster extends Exchange {
|
|
|
317
363
|
* @method
|
|
318
364
|
* @name aster#cancelAllOrders
|
|
319
365
|
* @description cancel all open orders in a market
|
|
320
|
-
* @see https://github.
|
|
321
|
-
* @see https://github.
|
|
366
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#cancel-all-open-orders-trade
|
|
367
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#current-all-open-orders-user_data
|
|
322
368
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
323
369
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
324
370
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -328,8 +374,8 @@ export default class aster extends Exchange {
|
|
|
328
374
|
* @method
|
|
329
375
|
* @name aster#cancelOrder
|
|
330
376
|
* @description cancels an open order
|
|
331
|
-
* @see https://github.
|
|
332
|
-
* @see https://github.
|
|
377
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#cancel-order-trade
|
|
378
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#cancel-order-trade
|
|
333
379
|
* @param {string} id order id
|
|
334
380
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
335
381
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -340,7 +386,8 @@ export default class aster extends Exchange {
|
|
|
340
386
|
* @method
|
|
341
387
|
* @name aster#cancelOrders
|
|
342
388
|
* @description cancel multiple orders
|
|
343
|
-
* @see https://github.
|
|
389
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#cancel-all-open-orders-trade
|
|
390
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#cancel-multiple-orders-trade
|
|
344
391
|
* @param {string[]} ids order ids
|
|
345
392
|
* @param {string} [symbol] unified market symbol
|
|
346
393
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -355,7 +402,7 @@ export default class aster extends Exchange {
|
|
|
355
402
|
* @method
|
|
356
403
|
* @name aster#setLeverage
|
|
357
404
|
* @description set the level of leverage for a market
|
|
358
|
-
* @see https://github.
|
|
405
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#change-initial-leverage-trade
|
|
359
406
|
* @param {float} leverage the rate of leverage
|
|
360
407
|
* @param {string} symbol unified market symbol
|
|
361
408
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -366,7 +413,7 @@ export default class aster extends Exchange {
|
|
|
366
413
|
* @method
|
|
367
414
|
* @name aster#fetchLeverages
|
|
368
415
|
* @description fetch the set leverage for all markets
|
|
369
|
-
* @see https://github.
|
|
416
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#position-information-v3-user_data
|
|
370
417
|
* @param {string[]} [symbols] a list of unified market symbols
|
|
371
418
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
372
419
|
* @returns {object} a list of [leverage structures]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
@@ -377,7 +424,7 @@ export default class aster extends Exchange {
|
|
|
377
424
|
* @method
|
|
378
425
|
* @name aster#fetchMarginModes
|
|
379
426
|
* @description fetches margin mode of the user
|
|
380
|
-
* @see https://github.
|
|
427
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#position-information-v3-user_data
|
|
381
428
|
* @param {string[]} symbols unified market symbols
|
|
382
429
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
383
430
|
* @returns {object} a list of [margin mode structures]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
|
|
@@ -388,7 +435,7 @@ export default class aster extends Exchange {
|
|
|
388
435
|
* @method
|
|
389
436
|
* @name aster#fetchMarginAdjustmentHistory
|
|
390
437
|
* @description fetches the history of margin added or reduced from contract isolated positions
|
|
391
|
-
* @see https://github.
|
|
438
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#get-position-margin-change-history-trade
|
|
392
439
|
* @param {string} symbol unified market symbol
|
|
393
440
|
* @param {string} [type] "add" or "reduce"
|
|
394
441
|
* @param {int} [since] timestamp in ms of the earliest change to fetch
|
|
@@ -404,7 +451,7 @@ export default class aster extends Exchange {
|
|
|
404
451
|
* @method
|
|
405
452
|
* @name aster#reduceMargin
|
|
406
453
|
* @description remove margin from a position
|
|
407
|
-
* @see https://github.
|
|
454
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#modify-isolated-position-margin-trade
|
|
408
455
|
* @param {string} symbol unified market symbol
|
|
409
456
|
* @param {float} amount the amount of margin to remove
|
|
410
457
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -415,7 +462,7 @@ export default class aster extends Exchange {
|
|
|
415
462
|
* @method
|
|
416
463
|
* @name aster#addMargin
|
|
417
464
|
* @description add margin
|
|
418
|
-
* @see https://github.
|
|
465
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#modify-isolated-position-margin-trade
|
|
419
466
|
* @param {string} symbol unified market symbol
|
|
420
467
|
* @param {float} amount amount of margin to add
|
|
421
468
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -435,7 +482,7 @@ export default class aster extends Exchange {
|
|
|
435
482
|
* @method
|
|
436
483
|
* @name aster#fetchFundingHistory
|
|
437
484
|
* @description fetch the history of funding payments paid and received on this account
|
|
438
|
-
* @see https://github.
|
|
485
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#get-income-historyuser_data
|
|
439
486
|
* @param {string} symbol unified market symbol
|
|
440
487
|
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
441
488
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
@@ -452,7 +499,7 @@ export default class aster extends Exchange {
|
|
|
452
499
|
* @method
|
|
453
500
|
* @name aster#fetchLedger
|
|
454
501
|
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
455
|
-
* @see https://github.
|
|
502
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#get-income-historyuser_data
|
|
456
503
|
* @param {string} [code] unified currency code
|
|
457
504
|
* @param {int} [since] timestamp in ms of the earliest ledger entry
|
|
458
505
|
* @param {int} [limit] max number of ledger entries to return
|
|
@@ -466,7 +513,7 @@ export default class aster extends Exchange {
|
|
|
466
513
|
* @method
|
|
467
514
|
* @name aster#fetchPositionsRisk
|
|
468
515
|
* @description fetch positions risk
|
|
469
|
-
* @see https://github.
|
|
516
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#position-information-v3-user_data
|
|
470
517
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
471
518
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
472
519
|
* @returns {object} data on the positions risk
|
|
@@ -476,7 +523,7 @@ export default class aster extends Exchange {
|
|
|
476
523
|
* @method
|
|
477
524
|
* @name aster#fetchPositions
|
|
478
525
|
* @description fetch all open positions
|
|
479
|
-
* @see https://github.
|
|
526
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#position-information-v3-user_data
|
|
480
527
|
* @param {string[]} [symbols] list of unified market symbols
|
|
481
528
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
482
529
|
* @param {string} [params.method] method name to call, "positionRisk", "account" or "option", default is "positionRisk"
|
|
@@ -514,7 +561,7 @@ export default class aster extends Exchange {
|
|
|
514
561
|
* @name aster#fetchAccountPositions
|
|
515
562
|
* @ignore
|
|
516
563
|
* @description fetch account positions
|
|
517
|
-
|
|
564
|
+
https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#position-information-v3-user_data
|
|
518
565
|
* @param {string[]} [symbols] list of unified market symbols
|
|
519
566
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
520
567
|
* @returns {object} data on account positions
|
|
@@ -528,7 +575,9 @@ export default class aster extends Exchange {
|
|
|
528
575
|
* @method
|
|
529
576
|
* @name aster#withdraw
|
|
530
577
|
* @description make a withdrawal
|
|
531
|
-
* @see https://github.
|
|
578
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#withdraw-user_data
|
|
579
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/deposit%26withdrawal/#withdraw-by-fapiv3-evm-futures
|
|
580
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/deposit%26withdrawal/#withdraw-by-fapiv3-evm-spot
|
|
532
581
|
* @param {string} code unified currency code
|
|
533
582
|
* @param {float} amount the amount to withdraw
|
|
534
583
|
* @param {string} address the address to withdraw to
|
|
@@ -537,12 +586,13 @@ export default class aster extends Exchange {
|
|
|
537
586
|
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
538
587
|
*/
|
|
539
588
|
withdraw(code: string, amount: number, address: string, tag?: Str, params?: {}): Promise<Transaction>;
|
|
589
|
+
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
540
590
|
/**
|
|
541
591
|
* @method
|
|
542
592
|
* @name aster#transfer
|
|
543
593
|
* @description transfer currency internally between wallets on the same account
|
|
544
|
-
* @see https://github.
|
|
545
|
-
* @see https://github.
|
|
594
|
+
* @see https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#perp-spot-transfer-trade
|
|
595
|
+
* @see https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#transfer-between-futures-and-spot-transfer
|
|
546
596
|
* @param {string} code unified currency code
|
|
547
597
|
* @param {float} amount amount to transfer
|
|
548
598
|
* @param {string} fromAccount account to transfer from
|
|
@@ -551,6 +601,8 @@ export default class aster extends Exchange {
|
|
|
551
601
|
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
552
602
|
*/
|
|
553
603
|
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
604
|
+
parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
|
|
605
|
+
parseTransferStatus(status: Str): Str;
|
|
554
606
|
hashMessage(binaryMessage: any): string;
|
|
555
607
|
signHash(hash: any, privateKey: any): string;
|
|
556
608
|
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
@@ -559,5 +611,18 @@ export default class aster extends Exchange {
|
|
|
559
611
|
body: any;
|
|
560
612
|
headers: any;
|
|
561
613
|
};
|
|
614
|
+
encodeValuesWithJson(values: Dict): string;
|
|
615
|
+
capitalizeKeys(dict: Dict): Dict;
|
|
616
|
+
loadMarketsAndSignIn(): Promise<void>;
|
|
617
|
+
/**
|
|
618
|
+
* @method
|
|
619
|
+
* @name aster#signIn
|
|
620
|
+
* @description sign in, must be called prior to using other authenticated methods
|
|
621
|
+
* @see https://asterdex.github.io/aster-api-website/asterCode/integration-flow/
|
|
622
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
623
|
+
* @returns response from exchange
|
|
624
|
+
*/
|
|
625
|
+
signIn(params?: {}): Promise<boolean>;
|
|
626
|
+
initializeClient(params?: {}): Promise<boolean>;
|
|
562
627
|
handleErrors(httpCode: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
|
|
563
628
|
}
|