revolut-x-python 1.0.0__tar.gz → 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/LICENSE +21 -21
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/PKG-INFO +150 -164
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/README.md +120 -120
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/pyproject.toml +56 -72
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/setup.cfg +4 -4
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/__init__.py +107 -103
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/_auth.py +139 -139
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/_http.py +270 -270
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/_version.py +10 -10
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/account.py +203 -203
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/client.py +170 -170
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/exceptions.py +147 -147
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/helpers.py +631 -540
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/market.py +523 -469
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/orders.py +522 -522
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/types.py +412 -397
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x_python.egg-info/PKG-INFO +150 -164
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x_python.egg-info/SOURCES.txt +0 -13
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/tests/test_auth.py +200 -200
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/tests/test_helpers.py +371 -299
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/tests/test_maker_strategy.py +188 -188
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/tests/test_market.py +300 -191
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/tests/test_orders.py +131 -131
- revolut_x_python-1.0.0/.agents/skills/revolut-x-library/SKILL.md +0 -491
- revolut_x_python-1.0.0/.agents/skills/revolut-x-library/references/types.md +0 -289
- revolut_x_python-1.0.0/CHANGELOG.md +0 -216
- revolut_x_python-1.0.0/MANIFEST.in +0 -18
- revolut_x_python-1.0.0/examples/01_public_market_data.py +0 -31
- revolut_x_python-1.0.0/examples/02_download_candles_stream.py +0 -23
- revolut_x_python-1.0.0/examples/03_account_balances_and_history.py +0 -33
- revolut_x_python-1.0.0/examples/04_place_and_cancel_orders.py +0 -46
- revolut_x_python-1.0.0/examples/05_fee_calculator_and_validation.py +0 -30
- revolut_x_python-1.0.0/examples/06_smart_maker_orders.py +0 -76
- revolut_x_python-1.0.0/examples/README.md +0 -34
- revolut_x_python-1.0.0/requirements.txt +0 -5
- revolut_x_python-1.0.0/tests/__init__.py +0 -1
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/py.typed +0 -0
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x_python.egg-info/dependency_links.txt +0 -0
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x_python.egg-info/requires.txt +0 -0
- {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x_python.egg-info/top_level.txt +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Jan Přikryl
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jan Přikryl
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,164 +1,150 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: revolut-x-python
|
|
3
|
-
Version: 1.
|
|
4
|
-
Summary: Python SDK for the Revolut X Crypto Exchange REST API (v1.0)
|
|
5
|
-
Author: Jan Přikryl
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://janprikryl1.github.io/revolut-x-python/
|
|
8
|
-
Project-URL: Documentation, https://janprikryl1.github.io/revolut-x-python/
|
|
9
|
-
Project-URL: Repository, https://github.com/janprikryl1/revolut-x-python
|
|
10
|
-
Project-URL: Changelog, https://github.com/janprikryl1/revolut-x-python/blob/main/CHANGELOG.md
|
|
11
|
-
Project-URL: Issues, https://github.com/janprikryl1/revolut-x-python/issues
|
|
12
|
-
Keywords: revolut,revolut-x,crypto,exchange,trading,api,sdk,bitcoin
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Requires-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
#
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## Changelog
|
|
155
|
-
|
|
156
|
-
See [CHANGELOG.md](https://github.com/janprikryl1/revolut-x-python/blob/main/CHANGELOG.md).
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
## License
|
|
161
|
-
|
|
162
|
-
This project is licensed under the MIT License — see the
|
|
163
|
-
[LICENSE](https://github.com/janprikryl1/revolut-x-python/blob/main/LICENSE)
|
|
164
|
-
file for details.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: revolut-x-python
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: Python SDK for the Revolut X Crypto Exchange REST API (v1.0)
|
|
5
|
+
Author: Jan Přikryl
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://janprikryl1.github.io/revolut-x-python/
|
|
8
|
+
Project-URL: Documentation, https://janprikryl1.github.io/revolut-x-python/
|
|
9
|
+
Project-URL: Repository, https://github.com/janprikryl1/revolut-x-python
|
|
10
|
+
Project-URL: Changelog, https://github.com/janprikryl1/revolut-x-python/blob/main/CHANGELOG.md
|
|
11
|
+
Project-URL: Issues, https://github.com/janprikryl1/revolut-x-python/issues
|
|
12
|
+
Keywords: revolut,revolut-x,crypto,exchange,trading,api,sdk,bitcoin
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: requests>=2.31.0
|
|
17
|
+
Requires-Dist: cryptography>=41.0.0
|
|
18
|
+
Provides-Extra: dev
|
|
19
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
20
|
+
Requires-Dist: pytest-mock>=3.10; extra == "dev"
|
|
21
|
+
Requires-Dist: build>=1.0; extra == "dev"
|
|
22
|
+
Requires-Dist: twine>=6.1; extra == "dev"
|
|
23
|
+
Provides-Extra: docs
|
|
24
|
+
Requires-Dist: mkdocs>=1.5.0; extra == "docs"
|
|
25
|
+
Requires-Dist: mkdocs-material>=9.5.0; extra == "docs"
|
|
26
|
+
Requires-Dist: mkdocs-static-i18n>=1.2.0; extra == "docs"
|
|
27
|
+
Requires-Dist: mkdocstrings[python]>=0.24.0; extra == "docs"
|
|
28
|
+
Requires-Dist: pymdown-extensions>=10.0; extra == "docs"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# Revolut X Python SDK
|
|
32
|
+
|
|
33
|
+
Python client library for the **Revolut X Crypto Exchange REST API (v1.0)**.
|
|
34
|
+
|
|
35
|
+
📖 **Documentation**: [janprikryl1.github.io/revolut-x-python](https://janprikryl1.github.io/revolut-x-python/)
|
|
36
|
+
🐘 **Looking for PHP?** See [revolut-x-php](https://github.com/janprikryl1/revolut-x-php).
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Features
|
|
41
|
+
|
|
42
|
+
- **Revolut X API v1.0** — Complete coverage of market data, order placement, balances, and transaction history.
|
|
43
|
+
- **Ed25519 Authentication** — Cryptographic request signing using `cryptography` (PKCS#8 PEM).
|
|
44
|
+
- **Smart Maker Strategy (0.00% fee)** — Automatic offset pricing and `post_only` execution to prevent taker fees (0.09%).
|
|
45
|
+
- **Streaming Iterators** — `iter_candles()` and `iter_trades()` automatically handle cursor pagination and rate-limit delays.
|
|
46
|
+
- **100% Type Annotated** — Built with Python `TypedDict`, `Enum`, and type annotations.
|
|
47
|
+
- **AI Agent Skill** — Pre-packaged skill definition for AI coding assistants (Google Antigravity, Claude, Cursor).
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Installation
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install revolut-x-python
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
In a `requirements.txt`:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
revolut-x-python>=1.0.0
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
<details>
|
|
64
|
+
<summary>Pre-release builds (TestPyPI)</summary>
|
|
65
|
+
|
|
66
|
+
Release candidates go to **TestPyPI** first. Versions `0.0.1` – `0.1.0` were
|
|
67
|
+
published there only; `1.0.0` is the first release on PyPI proper. To install
|
|
68
|
+
a pre-release build:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pip install --extra-index-url https://test.pypi.org/simple/ revolut-x-python
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Use `--extra-index-url` (rather than `--index-url`) so PyPI stays available
|
|
75
|
+
for the `requests` and `cryptography` dependencies, which are not mirrored on
|
|
76
|
+
TestPyPI.
|
|
77
|
+
|
|
78
|
+
</details>
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Quickstart
|
|
83
|
+
|
|
84
|
+
### 1. Public Market Data (No API Key Required)
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
from revolut_x import RevolutXClient, Interval
|
|
88
|
+
|
|
89
|
+
client = RevolutXClient()
|
|
90
|
+
|
|
91
|
+
# Get BTC-EUR ticker
|
|
92
|
+
ticker = client.get_ticker("BTC-EUR")
|
|
93
|
+
print(f"BTC Price: {ticker['last_price']} EUR")
|
|
94
|
+
|
|
95
|
+
# Get 1-hour OHLCV candles
|
|
96
|
+
candles = client.get_candles("BTC-EUR", Interval.HOUR_1)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 2. Authenticated Trading & 0% Fee Maker Orders
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
from revolut_x import RevolutXClient, OrderSide
|
|
103
|
+
|
|
104
|
+
client = RevolutXClient(
|
|
105
|
+
api_key="your-api-key",
|
|
106
|
+
private_key_path="keys/private.pem",
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
# Submit zero-fee Maker limit order (post_only=True)
|
|
110
|
+
order = client.place_maker_order(
|
|
111
|
+
symbol="BTC-EUR",
|
|
112
|
+
side=OrderSide.BUY,
|
|
113
|
+
quote_size="50.00",
|
|
114
|
+
offset="0.10",
|
|
115
|
+
)
|
|
116
|
+
print(f"Order ID: {order['venue_order_id']}")
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Running Tests
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
pytest tests
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Academic Reference
|
|
130
|
+
|
|
131
|
+
This library was written as part of a **master's thesis** at **VŠB – Technical
|
|
132
|
+
University of Ostrava**, Faculty of Electrical Engineering and Computer Science.
|
|
133
|
+
|
|
134
|
+
- **Author**: Bc. Jan Přikryl
|
|
135
|
+
- **University**: VŠB – Technical University of Ostrava
|
|
136
|
+
- **Faculty**: Faculty of Electrical Engineering and Computer Science (FEI)
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Changelog
|
|
141
|
+
|
|
142
|
+
See [CHANGELOG.md](https://github.com/janprikryl1/revolut-x-python/blob/main/CHANGELOG.md).
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## License
|
|
147
|
+
|
|
148
|
+
This project is licensed under the MIT License — see the
|
|
149
|
+
[LICENSE](https://github.com/janprikryl1/revolut-x-python/blob/main/LICENSE)
|
|
150
|
+
file for details.
|
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
# Revolut X Python SDK
|
|
2
|
-
|
|
3
|
-
Python client library for the **Revolut X Crypto Exchange REST API (v1.0)**.
|
|
4
|
-
|
|
5
|
-
📖 **Documentation**: [janprikryl1.github.io/revolut-x-python](https://janprikryl1.github.io/revolut-x-python/)
|
|
6
|
-
🐘 **Looking for PHP?** See [revolut-x-php](https://github.com/janprikryl1/revolut-x-php).
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Features
|
|
11
|
-
|
|
12
|
-
- **Revolut X API v1.0** — Complete coverage of market data, order placement, balances, and transaction history.
|
|
13
|
-
- **Ed25519 Authentication** — Cryptographic request signing using `cryptography` (PKCS#8 PEM).
|
|
14
|
-
- **Smart Maker Strategy (0.00% fee)** — Automatic offset pricing and `post_only` execution to prevent taker fees (0.09%).
|
|
15
|
-
- **Streaming Iterators** — `iter_candles()` and `iter_trades()` automatically handle cursor pagination and rate-limit delays.
|
|
16
|
-
- **100% Type Annotated** — Built with Python `TypedDict`, `Enum`, and type annotations.
|
|
17
|
-
- **AI Agent Skill** — Pre-packaged skill definition for AI coding assistants (Google Antigravity, Claude, Cursor).
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Installation
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
pip install revolut-x-python
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
In a `requirements.txt`:
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
revolut-x-python>=1.0.0
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
<details>
|
|
34
|
-
<summary>Pre-release builds (TestPyPI)</summary>
|
|
35
|
-
|
|
36
|
-
Release candidates go to **TestPyPI** first. Versions `0.0.1` – `0.1.0` were
|
|
37
|
-
published there only; `1.0.0` is the first release on PyPI proper. To install
|
|
38
|
-
a pre-release build:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
pip install --extra-index-url https://test.pypi.org/simple/ revolut-x-python
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Use `--extra-index-url` (rather than `--index-url`) so PyPI stays available
|
|
45
|
-
for the `requests` and `cryptography` dependencies, which are not mirrored on
|
|
46
|
-
TestPyPI.
|
|
47
|
-
|
|
48
|
-
</details>
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Quickstart
|
|
53
|
-
|
|
54
|
-
### 1. Public Market Data (No API Key Required)
|
|
55
|
-
|
|
56
|
-
```python
|
|
57
|
-
from revolut_x import RevolutXClient, Interval
|
|
58
|
-
|
|
59
|
-
client = RevolutXClient()
|
|
60
|
-
|
|
61
|
-
# Get BTC-EUR ticker
|
|
62
|
-
ticker = client.get_ticker("BTC-EUR")
|
|
63
|
-
print(f"BTC Price: {ticker['last_price']} EUR")
|
|
64
|
-
|
|
65
|
-
# Get 1-hour OHLCV candles
|
|
66
|
-
candles = client.get_candles("BTC-EUR", Interval.HOUR_1)
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### 2. Authenticated Trading & 0% Fee Maker Orders
|
|
70
|
-
|
|
71
|
-
```python
|
|
72
|
-
from revolut_x import RevolutXClient, OrderSide
|
|
73
|
-
|
|
74
|
-
client = RevolutXClient(
|
|
75
|
-
api_key="your-api-key",
|
|
76
|
-
private_key_path="keys/private.pem",
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
# Submit zero-fee Maker limit order (post_only=True)
|
|
80
|
-
order = client.place_maker_order(
|
|
81
|
-
symbol="BTC-EUR",
|
|
82
|
-
side=OrderSide.BUY,
|
|
83
|
-
quote_size="50.00",
|
|
84
|
-
offset="0.10",
|
|
85
|
-
)
|
|
86
|
-
print(f"Order ID: {order['venue_order_id']}")
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## Running Tests
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
pytest tests
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## Academic Reference
|
|
100
|
-
|
|
101
|
-
This library was written as part of a **master's thesis** at **VŠB – Technical
|
|
102
|
-
University of Ostrava**, Faculty of Electrical Engineering and Computer Science.
|
|
103
|
-
|
|
104
|
-
- **Author**: Bc. Jan Přikryl
|
|
105
|
-
- **University**: VŠB – Technical University of Ostrava
|
|
106
|
-
- **Faculty**: Faculty of Electrical Engineering and Computer Science (FEI)
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
## Changelog
|
|
111
|
-
|
|
112
|
-
See [CHANGELOG.md](https://github.com/janprikryl1/revolut-x-python/blob/main/CHANGELOG.md).
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## License
|
|
117
|
-
|
|
118
|
-
This project is licensed under the MIT License — see the
|
|
119
|
-
[LICENSE](https://github.com/janprikryl1/revolut-x-python/blob/main/LICENSE)
|
|
120
|
-
file for details.
|
|
1
|
+
# Revolut X Python SDK
|
|
2
|
+
|
|
3
|
+
Python client library for the **Revolut X Crypto Exchange REST API (v1.0)**.
|
|
4
|
+
|
|
5
|
+
📖 **Documentation**: [janprikryl1.github.io/revolut-x-python](https://janprikryl1.github.io/revolut-x-python/)
|
|
6
|
+
🐘 **Looking for PHP?** See [revolut-x-php](https://github.com/janprikryl1/revolut-x-php).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Features
|
|
11
|
+
|
|
12
|
+
- **Revolut X API v1.0** — Complete coverage of market data, order placement, balances, and transaction history.
|
|
13
|
+
- **Ed25519 Authentication** — Cryptographic request signing using `cryptography` (PKCS#8 PEM).
|
|
14
|
+
- **Smart Maker Strategy (0.00% fee)** — Automatic offset pricing and `post_only` execution to prevent taker fees (0.09%).
|
|
15
|
+
- **Streaming Iterators** — `iter_candles()` and `iter_trades()` automatically handle cursor pagination and rate-limit delays.
|
|
16
|
+
- **100% Type Annotated** — Built with Python `TypedDict`, `Enum`, and type annotations.
|
|
17
|
+
- **AI Agent Skill** — Pre-packaged skill definition for AI coding assistants (Google Antigravity, Claude, Cursor).
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install revolut-x-python
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
In a `requirements.txt`:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
revolut-x-python>=1.0.0
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
<details>
|
|
34
|
+
<summary>Pre-release builds (TestPyPI)</summary>
|
|
35
|
+
|
|
36
|
+
Release candidates go to **TestPyPI** first. Versions `0.0.1` – `0.1.0` were
|
|
37
|
+
published there only; `1.0.0` is the first release on PyPI proper. To install
|
|
38
|
+
a pre-release build:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pip install --extra-index-url https://test.pypi.org/simple/ revolut-x-python
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Use `--extra-index-url` (rather than `--index-url`) so PyPI stays available
|
|
45
|
+
for the `requests` and `cryptography` dependencies, which are not mirrored on
|
|
46
|
+
TestPyPI.
|
|
47
|
+
|
|
48
|
+
</details>
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Quickstart
|
|
53
|
+
|
|
54
|
+
### 1. Public Market Data (No API Key Required)
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
from revolut_x import RevolutXClient, Interval
|
|
58
|
+
|
|
59
|
+
client = RevolutXClient()
|
|
60
|
+
|
|
61
|
+
# Get BTC-EUR ticker
|
|
62
|
+
ticker = client.get_ticker("BTC-EUR")
|
|
63
|
+
print(f"BTC Price: {ticker['last_price']} EUR")
|
|
64
|
+
|
|
65
|
+
# Get 1-hour OHLCV candles
|
|
66
|
+
candles = client.get_candles("BTC-EUR", Interval.HOUR_1)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 2. Authenticated Trading & 0% Fee Maker Orders
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
from revolut_x import RevolutXClient, OrderSide
|
|
73
|
+
|
|
74
|
+
client = RevolutXClient(
|
|
75
|
+
api_key="your-api-key",
|
|
76
|
+
private_key_path="keys/private.pem",
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
# Submit zero-fee Maker limit order (post_only=True)
|
|
80
|
+
order = client.place_maker_order(
|
|
81
|
+
symbol="BTC-EUR",
|
|
82
|
+
side=OrderSide.BUY,
|
|
83
|
+
quote_size="50.00",
|
|
84
|
+
offset="0.10",
|
|
85
|
+
)
|
|
86
|
+
print(f"Order ID: {order['venue_order_id']}")
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Running Tests
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pytest tests
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Academic Reference
|
|
100
|
+
|
|
101
|
+
This library was written as part of a **master's thesis** at **VŠB – Technical
|
|
102
|
+
University of Ostrava**, Faculty of Electrical Engineering and Computer Science.
|
|
103
|
+
|
|
104
|
+
- **Author**: Bc. Jan Přikryl
|
|
105
|
+
- **University**: VŠB – Technical University of Ostrava
|
|
106
|
+
- **Faculty**: Faculty of Electrical Engineering and Computer Science (FEI)
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Changelog
|
|
111
|
+
|
|
112
|
+
See [CHANGELOG.md](https://github.com/janprikryl1/revolut-x-python/blob/main/CHANGELOG.md).
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## License
|
|
117
|
+
|
|
118
|
+
This project is licensed under the MIT License — see the
|
|
119
|
+
[LICENSE](https://github.com/janprikryl1/revolut-x-python/blob/main/LICENSE)
|
|
120
|
+
file for details.
|