ccxt 4.5.9 → 4.5.11

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 (79) hide show
  1. package/README.md +5 -6
  2. package/dist/ccxt.browser.min.js +2 -2
  3. package/dist/cjs/ccxt.js +1 -6
  4. package/dist/cjs/src/base/Exchange.js +14 -2
  5. package/dist/cjs/src/bingx.js +1 -1
  6. package/dist/cjs/src/bitfinex.js +4 -2
  7. package/dist/cjs/src/bitget.js +5 -2
  8. package/dist/cjs/src/btcmarkets.js +4 -2
  9. package/dist/cjs/src/coinbase.js +1 -0
  10. package/dist/cjs/src/deribit.js +21 -19
  11. package/dist/cjs/src/kraken.js +4 -0
  12. package/dist/cjs/src/kucoin.js +1 -1
  13. package/dist/cjs/src/latoken.js +1 -0
  14. package/dist/cjs/src/mexc.js +1 -0
  15. package/dist/cjs/src/onetrading.js +2 -1
  16. package/dist/cjs/src/phemex.js +1 -0
  17. package/dist/cjs/src/pro/bitget.js +1 -0
  18. package/dist/cjs/src/pro/htx.js +22 -3
  19. package/dist/cjs/src/pro/kraken.js +282 -458
  20. package/dist/cjs/src/pro/mexc.js +15 -10
  21. package/dist/cjs/src/probit.js +1 -1
  22. package/js/ccxt.d.ts +2 -8
  23. package/js/ccxt.js +2 -6
  24. package/js/src/abstract/coinbase.d.ts +1 -0
  25. package/js/src/abstract/coinbaseadvanced.d.ts +1 -0
  26. package/js/src/abstract/phemex.d.ts +1 -0
  27. package/js/src/base/Exchange.d.ts +5 -2
  28. package/js/src/base/Exchange.js +14 -2
  29. package/js/src/bingx.js +1 -1
  30. package/js/src/bitfinex.d.ts +1 -1
  31. package/js/src/bitfinex.js +4 -2
  32. package/js/src/bitget.d.ts +1 -1
  33. package/js/src/bitget.js +5 -2
  34. package/js/src/bithumb.d.ts +1 -1
  35. package/js/src/bitmex.d.ts +1 -1
  36. package/js/src/bitopro.d.ts +1 -1
  37. package/js/src/bitso.d.ts +1 -1
  38. package/js/src/bittrade.d.ts +1 -1
  39. package/js/src/blofin.d.ts +1 -1
  40. package/js/src/btcmarkets.d.ts +1 -1
  41. package/js/src/btcmarkets.js +4 -2
  42. package/js/src/bybit.d.ts +1 -1
  43. package/js/src/coinbase.d.ts +1 -1
  44. package/js/src/coinbase.js +1 -0
  45. package/js/src/coinex.d.ts +1 -1
  46. package/js/src/cryptocom.d.ts +1 -1
  47. package/js/src/deribit.js +21 -19
  48. package/js/src/digifinex.d.ts +1 -1
  49. package/js/src/hibachi.d.ts +1 -1
  50. package/js/src/htx.d.ts +1 -1
  51. package/js/src/hyperliquid.d.ts +1 -1
  52. package/js/src/kraken.d.ts +1 -1
  53. package/js/src/kraken.js +4 -0
  54. package/js/src/kucoin.js +1 -1
  55. package/js/src/kucoinfutures.d.ts +1 -1
  56. package/js/src/latoken.js +1 -0
  57. package/js/src/mexc.d.ts +1 -1
  58. package/js/src/mexc.js +1 -0
  59. package/js/src/oceanex.d.ts +1 -1
  60. package/js/src/okx.d.ts +1 -1
  61. package/js/src/onetrading.d.ts +1 -1
  62. package/js/src/onetrading.js +2 -1
  63. package/js/src/phemex.js +1 -0
  64. package/js/src/pro/bitget.d.ts +1 -0
  65. package/js/src/pro/bitget.js +1 -0
  66. package/js/src/pro/bitvavo.d.ts +2 -2
  67. package/js/src/pro/htx.js +22 -3
  68. package/js/src/pro/kraken.d.ts +7 -8
  69. package/js/src/pro/kraken.js +282 -458
  70. package/js/src/pro/mexc.js +15 -10
  71. package/js/src/probit.js +1 -1
  72. package/js/src/timex.d.ts +1 -1
  73. package/package.json +1 -1
  74. package/js/src/abstract/okcoin.d.ts +0 -77
  75. package/js/src/abstract/okcoin.js +0 -11
  76. package/js/src/okcoin.d.ts +0 -346
  77. package/js/src/okcoin.js +0 -3214
  78. package/js/src/pro/okcoin.d.ts +0 -91
  79. package/js/src/pro/okcoin.js +0 -763
@@ -999,14 +999,16 @@ export default class mexc extends mexcRest {
999
999
  // swap
1000
1000
  // {
1001
1001
  // "symbol": "BTC_USDT",
1002
- // "data": {
1003
- // "p": 27307.3,
1004
- // "v": 5,
1005
- // "T": 2,
1006
- // "O": 3,
1007
- // "M": 1,
1008
- // "t": 1680055941870
1009
- // },
1002
+ // "data": [
1003
+ // {
1004
+ // "p": 114350.4,
1005
+ // "v": 4,
1006
+ // "T": 2,
1007
+ // "O": 3,
1008
+ // "M": 2,
1009
+ // "t": 1760368563597
1010
+ // }
1011
+ // ],
1010
1012
  // "channel": "push.deal",
1011
1013
  // "ts": 1680055941870
1012
1014
  // }
@@ -1021,8 +1023,11 @@ export default class mexc extends mexcRest {
1021
1023
  stored = new ArrayCache(limit);
1022
1024
  this.trades[symbol] = stored;
1023
1025
  }
1024
- const d = this.safeDictN(message, ['d', 'data', 'publicAggreDeals']);
1025
- const trades = this.safeList2(d, 'deals', 'dealsList', [d]);
1026
+ const d = this.safeDictN(message, ['d', 'publicAggreDeals']);
1027
+ let trades = this.safeList2(d, 'deals', 'dealsList', [d]);
1028
+ if (d === undefined) {
1029
+ trades = this.safeList(message, 'data', []);
1030
+ }
1026
1031
  for (let j = 0; j < trades.length; j++) {
1027
1032
  let parsedTrade = undefined;
1028
1033
  if (market['spot']) {
package/js/src/probit.js CHANGED
@@ -859,7 +859,7 @@ export default class probit extends Exchange {
859
859
  // "data":[
860
860
  // {
861
861
  // "id":"ETH-BTC:3331886",
862
- // "price":"0.022981",
862
+ // "price":"0.022982",
863
863
  // "quantity":"12.337",
864
864
  // "time":"2020-04-12T20:55:42.371Z",
865
865
  // "side":"sell",
package/js/src/timex.d.ts CHANGED
@@ -161,7 +161,7 @@ export default class timex extends Exchange {
161
161
  * @param {object} [params] extra parameters specific to the exchange API endpoint
162
162
  * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
163
163
  */
164
- cancelOrders(ids: any, symbol?: Str, params?: {}): Promise<any[]>;
164
+ cancelOrders(ids: string[], symbol?: Str, params?: {}): Promise<Order[]>;
165
165
  /**
166
166
  * @method
167
167
  * @name timex#fetchOrder
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.5.9",
3
+ "version": "4.5.11",
4
4
  "description": "A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go",
5
5
  "unpkg": "dist/ccxt.browser.min.js",
6
6
  "type": "module",
@@ -1,77 +0,0 @@
1
- import { implicitReturnType } from '../base/types.js';
2
- import { Exchange as _Exchange } from '../base/Exchange.js';
3
- interface Exchange {
4
- publicGetMarketTickers(params?: {}): Promise<implicitReturnType>;
5
- publicGetMarketTicker(params?: {}): Promise<implicitReturnType>;
6
- publicGetMarketBooks(params?: {}): Promise<implicitReturnType>;
7
- publicGetMarketCandles(params?: {}): Promise<implicitReturnType>;
8
- publicGetMarketHistoryCandles(params?: {}): Promise<implicitReturnType>;
9
- publicGetMarketTrades(params?: {}): Promise<implicitReturnType>;
10
- publicGetMarketHistoryTrades(params?: {}): Promise<implicitReturnType>;
11
- publicGetMarketPlatform24Volume(params?: {}): Promise<implicitReturnType>;
12
- publicGetMarketOpenOracle(params?: {}): Promise<implicitReturnType>;
13
- publicGetMarketExchangeRate(params?: {}): Promise<implicitReturnType>;
14
- publicGetPublicInstruments(params?: {}): Promise<implicitReturnType>;
15
- publicGetPublicTime(params?: {}): Promise<implicitReturnType>;
16
- privateGetTradeOrder(params?: {}): Promise<implicitReturnType>;
17
- privateGetTradeOrdersPending(params?: {}): Promise<implicitReturnType>;
18
- privateGetTradeOrdersHistory(params?: {}): Promise<implicitReturnType>;
19
- privateGetTradeOrdersHistoryArchive(params?: {}): Promise<implicitReturnType>;
20
- privateGetTradeFills(params?: {}): Promise<implicitReturnType>;
21
- privateGetTradeFillsHistory(params?: {}): Promise<implicitReturnType>;
22
- privateGetTradeFillsArchive(params?: {}): Promise<implicitReturnType>;
23
- privateGetTradeOrderAlgo(params?: {}): Promise<implicitReturnType>;
24
- privateGetTradeOrdersAlgoPending(params?: {}): Promise<implicitReturnType>;
25
- privateGetTradeOrdersAlgoHistory(params?: {}): Promise<implicitReturnType>;
26
- privateGetOtcRfqTrade(params?: {}): Promise<implicitReturnType>;
27
- privateGetOtcRfqHistory(params?: {}): Promise<implicitReturnType>;
28
- privateGetAccountBalance(params?: {}): Promise<implicitReturnType>;
29
- privateGetAccountBills(params?: {}): Promise<implicitReturnType>;
30
- privateGetAccountBillsArchive(params?: {}): Promise<implicitReturnType>;
31
- privateGetAccountConfig(params?: {}): Promise<implicitReturnType>;
32
- privateGetAccountMaxSize(params?: {}): Promise<implicitReturnType>;
33
- privateGetAccountMaxAvailSize(params?: {}): Promise<implicitReturnType>;
34
- privateGetAccountTradeFee(params?: {}): Promise<implicitReturnType>;
35
- privateGetAccountMaxWithdrawal(params?: {}): Promise<implicitReturnType>;
36
- privateGetAssetCurrencies(params?: {}): Promise<implicitReturnType>;
37
- privateGetAssetBalances(params?: {}): Promise<implicitReturnType>;
38
- privateGetAssetAssetValuation(params?: {}): Promise<implicitReturnType>;
39
- privateGetAssetTransferState(params?: {}): Promise<implicitReturnType>;
40
- privateGetAssetBills(params?: {}): Promise<implicitReturnType>;
41
- privateGetAssetDepositLightning(params?: {}): Promise<implicitReturnType>;
42
- privateGetAssetDepositAddress(params?: {}): Promise<implicitReturnType>;
43
- privateGetAssetDepositHistory(params?: {}): Promise<implicitReturnType>;
44
- privateGetAssetWithdrawalHistory(params?: {}): Promise<implicitReturnType>;
45
- privateGetAssetDepositWithdrawStatus(params?: {}): Promise<implicitReturnType>;
46
- privateGetFiatDepositHistory(params?: {}): Promise<implicitReturnType>;
47
- privateGetFiatWithdrawHistory(params?: {}): Promise<implicitReturnType>;
48
- privateGetFiatChannel(params?: {}): Promise<implicitReturnType>;
49
- privateGetUsersSubaccountList(params?: {}): Promise<implicitReturnType>;
50
- privateGetUsersSubaccountApiKey(params?: {}): Promise<implicitReturnType>;
51
- privateGetAccountSubaccountBalances(params?: {}): Promise<implicitReturnType>;
52
- privateGetAssetSubaccountBalances(params?: {}): Promise<implicitReturnType>;
53
- privateGetAssetSubaccountBills(params?: {}): Promise<implicitReturnType>;
54
- privatePostTradeOrder(params?: {}): Promise<implicitReturnType>;
55
- privatePostTradeBatchOrders(params?: {}): Promise<implicitReturnType>;
56
- privatePostTradeCancelOrder(params?: {}): Promise<implicitReturnType>;
57
- privatePostTradeCancelBatchOrders(params?: {}): Promise<implicitReturnType>;
58
- privatePostTradeAmendOrder(params?: {}): Promise<implicitReturnType>;
59
- privatePostTradeAmendBatchOrders(params?: {}): Promise<implicitReturnType>;
60
- privatePostTradeOrderAlgo(params?: {}): Promise<implicitReturnType>;
61
- privatePostTradeCancelAlgos(params?: {}): Promise<implicitReturnType>;
62
- privatePostTradeCancelAdvanceAlgos(params?: {}): Promise<implicitReturnType>;
63
- privatePostOtcRfqQuote(params?: {}): Promise<implicitReturnType>;
64
- privatePostOtcRfqTrade(params?: {}): Promise<implicitReturnType>;
65
- privatePostAssetTransfer(params?: {}): Promise<implicitReturnType>;
66
- privatePostAssetWithdrawal(params?: {}): Promise<implicitReturnType>;
67
- privatePostAssetWithdrawalLightning(params?: {}): Promise<implicitReturnType>;
68
- privatePostAssetWithdrawalCancel(params?: {}): Promise<implicitReturnType>;
69
- privatePostFiatDeposit(params?: {}): Promise<implicitReturnType>;
70
- privatePostFiatCancelDeposit(params?: {}): Promise<implicitReturnType>;
71
- privatePostFiatWithdrawal(params?: {}): Promise<implicitReturnType>;
72
- privatePostFiatCancelWithdrawal(params?: {}): Promise<implicitReturnType>;
73
- privatePostAssetSubaccountTransfer(params?: {}): Promise<implicitReturnType>;
74
- }
75
- declare abstract class Exchange extends _Exchange {
76
- }
77
- export default Exchange;
@@ -1,11 +0,0 @@
1
- // ----------------------------------------------------------------------------
2
-
3
- // PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
4
- // https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
5
- // EDIT THE CORRESPONDENT .ts FILE INSTEAD
6
-
7
- // -------------------------------------------------------------------------------
8
- import { Exchange as _Exchange } from '../base/Exchange.js';
9
- class Exchange extends _Exchange {
10
- }
11
- export default Exchange;
@@ -1,346 +0,0 @@
1
- import Exchange from './abstract/okcoin.js';
2
- import type { TransferEntry, Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, Num, Currencies, Dict, int, LedgerEntry, DepositAddress } from './base/types.js';
3
- /**
4
- * @class okcoin
5
- * @augments Exchange
6
- */
7
- export default class okcoin extends Exchange {
8
- describe(): any;
9
- /**
10
- * @method
11
- * @name okcoin#fetchTime
12
- * @description fetches the current integer timestamp in milliseconds from the exchange server
13
- * @param {object} [params] extra parameters specific to the exchange API endpoint
14
- * @returns {int} the current integer timestamp in milliseconds from the exchange server
15
- */
16
- fetchTime(params?: {}): Promise<Int>;
17
- /**
18
- * @method
19
- * @name okcoin#fetchMarkets
20
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-public-data-get-instruments
21
- * @description retrieves data on all markets for okcoin
22
- * @param {object} [params] extra parameters specific to the exchange API endpoint
23
- * @returns {object[]} an array of objects representing market data
24
- */
25
- fetchMarkets(params?: {}): Promise<Market[]>;
26
- parseMarket(market: Dict): Market;
27
- /**
28
- * @method
29
- * @name okcoin#fetchCurrencies
30
- * @description fetches all available currencies on an exchange
31
- * @param {object} [params] extra parameters specific to the exchange API endpoint
32
- * @returns {object} an associative dictionary of currencies
33
- */
34
- fetchCurrencies(params?: {}): Promise<Currencies>;
35
- /**
36
- * @method
37
- * @name okcoin#fetchOrderBook
38
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-market-data-get-order-book
39
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
40
- * @param {string} symbol unified symbol of the market to fetch the order book for
41
- * @param {int} [limit] the maximum amount of order book entries to return
42
- * @param {object} [params] extra parameters specific to the exchange API endpoint
43
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
44
- */
45
- fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
46
- parseTicker(ticker: Dict, market?: Market): Ticker;
47
- /**
48
- * @method
49
- * @name okcoin#fetchTicker
50
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-market-data-get-ticker
51
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
52
- * @param {string} symbol unified symbol of the market to fetch the ticker for
53
- * @param {object} [params] extra parameters specific to the exchange API endpoint
54
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
55
- */
56
- fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
57
- /**
58
- * @method
59
- * @name okcoin#fetchTickers
60
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-market-data-get-tickers
61
- * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
62
- * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
63
- * @param {object} [params] extra parameters specific to the exchange API endpoint
64
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
65
- */
66
- fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
67
- parseTrade(trade: Dict, market?: Market): Trade;
68
- /**
69
- * @method
70
- * @name okcoin#fetchTrades
71
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-market-data-get-trades
72
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-market-data-get-trades-history
73
- * @description get the list of most recent trades for a particular symbol
74
- * @param {string} symbol unified symbol of the market to fetch trades for
75
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
76
- * @param {int} [limit] the maximum amount of trades to fetch
77
- * @param {object} [params] extra parameters specific to the exchange API endpoint
78
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
79
- */
80
- fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
81
- parseOHLCV(ohlcv: any, market?: Market): OHLCV;
82
- /**
83
- * @method
84
- * @name okcoin#fetchOHLCV
85
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-market-data-get-candlesticks
86
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-market-data-get-candlesticks-history
87
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
88
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
89
- * @param {string} timeframe the length of time each candle represents
90
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
91
- * @param {int} [limit] the maximum amount of candles to fetch
92
- * @param {object} [params] extra parameters specific to the exchange API endpoint
93
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
94
- */
95
- fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
96
- parseAccountBalance(response: any): Balances;
97
- /**
98
- * @method
99
- * @name okcoin#fetchBalance
100
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
101
- * @param {object} [params] extra parameters specific to the exchange API endpoint
102
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
103
- */
104
- fetchBalance(params?: {}): Promise<Balances>;
105
- parseTradingBalance(response: any): Balances;
106
- parseFundingBalance(response: any): Balances;
107
- /**
108
- * @method
109
- * @name okcoin#createMarketBuyOrderWithCost
110
- * @description create a market buy order by providing the symbol and cost
111
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-place-order
112
- * @param {string} symbol unified symbol of the market to create an order in
113
- * @param {float} cost how much you want to trade in units of the quote currency
114
- * @param {object} [params] extra parameters specific to the exchange API endpoint
115
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
116
- */
117
- createMarketBuyOrderWithCost(symbol: string, cost: number, params?: {}): Promise<Order>;
118
- /**
119
- * @method
120
- * @name okcoin#createOrder
121
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-place-order
122
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-place-algo-order
123
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-place-multiple-orders
124
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-cancel-advance-algo-order
125
- * @description create a trade order
126
- * @param {string} symbol unified symbol of the market to create an order in
127
- * @param {string} type 'market' or 'limit'
128
- * @param {string} side 'buy' or 'sell'
129
- * @param {float} amount how much of currency you want to trade in units of base currency
130
- * @param {float} price the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
131
- * @param {object} [params] extra parameters specific to the exchange API endpoint
132
- * @param {bool} [params.reduceOnly] MARGIN orders only, or swap/future orders in net mode
133
- * @param {bool} [params.postOnly] true to place a post only order
134
- * @param {float} [params.triggerPrice] conditional orders only, the price at which the order is to be triggered
135
- * @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)
136
- * @param {float} [params.takeProfit.triggerPrice] take profit trigger price
137
- * @param {float} [params.takeProfit.price] used for take profit limit orders, not used for take profit market price orders
138
- * @param {string} [params.takeProfit.type] 'market' or 'limit' used to specify the take profit price type
139
- * @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)
140
- * @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
141
- * @param {float} [params.stopLoss.price] used for stop loss limit orders, not used for stop loss market price orders
142
- * @param {string} [params.stopLoss.type] 'market' or 'limit' used to specify the stop loss price type
143
- * @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
144
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
145
- */
146
- createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
147
- createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
148
- /**
149
- * @method
150
- * @name okcoin#cancelOrder
151
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-cancel-order
152
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-cancel-algo-order
153
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-cancel-advance-algo-order
154
- * @description cancels an open order
155
- * @param {string} id order id
156
- * @param {string} symbol unified symbol of the market the order was made in
157
- * @param {object} [params] extra parameters specific to the exchange API endpoint
158
- * @param {bool} [params.trigger] True if cancel trigger or conditional orders
159
- * @param {bool} [params.advanced] True if canceling advanced orders only
160
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
161
- */
162
- cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
163
- parseIds(ids: any): any;
164
- /**
165
- * @method
166
- * @name okcoin#cancelOrders
167
- * @description cancel multiple orders
168
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-cancel-multiple-orders
169
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-cancel-algo-order
170
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-cancel-advance-algo-order
171
- * @param {string[]} ids order ids
172
- * @param {string} symbol unified market symbol
173
- * @param {object} [params] extra parameters specific to the exchange API endpoint
174
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
175
- */
176
- cancelOrders(ids: any, symbol?: Str, params?: {}): Promise<Order[]>;
177
- parseOrderStatus(status: Str): string;
178
- parseOrder(order: Dict, market?: Market): Order;
179
- /**
180
- * @method
181
- * @name okcoin#fetchOrder
182
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-get-order-details
183
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-get-algo-order-list
184
- * @description fetches information on an order made by the user
185
- * @param {string} id order id
186
- * @param {string} symbol unified symbol of the market the order was made in
187
- * @param {object} [params] extra parameters specific to the exchange API endpoint
188
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
189
- */
190
- fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
191
- /**
192
- * @method
193
- * @name okcoin#fetchOpenOrders
194
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-get-order-list
195
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-get-algo-order-list
196
- * @description fetch all unfilled currently open orders
197
- * @param {string} symbol unified market symbol
198
- * @param {int} [since] the earliest time in ms to fetch open orders for
199
- * @param {int} [limit] the maximum number of open orders structures to retrieve
200
- * @param {object} [params] extra parameters specific to the exchange API endpoint
201
- * @param {bool} [params.trigger] True if fetching trigger or conditional orders
202
- * @param {string} [params.ordType] "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap"
203
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
204
- */
205
- fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
206
- /**
207
- * @method
208
- * @name okcoin#fetchClosedOrders
209
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-get-algo-order-history
210
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-get-order-history-last-3-months
211
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-get-order-history-last-7-days
212
- * @description fetches information on multiple closed orders made by the user
213
- * @param {string} symbol unified market symbol of the market orders were made in
214
- * @param {int} [since] the earliest time in ms to fetch orders for
215
- * @param {int} [limit] the maximum number of order structures to retrieve
216
- * @param {object} [params] extra parameters specific to the exchange API endpoint
217
- * @param {bool} [params.trigger] True if fetching trigger or conditional orders
218
- * @param {string} [params.ordType] "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap"
219
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
220
- */
221
- fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
222
- parseDepositAddress(depositAddress: any, currency?: Currency): DepositAddress;
223
- /**
224
- * @method
225
- * @name okcoin#fetchDepositAddress
226
- * @description fetch the deposit address for a currency associated with this account
227
- * @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
228
- * @param {string} code unified currency code
229
- * @param {object} [params] extra parameters specific to the exchange API endpoint
230
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
231
- */
232
- fetchDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
233
- /**
234
- * @method
235
- * @name okcoin#fetchDepositAddressesByNetwork
236
- * @description fetch a dictionary of addresses for a currency, indexed by network
237
- * @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
238
- * @param {string} code unified currency code of the currency for the deposit address
239
- * @param {object} [params] extra parameters specific to the exchange API endpoint
240
- * @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/#/?id=address-structure} indexed by the network
241
- */
242
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<DepositAddress[]>;
243
- /**
244
- * @method
245
- * @name okcoin#transfer
246
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-funding-funds-transfer
247
- * @description transfer currency internally between wallets on the same account
248
- * @param {string} code unified currency code
249
- * @param {float} amount amount to transfer
250
- * @param {string} fromAccount account to transfer from
251
- * @param {string} toAccount account to transfer to
252
- * @param {object} [params] extra parameters specific to the exchange API endpoint
253
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
254
- */
255
- transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
256
- parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
257
- parseTransferStatus(status: Str): Str;
258
- /**
259
- * @method
260
- * @name okcoin#withdraw
261
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-funding-withdrawal
262
- * @description make a withdrawal
263
- * @param {string} code unified currency code
264
- * @param {float} amount the amount to withdraw
265
- * @param {string} address the address to withdraw to
266
- * @param {string} tag
267
- * @param {object} [params] extra parameters specific to the exchange API endpoint
268
- * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
269
- */
270
- withdraw(code: string, amount: number, address: string, tag?: Str, params?: {}): Promise<Transaction>;
271
- /**
272
- * @method
273
- * @name okcoin#fetchDeposits
274
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-funding-get-deposit-history
275
- * @description fetch all deposits made to an account
276
- * @param {string} code unified currency code
277
- * @param {int} [since] the earliest time in ms to fetch deposits for
278
- * @param {int} [limit] the maximum number of deposits structures to retrieve
279
- * @param {object} [params] extra parameters specific to the exchange API endpoint
280
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
281
- */
282
- fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
283
- /**
284
- * @method
285
- * @name okcoin#fetchWithdrawals
286
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-funding-get-withdrawal-history
287
- * @description fetch all withdrawals made from an account
288
- * @param {string} code unified currency code
289
- * @param {int} [since] the earliest time in ms to fetch withdrawals for
290
- * @param {int} [limit] the maximum number of withdrawals structures to retrieve
291
- * @param {object} [params] extra parameters specific to the exchange API endpoint
292
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
293
- */
294
- fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
295
- parseTransactionStatus(status: Str): string;
296
- parseTransaction(transaction: Dict, currency?: Currency): Transaction;
297
- /**
298
- * @method
299
- * @name okcoin#fetchMyTrades
300
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-get-transaction-details-last-3-days
301
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-trade-get-transaction-details-last-3-months
302
- * @description fetch all trades made by the user
303
- * @param {string} symbol unified market symbol
304
- * @param {int} [since] the earliest time in ms to fetch trades for
305
- * @param {int} [limit] the maximum number of trades structures to retrieve
306
- * @param {object} [params] extra parameters specific to the exchange API endpoint
307
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
308
- */
309
- fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
310
- /**
311
- * @method
312
- * @name okcoin#fetchOrderTrades
313
- * @description fetch all the trades made from a single order
314
- * @param {string} id order id
315
- * @param {string} symbol unified market symbol
316
- * @param {int} [since] the earliest time in ms to fetch trades for
317
- * @param {int} [limit] the maximum number of trades to retrieve
318
- * @param {object} [params] extra parameters specific to the exchange API endpoint
319
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
320
- */
321
- fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
322
- /**
323
- * @method
324
- * @name okcoin#fetchLedger
325
- * @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
326
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-funding-asset-bills-details
327
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-account-get-bills-details-last-7-days
328
- * @see https://www.okcoin.com/docs-v5/en/#rest-api-account-get-bills-details-last-3-months
329
- * @param {string} [code] unified currency code, default is undefined
330
- * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
331
- * @param {int} [limit] max number of ledger entries to return, default is undefined
332
- * @param {object} [params] extra parameters specific to the exchange API endpoint
333
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
334
- */
335
- fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
336
- parseLedgerEntryType(type: any): string;
337
- parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
338
- sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
339
- url: string;
340
- method: string;
341
- body: any;
342
- headers: any;
343
- };
344
- parseBalanceByType(type: any, response: any): Balances;
345
- handleErrors(httpCode: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
346
- }