cex_trading

Crates.iocex_trading
lib.rscex_trading
version0.1.1
sourcesrc
created_at2019-06-27 23:05:03.924727
updated_at2019-06-27 23:44:23.303317
descriptionClient for Cex.io crypto exchange API
homepagehttps://github.com/isvforall/cex_trading
repositoryhttps://github.com/isvforall/cex_trading
max_upload_size
id144152
size23,974
Sergey Isaev (isvforall)

documentation

https://docs.rs/cex_trading

README

cex_trading

crates.io MIT licensed

Rust Library for the Cex.io API

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]
cex_trading = "0.1.1"

Example

use cex_trading::api::CexAPI;
use cex_trading::models::Symbol;

const CEX_USERID: &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_USERID, CEX_API_KEY, CEX_API_SECRET);
    println!("{:?}", cex.balance());
}

License

MIT licensed. See the LICENSE file for details.

Commit count: 80

cargo fmt