dydx-v3-blocking

Crates.iodydx-v3-blocking
lib.rsdydx-v3-blocking
version1.0.0
sourcesrc
created_at2023-02-22 12:07:05.677298
updated_at2023-02-22 12:07:05.677298
descriptionBlocking Rust SDK for dYdX v3 API
homepagehttps://docs.dydx.exchange/
repositoryhttps://github.com/Sharaddition/dydx-v3-blocking
max_upload_size
id791776
size357,245
(Sharaddition)

documentation

README

Rust(Non-Async) client for dYdX (v3 API) built from official source code.

dYdX API Docs

Installation

Install dydx-v3-blocking from crates.io. Add the following line to your Cargo.toml file's dependencies section:

[dependencies]
dydx-v3-blocking = { git = "https://github.com/Sharaddition/dydx-v3-blocking" }
tokio = { version = "1.18.2", features = ["full"] }

Usage

Sample code to call Get Markets API

use dydx_v3_blocking::{types::*, ClientOptions, DydxClient};

fn main() {
    let options: ClientOptions = ClientOptions {
        network_id: None,
        api_timeout: None,
        api_key_credentials: None,
        stark_private_key: None,
        eth_private_key: None,
    };
    let client = DydxClient::new("https://api.dydx.exchange", options);
    let response = client
        .public
        .get_markets(Some(DydxMarket::BTC_USD))
        .unwrap();
    dbg!(response);
}

Run tests

cargo test

Disclaimer

Please use it at your own risk, do your own due-dilligence, I'm not responsible for anything that happens due to this library.

Commit count: 3

cargo fmt