bitbank-api 0.5.1

Rust library for bitbank API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;

#[serde_as]
#[derive(TypedBuilder, Serialize, Debug)]
pub struct Params {
    #[serde_as(as = "DisplayFromStr")]
    pair: Pair,
    order_id: u64,
}

pub async fn post(cred: Credential, params: Params) -> anyhow::Result<OrderInfo> {
    let json = serde_json::to_string(&params)?;
    ApiExec { cred }
        .post("/v1/user/spot/cancel_order", json)
        .await
}