Version: 1.0.0

Revolut X Crypto Exchange REST API

As a Revolut X customer, you can use the Revolut X REST API to ameliorate your trading experience.

Our REST API is used in addition to the FIX API.

API key

Note

To enable API key generation, join the waitlist in the Revolut X web app.

To get started using the Revolut X REST API, you need an API key to include with your requests. To create it, follow the instructions below.

Generate an Ed25519 key pair

Before creating your API key in the Revolut X web app, you must first generate an Ed25519 key pair.

An Ed25519 key pair consists of a private key and a public key. The private key is kept secret and used for signing data or authenticating, while the public key can be shared to verify signatures and authenticate access.

You can generate this pair using openssl.

1. Generate the private key

Run the following command in your terminal:

openssl genpkey -algorithm ed25519 -out private.pem

This command generates a file named private.pem, which contains your private key. It has the following structure:

-----BEGIN PRIVATE KEY-----
{YOUR BASE64-ENCODED PRIVATE KEY}
-----END PRIVATE KEY-----
IMPORTANT: Secure your private key

This is your private key, and it will be used for signing requests. Your private key is a secret. Never share it with anyone and never send it as a part of any request.

2. Generate the public key

Next, generate the public key from your private key:

openssl pkey -in private.pem -pubout -out public.pem

This command generates a file named public.pem with your public key. It has the following structure:

-----BEGIN PUBLIC KEY-----
{YOUR BASE64-ENCODED PUBLIC KEY}
-----END PUBLIC KEY-----
About your public key

This is your public key. It is not secret, and it is safe to share. You will provide this key to Revolut X so we can verify the requests signed with your matching private key.

When you provide it, make sure that you copy all of it, including the -----BEGIN KEY----- and -----END KEY----- lines.

Create your API key

Note

To enable API key generation, join the waitlist in the Revolut X web app.

Once you have your public key (the content of public.pem), you are ready to create your API key.

Go to the Revolut X web appProfile to complete the setup.


Authentication

This API uses a custom authentication scheme based on Ed25519 signatures. Every request to the API must include the following headers:

HeaderDescription
X-Revx-API-KeyYour API key (64-character alphanumeric string).
X-Revx-TimestampThe Unix timestamp in milliseconds of the request**.
X-Revx-SignatureThe request digest string signed with your private key.

Signing a request

To generate the X-Revx-Signature, you must sign a specific string constructed from your request data.

1. Construct the message string

The string to sign is a concatenation of the following values, in this specific order:

  1. Timestamp: Same value as the X-Revx-Timestamp header.
  2. HTTP Method: Uppercase (e.g., GET, POST).
  3. Request Path: The path starting from /api (e.g., /api/1.0/crypto-exchange/orders).
  4. Query String: The URL query string if present (e.g., limit=10). Do not include the ?.
  5. Request Body: The JSON body string if present.
Note

When concatenating, do not add any separators (spaces, newlines, or commas) between the fields.

Example Message:

1765360896219POST/api/1.0/orders{"client_order_id":"3b364427-1f4f-4f66-9935-86b6fb115d26","symbol":"BTC-USD","side":"BUY","order_configuration":{"limit":{"base_size":"0.1","price":"90000.1"}}}

2. Sign the message

  1. Sign the constructed string using your Ed25519 private key.
  2. Base64 encode the resulting signature.
  3. Send this value in the X-Revx-Signature header.

Code Examples

Python Example
import base64
from pathlib import Path
from nacl.signing import SigningKey
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.backends import default_backend

# 1. Load your Private Key
pem_data = Path("private.pem").read_bytes()
private_key_obj = serialization.load_pem_private_key(
pem_data,
password=None,
backend=default_backend()
)

# Extract raw bytes for PyNaCl
raw_private = private_key_obj.private_bytes(
encoding=serialization.Encoding.Raw,
format=serialization.PrivateFormat.Raw,
encryption_algorithm=serialization.NoEncryption()
)

# 2. Prepare the message
timestamp = "1746007718237"
method = "GET"
path = "/api/1.0/crypto-exchange/orders"
query = "status=open&limit=10"
body = "" # Empty for GET

# Concatenate without separators
message = f"{timestamp}{method}{path}{query}{body}".encode('utf-8')

# 3. Sign and Encode
signing_key = SigningKey(raw_private)
signed = signing_key.sign(message)
signature = base64.b64encode(signed.signature).decode()

print(f"X-Revx-Signature: {signature}")
Node.js Example
const crypto = require('crypto');
const fs = require('fs');

// 1. Load your Private Key
const privateKey = fs.readFileSync('private.pem', 'utf8');

// 2. Prepare the message
const timestamp = Date.now().toString();
const method = 'POST';
const path = '/api/1.0/crypto-exchange/orders';
const body = JSON.stringify({
symbol: "BTC/USD",
type: "limit",
side: "buy",
qty: "0.005"
});

// Concatenate without separators
const message = timestamp + method + path + body;

// 3. Sign and Encode
// Note: Use crypto.sign with null to indicate pure Ed25519 signing (no hashing algorithm)
const signatureBuffer = crypto.sign(null, Buffer.from(message), privateKey);
const signature = signatureBuffer.toString('base64');

console.log(`X-Revx-Timestamp: ${timestamp}`);
console.log(`X-Revx-Signature: ${signature}`);

API endpoints

To see the reference for the specific endpoints and operations of this API, browse the menu on the left.

Authentication

The API key obtained from the Revolut X web app. Each API key directly maps to the user account (either Business or Retail).

Note

To enable API key generation, join the waitlist in the Revolut X web app.

Security Scheme Type:

apiKey

Header parameter name:

X-Revx-API-Key

Was this page helpful?