9 unstable releases (4 breaking)

0.5.3 Jul 30, 2020
0.5.2 Feb 8, 2020
0.5.1 Jan 29, 2020
0.4.1 Dec 23, 2019
0.1.1 Jul 12, 2019

#132 in #trading

MIT license

25KB
743 lines

cexio

Rust Library for the Cex.io API

Downloads from crates.io doc.rs Dependency status MIT licensed

Risk Warning

It is a personal project, use at your own risk. I will not be responsible for your investment losses. Cryptocurrency investment is subject to high market risk.

Usage

Add this to your Cargo.toml

[dependencies]
cexio = "<version>"

Example

use cexio::api::CexAPI;
use cexio::models::Symbol;

const CEX_USER_ID: &str = "your user id";
const CEX_API_KEY: &str = "your api key";
const CEX_API_SECRET: &str = "your api secret";

fn main() {

    // Public API calls
    println!("{:?}", CexAPI::last_price(Symbol::BTC, Symbol::USD));

    // Private API calls
    let cex = CexAPI::new(CEX_USER_ID, CEX_API_KEY, CEX_API_SECRET);
    println!("{:?}", cex.balance());

}

License

MIT licensed. See the LICENSE file for details.

Dependencies

~4.5–9.5MB
~178K SLoC