gateio-rs 0.1.0

Comprehensive Rust SDK for Gate.io cryptocurrency exchange API with sync and async support
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use gateio_rs::{api::spot, ureq::GateHttpClient};
use serde_json::Value;

fn main() -> Result<(), Box<gateio_rs::ureq::Error>> {
    dotenv::dotenv().ok();

    let client = GateHttpClient::default();

    // Get server time (public endpoint, no credentials needed)
    let req = spot::get_server_time();

    let resp = client.send(req)?;
    let body = resp.into_body_str()?;
    let resp_obj: Value = serde_json::from_str(&body).unwrap();
    println!("{:?}", resp_obj);

    Ok(())
}