use pc_core::{Exchange, FetchMarketsParams};
use pc_exchange_limitless::{Limitless, LimitlessConfig};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let exchange = Limitless::new(LimitlessConfig::new())?;
let markets = exchange
.fetch_markets(Some(FetchMarketsParams {
limit: Some(10),
active_only: true,
}))
.await?;
for market in markets {
println!("─────────────────────────────────");
println!("Question: {}", market.question);
println!("Volume: ${:.0}", market.volume);
for (outcome, price) in &market.prices {
println!(" {}: {:.1}%", outcome, price * 100.0);
}
}
Ok(())
}