DaniPopes / dexscreener

A Rust Dexscreener HTTP API client
MIT License
3 stars 4 forks source link

can you explain how to use your library please? #1

Closed ghost closed 10 months ago

ghost commented 1 year ago

i'm new to rust

DaniPopes commented 1 year ago

Sure! This is just a client for the official Dexscreener API, so it's pretty simple:

let client = Client::new();
let pair_addresses = [
    "0x7213a321F1855CF1779f42c0CD85d3D95291D34C",
    "0x16b9a82891338f9ba80e2d6970fdda79d1eb0dae",
];
let result = client.pairs("bsc", pair_addresses).await.unwrap().pairs.unwrap();

You can also view the automatically generated documentation on docs.rs.