Start building
Help

Authenticate requests

After you've created your API key, make a test request to verify that your authentication and signing setup works correctly.

How it works

Base URL

The base URL for all Revolut X Crypto Exchange REST API endpoints is:

https://revx.revolut.com/api/

Authentication headers

Every request to an authenticated endpoint must include the following headers:

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

Before you begin

Before you start, make sure you have:

Signing a request

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

  1. Construct the message string by concatenating the present components in order, with no separators.
  2. Sign the message using your Ed25519 private key. Ed25519 signing produces a 64-byte raw signature that is unique to both the message and the private key.
  3. Base64-encode the raw signature bytes.

Send the encoded value in the X-Revx-Signature header.

1. Construct the message string

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

#ComponentNotesExample
1TimestampSame value as the X-Revx-Timestamp header1783616701644
2HTTP methodUppercaseGET
3Request pathStarting from /api, including any path parameters/api/1.0/orders/active
4Query string (if present)Without the ? prefix (empty string if none)limit=10
5Request body (if present)Minified JSON (empty string if none){"client_order_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6", ...}
(see below for the full sample)

A sample minified request body JSON migh look like this:

{"client_order_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","symbol":"BTC-USD","side":"sell","order_configuration":{"limit":{"base_size":"0.1","price":"120000.50","execution_instructions":["post_only"]}}}

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

URL-encode query string values in the signature

If your request includes URL-encoded query string values (e.g., key=hello%3Aworld), you must use the same URL-encoded value when constructing the signature message. Signing the raw, unencoded value (e.g., key=hello:world) will cause signature verification to fail.

Keep the space encoding consistent between the request and the signature message. Some API clients encode spaces as + in query strings (for example, Bruno), others as %20. Either approach is valid, provided the signature message uses the same encoding as the request.

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

Generate the signature programmatically.

The code samples below are included for educational purposes only and are not considered production-ready. Adjust them to your needs before use.

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 = "1785313433816"
method = "GET"
path = "/api/1.0/orders/active"
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/orders';
const body = JSON.stringify({
  client_order_id: crypto.randomUUID(),
  symbol: "BTC-USD",
  side: "buy",
  order_configuration: {
    limit: {
      base_size: "0.005",
      price: "90000.1"
    }
  }
});

// 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}`);

Include the X-Revx-API-Key, X-Revx-Timestamp, and X-Revx-Signature headers in your request and send it.

See Make your first request for more details.

Rate this page