ccxt 4.4.85 → 4.4.87

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 (115) hide show
  1. package/README.md +18 -7
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +16 -9
  4. package/dist/cjs/src/abstract/bittrade.js +9 -0
  5. package/dist/cjs/src/abstract/modetrade.js +9 -0
  6. package/dist/cjs/src/ascendex.js +189 -155
  7. package/dist/cjs/src/base/Exchange.js +10 -8
  8. package/dist/cjs/src/bequant.js +1 -1
  9. package/dist/cjs/src/binance.js +1 -1
  10. package/dist/cjs/src/bitget.js +5 -4
  11. package/dist/cjs/src/bitmart.js +1 -1
  12. package/dist/cjs/src/bitteam.js +31 -0
  13. package/dist/cjs/src/bittrade.js +2049 -0
  14. package/dist/cjs/src/coinbase.js +2 -6
  15. package/dist/cjs/src/coinmetro.js +5 -1
  16. package/dist/cjs/src/deribit.js +4 -5
  17. package/dist/cjs/src/derive.js +4 -5
  18. package/dist/cjs/src/ellipx.js +2 -3
  19. package/dist/cjs/src/gate.js +92 -76
  20. package/dist/cjs/src/hollaex.js +107 -49
  21. package/dist/cjs/src/htx.js +30 -52
  22. package/dist/cjs/src/hyperliquid.js +36 -20
  23. package/dist/cjs/src/kraken.js +5 -8
  24. package/dist/cjs/src/mexc.js +2 -2
  25. package/dist/cjs/src/modetrade.js +2839 -0
  26. package/dist/cjs/src/ndax.js +25 -24
  27. package/dist/cjs/src/okcoin.js +12 -31
  28. package/dist/cjs/src/okx.js +104 -2
  29. package/dist/cjs/src/okxus.js +53 -0
  30. package/dist/cjs/src/onetrading.js +9 -6
  31. package/dist/cjs/src/oxfun.js +42 -114
  32. package/dist/cjs/src/paradex.js +10 -1
  33. package/dist/cjs/src/phemex.js +4 -6
  34. package/dist/cjs/src/poloniex.js +181 -170
  35. package/dist/cjs/src/pro/binance.js +1 -0
  36. package/dist/cjs/src/pro/bittrade.js +605 -0
  37. package/dist/cjs/src/pro/luno.js +6 -5
  38. package/dist/cjs/src/pro/mexc.js +3 -0
  39. package/dist/cjs/src/pro/modetrade.js +1334 -0
  40. package/dist/cjs/src/pro/okxus.js +38 -0
  41. package/dist/cjs/src/probit.js +18 -51
  42. package/dist/cjs/src/timex.js +5 -10
  43. package/dist/cjs/src/vertex.js +3 -4
  44. package/dist/cjs/src/whitebit.js +41 -11
  45. package/dist/cjs/src/woo.js +101 -77
  46. package/dist/cjs/src/woofipro.js +24 -21
  47. package/dist/cjs/src/xt.js +36 -44
  48. package/js/ccxt.d.ts +20 -11
  49. package/js/ccxt.js +14 -8
  50. package/js/src/abstract/modetrade.d.ts +122 -0
  51. package/js/src/abstract/myokx.d.ts +2 -0
  52. package/js/src/abstract/okx.d.ts +2 -0
  53. package/js/src/abstract/okxus.d.ts +352 -0
  54. package/js/src/abstract/okxus.js +11 -0
  55. package/js/src/ascendex.d.ts +2 -0
  56. package/js/src/ascendex.js +189 -155
  57. package/js/src/base/Exchange.js +10 -8
  58. package/js/src/bequant.js +1 -1
  59. package/js/src/binance.js +1 -1
  60. package/js/src/bitget.js +5 -4
  61. package/js/src/bitmart.js +1 -1
  62. package/js/src/bitteam.js +31 -0
  63. package/js/src/{huobijp.d.ts → bittrade.d.ts} +29 -29
  64. package/js/src/{huobijp.js → bittrade.js} +35 -35
  65. package/js/src/coinbase.js +2 -6
  66. package/js/src/coinmetro.js +5 -1
  67. package/js/src/deribit.js +4 -5
  68. package/js/src/derive.js +4 -3
  69. package/js/src/ellipx.d.ts +1 -1
  70. package/js/src/ellipx.js +3 -5
  71. package/js/src/gate.js +92 -76
  72. package/js/src/hollaex.js +107 -49
  73. package/js/src/htx.js +30 -52
  74. package/js/src/hyperliquid.js +36 -20
  75. package/js/src/kraken.js +5 -8
  76. package/js/src/mexc.js +2 -2
  77. package/js/src/modetrade.d.ts +475 -0
  78. package/js/src/modetrade.js +2840 -0
  79. package/js/src/ndax.js +25 -24
  80. package/js/src/okcoin.js +12 -31
  81. package/js/src/okx.d.ts +24 -1
  82. package/js/src/okx.js +104 -2
  83. package/js/src/okxus.d.ts +4 -0
  84. package/js/src/okxus.js +54 -0
  85. package/js/src/onetrading.js +9 -6
  86. package/js/src/oxfun.js +42 -114
  87. package/js/src/paradex.js +10 -1
  88. package/js/src/phemex.js +4 -6
  89. package/js/src/poloniex.d.ts +2 -0
  90. package/js/src/poloniex.js +181 -170
  91. package/js/src/pro/binance.js +1 -0
  92. package/js/src/pro/{huobijp.d.ts → bittrade.d.ts} +6 -6
  93. package/js/src/pro/{huobijp.js → bittrade.js} +7 -7
  94. package/js/src/pro/luno.js +6 -5
  95. package/js/src/pro/mexc.js +3 -0
  96. package/js/src/pro/modetrade.d.ts +155 -0
  97. package/js/src/pro/modetrade.js +1335 -0
  98. package/js/src/pro/okxus.d.ts +4 -0
  99. package/js/src/pro/okxus.js +39 -0
  100. package/js/src/probit.js +18 -51
  101. package/js/src/timex.js +5 -10
  102. package/js/src/vertex.js +3 -4
  103. package/js/src/whitebit.js +42 -11
  104. package/js/src/woo.d.ts +2 -0
  105. package/js/src/woo.js +101 -77
  106. package/js/src/woofipro.d.ts +2 -1
  107. package/js/src/woofipro.js +24 -21
  108. package/js/src/xt.js +36 -44
  109. package/package.json +1 -1
  110. package/js/src/abstract/kuna.d.ts +0 -185
  111. package/js/src/kuna.d.ts +0 -335
  112. package/js/src/kuna.js +0 -2006
  113. /package/js/src/abstract/{huobijp.d.ts → bittrade.d.ts} +0 -0
  114. /package/js/src/abstract/{huobijp.js → bittrade.js} +0 -0
  115. /package/js/src/abstract/{kuna.js → modetrade.js} +0 -0
@@ -0,0 +1,475 @@
1
+ import Exchange from './abstract/modetrade.js';
2
+ import type { Balances, Currency, FundingRateHistory, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Trade, Transaction, Leverage, Currencies, TradingFees, OrderRequest, Dict, int, LedgerEntry, FundingRate, FundingRates, Position } from './base/types.js';
3
+ /**
4
+ * @class modetrade
5
+ * @augments Exchange
6
+ */
7
+ export default class modetrade extends Exchange {
8
+ describe(): any;
9
+ setSandboxMode(enable: boolean): void;
10
+ /**
11
+ * @method
12
+ * @name modetrade#fetchStatus
13
+ * @description the latest known information on the availability of the exchange API
14
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-system-maintenance-status
15
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
16
+ * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
17
+ */
18
+ fetchStatus(params?: {}): Promise<{
19
+ status: string;
20
+ updated: any;
21
+ eta: any;
22
+ url: any;
23
+ info: any;
24
+ }>;
25
+ /**
26
+ * @method
27
+ * @name modetrade#fetchTime
28
+ * @description fetches the current integer timestamp in milliseconds from the exchange server
29
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-system-maintenance-status
30
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
31
+ * @returns {int} the current integer timestamp in milliseconds from the exchange server
32
+ */
33
+ fetchTime(params?: {}): Promise<Int>;
34
+ parseMarket(market: Dict): Market;
35
+ /**
36
+ * @method
37
+ * @name modetrade#fetchMarkets
38
+ * @description retrieves data on all markets for modetrade
39
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-available-symbols
40
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
41
+ * @returns {object[]} an array of objects representing market data
42
+ */
43
+ fetchMarkets(params?: {}): Promise<Market[]>;
44
+ /**
45
+ * @method
46
+ * @name modetrade#fetchCurrencies
47
+ * @description fetches all available currencies on an exchange
48
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-token-info
49
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
50
+ * @returns {object} an associative dictionary of currencies
51
+ */
52
+ fetchCurrencies(params?: {}): Promise<Currencies>;
53
+ parseTokenAndFeeTemp(item: any, feeTokenKey: any, feeAmountKey: any): any;
54
+ parseTrade(trade: Dict, market?: Market): Trade;
55
+ /**
56
+ * @method
57
+ * @name modetrade#fetchTrades
58
+ * @description get the list of most recent trades for a particular symbol
59
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-market-trades
60
+ * @param {string} symbol unified symbol of the market to fetch trades for
61
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
62
+ * @param {int} [limit] the maximum amount of trades to fetch
63
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
64
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
65
+ */
66
+ fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
67
+ parseFundingRate(fundingRate: any, market?: Market): FundingRate;
68
+ parseFundingInterval(interval: any): string;
69
+ /**
70
+ * @method
71
+ * @name modetrade#fetchFundingInterval
72
+ * @description fetch the current funding rate interval
73
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-predicted-funding-rate-for-one-market
74
+ * @param {string} symbol unified market symbol
75
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
76
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
77
+ */
78
+ fetchFundingInterval(symbol: string, params?: {}): Promise<FundingRate>;
79
+ /**
80
+ * @method
81
+ * @name modetrade#fetchFundingRate
82
+ * @description fetch the current funding rate
83
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-predicted-funding-rate-for-one-market
84
+ * @param {string} symbol unified market symbol
85
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
86
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
87
+ */
88
+ fetchFundingRate(symbol: string, params?: {}): Promise<FundingRate>;
89
+ /**
90
+ * @method
91
+ * @name modetrade#fetchFundingRates
92
+ * @description fetch the current funding rate for multiple markets
93
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-predicted-funding-rates-for-all-markets
94
+ * @param {string[]} symbols unified market symbols
95
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
96
+ * @returns {object[]} an array of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
97
+ */
98
+ fetchFundingRates(symbols?: Strings, params?: {}): Promise<FundingRates>;
99
+ /**
100
+ * @method
101
+ * @name modetrade#fetchFundingRateHistory
102
+ * @description fetches historical funding rate prices
103
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-funding-rate-history-for-one-market
104
+ * @param {string} symbol unified symbol of the market to fetch the funding rate history for
105
+ * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
106
+ * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
107
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
108
+ * @param {int} [params.until] timestamp in ms of the latest funding rate
109
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
110
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
111
+ */
112
+ fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
113
+ /**
114
+ * @method
115
+ * @name modetrade#fetchTradingFees
116
+ * @description fetch the trading fees for multiple markets
117
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-account-information
118
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
119
+ * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
120
+ */
121
+ fetchTradingFees(params?: {}): Promise<TradingFees>;
122
+ /**
123
+ * @method
124
+ * @name modetrade#fetchOrderBook
125
+ * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
126
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/orderbook-snapshot
127
+ * @param {string} symbol unified symbol of the market to fetch the order book for
128
+ * @param {int} [limit] the maximum amount of order book entries to return
129
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
130
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
131
+ */
132
+ fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
133
+ parseOHLCV(ohlcv: any, market?: Market): OHLCV;
134
+ /**
135
+ * @method
136
+ * @name modetrade#fetchOHLCV
137
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-kline
138
+ * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
139
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
140
+ * @param {string} timeframe the length of time each candle represents
141
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
142
+ * @param {int} [limit] max=1000, max=100 when since is defined and is less than (now - (999 * (timeframe in ms)))
143
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
144
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
145
+ */
146
+ fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
147
+ parseOrder(order: Dict, market?: Market): Order;
148
+ parseTimeInForce(timeInForce: Str): string;
149
+ parseOrderStatus(status: Str): string;
150
+ parseOrderType(type: Str): string;
151
+ createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
152
+ /**
153
+ * @method
154
+ * @name modetrade#createOrder
155
+ * @description create a trade order
156
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/create-order
157
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/create-algo-order
158
+ * @param {string} symbol unified symbol of the market to create an order in
159
+ * @param {string} type 'market' or 'limit'
160
+ * @param {string} side 'buy' or 'sell'
161
+ * @param {float} amount how much of currency you want to trade in units of base currency
162
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
163
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
164
+ * @param {float} [params.triggerPrice] The price a trigger order is triggered at
165
+ * @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)
166
+ * @param {float} [params.takeProfit.triggerPrice] take profit trigger price
167
+ * @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)
168
+ * @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
169
+ * @param {float} [params.algoType] 'STOP'or 'TP_SL' or 'POSITIONAL_TP_SL'
170
+ * @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
171
+ * @param {string} [params.clientOrderId] a unique id for the order
172
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
173
+ */
174
+ createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
175
+ /**
176
+ * @method
177
+ * @name modetrade#createOrders
178
+ * @description *contract only* create a list of trade orders
179
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/batch-create-order
180
+ * @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
181
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
182
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
183
+ */
184
+ createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
185
+ /**
186
+ * @method
187
+ * @name modetrade#editOrder
188
+ * @description edit a trade order
189
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/edit-order
190
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/edit-algo-order
191
+ * @param {string} id order id
192
+ * @param {string} symbol unified symbol of the market to create an order in
193
+ * @param {string} type 'market' or 'limit'
194
+ * @param {string} side 'buy' or 'sell'
195
+ * @param {float} amount how much of currency you want to trade in units of base currency
196
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
197
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
198
+ * @param {float} [params.triggerPrice] The price a trigger order is triggered at
199
+ * @param {float} [params.stopLossPrice] price to trigger stop-loss orders
200
+ * @param {float} [params.takeProfitPrice] price to trigger take-profit orders
201
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
202
+ */
203
+ editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
204
+ /**
205
+ * @method
206
+ * @name modetrade#cancelOrder
207
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/cancel-order
208
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/cancel-order-by-client_order_id
209
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/cancel-algo-order
210
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/cancel-algo-order-by-client_order_id
211
+ * @description cancels an open order
212
+ * @param {string} id order id
213
+ * @param {string} symbol unified symbol of the market the order was made in
214
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
215
+ * @param {boolean} [params.trigger] whether the order is a stop/algo order
216
+ * @param {string} [params.clientOrderId] a unique id for the order
217
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
218
+ */
219
+ cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
220
+ /**
221
+ * @method
222
+ * @name modetrade#cancelOrders
223
+ * @description cancel multiple orders
224
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/batch-cancel-orders
225
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/batch-cancel-orders-by-client_order_id
226
+ * @param {string[]} ids order ids
227
+ * @param {string} [symbol] unified market symbol
228
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
229
+ * @param {string[]} [params.client_order_ids] max length 10 e.g. ["my_id_1","my_id_2"], encode the double quotes. No space after comma
230
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
231
+ */
232
+ cancelOrders(ids: string[], symbol?: Str, params?: {}): Promise<Order[]>;
233
+ /**
234
+ * @method
235
+ * @name modetrade#cancelAllOrders
236
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/cancel-all-pending-algo-orders
237
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/cancel-orders-in-bulk
238
+ * @description cancel all open orders in a market
239
+ * @param {string} symbol unified market symbol
240
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
241
+ * @param {boolean} [params.trigger] whether the order is a stop/algo order
242
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
243
+ */
244
+ cancelAllOrders(symbol?: Str, params?: {}): Promise<{
245
+ info: any;
246
+ }[]>;
247
+ /**
248
+ * @method
249
+ * @name modetrade#fetchOrder
250
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-order-by-order_id
251
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-order-by-client_order_id
252
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-algo-order-by-order_id
253
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-algo-order-by-client_order_id
254
+ * @description fetches information on an order made by the user
255
+ * @param {string} id the order id
256
+ * @param {string} symbol unified symbol of the market the order was made in
257
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
258
+ * @param {boolean} [params.trigger] whether the order is a stop/algo order
259
+ * @param {string} [params.clientOrderId] a unique id for the order
260
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
261
+ */
262
+ fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
263
+ /**
264
+ * @method
265
+ * @name modetrade#fetchOrders
266
+ * @description fetches information on multiple orders made by the user
267
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-orders
268
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-algo-orders
269
+ * @param {string} symbol unified market symbol of the market orders were made in
270
+ * @param {int} [since] the earliest time in ms to fetch orders for
271
+ * @param {int} [limit] the maximum number of order structures to retrieve
272
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
273
+ * @param {boolean} [params.trigger] whether the order is a stop/algo order
274
+ * @param {boolean} [params.is_triggered] whether the order has been triggered (false by default)
275
+ * @param {string} [params.side] 'buy' or 'sell'
276
+ * @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
277
+ * @param {int} params.until timestamp in ms of the latest order to fetch
278
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
279
+ */
280
+ fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
281
+ /**
282
+ * @method
283
+ * @name modetrade#fetchOpenOrders
284
+ * @description fetches information on multiple orders made by the user
285
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-orders
286
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-algo-orders
287
+ * @param {string} symbol unified market symbol of the market orders were made in
288
+ * @param {int} [since] the earliest time in ms to fetch orders for
289
+ * @param {int} [limit] the maximum number of order structures to retrieve
290
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
291
+ * @param {boolean} [params.trigger] whether the order is a stop/algo order
292
+ * @param {boolean} [params.is_triggered] whether the order has been triggered (false by default)
293
+ * @param {string} [params.side] 'buy' or 'sell'
294
+ * @param {int} params.until timestamp in ms of the latest order to fetch
295
+ * @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
296
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
297
+ */
298
+ fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
299
+ /**
300
+ * @method
301
+ * @name modetrade#fetchClosedOrders
302
+ * @description fetches information on multiple orders made by the user
303
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-orders
304
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-algo-orders
305
+ * @param {string} symbol unified market symbol of the market orders were made in
306
+ * @param {int} [since] the earliest time in ms to fetch orders for
307
+ * @param {int} [limit] the maximum number of order structures to retrieve
308
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
309
+ * @param {boolean} [params.trigger] whether the order is a stop/algo order
310
+ * @param {boolean} [params.is_triggered] whether the order has been triggered (false by default)
311
+ * @param {string} [params.side] 'buy' or 'sell'
312
+ * @param {int} params.until timestamp in ms of the latest order to fetch
313
+ * @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
314
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
315
+ */
316
+ fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
317
+ /**
318
+ * @method
319
+ * @name modetrade#fetchOrderTrades
320
+ * @description fetch all the trades made from a single order
321
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-all-trades-of-specific-order
322
+ * @param {string} id order id
323
+ * @param {string} symbol unified market symbol
324
+ * @param {int} [since] the earliest time in ms to fetch trades for
325
+ * @param {int} [limit] the maximum number of trades to retrieve
326
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
327
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
328
+ */
329
+ fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
330
+ /**
331
+ * @method
332
+ * @name modetrade#fetchMyTrades
333
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-trades
334
+ * @description fetch all trades made by the user
335
+ * @param {string} symbol unified market symbol
336
+ * @param {int} [since] the earliest time in ms to fetch trades for
337
+ * @param {int} [limit] the maximum number of trades structures to retrieve
338
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
339
+ * @param {boolean} [params.paginate] set to true if you want to fetch trades with pagination
340
+ * @param {int} params.until timestamp in ms of the latest trade to fetch
341
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
342
+ */
343
+ fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
344
+ parseBalance(response: any): Balances;
345
+ /**
346
+ * @method
347
+ * @name modetrade#fetchBalance
348
+ * @description query for balance and get the amount of funds available for trading or funds locked in orders
349
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-current-holding
350
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
351
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
352
+ */
353
+ fetchBalance(params?: {}): Promise<Balances>;
354
+ getAssetHistoryRows(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
355
+ parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
356
+ parseLedgerEntryType(type: any): string;
357
+ /**
358
+ * @method
359
+ * @name modetrade#fetchLedger
360
+ * @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
361
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-asset-history
362
+ * @param {string} [code] unified currency code, default is undefined
363
+ * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
364
+ * @param {int} [limit] max number of ledger entries to return, default is undefined
365
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
366
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
367
+ */
368
+ fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
369
+ parseTransaction(transaction: Dict, currency?: Currency): Transaction;
370
+ parseTransactionStatus(status: Str): string;
371
+ /**
372
+ * @method
373
+ * @name modetrade#fetchDeposits
374
+ * @description fetch all deposits made to an account
375
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-asset-history
376
+ * @param {string} code unified currency code
377
+ * @param {int} [since] the earliest time in ms to fetch deposits for
378
+ * @param {int} [limit] the maximum number of deposits structures to retrieve
379
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
380
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
381
+ */
382
+ fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
383
+ /**
384
+ * @method
385
+ * @name modetrade#fetchWithdrawals
386
+ * @description fetch all withdrawals made from an account
387
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-asset-history
388
+ * @param {string} code unified currency code
389
+ * @param {int} [since] the earliest time in ms to fetch withdrawals for
390
+ * @param {int} [limit] the maximum number of withdrawals structures to retrieve
391
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
392
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
393
+ */
394
+ fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
395
+ /**
396
+ * @method
397
+ * @name modetrade#fetchDepositsWithdrawals
398
+ * @description fetch history of deposits and withdrawals
399
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-asset-history
400
+ * @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
401
+ * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
402
+ * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
403
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
404
+ * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
405
+ */
406
+ fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
407
+ getWithdrawNonce(params?: {}): Promise<number>;
408
+ hashMessage(message: any): string;
409
+ signHash(hash: any, privateKey: any): string;
410
+ signMessage(message: any, privateKey: any): string;
411
+ /**
412
+ * @method
413
+ * @name modetrade#withdraw
414
+ * @description make a withdrawal
415
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/create-withdraw-request
416
+ * @param {string} code unified currency code
417
+ * @param {float} amount the amount to withdraw
418
+ * @param {string} address the address to withdraw to
419
+ * @param {string} tag
420
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
421
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
422
+ */
423
+ withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
424
+ parseLeverage(leverage: any, market?: any): Leverage;
425
+ /**
426
+ * @method
427
+ * @name modetrade#fetchLeverage
428
+ * @description fetch the set leverage for a market
429
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-account-information
430
+ * @param {string} symbol unified market symbol
431
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
432
+ * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
433
+ */
434
+ fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
435
+ /**
436
+ * @method
437
+ * @name modetrade#setLeverage
438
+ * @description set the level of leverage for a market
439
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/update-leverage-setting
440
+ * @param {int} [leverage] the rate of leverage
441
+ * @param {string} [symbol] unified market symbol
442
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
443
+ * @returns {object} response from the exchange
444
+ */
445
+ setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
446
+ parsePosition(position: Dict, market?: Market): Position;
447
+ /**
448
+ * @method
449
+ * @name modetrade#fetchPosition
450
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-one-position-info
451
+ * @description fetch data on an open position
452
+ * @param {string} symbol unified market symbol of the market the position is held in
453
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
454
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
455
+ */
456
+ fetchPosition(symbol: Str, params?: {}): Promise<Position>;
457
+ /**
458
+ * @method
459
+ * @name modetrade#fetchPositions
460
+ * @description fetch all open positions
461
+ * @see https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-all-positions-info
462
+ * @param {string[]} [symbols] list of unified market symbols
463
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
464
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
465
+ */
466
+ fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
467
+ nonce(): number;
468
+ sign(path: any, section?: string, method?: string, params?: {}, headers?: any, body?: any): {
469
+ url: string;
470
+ method: string;
471
+ body: any;
472
+ headers: any;
473
+ };
474
+ handleErrors(httpCode: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
475
+ }