Expand description
Lightcone REST API client implementation.
The LightconeApiClient provides a type-safe interface for interacting with
the Lightcone REST API.
§Example
ⓘ
use lightcone_sdk::api::LightconeApiClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = LightconeApiClient::new("https://api.lightcone.xyz");
// Get all markets
let markets = client.get_markets().await?;
println!("Found {} markets", markets.total);
// Get orderbook
let orderbook = client.get_orderbook("orderbook_id", None).await?;
println!("Best bid: {:?}", orderbook.best_bid);
Ok(())
}Structs§
- Lightcone
ApiClient - Lightcone REST API client.
- Lightcone
ApiClient Builder - Builder for configuring
LightconeApiClient. - Retry
Config - Retry configuration for the API client.