wiki/exchanges/revolutx.md
<a name="revolutx" id="revolutx"></a>
Kind: global class
Extends: <code>Exchange</code>
<a name="fetchMarkets" id="fetchmarkets"></a>
retrieves all available markets on the exchange
Kind: instance method of <code>revolutx</code>
Returns: <code>Array<object></code> - an array of market structures
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-public-market-data
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.region | <code>string</code> | No | the region to filter markets by (e.g. EEA, UK) |
revolutx.fetchMarkets (params?)
<a name="fetchCurrencies" id="fetchcurrencies"></a>
fetches all available currencies on the exchange
Kind: instance method of <code>revolutx</code>
Returns: <code>object</code> - a dictionary of currency structures
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-public-market-data
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.region | <code>string</code> | No | the region to filter currencies by |
revolutx.fetchCurrencies (params?)
<a name="fetchTickers" id="fetchtickers"></a>
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
Kind: instance method of <code>revolutx</code>
Returns: <code>object</code> - a dictionary of ticker structures
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-public-market-data
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code>, <code>undefined</code> | Yes | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.region | <code>string</code> | No | the region to fetch tickers for (e.g. EEA, UK) |
revolutx.fetchTickers (symbols, params?)
<a name="fetchTicker" id="fetchticker"></a>
fetches a price ticker for a given market symbol
Kind: instance method of <code>revolutx</code>
Returns: <code>object</code> - a ticker structure
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-public-market-data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.region | <code>string</code> | No | the region to fetch the ticker for |
revolutx.fetchTicker (symbol, params?)
<a name="fetchOrderBook" id="fetchorderbook"></a>
fetches the current order book snapshot for a given market symbol
Kind: instance method of <code>revolutx</code>
Returns: <code>object</code> - an order book structure
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-public-market-data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the order book for |
| limit | <code>int</code> | No | the maximum number of orders to return (1-50, default 50) |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.region | <code>string</code> | No | the region to fetch the order book for |
revolutx.fetchOrderBook (symbol, limit?, params?)
<a name="fetchOHLCV" id="fetchohlcv"></a>
fetches historical candlestick data for a given market symbol
Kind: instance method of <code>revolutx</code>
Returns: <code>Array<Array<int>></code> - a list of OHLCV structures
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-public-market-data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | <code>string</code> | Yes | the length of time each candle represents (e.g. 1m, 5m, 1h, 1d) |
| since | <code>int</code> | No | timestamp in ms of the earliest candle to fetch |
| limit | <code>int</code> | No | the maximum number of candles to return |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | timestamp in ms of the latest candle to fetch |
| params.region | <code>string</code> | No | the region to fetch candles for |
revolutx.fetchOHLCV (symbol, timeframe, since?, limit?, params?)
<a name="fetchTrades" id="fetchtrades"></a>
fetches the public trade history for a given market symbol
Kind: instance method of <code>revolutx</code>
Returns: <code>Array<object></code> - a list of trade structures
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-public-market-data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch trades for |
| since | <code>int</code> | No | timestamp in ms of the earliest trade to fetch |
| limit | <code>int</code> | No | the maximum number of trades to return (1-1900, default 1900) |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | timestamp in ms of the latest trade to fetch |
| params.cursor | <code>string</code> | No | pagination cursor from the previous response |
revolutx.fetchTrades (symbol, since?, limit?, params?)
<a name="fetchBalance" id="fetchbalance"></a>
fetches the current balance for the authenticated user
Kind: instance method of <code>revolutx</code>
Returns: <code>object</code> - a balance structure
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-account-data
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
revolutx.fetchBalance (params?)
<a name="createOrder" id="createorder"></a>
create a trade order
Kind: instance method of <code>revolutx</code>
Returns: <code>object</code> - an order structure
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-trading
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to create an order in |
| type | <code>string</code> | Yes | 'limit' or 'market' |
| side | <code>string</code> | Yes | 'buy' or 'sell' |
| amount | <code>float</code> | Yes | how much of the base currency you want to trade |
| price | <code>float</code> | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | <code>string</code> | No | a custom client order id (UUID) |
| params.cost | <code>float</code> | No | the order cost in units of the quote currency (alternative to amount) |
| params.timeInForce | <code>string</code> | No | 'gtc' or 'ioc' for limit orders |
| params.executionInstructions | <code>Array<string></code> | No | limit order instructions, e.g. ['post_only'] or ['allow_taker'] |
revolutx.createOrder (symbol, type, side, amount, price?, params?)
<a name="cancelOrder" id="cancelorder"></a>
cancels an open order by its id
Kind: instance method of <code>revolutx</code>
Returns: <code>object</code> - an order structure
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-trading
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | the order id (venue order id) |
| symbol | <code>string</code> | Yes | not used by this exchange |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
revolutx.cancelOrder (id, symbol, params?)
<a name="cancelAllOrders" id="cancelallorders"></a>
cancels all open orders
Kind: instance method of <code>revolutx</code>
Returns: <code>object</code> - an empty order structure
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-trading
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | No | not used by this exchange |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
revolutx.cancelAllOrders (symbol?, params?)
<a name="fetchOrder" id="fetchorder"></a>
fetches an order by its id
Kind: instance method of <code>revolutx</code>
Returns: <code>object</code> - an order structure
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-account-data
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | the order id (venue order id) |
| symbol | <code>string</code> | Yes | unified symbol of the market the order was made in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
revolutx.fetchOrder (id, symbol, params?)
<a name="fetchOpenOrders" id="fetchopenorders"></a>
fetches all open orders for the authenticated user
Kind: instance method of <code>revolutx</code>
Returns: <code>Array<object></code> - a list of order structures
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-account-data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code>, <code>undefined</code> | Yes | unified symbol of the market to fetch open orders for |
| since | <code>int</code> | No | timestamp in ms of the earliest order to fetch |
| limit | <code>int</code> | No | the maximum number of orders to return (1-300, default 300) |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.cursor | <code>string</code> | No | pagination cursor from the previous response |
| params.orderStates | <code>Array<string></code> | No | filter by order states, e.g. ['new', 'partially_filled'] |
| params.orderTypes | <code>Array<string></code> | No | filter by order types, e.g. ['limit', 'market'] |
| params.side | <code>string</code> | No | filter by side, 'buy' or 'sell' |
revolutx.fetchOpenOrders (symbol, since?, limit?, params?)
<a name="fetchOrders" id="fetchorders"></a>
fetches historical orders for the authenticated user
Kind: instance method of <code>revolutx</code>
Returns: <code>Array<object></code> - a list of order structures
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-account-data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code>, <code>undefined</code> | Yes | unified symbol of the market to fetch orders for |
| since | <code>int</code> | No | timestamp in ms of the earliest order to fetch, the lookup window is limited to 30 days |
| limit | <code>int</code> | No | the maximum number of orders to return (1-1900, default 1900) |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | timestamp in ms of the latest order to fetch |
| params.cursor | <code>string</code> | No | pagination cursor from the previous response |
| params.orderStates | <code>Array<string></code> | No | filter by order states, e.g. ['filled', 'cancelled', 'rejected'] |
| params.orderTypes | <code>Array<string></code> | No | filter by order types, e.g. ['limit', 'market'] |
revolutx.fetchOrders (symbol, since?, limit?, params?)
<a name="fetchClosedOrders" id="fetchclosedorders"></a>
fetches closed (filled, cancelled, rejected) orders for the authenticated user
Kind: instance method of <code>revolutx</code>
Returns: <code>Array<object></code> - a list of order structures
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-account-data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code>, <code>undefined</code> | Yes | unified symbol of the market to fetch orders for |
| since | <code>int</code> | No | timestamp in ms of the earliest order to fetch, the lookup window is limited to 30 days |
| limit | <code>int</code> | No | the maximum number of orders to return |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
revolutx.fetchClosedOrders (symbol, since?, limit?, params?)
<a name="fetchMyTrades" id="fetchmytrades"></a>
fetches the trade history for the authenticated user
Kind: instance method of <code>revolutx</code>
Returns: <code>Array<object></code> - a list of trade structures
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-account-data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch trades for |
| since | <code>int</code> | No | timestamp in ms of the earliest trade to fetch, the lookup window is limited to 30 days |
| limit | <code>int</code> | No | the maximum number of trades to return (1-1900, default 1900) |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | timestamp in ms of the latest trade to fetch |
| params.cursor | <code>string</code> | No | pagination cursor from the previous response |
revolutx.fetchMyTrades (symbol, since?, limit?, params?)
<a name="editOrder" id="editorder"></a>
replaces an existing order
Kind: instance method of <code>revolutx</code>
Returns: <code>object</code> - an order structure
See: https://developer.revolut.com/docs/api/revolut-x-crypto-exchange#tag-trading
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | the order id (venue order id) to replace |
| symbol | <code>string</code> | Yes | unified symbol of the market |
| type | <code>string</code> | Yes | 'limit' or 'market' |
| side | <code>string</code> | Yes | 'buy' or 'sell' |
| amount | <code>float</code> | Yes | the new amount |
| price | <code>float</code> | No | the new price |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | <code>string</code> | No | a custom client order id (UUID) |
| params.cost | <code>float</code> | No | the new order cost in units of the quote currency |
| params.timeInForce | <code>string</code> | No | e.g. gtc |
| params.executionInstructions | <code>Array<string></code> | No | e.g. ['post_only'] |
revolutx.editOrder (id, symbol, type, side, amount, price?, params?)