Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.
/ coinmarket Public archive

Simple library designed to make it easy get market or account information for cryptocurrencies by interacting with ShapeShift and Etherscan APIs.

License

BSD-3-Clause, Unlicense licenses found

Licenses found

BSD-3-Clause
LICENSE
Unlicense
UNLICENSE
Notifications You must be signed in to change notification settings

tonytins/coinmarket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Coin Market

Coin Market was formally used for getting market data from ShapeShift but after changes made in the organization I've since removed those APIs and have deprecated this library. It is still useful for interacting with EVM-compatible networks that use Etherscan. Those remaining APIs have been used in Web3Scan.

Installation

[dependencies]
coinmarket = "0.4"

Examples

0.4 and Web3Scan

APIKEY=[key]
// use web3scan::Web3;
use coinmarket::web3::Web3;

pub fn main() {
    let network = Web3::new("api.etherscan.io");
    let balance = network
    .get_balance("0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B")
    .expect("Parsing error");

    println!("{}", balance);
}

0.3 and earlier

ETHSCAN=[key]
// Web3 and Web3Provider are formally Ethereum and EthNetworks, 
// respectively, in versions prior to 0.2.102. I forgot to warn about
// that breaking change but than the pandemic happened. Sorry about that.
use coinmarket::ethereum::{Web3, Web3Provider};

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

    println!("{}", balance);
}

Requirements

License

This project is dual-licensed under the BSD-3-Clause or the UNLICENSE.

About

Simple library designed to make it easy get market or account information for cryptocurrencies by interacting with ShapeShift and Etherscan APIs.

Topics

Resources

License

BSD-3-Clause, Unlicense licenses found

Licenses found

BSD-3-Clause
LICENSE
Unlicense
UNLICENSE

Stars

Watchers

Forks

Languages