ccxt 4.5.46 → 4.5.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +5 -6
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -6
  4. package/dist/cjs/src/aftermath.js +1 -1
  5. package/dist/cjs/src/backpack.js +1 -1
  6. package/dist/cjs/src/base/Exchange.js +24 -0
  7. package/dist/cjs/src/binance.js +12 -15
  8. package/dist/cjs/src/bitfinex.js +6 -11
  9. package/dist/cjs/src/bitget.js +6 -3
  10. package/dist/cjs/src/bitmex.js +46 -0
  11. package/dist/cjs/src/bitstamp.js +14 -1
  12. package/dist/cjs/src/bittrade.js +1 -1
  13. package/dist/cjs/src/blofin.js +137 -29
  14. package/dist/cjs/src/hollaex.js +1 -1
  15. package/dist/cjs/src/kraken.js +39 -31
  16. package/dist/cjs/src/kucoin.js +2158 -461
  17. package/dist/cjs/src/lighter.js +2 -2
  18. package/dist/cjs/src/okx.js +0 -1
  19. package/dist/cjs/src/pro/bittrade.js +4 -0
  20. package/dist/cjs/src/pro/grvt.js +1 -1
  21. package/dist/cjs/src/pro/lighter.js +1 -1
  22. package/dist/cjs/src/whitebit.js +21 -2
  23. package/js/ccxt.d.ts +2 -8
  24. package/js/ccxt.js +2 -6
  25. package/js/src/abstract/blofin.d.ts +28 -12
  26. package/js/src/abstract/kraken.d.ts +36 -30
  27. package/js/src/abstract/kucoin.d.ts +1 -0
  28. package/js/src/abstract/kucoinfutures.d.ts +1 -0
  29. package/js/src/aftermath.js +1 -1
  30. package/js/src/backpack.js +1 -1
  31. package/js/src/base/Exchange.d.ts +1 -0
  32. package/js/src/base/Exchange.js +24 -0
  33. package/js/src/binance.js +12 -15
  34. package/js/src/bitfinex.js +6 -11
  35. package/js/src/bitget.d.ts +1 -1
  36. package/js/src/bitget.js +6 -3
  37. package/js/src/bitmex.d.ts +12 -0
  38. package/js/src/bitmex.js +46 -0
  39. package/js/src/bitstamp.js +14 -1
  40. package/js/src/bittrade.js +1 -1
  41. package/js/src/blofin.d.ts +2 -0
  42. package/js/src/blofin.js +137 -29
  43. package/js/src/hollaex.js +1 -1
  44. package/js/src/kraken.js +39 -31
  45. package/js/src/kucoin.d.ts +249 -8
  46. package/js/src/kucoin.js +2158 -461
  47. package/js/src/lighter.js +2 -2
  48. package/js/src/okx.js +0 -1
  49. package/js/src/pro/bittrade.js +4 -0
  50. package/js/src/pro/grvt.js +1 -1
  51. package/js/src/pro/lighter.js +1 -1
  52. package/js/src/whitebit.d.ts +1 -1
  53. package/js/src/whitebit.js +21 -2
  54. package/package.json +1 -1
  55. package/dist/cjs/src/abstract/coincatch.js +0 -11
  56. package/dist/cjs/src/coincatch.js +0 -5495
  57. package/dist/cjs/src/pro/coincatch.js +0 -1563
  58. package/js/src/abstract/coincatch.d.ts +0 -97
  59. package/js/src/abstract/coincatch.js +0 -5
  60. package/js/src/coincatch.d.ts +0 -788
  61. package/js/src/coincatch.js +0 -5488
  62. package/js/src/pro/coincatch.d.ts +0 -207
  63. package/js/src/pro/coincatch.js +0 -1556
@@ -1,788 +0,0 @@
1
- import Exchange from './abstract/coincatch.js';
2
- import type { Balances, Bool, Currency, Currencies, DepositAddress, Dict, FundingRate, FundingRateHistory, int, Int, LedgerEntry, Leverage, MarginMode, MarginModification, Market, Num, OHLCV, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry } from './base/types.js';
3
- /**
4
- * @class coincatch
5
- * @augments Exchange
6
- */
7
- export default class coincatch extends Exchange {
8
- describe(): any;
9
- calculateRateLimiterCost(api: any, method: any, path: any, params: any, config?: {}): number;
10
- /**
11
- * @method
12
- * @name coincatch#fetchTime
13
- * @description fetches the current integer timestamp in milliseconds from the exchange server
14
- * @see https://coincatch.github.io/github.io/en/spot/#get-server-time
15
- * @param {object} [params] extra parameters specific to the exchange API endpoint
16
- * @returns {int} the current integer timestamp in milliseconds from the exchange server
17
- */
18
- fetchTime(params?: {}): Promise<Int>;
19
- /**
20
- * @method
21
- * @name coincatch#fetchCurrencies
22
- * @description fetches all available currencies on an exchange
23
- * @see https://coincatch.github.io/github.io/en/spot/#get-coin-list
24
- * @param {object} [params] extra parameters specific to the exchange API endpoint
25
- * @returns {object} an associative dictionary of currencies
26
- */
27
- fetchCurrencies(params?: {}): Promise<Currencies>;
28
- /**
29
- * @method
30
- * @name coincatch#fetchDepositWithdrawFees
31
- * @description fetch deposit and withdraw fees
32
- * @see https://coincatch.github.io/github.io/en/spot/#get-coin-list
33
- * @param {string[]} [codes] list of unified currency codes
34
- * @param {object} [params] extra parameters specific to the exchange API endpoint
35
- * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/?id=fee-structure}
36
- */
37
- fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<any>;
38
- parseDepositWithdrawFee(fee: any, currency?: Currency): Dict;
39
- /**
40
- * @method
41
- * @name coincatch#fetchMarkets
42
- * @description retrieves data on all markets for the exchange
43
- * @see https://coincatch.github.io/github.io/en/spot/#get-all-tickers
44
- * @see https://coincatch.github.io/github.io/en/mix/#get-all-symbols
45
- * @param {object} [params] extra parameters specific to the exchange API endpoint
46
- * @returns {object[]} an array of objects representing market data
47
- */
48
- fetchMarkets(params?: {}): Promise<Market[]>;
49
- parseMarket(market: Dict): Market;
50
- parseSpotMarketId(marketId: any): Dict;
51
- /**
52
- * @method
53
- * @name coincatch#fetchTicker
54
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
55
- * @see https://coincatch.github.io/github.io/en/spot/#get-single-ticker
56
- * @see https://coincatch.github.io/github.io/en/mix/#get-single-symbol-ticker
57
- * @param {string} symbol unified symbol of the market to fetch the ticker for
58
- * @param {object} [params] extra parameters specific to the exchange API endpoint
59
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
60
- */
61
- fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
62
- /**
63
- * @method
64
- * @name coincatch#fetchTickers
65
- * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
66
- * @see https://coincatch.github.io/github.io/en/spot/#get-all-tickers
67
- * @see https://coincatch.github.io/github.io/en/mix/#get-all-symbol-ticker
68
- * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
69
- * @param {object} [params] extra parameters specific to the exchange API endpoint
70
- * @param {string} [params.type] 'spot' or 'swap' (default 'spot')
71
- * @param {string} [params.productType] 'umcbl' or 'dmcbl' (default 'umcbl') - USDT perpetual contract or Universal margin perpetual contract
72
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
73
- */
74
- fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
75
- parseTicker(ticker: any, market?: Market): Ticker;
76
- /**
77
- * @method
78
- * @name coincatch#fetchOrderBook
79
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
80
- * @see https://coincatch.github.io/github.io/en/spot/#get-merged-depth-data
81
- * @see https://coincatch.github.io/github.io/en/mix/#get-merged-depth-data
82
- * @param {string} symbol unified symbol of the market to fetch the order book for
83
- * @param {int} [limit] the maximum amount of order book entries to return (maximum and default value is 100)
84
- * @param {object} [params] extra parameters specific to the exchange API endpoint
85
- * @param {string} [params.precision] 'scale0' (default), 'scale1', 'scale2' or 'scale3' - price accuracy, according to the selected accuracy as the step size to return the cumulative depth
86
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
87
- */
88
- fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
89
- /**
90
- * @method
91
- * @name coincatch#fetchOHLCV
92
- * @see https://coincatch.github.io/github.io/en/spot/#get-candle-data
93
- * @see https://coincatch.github.io/github.io/en/mix/#get-candle-data
94
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
95
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
96
- * @param {string} timeframe the length of time each candle represents
97
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
98
- * @param {int} [limit] the maximum amount of candles to fetch (default 100)
99
- * @param {object} [params] extra parameters specific to the exchange API endpoint
100
- * @param {int} [params.until] timestamp in ms of the latest candle to fetch
101
- * @param {string} [params.price] "mark" for mark price candles
102
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
103
- */
104
- fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
105
- parseOHLCV(ohlcv: any, market?: Market): OHLCV;
106
- /**
107
- * @method
108
- * @name coincatch#fetchTrades
109
- * @description get the list of most recent trades for a particular symbol
110
- * @see https://coincatch.github.io/github.io/en/spot/#get-recent-trades
111
- * @see https://coincatch.github.io/github.io/en/mix/#get-fills
112
- * @param {string} symbol unified symbol of the market to fetch trades for
113
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
114
- * @param {int} [limit] the maximum amount of trades to fetch
115
- * @param {object} [params] extra parameters specific to the exchange API endpoint
116
- * @param {int} [params.until] timestamp in ms of the latest entry to fetch
117
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades}
118
- */
119
- fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
120
- parseTrade(trade: Dict, market?: Market): Trade;
121
- /**
122
- * @method
123
- * @name coincatch#fetchFundingRate
124
- * @description fetch the current funding rate
125
- * @see https://coincatch.github.io/github.io/en/mix/#get-current-funding-rate
126
- * @param {string} symbol unified market symbol
127
- * @param {object} [params] extra parameters specific to the exchange API endpoint
128
- * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/?id=funding-rate-structure}
129
- */
130
- fetchFundingRate(symbol: string, params?: {}): Promise<FundingRate>;
131
- parseFundingRate(contract: any, market?: Market): {
132
- info: any;
133
- symbol: string;
134
- markPrice: any;
135
- indexPrice: any;
136
- interestRate: any;
137
- estimatedSettlePrice: any;
138
- timestamp: any;
139
- datetime: any;
140
- fundingRate: number;
141
- fundingTimestamp: any;
142
- fundingDatetime: any;
143
- nextFundingRate: any;
144
- nextFundingTimestamp: any;
145
- nextFundingDatetime: any;
146
- previousFundingRate: any;
147
- previousFundingTimestamp: any;
148
- previousFundingDatetime: any;
149
- };
150
- handleOptionParamsAndRequest(params: object, methodName: string, optionName: string, request: object, requestProperty: string, defaultValue?: any): any[];
151
- /**
152
- * @method
153
- * @name coincatch#fetchFundingRateHistory
154
- * @description fetches historical funding rate prices
155
- * @see https://coincatch.github.io/github.io/en/mix/#get-history-funding-rate
156
- * @param {string} symbol unified symbol of the market to fetch the funding rate history for
157
- * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
158
- * @param {int} [limit] the maximum amount of entries to fetch
159
- * @param {object} [params] extra parameters specific to the exchange API endpoint
160
- * @param {int} [params.pageNo] the page number to fetch
161
- * @param {bool} [params.nextPage] whether to query the next page (default false)
162
- * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/?id=funding-rate-history-structure}
163
- */
164
- fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
165
- /**
166
- * @method
167
- * @name coincatch#fetchBalance
168
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
169
- * @see https://coincatch.github.io/github.io/en/spot/#get-account-assets
170
- * @param {object} [params] extra parameters specific to the exchange API endpoint
171
- * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch balance for (default 'spot')
172
- * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' (default 'umcbl')
173
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
174
- */
175
- fetchBalance(params?: {}): Promise<Balances>;
176
- parseBalance(balances: any): Balances;
177
- /**
178
- * @method
179
- * @name coincatch#transfer
180
- * @description transfer currency internally between wallets on the same account
181
- * @see https://coincatch.github.io/github.io/en/spot/#transfer
182
- * @param {string} code unified currency code
183
- * @param {float} amount amount to transfer
184
- * @param {string} fromAccount 'spot' or 'swap' or 'mix_usdt' or 'mix_usd' - account to transfer from
185
- * @param {string} toAccount 'spot' or 'swap' or 'mix_usdt' or 'mix_usd' - account to transfer to
186
- * @param {object} [params] extra parameters specific to the exchange API endpoint
187
- * @param {string} [params.clientOrderId] a unique id for the transfer
188
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/?id=transfer-structure}
189
- */
190
- transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
191
- parseTransfer(transfer: any, currency?: Currency): {
192
- id: string;
193
- timestamp: any;
194
- datetime: any;
195
- currency: string;
196
- amount: any;
197
- fromAccount: any;
198
- toAccount: any;
199
- status: string;
200
- info: any;
201
- };
202
- /**
203
- * @method
204
- * @name coincatch#fetchDepositAddress
205
- * @description fetch the deposit address for a currency associated with this account
206
- * @see https://coincatch.github.io/github.io/en/spot/#get-coin-address
207
- * @param {string} code unified currency code
208
- * @param {object} [params] extra parameters specific to the exchange API endpoint
209
- * @param {string} [params.network] network for fetch deposit address
210
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/?id=address-structure}
211
- */
212
- fetchDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
213
- parseDepositAddress(depositAddress: any, currency?: Currency): DepositAddress;
214
- /**
215
- * @method
216
- * @name coincatch#fetchDeposits
217
- * @description fetch all deposits made to an account
218
- * @see https://coincatch.github.io/github.io/en/spot/#get-deposit-list
219
- * @param {string} code unified currency code of the currency transferred
220
- * @param {int} [since] the earliest time in ms to fetch transfers for (default 24 hours ago)
221
- * @param {int} [limit] the maximum number of transfer structures to retrieve (not used by exchange)
222
- * @param {object} [params] extra parameters specific to the exchange API endpoint
223
- * @param {int} [params.until] the latest time in ms to fetch transfers for (default time now)
224
- * @param {int} [params.pageNo] pageNo default 1
225
- * @param {int} [params.pageSize] pageSize (default 20, max 100)
226
- * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/?id=transfer-structure}
227
- */
228
- fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
229
- /**
230
- * @method
231
- * @name coincatch#fetchWithdrawals
232
- * @description fetch all withdrawals made from an account
233
- * @see https://coincatch.github.io/github.io/en/spot/#get-withdraw-list-v2
234
- * @param {string} code unified currency code of the currency transferred
235
- * @param {int} [since] the earliest time in ms to fetch transfers for (default 24 hours ago)
236
- * @param {int} [limit] the maximum number of transfer structures to retrieve (default 50, max 200)
237
- * @param {object} [params] extra parameters specific to the exchange API endpoint
238
- * @param {int} [params.until] the latest time in ms to fetch transfers for (default time now)
239
- * @param {string} [params.clientOid] clientOid
240
- * @param {string} [params.orderId] The response orderId
241
- * @param {string} [params.idLessThan] Requests the content on the page before this ID (older data), the value input should be the orderId of the corresponding interface.
242
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/?id=transaction-structure}
243
- */
244
- fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
245
- /**
246
- * @method
247
- * @name coincatch#withdraw
248
- * @description make a withdrawal
249
- * @see https://coincatch.github.io/github.io/en/spot/#withdraw
250
- * @param {string} code unified currency code
251
- * @param {float} amount the amount to withdraw
252
- * @param {string} address the address to withdraw to
253
- * @param {string} [tag]
254
- * @param {object} [params] extra parameters specific to the exchange API endpoint
255
- * @param {string} params.network network for withdraw (mandatory)
256
- * @param {string} [params.remark] remark
257
- * @param {string} [params.clientOid] custom id
258
- * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/?id=transaction-structure}
259
- */
260
- withdraw(code: string, amount: number, address: string, tag?: Str, params?: {}): Promise<Transaction>;
261
- parseTransaction(transaction: any, currency?: Currency): Transaction;
262
- /**
263
- * @method
264
- * @name coincatch#createMarketBuyOrderWithCost
265
- * @description create a market buy order by providing the symbol and cost
266
- * @see https://coincatch.github.io/github.io/en/spot/#place-order
267
- * @param {string} symbol unified symbol of the market to create an order in
268
- * @param {float} cost how much you want to trade in units of the quote currency
269
- * @param {object} [params] extra parameters specific to the exchange API endpoint
270
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
271
- */
272
- createMarketBuyOrderWithCost(symbol: string, cost: number, params?: {}): Promise<Order>;
273
- /**
274
- * @method
275
- * @name coincatch#createOrder
276
- * @description create a trade order
277
- * @see https://coincatch.github.io/github.io/en/spot/#place-order
278
- * @see https://coincatch.github.io/github.io/en/spot/#place-plan-order
279
- * @see https://coincatch.github.io/github.io/en/mix/#place-order
280
- * @see https://coincatch.github.io/github.io/en/mix/#place-plan-order
281
- * @param {string} symbol unified symbol of the market to create an order in
282
- * @param {string} type 'market' or 'limit' or 'LIMIT_MAKER' for spot, 'market' or 'limit' or 'STOP' for swap
283
- * @param {string} side 'buy' or 'sell'
284
- * @param {float} amount how much of you want to trade in units of the base currency
285
- * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
286
- * @param {object} [params] extra parameters specific to the exchange API endpoint
287
- * @param {bool} [params.hedged] *swap markets only* must be set to true if position mode is hedged (default false)
288
- * @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
289
- * @param {float} [params.triggerPrice] the price that the order is to be triggered
290
- * @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
291
- * @param {string} [params.timeInForce] 'GTC', 'IOC', 'FOK' or 'PO'
292
- * @param {string} [params.clientOrderId] a unique id for the order - is mandatory for swap
293
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
294
- */
295
- createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
296
- /**
297
- * @method
298
- * @name coincatch#createSpotOrder
299
- * @description create a trade order on spot market
300
- * @see https://coincatch.github.io/github.io/en/spot/#place-order
301
- * @see https://coincatch.github.io/github.io/en/spot/#place-plan-order
302
- * @param {string} symbol unified symbol of the market to create an order in
303
- * @param {string} type 'market' or 'limit'
304
- * @param {string} side 'buy' or 'sell'
305
- * @param {float} amount how much of you want to trade in units of the base currency
306
- * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
307
- * @param {object} [params] extra parameters specific to the exchange API endpoint
308
- * @param {float} [params.cost] *market buy only* the quote quantity that can be used as an alternative for the amount
309
- * @param {float} [params.triggerPrice] the price that the order is to be triggered at
310
- * @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
311
- * @param {string} [params.timeInForce] 'GTC', 'IOC', 'FOK' or 'PO'
312
- * @param {string} [params.clientOrderId] a unique id for the order (max length 40)
313
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
314
- */
315
- createSpotOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
316
- createSpotOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Dict;
317
- handleRequiresPriceAndCost(methodName: string, params?: Dict, price?: Num, amount?: Num, cost?: Str, side?: string): Dict;
318
- handleTimeInForceAndPostOnly(methodName: string, params?: Dict, isMarketOrder?: Bool): Dict;
319
- /**
320
- * @method
321
- * @name coincatch#createSwapOrder
322
- * @description create a trade order on swap market
323
- * @see https://coincatch.github.io/github.io/en/mix/#place-order
324
- * @see https://coincatch.github.io/github.io/en/mix/#place-plan-order
325
- * @see https://coincatch.github.io/github.io/en/mix/#place-stop-order
326
- * @param {string} symbol unified symbol of the market to create an order in
327
- * @param {string} type 'market' or 'limit'
328
- * @param {string} side 'buy' or 'sell'
329
- * @param {float} amount how much of you want to trade in units of the base currency
330
- * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
331
- * @param {object} [params] extra parameters specific to the exchange API endpoint
332
- * @param {bool} [params.hedged] must be set to true if position mode is hedged (default false)
333
- * @param {bool} [params.postOnly] *non-trigger orders only* if true, the order will only be posted to the order book and not executed immediately
334
- * @param {bool} [params.reduceOnly] true or false whether the order is reduce only
335
- * @param {string} [params.timeInForce] *non-trigger orders only* 'GTC', 'FOK', 'IOC' or 'PO'
336
- * @param {string} [params.clientOrderId] a unique id for the order
337
- * @param {float} [params.triggerPrice] the price that the order is to be triggered at
338
- * @param {float} [params.stopLossPrice] The price at which a stop loss order is triggered at
339
- * @param {float} [params.takeProfitPrice] The price at which a take profit order is triggered at
340
- * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
341
- * @param {float} [params.takeProfit.triggerPrice] take profit trigger price
342
- * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
343
- * @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
344
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
345
- */
346
- createSwapOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
347
- createSwapOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Dict;
348
- handleTriggerStopLossAndTakeProfit(symbol: any, side: any, type: any, price: any, methodName?: string, params?: {}): any;
349
- /**
350
- * @method
351
- * @name coincatch#createOrderWithTakeProfitAndStopLoss
352
- * @description *swap markets only* create an order with a stop loss or take profit attached (type 3)
353
- * @param {string} symbol unified symbol of the market to create an order in
354
- * @param {string} type 'market' or 'limit'
355
- * @param {string} side 'buy' or 'sell'
356
- * @param {float} amount how much you want to trade in units of the base currency or the number of contracts
357
- * @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
358
- * @param {float} [takeProfit] the take profit price, in units of the quote currency
359
- * @param {float} [stopLoss] the stop loss price, in units of the quote currency
360
- * @param {object} [params] extra parameters specific to the exchange API endpoint
361
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
362
- */
363
- createOrderWithTakeProfitAndStopLoss(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, takeProfit?: Num, stopLoss?: Num, params?: {}): Promise<Order>;
364
- encodeTimeInForce(timeInForce: Str): Str;
365
- /**
366
- * @method
367
- * @name coincatch#createOrders
368
- * @description create a list of trade orders (all orders should be of the same symbol)
369
- * @see https://coincatch.github.io/github.io/en/spot/#batch-order
370
- * @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 (max 50 entries)
371
- * @param {object} [params] extra parameters specific to the api endpoint
372
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
373
- */
374
- createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
375
- createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Dict;
376
- /**
377
- * @method
378
- * @name coincatch#editOrder
379
- * @description edit a trade trigger, stop-looss or take-profit order
380
- * @see https://coincatch.github.io/github.io/en/spot/#modify-plan-order
381
- * @param {string} id order id
382
- * @param {string} symbol unified symbol of the market to create an order in
383
- * @param {string} type 'market' or 'limit'
384
- * @param {string} side 'buy' or 'sell'
385
- * @param {float} amount how much of currency you want to trade in units of base currency
386
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
387
- * @param {object} [params] extra parameters specific to the exchange API endpoint
388
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
389
- */
390
- editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
391
- /**
392
- * @method
393
- * @name coincatch#editSpotOrder
394
- * @ignore
395
- * @description edit a trade order
396
- * @see https://coincatch.github.io/github.io/en/spot/#modify-plan-order
397
- * @param {string} id order id
398
- * @param {string} symbol unified symbol of the market to create an order in
399
- * @param {string} type 'market' or 'limit'
400
- * @param {string} side 'buy' or 'sell'
401
- * @param {float} amount how much of currency you want to trade in units of base currency
402
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
403
- * @param {object} [params] extra parameters specific to the exchange API endpoint
404
- * @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
405
- * @param {string} params.triggerPrice *mandatory* the price that the order is to be triggered at
406
- * @param {float} [params.cost] *market buy only* the quote quantity that can be used as an alternative for the amount
407
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
408
- */
409
- editSpotOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
410
- /**
411
- * @method
412
- * @name coincatch#fetchOrder
413
- * @description fetches information on an order made by the user (non-trigger orders only)
414
- * @see https://coincatch.github.io/github.io/en/spot/#get-order-details
415
- * @see https://coincatch.github.io/github.io/en/mix/#get-order-details
416
- * @param {string} id the order id
417
- * @param {string} symbol unified symbol of the market the order was made in (is mandatory for swap)
418
- * @param {object} [params] extra parameters specific to the exchange API endpoint
419
- * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entry for (default 'spot')
420
- * @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
421
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
422
- */
423
- fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
424
- /**
425
- * @method
426
- * @name coincatch#fetchOpenOrders
427
- * @description fetch all unfilled currently open orders
428
- * @see https://coincatch.github.io/github.io/en/spot/#get-order-list
429
- * @see https://coincatch.github.io/github.io/en/spot/#get-current-plan-orders
430
- * @see https://coincatch.github.io/github.io/en/mix/#get-open-order
431
- * @see https://coincatch.github.io/github.io/en/mix/#get-all-open-order
432
- * @see https://coincatch.github.io/github.io/en/mix/#get-plan-order-tpsl-list
433
- * @param {string} [symbol] unified market symbol of the market orders were made in
434
- * @param {int} [since] the earliest time in ms to fetch orders for
435
- * @param {int} [limit] the maximum number of order structures to retrieve
436
- * @param {object} [params] extra parameters specific to the exchange API endpoint
437
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
438
- * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
439
- * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
440
- * @param {string} [params.marginCoin] *swap only* the margin coin of the market to fetch entries for
441
- * @param {string} [params.isPlan] *swap trigger only* 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders)
442
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
443
- */
444
- fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
445
- /**
446
- * @method
447
- * @ignore
448
- * @name coincatch#fetchOpenSpotOrders
449
- * @description fetch all unfilled currently open orders for spot markets
450
- * @see https://coincatch.github.io/github.io/en/spot/#get-order-list
451
- * @see https://coincatch.github.io/github.io/en/spot/#get-current-plan-orders
452
- * @param {string} [symbol] unified market symbol of the market orders were made in
453
- * @param {int} [since] the earliest time in ms to fetch orders for
454
- * @param {int} [limit] the maximum number of order structures to retrieve
455
- * @param {object} [params] extra parameters specific to the exchange API endpoint
456
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
457
- * @param {string} [params.lastEndId] *for trigger orders only* the last order id to fetch entries after
458
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
459
- */
460
- fetchOpenSpotOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
461
- /**
462
- * @method
463
- * @ignore
464
- * @name coincatch#fetchOpenSwapOrders
465
- * @description fetch all unfilled currently open orders for swap markets
466
- * @see https://coincatch.github.io/github.io/en/mix/#get-open-order
467
- * @see https://coincatch.github.io/github.io/en/mix/#get-all-open-order
468
- * @see https://coincatch.github.io/github.io/en/mix/#get-plan-order-tpsl-list
469
- * @param {string} [symbol] unified market symbol of the market orders were made in
470
- * @param {int} [since] the earliest time in ms to fetch orders for
471
- * @param {int} [limit] the maximum number of order structures to retrieve
472
- * @param {object} [params] extra parameters specific to the exchange API endpoint
473
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
474
- * @param {string} [params.isPlan] 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders)
475
- * @param {string} [params.productType] 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
476
- * @param {string} [params.marginCoin] the margin coin of the market to fetch entries for
477
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
478
- */
479
- fetchOpenSwapOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
480
- /**
481
- * @method
482
- * @name coincatch#fetchCanceledAndClosedOrders
483
- * @description fetches information on multiple canceled and closed orders made by the user
484
- * @see https://coincatch.github.io/github.io/en/spot/#get-order-list
485
- * @see https://coincatch.github.io/github.io/en/spot/#get-history-plan-orders
486
- * @see https://coincatch.github.io/github.io/en/mix/#get-history-orders
487
- * @see https://coincatch.github.io/github.io/en/mix/#get-producttype-history-orders
488
- * @see https://coincatch.github.io/github.io/en/mix/#get-history-plan-orders-tpsl
489
- * @param {string} symbol *is mandatory* unified market symbol of the market orders were made in
490
- * @param {int} [since] the earliest time in ms to fetch orders for
491
- * @param {int} [limit] the maximum number of order structures to retrieve
492
- * @param {object} [params] extra parameters specific to the exchange API endpoint
493
- * @param {int} [params.until] the latest time in ms to fetch orders for
494
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
495
- * @param {string} [params.isPlan] *swap only* 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders)
496
- * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
497
- * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
498
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
499
- */
500
- fetchCanceledAndClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
501
- /**
502
- * @method
503
- * @ignore
504
- * @name coincatch#fetchCanceledAndClosedSpotOrders
505
- * @description fetches information on multiple canceled and closed orders made by the user on spot markets
506
- * @see https://coincatch.github.io/github.io/en/spot/#get-order-history
507
- * @see https://coincatch.github.io/github.io/en/spot/#get-history-plan-orders
508
- * @param {string} symbol *is mandatory* unified market symbol of the market orders were made in
509
- * @param {int} [since] the earliest time in ms to fetch orders for
510
- * @param {int} [limit] the maximum number of order structures to retrieve
511
- * @param {object} [params] extra parameters specific to the exchange API endpoint
512
- * @param {int} [params.until] *for trigger orders only* the latest time in ms to fetch orders for
513
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
514
- * @param {string} [params.lastEndId] *for trigger orders only* the last order id to fetch entries after
515
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
516
- */
517
- fetchCanceledAndClosedSpotOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
518
- /**
519
- * @method
520
- * @ignore
521
- * @name coincatch#fetchCanceledAndClosedSwapOrders
522
- * @description fetches information on multiple canceled and closed orders made by the user on swap markets
523
- * @see https://coincatch.github.io/github.io/en/mix/#get-history-orders
524
- * @see https://coincatch.github.io/github.io/en/mix/#get-producttype-history-orders
525
- * @see https://coincatch.github.io/github.io/en/mix/#get-history-plan-orders-tpsl
526
- * @param {string} [symbol] unified market symbol of the market orders were made in
527
- * @param {int} [since] the earliest time in ms to fetch orders for
528
- * @param {int} [limit] the maximum number of order structures to retrieve
529
- * @param {object} [params] extra parameters specific to the exchange API endpoint
530
- * @param {int} [params.until] the latest time in ms to fetch orders for
531
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
532
- * @param {string} [params.isPlan] *swap only* 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders)
533
- * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
534
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
535
- */
536
- fetchCanceledAndClosedSwapOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
537
- /**
538
- * @method
539
- * @name coincatch#cancelOrder
540
- * @description cancels an open order
541
- * @see https://coincatch.github.io/github.io/en/spot/#cancel-order-v2
542
- * @see https://coincatch.github.io/github.io/en/spot/#cancel-plan-order
543
- * @see https://coincatch.github.io/github.io/en/mix/#cancel-order
544
- * @see https://coincatch.github.io/github.io/en/mix/#cancel-plan-order-tpsl
545
- * @param {string} id order id
546
- * @param {string} symbol unified symbol of the market the order was made in
547
- * @param {object} [params] extra parameters specific to the exchange API endpoint
548
- * @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
549
- * @param {bool} [params.trigger] true for canceling a trigger order (default false)
550
- * @param {bool} [params.stop] *swap only* an alternative for trigger param
551
- * @param {string} [params.planType] *swap trigger only* the type of the plan order to cancel: 'profit_plan' - profit order, 'loss_plan' - loss order, 'normal_plan' - plan order, 'pos_profit' - position profit, 'pos_loss' - position loss, 'moving_plan' - Trailing TP/SL, 'track_plan' - Trailing Stop
552
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
553
- */
554
- cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
555
- /**
556
- * @method
557
- * @name coincatch#cancelAllOrders
558
- * @description cancels all open orders
559
- * @see https://coincatch.github.io/github.io/en/spot/#cancel-all-orders
560
- * @see https://coincatch.github.io/github.io/en/spot/#batch-cancel-plan-orders
561
- * @see https://coincatch.github.io/github.io/en/mix/#batch-cancel-order
562
- * @see https://coincatch.github.io/github.io/en/mix/#cancel-order-by-symbol
563
- * @see https://coincatch.github.io/github.io/en/mix/#cancel-plan-order-tpsl-by-symbol
564
- * @see https://coincatch.github.io/github.io/en/mix/#cancel-all-trigger-order-tpsl
565
- * @param {string} [symbol] unified symbol of the market the orders were made in
566
- * @param {object} [params] extra parameters specific to the exchange API endpoint
567
- * @param {string} [params.type] 'spot' or 'swap' - the type of the market to cancel orders for (default 'spot')
568
- * @param {bool} [params.trigger] true for canceling a trigger orders (default false)
569
- * @param {string} [params.productType] *swap only (if symbol is not provided* 'umcbl' or 'dmcbl' - the product type of the market to cancel orders for (default 'umcbl')
570
- * @param {string} [params.marginCoin] *mandatory for swap non-trigger dmcb (if symbol is not provided)* the margin coin of the market to cancel orders for
571
- * @param {string} [params.planType] *swap trigger only* the type of the plan order to cancel: 'profit_plan' - profit order, 'loss_plan' - loss order, 'normal_plan' - plan order, 'pos_profit' - position profit, 'pos_loss' - position loss, 'moving_plan' - Trailing TP/SL, 'track_plan' - Trailing Stop
572
- * @returns {object} response from the exchange
573
- */
574
- cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
575
- /**
576
- * @method
577
- * @name coincatch#cancelOrders
578
- * @description cancel multiple non-trigger orders
579
- * @see https://coincatch.github.io/github.io/en/spot/#cancel-order-in-batch-v2-single-instruments
580
- * @param {string[]} ids order ids
581
- * @param {string} symbol *is mandatory* unified market symbol
582
- * @param {object} [params] extra parameters specific to the exchange API endpoint
583
- * @param {string[]} [params.clientOrderIds] client order ids
584
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
585
- */
586
- cancelOrders(ids: string[], symbol?: Str, params?: {}): Promise<Order[]>;
587
- getResultFromBatchCancelingSwapOrders(response: any): any[];
588
- parseOrder(order: any, market?: any): Order;
589
- parseOrderStatus(status: Str): Str;
590
- parseOrderSide(side: Str): Str;
591
- parseOrderTimeInForce(timeInForce: Str): Str;
592
- parseFeeDetailString(feeDetailString: Str): any[];
593
- /**
594
- * @method
595
- * @name coincatch#fetchMyTrades
596
- * @description fetch all trades made by the user
597
- * @see https://coincatch.github.io/github.io/en/spot/#get-transaction-details
598
- * @see https://coincatch.github.io/github.io/en/mix/#get-order-fill-detail
599
- * @see https://coincatch.github.io/github.io/en/mix/#get-producttype-order-fill-detail
600
- * @param {string} symbol *is mandatory* unified market symbol
601
- * @param {int} [since] the earliest time in ms to fetch trades for
602
- * @param {int} [limit] the maximum amount of trades to fetch
603
- * @param {object} [params] extra parameters specific to the exchange API endpoint
604
- * @param {int} [params.until] *swap markets only* the latest time in ms to fetch trades for, only supports the last 30 days timeframe
605
- * @param {string} [params.lastEndId] *swap markets only* query the data after this tradeId
606
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
607
- */
608
- fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
609
- /**
610
- * @method
611
- * @name coincatch#fetchOrderTrades
612
- * @description fetch all the trades made from a single order
613
- * @see https://coincatch.github.io/github.io/en/spot/#get-transaction-details
614
- * @param {string} id order id
615
- * @param {string} symbol unified market symbol
616
- * @param {int} [since] the earliest time in ms to fetch trades for
617
- * @param {int} [limit] the maximum number of trades to retrieve
618
- * @param {object} [params] extra parameters specific to the exchange API endpoint
619
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=trade-structure}
620
- */
621
- fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
622
- /**
623
- * @method
624
- * @name coincatch#fetchMarginMode
625
- * @description fetches the margin mode of the trading pair
626
- * @see https://coincatch.github.io/github.io/en/mix/#get-single-account
627
- * @param {string} symbol unified symbol of the market to fetch the margin mode for
628
- * @param {object} [params] extra parameters specific to the exchange API endpoint
629
- * @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/?id=margin-mode-structure}
630
- */
631
- fetchMarginMode(symbol: string, params?: {}): Promise<MarginMode>;
632
- parseMarginMode(marginMode: Dict, market?: any): MarginMode;
633
- parseMarginModeType(type: string): string;
634
- /**
635
- * @method
636
- * @name coincatch#setMarginMode
637
- * @description set margin mode to 'cross' or 'isolated'
638
- * @see https://coincatch.github.io/github.io/en/mix/#change-margin-mode
639
- * @param {string} marginMode 'cross' or 'isolated'
640
- * @param {string} symbol unified market symbol
641
- * @param {object} [params] extra parameters specific to the exchange API endpoint
642
- * @returns {object} response from the exchange
643
- */
644
- setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
645
- encodeMarginModeType(type: string): string;
646
- /**
647
- * @method
648
- * @name coincatch#fetchPositionMode
649
- * @description fetchs the position mode, hedged or one way
650
- * @see https://coincatch.github.io/github.io/en/mix/#get-single-account
651
- * @param {string} symbol unified symbol of the market to fetch entry for
652
- * @param {object} [params] extra parameters specific to the exchange API endpoint
653
- * @returns {object} an object detailing whether the market is in hedged or one-way mode
654
- */
655
- fetchPositionMode(symbol?: Str, params?: {}): Promise<{
656
- info: any;
657
- hedged: boolean;
658
- }>;
659
- /**
660
- * @method
661
- * @name coincatch#setPositionMode
662
- * @description set hedged to true or false for a market
663
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Set%20Position%20Mode
664
- * @param {bool} hedged set to true to use dualSidePosition
665
- * @param {string} symbol unified symbol of the market to fetch entry for
666
- * @param {object} [params] extra parameters specific to the exchange API endpoint
667
- * @param {string} [params.productType] 'umcbl' or 'dmcbl' (default 'umcbl' if symbol is not provided)
668
- * @returns {object} response from the exchange
669
- */
670
- setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
671
- /**
672
- * @method
673
- * @name coincatch#fetchLeverage
674
- * @description fetch the set leverage for a market
675
- * @see https://coincatch.github.io/github.io/en/mix/#get-single-account
676
- * @param {string} symbol unified market symbol
677
- * @param {object} [params] extra parameters specific to the exchange API endpoint
678
- * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/?id=leverage-structure}
679
- */
680
- fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
681
- /**
682
- * @method
683
- * @name coincatch#setLeverage
684
- * @description set the level of leverage for a market
685
- * @see https://hashkeyglobal-apidoc.readme.io/reference/change-futures-leverage-trade
686
- * @param {float} leverage the rate of leverage
687
- * @param {string} symbol unified market symbol
688
- * @param {object} [params] extra parameters specific to the exchange API endpoint
689
- * @param {string} [params.side] *for isolated margin mode with hedged position mode only* 'long' or 'short'
690
- * @returns {object} response from the exchange
691
- */
692
- setLeverage(leverage: int, symbol?: Str, params?: {}): Promise<Leverage>;
693
- parseLeverage(leverage: Dict, market?: Market): Leverage;
694
- modifyMarginHelper(symbol: string, amount: any, type: any, params?: {}): Promise<MarginModification>;
695
- parseMarginModification(data: Dict, market?: Market): MarginModification;
696
- /**
697
- * @method
698
- * @name coincatch#reduceMargin
699
- * @description remove margin from a position
700
- * @see https://coincatch.github.io/github.io/en/mix/#change-margin
701
- * @param {string} symbol unified market symbol
702
- * @param {float} amount the amount of margin to remove
703
- * @param {object} [params] extra parameters specific to the exchange API endpoint
704
- * @param {string} [params.side] *for isolated margin mode with hedged position mode only* 'long' or 'short'
705
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
706
- */
707
- reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
708
- /**
709
- * @method
710
- * @name coincatch#addMargin
711
- * @description add margin
712
- * @see https://coincatch.github.io/github.io/en/mix/#change-margin
713
- * @param {string} symbol unified market symbol
714
- * @param {float} amount amount of margin to add
715
- * @param {object} [params] extra parameters specific to the exchange API endpoint
716
- * @param {string} [params.side] *for isolated margin mode with hedged position mode only* 'long' or 'short'
717
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
718
- */
719
- addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
720
- /**
721
- * @method
722
- * @name coincatch#fetchPosition
723
- * @description fetch data on a single open contract trade position
724
- * @see https://coincatch.github.io/github.io/en/mix/#get-symbol-position
725
- * @param {string} symbol unified market symbol of the market the position is held in, default is undefined
726
- * @param {object} [params] extra parameters specific to the exchange API endpoint
727
- * @param {string} [params.side] 'long' or 'short' *for non-hedged position mode only* (default 'long')
728
- * @returns {object} a [position structure]{@link https://docs.ccxt.com/?id=position-structure}
729
- */
730
- fetchPosition(symbol: string, params?: {}): Promise<Position>;
731
- /**
732
- * @method
733
- * @description fetch open positions for a single market
734
- * @name coincatch#fetchPositionsForSymbol
735
- * @see https://coincatch.github.io/github.io/en/mix/#get-symbol-position
736
- * @description fetch all open positions for specific symbol
737
- * @param {string} symbol unified market symbol
738
- * @param {object} [params] extra parameters specific to the exchange API endpoint
739
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/?id=position-structure}
740
- */
741
- fetchPositionsForSymbol(symbol: string, params?: {}): Promise<Position[]>;
742
- /**
743
- * @method
744
- * @name coincatch#fetchPositions
745
- * @description fetch all open positions
746
- * @see https://coincatch.github.io/github.io/en/mix/#get-all-position
747
- * @param {string[]} [symbols] list of unified market symbols (all symbols must belong to the same product type)
748
- * @param {object} [params] extra parameters specific to the exchange API endpoint
749
- * @param {string} [params.productType] 'umcbl' or 'dmcbl' (default 'umcbl' if symbols are not provided)
750
- * @param {string} [params.marginCoin] the settle currency of the positions, needs to match the productType
751
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/?id=position-structure}
752
- */
753
- fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
754
- parsePosition(position: Dict, market?: Market): Position;
755
- safeMarketCustom(marketId: Str, market?: Market, settleId?: Str): Market;
756
- /**
757
- * @method
758
- * @name coincatch#fetchLedger
759
- * @description fetch the history of changes, actions done by the user or operations that altered balance of the user
760
- * @see https://coincatch.github.io/github.io/en/spot/#get-bills
761
- * @see https://coincatch.github.io/github.io/en/mix/#get-business-account-bill
762
- * @param {string} [code] unified currency code
763
- * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
764
- * @param {int} [limit] max number of ledger entrys to return, default is undefined
765
- * @param {object} [params] extra parameters specific to the exchange API endpoint
766
- * @param {int} [params.until] *swap only* the latest time in ms to fetch entries for
767
- * @param {string} [params.type] 'spot' or 'swap' (default 'spot')
768
- * @param {string} [params.after] *spot only* billId, return the data less than this billId
769
- * @param {string} [params.before] *spot only* billId, return the data greater than or equals to this billId
770
- * @param {string} [params.groupType] *spot only*
771
- * @param {string} [params.bizType] *spot only*
772
- * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' (default 'umcbl' or 'dmcbl' if code is provided and code is not equal to 'USDT')
773
- * @param {string} [params.business] *swap only*
774
- * @param {string} [params.lastEndId] *swap only*
775
- * @param {bool} [params.next] *swap only*
776
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}
777
- */
778
- fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
779
- parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
780
- parseLedgerEntryType(type: string): string;
781
- handleErrors(code: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
782
- sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
783
- url: string;
784
- method: string;
785
- body: any;
786
- headers: any;
787
- };
788
- }