get_commission_def/
get-commission-def.rs

1use xapi;
2
3use std::error::Error;
4use std::fs;
5
6#[tokio::main]
7async fn main() -> Result<(), Box<dyn Error>> {
8    let json = fs::read_to_string("credentials.json")?;
9    let credentials = xapi::Credentials::from(&json)?;
10
11    let x = xapi::connect(&credentials).await?;
12
13    let response = x.socket.get_commission_def("BITCOIN", 1.0).await?;
14    println!("{:?}", response.return_data);
15
16    Ok(())
17}