| Crates.io | polyte-gamma |
| lib.rs | polyte-gamma |
| version | 0.4.0 |
| created_at | 2025-11-24 10:41:48.15198+00 |
| updated_at | 2026-01-05 05:24:37.62429+00 |
| description | Rust client library for Polymarket Gamma (market data) API |
| homepage | |
| repository | https://github.com/roushou/polyte |
| max_upload_size | |
| id | 1947632 |
| size | 90,248 |
Rust client library for Polymarket Gamma (market data) API.
The Gamma API provides read-only access to Polymarket's market data, including markets, events, series, tags, and sports metadata.
More information about this crate can be found in the crate documentation.
[dependencies]
polyte-gamma = "0.1.0"
Or use the unified client:
[dependencies]
polyte = "0.1.0"
use polyte_gamma::Gamma;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let gamma = Gamma::new()?;
// List active markets
let markets = gamma.markets()
.list()
.active(true)
.limit(10)
.send()
.await?;
for market in markets {
println!("{}: {}", market.question, market.volume);
}
Ok(())
}
let market = gamma.markets()
.get("condition_id_here")
.send()
.await?;
println!("Market: {}", market.question);
println!("Volume: {}", market.volume);
println!("Liquidity: {}", market.liquidity);
let series = gamma.series()
.list()
.active(true)
.send()
.await?;
for s in series {
println!("{} - {} events", s.title, s.events.len());
}
let tags = gamma.tags().list().send().await?;
for tag in tags {
println!("{}: {}", tag.label, tag.slug);
}
let gamma = Gamma::builder()
.base_url("https://gamma-api.polymarket.com")
.timeout_ms(30_000)
.pool_size(10)
.build()?;
The crate includes several examples:
# List markets
cargo run --example retrieve_markets
# Get sports data
cargo run --example retrieve_sports
# Browse tags
cargo run --example retrieve_tags
# Explore series
cargo run --example retrieve_series
This project is licensed under the MIT License.