Revolut X Python SDK
Python client library for the Revolut X Crypto Exchange REST API (v1.0).
📖 Documentation: janprikryl1.github.io/revolut-x-python
🐘 Looking for PHP? See revolut-x-php.
Features
- Revolut X API v1.0 — Complete coverage of market data, order placement, balances, and transaction history.
- Ed25519 Authentication — Cryptographic request signing using
cryptography(PKCS#8 PEM). - Smart Maker Strategy (0.00% fee) — Automatic offset pricing and
post_onlyexecution to prevent taker fees (0.09%). - Streaming Iterators —
iter_candles()anditer_trades()automatically handle cursor pagination and rate-limit delays. - 100% Type Annotated — Built with Python
TypedDict,Enum, and type annotations. - AI Agent Skill — Pre-packaged skill definition for AI coding assistants (Google Antigravity, Claude, Cursor).
Installation
pip install revolut-x-python
In a requirements.txt:
revolut-x-python>=1.0.0
Pre-release builds (TestPyPI)
Release candidates go to TestPyPI first. Versions 0.0.1 – 0.1.0 were
published there only; 1.0.0 is the first release on PyPI proper. To install
a pre-release build:
pip install --extra-index-url https://test.pypi.org/simple/ revolut-x-python
Use --extra-index-url (rather than --index-url) so PyPI stays available
for the requests and cryptography dependencies, which are not mirrored on
TestPyPI.
Quickstart
1. Public Market Data (No API Key Required)
from revolut_x import RevolutXClient, Interval
client = RevolutXClient()
# Get BTC-EUR ticker
ticker = client.get_ticker("BTC-EUR")
print(f"BTC Price: {ticker['last_price']} EUR")
# Get 1-hour OHLCV candles
candles = client.get_candles("BTC-EUR", Interval.HOUR_1)
2. Authenticated Trading & 0% Fee Maker Orders
from revolut_x import RevolutXClient, OrderSide
client = RevolutXClient(
api_key="your-api-key",
private_key_path="keys/private.pem",
)
# Submit zero-fee Maker limit order (post_only=True)
order = client.place_maker_order(
symbol="BTC-EUR",
side=OrderSide.BUY,
quote_size="50.00",
offset="0.10",
)
print(f"Order ID: {order['venue_order_id']}")
Running Tests
pytest tests
Releasing & Publishing
Publishing to PyPI and TestPyPI is fully automated via GitHub Actions (.github/workflows/release.yml).
Whenever commits are pushed to main, the workflow runs the test suite and checks src/revolut_x/_version.py. If a new version is detected (no matching Git tag exists yet), it automatically builds the package, creates a Git tag and GitHub Release, and publishes to the corresponding registry.
1. Stable Release (PyPI)
To publish a standard production release to PyPI:
- Bump
__version__insrc/revolut_x/_version.py(e.g.__version__ = "1.2.0"). - Document changes under a matching
## [1.2.0]header inCHANGELOG.md. - Commit and push to
main:git commit -am "chore: release 1.2.0" git push origin main
- The workflow will:
- Run the test suite (
pytest). - Create and push tag
v1.2.0. - Create a GitHub Release with notes extracted from
CHANGELOG.md. - Publish the package to production PyPI.
- Run the test suite (
2. Experimental / Pre-release (TestPyPI)
To publish an experimental or pre-release build to TestPyPI:
- Set a pre-release version in
src/revolut_x/_version.py(e.g."1.2.0rc1","1.2.0a1","1.2.0b1","1.2.0.dev1", or"1.2.0-exp1"). - Commit and push to
main:git commit -am "chore: pre-release 1.2.0rc1" git push origin main
- The workflow automatically recognizes the pre-release suffix and routes the upload to TestPyPI (and marks the GitHub Release as Pre-release).
Manual Dispatch: You can also trigger a release or test run manually anytime from the GitHub web UI via Actions → Release & Publish → Run workflow, where you can optionally override the deployment target (
auto,testpypi, orpypi).
Academic Reference
This library was written as part of a master's thesis at VŠB – Technical University of Ostrava, Faculty of Electrical Engineering and Computer Science.
- Author: Bc. Jan Přikryl
- University: VŠB – Technical University of Ostrava
- Faculty: Faculty of Electrical Engineering and Computer Science (FEI)
Changelog
See CHANGELOG.md.
License
This project is licensed under the MIT License — see the LICENSE file for details.
Metadata
Release files for revolut-x-python 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| revolut_x_python-1.1.1.tar.gz | 43.1 kB | Without provenance | Details for revolut_x_python-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| revolut_x_python-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for revolut_x_python-1.1.1-py3-none-any.whl |
Total release size: 80.0 kB
Release files / revolut_x_python-1.1.1.tar.gz
| Download URL | revolut_x_python-1.1.1.tar.gz |
|---|---|
| Size | 43.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
226c8fb26449a1edb923bc4a098ce010c2d055ce6e26eed963c5a49ffa5072dc
|
|
BLAKE2b-256 checksum How to use checksums |
08ca7bc656c0aa3f7b7e10f8ceacd12011dc25f31edeb92423cac63995bfdac1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / revolut_x_python-1.1.1-py3-none-any.whl
| Download URL | revolut_x_python-1.1.1-py3-none-any.whl |
|---|---|
| Size | 37.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c9adc8f2180180c609ddf7e53b8a9cf2722bfbc051a6c2314fa15717e3412f5
|
|
BLAKE2b-256 checksum How to use checksums |
6a9c00f7eae572f773b7df8d7902a3e633e71bc709a46f0a843aa869ff6e1cc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for revolut-x-python 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.