Client Reference
The main entry point for all Revolut X API interactions.
RevolutXClient
RevolutXClient(*, api_key: str | None = None, private_key_path: str | Path | None = None, private_key_bytes: bytes | None = None, base_url: str = 'https://revx.revolut.com/api', api_version: str = '1.0', request_delay: float = 0.85, timeout: int = 15, max_retries: int = 3, timestamp_offset_ms: int = 0)
Bases: MarketMixin, OrdersMixin, AccountMixin
Client for the Revolut X Crypto Exchange REST API.
Provides complete access to:
- Public market data (no API key needed): trading pair configuration, currency info, tickers, order book, OHLCV candles, and public trades.
- Order management (API key required): place market/limit orders, cancel orders, inspect fills, view active and historical orders.
- Account data (API key required): balances, transaction ledger, private trade history.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str | None
|
Your Revolut X API key. Required only for authenticated
endpoints (orders, balances, etc.). Get it from your
|
None
|
private_key_path
|
str | Path | None
|
Path to your Ed25519 private key PEM file.
Mutually exclusive with |
None
|
private_key_bytes
|
bytes | None
|
Ed25519 private key as raw PEM bytes.
Mutually exclusive with |
None
|
base_url
|
str
|
API base URL (default: |
'https://revx.revolut.com/api'
|
api_version
|
str
|
API version string (default: |
'1.0'
|
request_delay
|
float
|
Minimum seconds between HTTP requests to respect
rate limits (default: |
0.85
|
timeout
|
int
|
HTTP request timeout in seconds (default: |
15
|
max_retries
|
int
|
Maximum retry attempts for rate-limited (429) or
failed requests (default: |
3
|
Raises:
| Type | Description |
|---|---|
AuthenticationError
|
If |
Example::
# Public data only — no credentials needed
client = RevolutXClient()
pairs = client.get_pairs()
candles = client.get_candles("BTC-EUR", Interval.HOUR_1)
# Full access — trading and account management
client = RevolutXClient(
api_key="your-api-key",
private_key_path="/path/to/private.pem",
)
balances = client.get_balances()
order = client.place_market_order("BTC-EUR", OrderSide.BUY, quote_size="50")
Source code in src/revolut_x/client.py
is_authenticated
property
Whether the client has API key and private key configured.
Returns:
| Type | Description |
|---|---|
bool
|
|
bool
|
meaning authenticated endpoints (orders, balances) can be used. |
Example::
>>> client = RevolutXClient()
>>> client.is_authenticated
False
>>> client = RevolutXClient(api_key="...", private_key_path="...")
>>> client.is_authenticated
True