Coin Market

Coin Market is a simple library designed to make it easy get market or account information for cryptocurrencies from ShapeShift and Etherscan.io.

Installation

toml [dependencies] coinmarket = "0.2"

Development

toml [dependencies] coinmarket = { git = "https://github.com/tonytins/coinmarket" }

Example

Exchange information

```rust extern crate coinmarket; use coinmarket::exchange::CoinExchange;

pub fn main() { // Tell the exchange we want to pair against Bitcoin and Monero let exchange = CoinExchange::new("btc", "xmr"); // Get the market info of Bitcoin in Monero let marketinfo = exchange.getmarket_info().expect("parsing error");

 // Print the market rate
 println!("{}", market_info.rate);

} ```

Ethereum account balance

```rust extern crate coinmarket; use coinmarket::ethereum::{Ethereum, EthNetworks};

pub fn main() { let network = Web3::new(Web3Provider::MainNet); let balance = network.ether_balance("0x341A3A994A150962F3e82b195873B736dAEb4bB3") .expect("Parsing error");

println!("{}", balance);

} ```