To use the authenticated endpoints, you need an API key to include with your requests. To create it, follow the steps below.
To use the public endpoints, you don't need an API key. See Make your first request for more details.
How it works
The Revolut X Crypto Exchange REST API endpoints authenticate requests using an API key created in the Revolut X web app.
Every authenticated request includes your API key in the X-Revx-API-Key header.
Additionally, the requests include the X-Revx-Timestamp and X-Revx-Signature headers as an extra security layer on top of the API key.
These signing keys must be generated before the API key.
The public key is uploaded to the Revolut X app, and the private key is used to sign requests.
Before you begin
Before you start, make sure you have:
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.pemThis 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-----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.pemThis 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-----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
Once you have your public key (the content of public.pem), you are ready to create your API key.
Go to the API keys page in the Revolut X web app to complete the setup.