Crates.io | cexio |
lib.rs | cexio |
version | 0.5.3 |
source | src |
created_at | 2019-07-01 23:00:04.554471 |
updated_at | 2020-07-30 20:40:50.073611 |
description | Client for Cex.io crypto exchange API |
homepage | https://github.com/isvforall/cexio |
repository | https://github.com/isvforall/cexio |
max_upload_size | |
id | 145281 |
size | 82,671 |
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.
Add this to your Cargo.toml
[dependencies]
cexio = "<version>"
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());
}
MIT licensed. See the LICENSE file for details.