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.
Files changed (40) hide show
  1. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/LICENSE +21 -21
  2. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/PKG-INFO +150 -164
  3. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/README.md +120 -120
  4. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/pyproject.toml +56 -72
  5. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/setup.cfg +4 -4
  6. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/__init__.py +107 -103
  7. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/_auth.py +139 -139
  8. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/_http.py +270 -270
  9. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/_version.py +10 -10
  10. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/account.py +203 -203
  11. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/client.py +170 -170
  12. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/exceptions.py +147 -147
  13. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/helpers.py +631 -540
  14. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/market.py +523 -469
  15. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/orders.py +522 -522
  16. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/types.py +412 -397
  17. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x_python.egg-info/PKG-INFO +150 -164
  18. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x_python.egg-info/SOURCES.txt +0 -13
  19. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/tests/test_auth.py +200 -200
  20. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/tests/test_helpers.py +371 -299
  21. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/tests/test_maker_strategy.py +188 -188
  22. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/tests/test_market.py +300 -191
  23. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/tests/test_orders.py +131 -131
  24. revolut_x_python-1.0.0/.agents/skills/revolut-x-library/SKILL.md +0 -491
  25. revolut_x_python-1.0.0/.agents/skills/revolut-x-library/references/types.md +0 -289
  26. revolut_x_python-1.0.0/CHANGELOG.md +0 -216
  27. revolut_x_python-1.0.0/MANIFEST.in +0 -18
  28. revolut_x_python-1.0.0/examples/01_public_market_data.py +0 -31
  29. revolut_x_python-1.0.0/examples/02_download_candles_stream.py +0 -23
  30. revolut_x_python-1.0.0/examples/03_account_balances_and_history.py +0 -33
  31. revolut_x_python-1.0.0/examples/04_place_and_cancel_orders.py +0 -46
  32. revolut_x_python-1.0.0/examples/05_fee_calculator_and_validation.py +0 -30
  33. revolut_x_python-1.0.0/examples/06_smart_maker_orders.py +0 -76
  34. revolut_x_python-1.0.0/examples/README.md +0 -34
  35. revolut_x_python-1.0.0/requirements.txt +0 -5
  36. revolut_x_python-1.0.0/tests/__init__.py +0 -1
  37. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x/py.typed +0 -0
  38. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x_python.egg-info/dependency_links.txt +0 -0
  39. {revolut_x_python-1.0.0 → revolut_x_python-1.1.0}/src/revolut_x_python.egg-info/requires.txt +0 -0
  40. {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.0.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
- Classifier: Development Status :: 5 - Production/Stable
14
- Classifier: Intended Audience :: Developers
15
- Classifier: Intended Audience :: Financial and Insurance Industry
16
- Classifier: Operating System :: OS Independent
17
- Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3 :: Only
19
- Classifier: Programming Language :: Python :: 3.10
20
- Classifier: Programming Language :: Python :: 3.11
21
- Classifier: Programming Language :: Python :: 3.12
22
- Classifier: Programming Language :: Python :: 3.13
23
- Classifier: Programming Language :: Python :: 3.14
24
- Classifier: Topic :: Office/Business :: Financial :: Investment
25
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
- Classifier: Typing :: Typed
27
- Requires-Python: >=3.10
28
- Description-Content-Type: text/markdown
29
- License-File: LICENSE
30
- Requires-Dist: requests>=2.31.0
31
- Requires-Dist: cryptography>=41.0.0
32
- Provides-Extra: dev
33
- Requires-Dist: pytest>=7.0; extra == "dev"
34
- Requires-Dist: pytest-mock>=3.10; extra == "dev"
35
- Requires-Dist: build>=1.0; extra == "dev"
36
- Requires-Dist: twine>=6.1; extra == "dev"
37
- Provides-Extra: docs
38
- Requires-Dist: mkdocs>=1.5.0; extra == "docs"
39
- Requires-Dist: mkdocs-material>=9.5.0; extra == "docs"
40
- Requires-Dist: mkdocs-static-i18n>=1.2.0; extra == "docs"
41
- Requires-Dist: mkdocstrings[python]>=0.24.0; extra == "docs"
42
- Requires-Dist: pymdown-extensions>=10.0; extra == "docs"
43
- Dynamic: license-file
44
-
45
- # Revolut X Python SDK
46
-
47
- Python client library for the **Revolut X Crypto Exchange REST API (v1.0)**.
48
-
49
- 📖 **Documentation**: [janprikryl1.github.io/revolut-x-python](https://janprikryl1.github.io/revolut-x-python/)
50
- 🐘 **Looking for PHP?** See [revolut-x-php](https://github.com/janprikryl1/revolut-x-php).
51
-
52
- ---
53
-
54
- ## Features
55
-
56
- - **Revolut X API v1.0** — Complete coverage of market data, order placement, balances, and transaction history.
57
- - **Ed25519 Authentication** — Cryptographic request signing using `cryptography` (PKCS#8 PEM).
58
- - **Smart Maker Strategy (0.00% fee)** — Automatic offset pricing and `post_only` execution to prevent taker fees (0.09%).
59
- - **Streaming Iterators** — `iter_candles()` and `iter_trades()` automatically handle cursor pagination and rate-limit delays.
60
- - **100% Type Annotated** — Built with Python `TypedDict`, `Enum`, and type annotations.
61
- - **AI Agent Skill** — Pre-packaged skill definition for AI coding assistants (Google Antigravity, Claude, Cursor).
62
-
63
- ---
64
-
65
- ## Installation
66
-
67
- ```bash
68
- pip install revolut-x-python
69
- ```
70
-
71
- In a `requirements.txt`:
72
-
73
- ```
74
- revolut-x-python>=1.0.0
75
- ```
76
-
77
- <details>
78
- <summary>Pre-release builds (TestPyPI)</summary>
79
-
80
- Release candidates go to **TestPyPI** first. Versions `0.0.1` – `0.1.0` were
81
- published there only; `1.0.0` is the first release on PyPI proper. To install
82
- a pre-release build:
83
-
84
- ```bash
85
- pip install --extra-index-url https://test.pypi.org/simple/ revolut-x-python
86
- ```
87
-
88
- Use `--extra-index-url` (rather than `--index-url`) so PyPI stays available
89
- for the `requests` and `cryptography` dependencies, which are not mirrored on
90
- TestPyPI.
91
-
92
- </details>
93
-
94
- ---
95
-
96
- ## Quickstart
97
-
98
- ### 1. Public Market Data (No API Key Required)
99
-
100
- ```python
101
- from revolut_x import RevolutXClient, Interval
102
-
103
- client = RevolutXClient()
104
-
105
- # Get BTC-EUR ticker
106
- ticker = client.get_ticker("BTC-EUR")
107
- print(f"BTC Price: {ticker['last_price']} EUR")
108
-
109
- # Get 1-hour OHLCV candles
110
- candles = client.get_candles("BTC-EUR", Interval.HOUR_1)
111
- ```
112
-
113
- ### 2. Authenticated Trading & 0% Fee Maker Orders
114
-
115
- ```python
116
- from revolut_x import RevolutXClient, OrderSide
117
-
118
- client = RevolutXClient(
119
- api_key="your-api-key",
120
- private_key_path="keys/private.pem",
121
- )
122
-
123
- # Submit zero-fee Maker limit order (post_only=True)
124
- order = client.place_maker_order(
125
- symbol="BTC-EUR",
126
- side=OrderSide.BUY,
127
- quote_size="50.00",
128
- offset="0.10",
129
- )
130
- print(f"Order ID: {order['venue_order_id']}")
131
- ```
132
-
133
- ---
134
-
135
- ## Running Tests
136
-
137
- ```bash
138
- pytest tests
139
- ```
140
-
141
- ---
142
-
143
- ## Academic Reference
144
-
145
- This library was written as part of a **master's thesis** at **VŠB – Technical
146
- University of Ostrava**, Faculty of Electrical Engineering and Computer Science.
147
-
148
- - **Author**: Bc. Jan Přikryl
149
- - **University**: VŠB – Technical University of Ostrava
150
- - **Faculty**: Faculty of Electrical Engineering and Computer Science (FEI)
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.