Expand description
§Cielo Rust SDK
Cielo Rust SDK is a Rust library for interacting with the Cielo API. It provides a convenient way to fetch and filter feed data from the Cielo platform.
This is not an official SDK. It is a personal project for learning Rust and API development. The included endpoints are primarily for personal use in my own projects and may not cover all features of the Cielo API.
§Features
- Configurable retry strategy for API requests.
- Fetch feed data with various filters.
§Configuration
You can configure the retry strategy by providing optional parameters when creating the CieloApi instance:
min_retry_interval: Minimum retry interval in milliseconds.max_retry_interval: Maximum retry interval in milliseconds.max_retries: Maximum number of retries.
§Usage
The feed data is linked to your account, so the filters you set will be applied to your existing feed data. This means that if you filter by a wallet address, the wallet address should already be in your watchlist for this to work.
§Creating a CieloApi Instance
use cielo_rs_sdk::CieloApi;
let api_key = "your_api_key";
let client = CieloApi::new(api_key, None, None, None)
.expect("Failed to create CieloApi");§Fetching Feed Data
let filters = api::feed::Filters {
wallet: Some("your_wallet_address".to_string()),
limit: Some(10),
list_id: None,
chains: Some(vec!["solana".to_string()]),
tx_types: Some(vec![api::feed::TxType::Swap]),
tokens: None,
min_usd: Some(100),
new_trades: Some(true),
start_from: None,
from_timestamp: None,
to_timestamp: None,
include_market_cap: Some(true),
};
let feed = cielo_api.get_feed(filters).await.unwrap();Re-exports§
pub use api::CieloApi;
Modules§
- api
- The
apimodule provides functionality for interacting with the Cielo API. - models
- Models module containing data structures for API responses and paging.
Enums§
- Error
- Custom error type for the Cielo API