Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Navigate and filter markets with the Rust SDK
MarketPageFetcher
use limitless_exchange_rust_sdk::Client; let client = Client::new()?; // Access through the root client let pages = client.pages.clone();
let navigation = client.pages.get_navigation().await?; for node in navigation { println!("{} -> {}", node.name, node.path); for child in node.children { println!(" {} -> {}", child.name, child.path); } }
NavigationNode
id
String
name
slug
path
/crypto
icon
Option<String>
children
Vec<NavigationNode>
MarketPage
let page = client.pages.get_market_page_by_path("/crypto").await?; println!("page {}", page.name); println!("filter groups {}", page.filter_groups.len()); println!("full path {}", page.full_path);
get_markets()
use limitless_exchange_rust_sdk::{MarketPageMarketsParams, MarketPageSort}; let result = client .pages .get_markets( &page.id, Some(&MarketPageMarketsParams { page: Some(1), limit: Some(20), sort: Some(MarketPageSort::CreatedAtDesc), cursor: None, filters: Default::default(), }), ) .await?; for market in result.data { println!("{} {}", market.slug, market.title); } if let Some(pagination) = result.pagination { println!("page {} of {}", pagination.page, pagination.total_pages); }
use limitless_exchange_rust_sdk::{MarketPageMarketsParams, MarketPageSort}; let first_page = client .pages .get_markets( &page.id, Some(&MarketPageMarketsParams { page: None, limit: Some(20), sort: Some(MarketPageSort::UpdatedAtDesc), cursor: Some(String::new()), filters: Default::default(), }), ) .await?; if let Some(cursor) = first_page.cursor.as_ref().and_then(|c| c.next_cursor.as_deref()) { let next_page = client .pages .get_markets( &page.id, Some(&MarketPageMarketsParams { page: None, limit: Some(20), sort: Some(MarketPageSort::UpdatedAtDesc), cursor: Some(cursor.to_string()), filters: Default::default(), }), ) .await?; println!("next page size {}", next_page.data.len()); }
page
cursor
HashMap<String, serde_json::Value>
use std::collections::HashMap; use serde_json::json; let mut filters = HashMap::new(); filters.insert("ticker".to_string(), json!(["btc", "eth"])); filters.insert("duration".to_string(), json!("hourly")); let result = client .pages .get_markets( &page.id, Some(&limitless_exchange_rust_sdk::MarketPageMarketsParams { page: None, limit: Some(10), sort: Some(limitless_exchange_rust_sdk::MarketPageSort::UpdatedAtDesc), cursor: Some(String::new()), filters, }), ) .await?;
Option<u32>
limit
sort
Option<MarketPageSort>
Some(String::new())
filters
HashMap<String, Value>
ticker
duration
let keys = client.pages.get_property_keys().await?; for key in &keys { println!("{} {}", key.name, key.property_type); }
let key = client.pages.get_property_key(&keys[0].id).await?; println!("{} {}", key.name, key.slug); let options = client.pages.get_property_options(&key.id, None).await?; for option in options { println!("{} {}", option.label, option.value); }
parent_id
let parent_id = "parent-option-id"; let child_options = client .pages .get_property_options(&key.id, Some(parent_id)) .await?;