Skip to main content

Crate radion_sdk

Crate radion_sdk 

Source
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 — emit tracing spans/events.
  • webhooks — consume webhook deliveries: signature verification and body parsing. No async transport — works in any HTTP server.

Modules§

realtimerealtime or webhooks
Realtime (WebSocket) product surface.
webhookswebhooks
Consume Radion webhook deliveries.

Structs§

Radion
Unified entry point for the Radion platform SDK.
RadionBuilder
Builder for Radion.
RadionConfig
Shared configuration for every Radion product surface.

Enums§

RadionError
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.