Expand description
Official, async-first, fully-typed Rust SDK for the Radion platform.
One Radion client, one API key. Today the SDK exposes the realtime
(WebSocket) product surface and standalone webhooks helpers; further
surfaces attach to the same client as they ship, so adopting them is
purely additive.
§Example
use futures_util::StreamExt;
use radion_sdk::{Radion, realtime::{Channel, Payload, Subscription}};
let radion = Radion::builder().api_key("sk_...").build()?;
radion.realtime.connect().await?;
let mut trades = radion.realtime.subscribe(Subscription::new("trading", Channel::Trading)).await?;
while let Some(event) = trades.next().await {
if let Payload::Trading(trade) = event.data {
println!("{} {:?}", event.id, trade);
}
}§Features
realtime(default) — the WebSocket product surface.rustls(default) — rustls TLS backend (no system OpenSSL dependency).native-tls— use the platform native TLS backend instead.compression— inflate zlib-compressed realtime frames. Opt in per client with.compression(true).tracing— emittracingspans/events.webhooks— consume webhook deliveries: signature verification and body parsing. No async transport — works in any HTTP server.
Modules§
- realtime
realtimeorwebhooks - Realtime (WebSocket) product surface.
- webhooks
webhooks - Consume Radion webhook deliveries.
Structs§
- Radion
- Unified entry point for the Radion platform SDK.
- Radion
Builder - Builder for
Radion. - Radion
Config - Shared configuration for every Radion product surface.
Enums§
- Radion
Error - Every error surfaced by the Radion SDK.
Constants§
- DEFAULT_
BASE_ URL - Default base URL for the Radion REST API.
- DEFAULT_
WS_ URL - Default endpoint for the Radion realtime (WebSocket) API.
Type Aliases§
- Result
- Convenience alias for results returned by the SDK.