1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
//! Unofficial Rust SDK for the [Revolut X](https://exchange.revolut.com/) crypto
//! exchange REST API.
//!
//! `revolutx` is a handwritten, domain-oriented SDK aimed at trading bots and
//! automation. The local OpenAPI specification is used as a contract and
//! regression-test source, but generated OpenAPI types are **not** part of the
//! public API. Prices, quantities, balances, and fees use
//! [`rust_decimal::Decimal`] (re-exported as [`Decimal`]); they are never `f64`.
//!
//! # Authentication
//!
//! Authenticated requests are signed automatically with Ed25519 — callers never
//! construct the `X-Revx-Timestamp` or `X-Revx-Signature` headers themselves.
//! Generate a key pair with:
//!
//! ```sh
//! openssl genpkey -algorithm ed25519 -out private.pem
//! openssl pkey -in private.pem -pubout -out public.pem
//! ```
//!
//! # Example
//!
//! ```no_run
//! use revolutx::{Environment, RevolutXClient};
//!
//! # async fn run() -> revolutx::Result<()> {
//! let client = RevolutXClient::builder()
//! .api_key("your-api-key")
//! .private_key_pem(std::fs::read_to_string("private.pem").unwrap())
//! .environment(Environment::Production)
//! .build()?;
//!
//! // Read-only: fetch balances and an order book.
//! let balances = client.balances().get_all().await?;
//! let book = client.market_data().order_book("BTC-USD").await?;
//! println!("{} balances, {} bid levels", balances.len(), book.bids.len());
//! # Ok(())
//! # }
//! ```
//!
//! Public market data needs no credentials:
//!
//! ```no_run
//! # async fn run() -> revolutx::Result<()> {
//! let client = revolutx::RevolutXClient::builder().build()?;
//! let book = client.market_data().public_order_book("BTC-USD").await?;
//! println!("best bid level count: {}", book.bids.len());
//! # Ok(())
//! # }
//! ```
//!
//! # Disclaimer
//!
//! This crate is not affiliated with Revolut. Trading automation carries
//! financial risk; callers are responsible for their own validation, risk
//! controls, and credential security. The SDK handles API access, typing,
//! signing, and error reporting only — it does not provide trading strategy or
//! risk management.
pub use ;
pub use ;
pub use Page;
pub use ;
pub use Decimal;