3 releases

Uses old Rust 2015

0.1.2 Aug 17, 2018
0.1.1 Nov 8, 2017
0.1.0 Nov 2, 2017

#50 in #market

MIT license

26KB
503 lines

Wex API

Full API implementation for the Wex market-place.

Wex API Documentation:

Documentation: https://docs.rs/wex/

Example

extern crate wex;

fn main() {
   let account = wex::Account {
        key: String::from("<your-key>"),
        secret: String::from("<your-secret>"),
    };

    println!("{:?}", wex::info());
    println!("{:?}", wex::get_info(&account));

    // currency pair chain :)

    let info = wex::info().expect("could not optain wex pairs");
    let pairs: Vec<&String> = info.pairs.keys().collect();
    let mut pairchain = pairs.iter().fold(
        String::new(),
        |data, item| data + item + "-",
    );
    pairchain.pop(); // remove last `-`

    // ticker all pairs at once
    let ticks = wex::ticker(&pairchain).expect("could not ticker");
}

lib.rs:

Wex API

API implementation for the Wex market-place.

Please Donate

  • BTC: 17voJDvueb7iZtcLRrLtq3dfQYBaSi2GsU
  • ETC: 0x7bC5Ff6Bc22B4C6Af135493E6a8a11A62D209ae5
  • XMR: 49S4VziJ9v2CSkH6mP9km5SGeo3uxhG41bVYDQdwXQZzRF6mG7B4Fqv2aNEYHmQmPfJcYEnwNK1cAGLHMMmKaUWg25rHnkm

Wex API Documentation:

Example

extern crate wex;

fn main() {
   let account = wex::Account {
        key: String::from("<your-key>"),
        secret: String::from("<your-secret>"),
    };

    println!("{:?}", wex::info());
    println!("{:?}", wex::get_info(&account));

    // currency pair chain :)

    let info = wex::info().expect("could not optain wex pairs");
    let pairs: Vec<&String> = info.pairs.keys().collect();
    let mut pairchain = pairs.iter().fold(
        String::new(),
        |data, item| data + item + "-",
    );
    pairchain.pop(); // remove last `-`

    // ticker all pairs at once :D
    let ticks = wex::ticker(&pairchain).expect("could not ticker");
}

Dependencies

~13–21MB
~309K SLoC