ccxt 4.5.44 → 4.5.46
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 +9 -12
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -12
- package/dist/cjs/src/abstract/kucoinfutures.js +1 -1
- package/dist/cjs/src/base/Exchange.js +39 -3
- package/dist/cjs/src/base/functions/encode.js +2 -2
- package/dist/cjs/src/base/functions/generic.js +8 -2
- package/dist/cjs/src/binance.js +11 -2
- package/dist/cjs/src/bitget.js +3 -1
- package/dist/cjs/src/bitmart.js +144 -21
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bitteam.js +1 -1
- package/dist/cjs/src/btcbox.js +1 -1
- package/dist/cjs/src/bybit.js +58 -56
- package/dist/cjs/src/bydfi.js +102 -100
- package/dist/cjs/src/cex.js +1 -0
- package/dist/cjs/src/gate.js +264 -170
- package/dist/cjs/src/grvt.js +3 -2
- package/dist/cjs/src/hyperliquid.js +16 -5
- package/dist/cjs/src/kraken.js +4 -2
- package/dist/cjs/src/krakenfutures.js +1 -5
- package/dist/cjs/src/kucoin.js +4733 -972
- package/dist/cjs/src/kucoinfutures.js +14 -3434
- package/dist/cjs/src/lbank.js +1 -1
- package/dist/cjs/src/okx.js +75 -57
- package/dist/cjs/src/paradex.js +2 -6
- package/dist/cjs/src/poloniex.js +1 -1
- package/dist/cjs/src/pro/bydfi.js +19 -19
- package/dist/cjs/src/pro/gate.js +114 -53
- package/dist/cjs/src/pro/grvt.js +5 -3
- package/dist/cjs/src/pro/htx.js +4 -4
- package/dist/cjs/src/pro/kucoin.js +819 -178
- package/dist/cjs/src/pro/kucoinfutures.js +95 -1261
- package/dist/cjs/src/pro/mexc.js +10 -5
- package/dist/cjs/src/pro/okx.js +85 -40
- package/index.d.cts +2 -0
- package/js/ccxt.d.ts +2 -14
- package/js/ccxt.js +2 -10
- package/js/src/abstract/bitmart.d.ts +7 -0
- package/js/src/abstract/bydfi.d.ts +29 -29
- package/js/src/abstract/kraken.d.ts +1 -0
- package/js/src/abstract/kucoin.d.ts +46 -2
- package/js/src/abstract/kucoinfutures.d.ts +27 -11
- package/js/src/base/Exchange.d.ts +13 -1
- package/js/src/base/Exchange.js +39 -3
- package/js/src/base/functions/encode.js +2 -2
- package/js/src/base/functions/generic.js +9 -3
- package/js/src/binance.js +11 -2
- package/js/src/bitget.js +3 -1
- package/js/src/bitmart.d.ts +18 -4
- package/js/src/bitmart.js +144 -21
- package/js/src/bitrue.js +1 -1
- package/js/src/bitteam.js +1 -1
- package/js/src/btcbox.js +1 -1
- package/js/src/bybit.d.ts +1 -0
- package/js/src/bybit.js +58 -56
- package/js/src/bydfi.d.ts +31 -31
- package/js/src/bydfi.js +102 -100
- package/js/src/cex.js +2 -1
- package/js/src/gate.d.ts +125 -119
- package/js/src/gate.js +264 -170
- package/js/src/grvt.js +3 -2
- package/js/src/hyperliquid.d.ts +3 -1
- package/js/src/hyperliquid.js +16 -5
- package/js/src/kraken.js +4 -2
- package/js/src/krakenfutures.js +1 -5
- package/js/src/kucoin.d.ts +696 -100
- package/js/src/kucoin.js +4734 -973
- package/js/src/kucoinfutures.d.ts +4 -522
- package/js/src/kucoinfutures.js +14 -3434
- package/js/src/lbank.js +1 -1
- package/js/src/okx.d.ts +1 -0
- package/js/src/okx.js +75 -57
- package/js/src/paradex.d.ts +0 -1
- package/js/src/paradex.js +2 -6
- package/js/src/poloniex.js +1 -1
- package/js/src/pro/bydfi.d.ts +18 -18
- package/js/src/pro/bydfi.js +19 -19
- package/js/src/pro/gate.d.ts +30 -1
- package/js/src/pro/gate.js +114 -53
- package/js/src/pro/grvt.js +5 -3
- package/js/src/pro/htx.js +4 -4
- package/js/src/pro/kucoin.d.ts +70 -30
- package/js/src/pro/kucoin.js +821 -180
- package/js/src/pro/kucoinfutures.d.ts +17 -195
- package/js/src/pro/kucoinfutures.js +96 -1262
- package/js/src/pro/mexc.js +10 -5
- package/js/src/pro/okx.d.ts +1 -0
- package/js/src/pro/okx.js +85 -40
- package/package.json +2 -2
- package/dist/cjs/src/abstract/alp.js +0 -11
- package/dist/cjs/src/abstract/defx.js +0 -11
- package/dist/cjs/src/abstract/timex.js +0 -11
- package/dist/cjs/src/alp.js +0 -1059
- package/dist/cjs/src/defx.js +0 -2142
- package/dist/cjs/src/pro/defx.js +0 -866
- package/dist/cjs/src/timex.js +0 -1793
- package/js/src/abstract/alp.d.ts +0 -21
- package/js/src/abstract/alp.js +0 -5
- package/js/src/abstract/defx.d.ts +0 -72
- package/js/src/abstract/defx.js +0 -5
- package/js/src/abstract/timex.d.ts +0 -65
- package/js/src/abstract/timex.js +0 -5
- package/js/src/alp.d.ts +0 -209
- package/js/src/alp.js +0 -1052
- package/js/src/defx.d.ts +0 -348
- package/js/src/defx.js +0 -2135
- package/js/src/pro/defx.d.ts +0 -236
- package/js/src/pro/defx.js +0 -859
- package/js/src/timex.d.ts +0 -247
- package/js/src/timex.js +0 -1786
package/js/src/defx.d.ts
DELETED
|
@@ -1,348 +0,0 @@
|
|
|
1
|
-
import Exchange from './abstract/defx.js';
|
|
2
|
-
import type { Dict, int, Num, Strings, Int, Str, Market, OrderType, OrderSide, Order, Ticker, Tickers, OHLCV, Trade, OrderBook, FundingRate, Balances, Position, LedgerEntry, Currency, Transaction, Leverage } from './base/types.js';
|
|
3
|
-
/**
|
|
4
|
-
* @class defx
|
|
5
|
-
* @augments Exchange
|
|
6
|
-
*/
|
|
7
|
-
export default class defx extends Exchange {
|
|
8
|
-
describe(): any;
|
|
9
|
-
/**
|
|
10
|
-
* @method
|
|
11
|
-
* @name defx#fetchStatus
|
|
12
|
-
* @description the latest known information on the availability of the exchange API
|
|
13
|
-
* @see https://api-docs.defx.com/#4b03bb3b-a0fa-4dfb-b96c-237bde0ce9e6
|
|
14
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
15
|
-
* @returns {object} a [status structure]{@link https://docs.ccxt.com/?id=exchange-status-structure}
|
|
16
|
-
*/
|
|
17
|
-
fetchStatus(params?: {}): Promise<{
|
|
18
|
-
status: any;
|
|
19
|
-
updated: any;
|
|
20
|
-
eta: any;
|
|
21
|
-
url: any;
|
|
22
|
-
info: any;
|
|
23
|
-
}>;
|
|
24
|
-
/**
|
|
25
|
-
* @method
|
|
26
|
-
* @name defx#fetchTime
|
|
27
|
-
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
28
|
-
* @see https://api-docs.defx.com/#4b03bb3b-a0fa-4dfb-b96c-237bde0ce9e6
|
|
29
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
30
|
-
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
31
|
-
*/
|
|
32
|
-
fetchTime(params?: {}): Promise<Int>;
|
|
33
|
-
/**
|
|
34
|
-
* @method
|
|
35
|
-
* @name defx#fetchMarkets
|
|
36
|
-
* @description retrieves data on all markets for defx
|
|
37
|
-
* @see https://api-docs.defx.com/#73cce0c8-f842-4891-9145-01bb6d61324d
|
|
38
|
-
* @see https://api-docs.defx.com/#24fd4e5b-840e-451e-99e0-7fea47c7f371
|
|
39
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
40
|
-
* @returns {object[]} an array of objects representing market data
|
|
41
|
-
*/
|
|
42
|
-
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
43
|
-
parseMarket(market: Dict): Market;
|
|
44
|
-
/**
|
|
45
|
-
* @method
|
|
46
|
-
* @name defx#fetchTicker
|
|
47
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
48
|
-
* @see https://api-docs.defx.com/#fe6f81d0-2f3a-4eee-976f-c8fc8f4c5d56
|
|
49
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
50
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
51
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
52
|
-
*/
|
|
53
|
-
fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
54
|
-
/**
|
|
55
|
-
* @method
|
|
56
|
-
* @name defx#fetchTickers
|
|
57
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
58
|
-
* @see https://api-docs.defx.com/#8c61cfbd-40d9-410e-b014-f5b36eba51d1
|
|
59
|
-
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
60
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
61
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
62
|
-
*/
|
|
63
|
-
fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
64
|
-
parseTicker(ticker: Dict, market?: Market): Ticker;
|
|
65
|
-
/**
|
|
66
|
-
* @method
|
|
67
|
-
* @name defx#fetchOHLCV
|
|
68
|
-
* @see https://api-docs.defx.com/#54b71951-1472-4670-b5af-4c2dc41e73d0
|
|
69
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
70
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
71
|
-
* @param {string} timeframe the length of time each candle represents
|
|
72
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
73
|
-
* @param {int} [limit] max=1000, max=100 when since is defined and is less than (now - (999 * (timeframe in ms)))
|
|
74
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
75
|
-
* @param {int} [params.until] the latest time in ms to fetch orders for
|
|
76
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
77
|
-
*/
|
|
78
|
-
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
79
|
-
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
80
|
-
/**
|
|
81
|
-
* @method
|
|
82
|
-
* @name defx#fetchTrades
|
|
83
|
-
* @description get the list of most recent trades for a particular symbol
|
|
84
|
-
* @see https://api-docs.defx.com/#5865452f-ea32-4f13-bfbc-03af5f5574fd
|
|
85
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
86
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
87
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
88
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
89
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades}
|
|
90
|
-
*/
|
|
91
|
-
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
92
|
-
/**
|
|
93
|
-
* @method
|
|
94
|
-
* @name defx#fetchMyTrades
|
|
95
|
-
* @description fetch all trades made by the user
|
|
96
|
-
* @see https://api-docs.defx.com/#06b5b33c-2fc6-48de-896c-fc316f5871a7
|
|
97
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
98
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
99
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
100
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
101
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades}
|
|
102
|
-
*/
|
|
103
|
-
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
104
|
-
parseTrade(trade: Dict, market?: Market): Trade;
|
|
105
|
-
/**
|
|
106
|
-
* @method
|
|
107
|
-
* @name defx#fetchOrderBook
|
|
108
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
109
|
-
* @see https://api-docs.defx.com/#6c1a2971-8325-4e7d-9962-e0bfcaacf9c4
|
|
110
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
111
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
112
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
113
|
-
* @param {string} [params.slab] slab from market.info.depthSlabs
|
|
114
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
|
|
115
|
-
*/
|
|
116
|
-
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
117
|
-
/**
|
|
118
|
-
* @method
|
|
119
|
-
* @name defx#fetchMarkPrice
|
|
120
|
-
* @description fetches mark price for the market
|
|
121
|
-
* @see https://api-docs.defx.com/#12168192-4e7b-4458-a001-e8b80961f0b7
|
|
122
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
123
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
124
|
-
* @param {string} [params.subType] "linear" or "inverse"
|
|
125
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
126
|
-
*/
|
|
127
|
-
fetchMarkPrice(symbol: string, params?: {}): Promise<Ticker>;
|
|
128
|
-
/**
|
|
129
|
-
* @method
|
|
130
|
-
* @name defx#fetchFundingRate
|
|
131
|
-
* @description fetch the current funding rate
|
|
132
|
-
* @see https://api-docs.defx.com/#12168192-4e7b-4458-a001-e8b80961f0b7
|
|
133
|
-
* @param {string} symbol unified market symbol
|
|
134
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
135
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/?id=funding-rate-structure}
|
|
136
|
-
*/
|
|
137
|
-
fetchFundingRate(symbol: string, params?: {}): Promise<FundingRate>;
|
|
138
|
-
parseFundingRate(contract: any, market?: Market): FundingRate;
|
|
139
|
-
/**
|
|
140
|
-
* @method
|
|
141
|
-
* @name defx#fetchBalance
|
|
142
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
143
|
-
* @see https://api-docs.defx.com/#26414338-14f7-40a1-b246-f8ea8571493f
|
|
144
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
145
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
|
|
146
|
-
*/
|
|
147
|
-
fetchBalance(params?: {}): Promise<Balances>;
|
|
148
|
-
parseBalance(balances: any): Balances;
|
|
149
|
-
/**
|
|
150
|
-
* @method
|
|
151
|
-
* @name defx#createOrder
|
|
152
|
-
* @description create a trade order
|
|
153
|
-
* @see https://api-docs.defx.com/#ba222d88-8856-4d3c-87a9-7cec07bb2622
|
|
154
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
155
|
-
* @param {string} type 'market' or 'limit'
|
|
156
|
-
* @param {string} side 'buy' or 'sell'
|
|
157
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
158
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
159
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
160
|
-
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
161
|
-
* @param {string} [params.reduceOnly] for swap and future reduceOnly is a string 'true' or 'false' that cant be sent with close position set to true or in hedge mode. For spot margin and option reduceOnly is a boolean.
|
|
162
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
|
|
163
|
-
*/
|
|
164
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
165
|
-
parseOrderStatus(status: Str): string;
|
|
166
|
-
parseOrder(order: Dict, market?: Market): Order;
|
|
167
|
-
/**
|
|
168
|
-
* @method
|
|
169
|
-
* @name defx#cancelOrder
|
|
170
|
-
* @see https://api-docs.defx.com/#09186f23-f8d1-4993-acf4-9974d8a6ddb0
|
|
171
|
-
* @description cancels an open order
|
|
172
|
-
* @param {string} id order id
|
|
173
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
174
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
175
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
|
|
176
|
-
*/
|
|
177
|
-
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
178
|
-
/**
|
|
179
|
-
* @method
|
|
180
|
-
* @name defx#cancelAllOrders
|
|
181
|
-
* @description cancel all open orders
|
|
182
|
-
* @see https://api-docs.defx.com/#db5531da-3692-4a53-841f-6ad6495f823a
|
|
183
|
-
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
184
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
185
|
-
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
|
|
186
|
-
*/
|
|
187
|
-
cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
|
|
188
|
-
/**
|
|
189
|
-
* @method
|
|
190
|
-
* @name defx#fetchPosition
|
|
191
|
-
* @description fetch data on a single open contract trade position
|
|
192
|
-
* @see https://api-docs.defx.com/#d89dbb86-9aba-4f59-ac5d-a97ff25ea80e
|
|
193
|
-
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
194
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
195
|
-
* @returns {object} a [position structure]{@link https://docs.ccxt.com/?id=position-structure}
|
|
196
|
-
*/
|
|
197
|
-
fetchPosition(symbol: string, params?: {}): Promise<Position>;
|
|
198
|
-
/**
|
|
199
|
-
* @method
|
|
200
|
-
* @name defx#fetchPositions
|
|
201
|
-
* @description fetch all open positions
|
|
202
|
-
* @see https://api-docs.defx.com/#d89dbb86-9aba-4f59-ac5d-a97ff25ea80e
|
|
203
|
-
* @param {string[]} [symbols] list of unified market symbols
|
|
204
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
205
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/?id=position-structure}
|
|
206
|
-
*/
|
|
207
|
-
fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
|
|
208
|
-
parsePosition(position: Dict, market?: Market): Position;
|
|
209
|
-
/**
|
|
210
|
-
* @method
|
|
211
|
-
* @name defx#fetchOrder
|
|
212
|
-
* @description fetches information on an order made by the user
|
|
213
|
-
* @see https://api-docs.defx.com/#44f82dd5-26b3-4e1f-b4aa-88ceddd65237
|
|
214
|
-
* @param {string} id the order id
|
|
215
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
216
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
217
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
|
|
218
|
-
*/
|
|
219
|
-
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
220
|
-
/**
|
|
221
|
-
* @method
|
|
222
|
-
* @name defx#fetchOrders
|
|
223
|
-
* @description fetches information on multiple orders made by the user
|
|
224
|
-
* @see https://api-docs.defx.com/#ab200038-8acb-4170-b05e-4fcb4cc13751
|
|
225
|
-
* @param {string} symbol unified market symbol
|
|
226
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
227
|
-
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
228
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
229
|
-
* @param {int} [params.until] the latest time in ms to fetch orders for
|
|
230
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
|
|
231
|
-
*/
|
|
232
|
-
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
233
|
-
/**
|
|
234
|
-
* @method
|
|
235
|
-
* @name defx#fetchOpenOrders
|
|
236
|
-
* @description fetch all unfilled currently open orders
|
|
237
|
-
* @see https://api-docs.defx.com/#ab200038-8acb-4170-b05e-4fcb4cc13751
|
|
238
|
-
* @param {string} symbol unified market symbol
|
|
239
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
240
|
-
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
241
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
242
|
-
* @param {int} [params.until] the latest time in ms to fetch orders for
|
|
243
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
|
|
244
|
-
*/
|
|
245
|
-
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
246
|
-
/**
|
|
247
|
-
* @method
|
|
248
|
-
* @name defx#fetchClosedOrders
|
|
249
|
-
* @description fetches information on multiple closed orders made by the user
|
|
250
|
-
* @see https://api-docs.defx.com/#ab200038-8acb-4170-b05e-4fcb4cc13751
|
|
251
|
-
* @param {string} symbol unified market symbol
|
|
252
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
253
|
-
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
254
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
255
|
-
* @param {int} [params.until] the latest time in ms to fetch orders for
|
|
256
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
|
|
257
|
-
*/
|
|
258
|
-
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
259
|
-
/**
|
|
260
|
-
* @method
|
|
261
|
-
* @name defx#fetchCanceledOrders
|
|
262
|
-
* @description fetches information on multiple canceled orders made by the user
|
|
263
|
-
* @see https://api-docs.defx.com/#ab200038-8acb-4170-b05e-4fcb4cc13751
|
|
264
|
-
* @param {string} symbol unified market symbol
|
|
265
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
266
|
-
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
267
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
268
|
-
* @param {int} [params.until] the latest time in ms to fetch orders for
|
|
269
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
|
|
270
|
-
*/
|
|
271
|
-
fetchCanceledOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
272
|
-
/**
|
|
273
|
-
* @method
|
|
274
|
-
* @name defx#closePosition
|
|
275
|
-
* @description closes an open position for a market
|
|
276
|
-
* @see https://api-docs.defx.com/#b2c08074-c4d9-4e50-b637-0d6c498fa29e
|
|
277
|
-
* @param {string} symbol unified CCXT market symbol
|
|
278
|
-
* @param {string} [side] one-way mode: 'buy' or 'sell', hedge-mode: 'long' or 'short'
|
|
279
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
280
|
-
* @param {string} [params.positionId] the position id you want to close
|
|
281
|
-
* @param {string} [params.type] 'MARKET' or 'LIMIT'
|
|
282
|
-
* @param {string} [params.quantity] how much of currency you want to trade in units of base currency
|
|
283
|
-
* @param {string} [params.price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
284
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
|
|
285
|
-
*/
|
|
286
|
-
closePosition(symbol: string, side?: OrderSide, params?: {}): Promise<Order>;
|
|
287
|
-
/**
|
|
288
|
-
* @method
|
|
289
|
-
* @name defx#closeAllPositions
|
|
290
|
-
* @description closes all open positions for a market type
|
|
291
|
-
* @see https://api-docs.defx.com/#d6f63b43-100e-47a9-998c-8b6c0c72d204
|
|
292
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
293
|
-
* @returns {object[]} A list of [position structures]{@link https://docs.ccxt.com/?id=position-structure}
|
|
294
|
-
*/
|
|
295
|
-
closeAllPositions(params?: {}): Promise<Position[]>;
|
|
296
|
-
/**
|
|
297
|
-
* @method
|
|
298
|
-
* @name defx#fetchLedger
|
|
299
|
-
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
300
|
-
* @see https://api-docs.defx.com/#38cc8974-794f-48c0-b959-db045a0ee565
|
|
301
|
-
* @param {string} [code] unified currency code
|
|
302
|
-
* @param {int} [since] timestamp in ms of the earliest ledger entry
|
|
303
|
-
* @param {int} [limit] max number of ledger entries to return
|
|
304
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
305
|
-
* @param {int} [params.until] timestamp in ms of the latest ledger entry
|
|
306
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
307
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
|
|
308
|
-
*/
|
|
309
|
-
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
310
|
-
parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
|
|
311
|
-
parseLedgerEntryType(type: any): string;
|
|
312
|
-
/**
|
|
313
|
-
* @method
|
|
314
|
-
* @name defx#withdraw
|
|
315
|
-
* @description make a withdrawal
|
|
316
|
-
* @see https://api-docs.defx.com/#2600f503-63ed-4672-b8f6-69ea5f03203b
|
|
317
|
-
* @param {string} code unified currency code
|
|
318
|
-
* @param {float} amount the amount to withdraw
|
|
319
|
-
* @param {string} address the address to withdraw to
|
|
320
|
-
* @param {string} tag
|
|
321
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
322
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/?id=transaction-structure}
|
|
323
|
-
*/
|
|
324
|
-
withdraw(code: string, amount: number, address: string, tag?: Str, params?: {}): Promise<Transaction>;
|
|
325
|
-
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
|
326
|
-
/**
|
|
327
|
-
* @method
|
|
328
|
-
* @name defx#setLeverage
|
|
329
|
-
* @description set the level of leverage for a market
|
|
330
|
-
* @see https://api-docs.defx.com/#4cb4ecc4-6c61-4194-8353-be67faaf7ca7
|
|
331
|
-
* @param {float} leverage the rate of leverage
|
|
332
|
-
* @param {string} symbol unified market symbol
|
|
333
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
334
|
-
* @returns {object} response from the exchange
|
|
335
|
-
*/
|
|
336
|
-
setLeverage(leverage: int, symbol?: Str, params?: {}): Promise<Leverage>;
|
|
337
|
-
parseLeverage(leverage: Dict, market?: Market): Leverage;
|
|
338
|
-
nonce(): number;
|
|
339
|
-
sign(path: any, section?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
340
|
-
url: string;
|
|
341
|
-
method: string;
|
|
342
|
-
body: any;
|
|
343
|
-
headers: any;
|
|
344
|
-
};
|
|
345
|
-
handleErrors(httpCode: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
|
|
346
|
-
defaultNetworkCodeForCurrency(code: any): any;
|
|
347
|
-
setSandboxMode(enable: boolean): void;
|
|
348
|
-
}
|