All Projects β†’ hugues31 β†’ Coinnect

hugues31 / Coinnect

Licence: mit
Coinnect is a Rust library aiming to provide a complete access to main crypto currencies exchanges via REST API.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Coinnect

Cryptofeed
Cryptocurrency Exchange Websocket Data Feed Handler
Stars: ✭ 643 (+394.62%)
Mutual labels:  bitcoin, cryptocurrency, kraken, trading, bittrex, exchange
My Token
πŸ“ˆTrack token prices of your favorite exchanges in terminal!
Stars: ✭ 141 (+8.46%)
Mutual labels:  bitcoin, cryptocurrency, kraken, poloniex, bittrex, exchange
Exchangesharp
ExchangeSharp is a powerful, fast and easy to use .NET/C# API for interfacing with many crypto currency exchanges. REST and web sockets are supported.
Stars: ✭ 489 (+276.15%)
Mutual labels:  bitcoin, cryptocurrency, kraken, poloniex, bittrex, exchange
Cryptocurrency Portfolio
Google Sheets automatic creation with Google Apps Script (GAS) for managing a cryptocurrency tracking spreadsheet with multi exchanges
Stars: ✭ 134 (+3.08%)
Mutual labels:  cryptocurrency, kraken, poloniex, bittrex, exchange
Algo Coin
Python library for algorithmic trading cryptocurrencies across multiple exchanges
Stars: ✭ 365 (+180.77%)
Mutual labels:  bitcoin, cryptocurrency, kraken, poloniex, exchange
Python Poloniex
Poloniex API wrapper for Python 2.7 & 3
Stars: ✭ 557 (+328.46%)
Mutual labels:  bitcoin, cryptocurrency, poloniex, trading, exchange
Stocklook
crypto currency library for trading & market making bots, account management, and data analysis
Stars: ✭ 119 (-8.46%)
Mutual labels:  bitcoin, cryptocurrency, poloniex, trading, bittrex
Crypto vba
An Excel/VBA project to communicate with various cryptocurrency exchanges APIs
Stars: ✭ 103 (-20.77%)
Mutual labels:  bitcoin, kraken, poloniex, bittrex, exchange
Krypto Trading Bot
Self-hosted crypto trading bot (automated high frequency market making) written in C++
Stars: ✭ 2,589 (+1891.54%)
Mutual labels:  bitcoin, cryptocurrency, kraken, trading, exchange
Crypto Exchange
Pulls together list of crypto exchanges to interact with their API's in a uniform fashion.
Stars: ✭ 241 (+85.38%)
Mutual labels:  bitcoin, kraken, poloniex, bittrex, exchange
Tribeca
A high frequency, market making cryptocurrency trading platform in node.js
Stars: ✭ 3,646 (+2704.62%)
Mutual labels:  bitcoin, cryptocurrency, trading, exchange
Crypto Exchanges Gateway
Your gateway to the world of crypto !
Stars: ✭ 343 (+163.85%)
Mutual labels:  cryptocurrency, poloniex, trading, bittrex
Wolfbot
Crypto currency trading bot written in TypeScript for NodeJS
Stars: ✭ 335 (+157.69%)
Mutual labels:  bitcoin, cryptocurrency, trading, exchange
Ccxt
A JavaScript / Python / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
Stars: ✭ 22,501 (+17208.46%)
Mutual labels:  bitcoin, cryptocurrency, trading, exchange
Qtbitcointrader
Secure multi crypto exchange trading client
Stars: ✭ 520 (+300%)
Mutual labels:  bitcoin, cryptocurrency, trading, exchange
guncontrol
πŸ”” GunControl β€’ Custom *nix launcher for GunBot
Stars: ✭ 16 (-87.69%)
Mutual labels:  trading, kraken, poloniex, bittrex
Coinbase Pro Node
Coinbase Pro API written in TypeScript and covered by tests.
Stars: ✭ 116 (-10.77%)
Mutual labels:  bitcoin, cryptocurrency, trading, exchange
Cryptotrader
A responsive dynamic webapp to trade cryptopairs on the most prominent exchanges
Stars: ✭ 118 (-9.23%)
Mutual labels:  kraken, poloniex, trading, bittrex
Currencyviewer
Short python framework that dynamically displays and converts the cryptocurrencies in your Kraken wallet into equivalents fiat money.
Stars: ✭ 13 (-90%)
Mutual labels:  bitcoin, cryptocurrency, kraken, exchange
Cryptotrader
A cryptocurrency trader for all famous exchanges
Stars: ✭ 228 (+75.38%)
Mutual labels:  bitcoin, cryptocurrency, trading, exchange

Coinnect

crates.io Downloads from crates.io Build Status doc.rs MIT licensed

Coinnect is a Rust library aiming to provide a complete access to REST APIs for various crypto-currencies exchanges (see below for a list of supported exchanges). All methods consume HTTPS api. The purpose of this crate is not to stream data (you should use websocket/FIX in that case).

You basically have 2 choices to retrieve data : use the raw API provided by the platform you target or use the generic Coinnect API, which is more user-friendly and safe. Ideally, use the raw API when the Coinnect API could not retrieve the data/perform the action you want.

NOTE: A new version with Futures support is coming as soon as async-await syntax will be stabilized !

WARNING: This library is highly experimental at the moment. Please do not invest what you can't afford to lose. This is a personal project, I cannot be held responsible for the library malfunction, which can lead to a loss of money.

The project is licensed under the terms of the MIT License.

Exchanges support:

Exchange Raw API supported Generic API supported Note
Bitstamp X X Not every method is implemented for now.
Kraken X X -
Poloniex X X -
Bittrex X X -

If your favorite exchange is not listed above, you can vote here to add it in the next release of Coinnect.

Generic API supports:

  • Ticker
  • Orderbook
  • Balances
  • Add a new order
  • ... more to come!

Feel free to make a PR to add support to your favorite exchange ;)

Documentation

Usage

Add this to your Cargo.toml:

[dependencies]
coinnect = "0.5"

and this to your crate root:

extern crate coinnect;

For optional parameters, most methods require an empty str ("") or Option (None) if you don't want to specify them.

Since 0.2, you have access to a generic API to communicate across exchanges in the same way. Note that this functionality is under active development. For more informations, look at ExchangeApi trait doc.

Example

The example below shows you how to connect to Poloniex

extern crate coinnect;

use coinnect::poloniex::api::PoloniexApi;
use coinnect::poloniex::credentials::PoloniexCreds;

fn main() {
    // We create a PoloniexApi by providing API key/secret
    // You can give an empty str if you only use public methods
    let creds = PoloniexCreds::new("my_optionnal_name", "api_key", "api_secret");
    let mut my_api = PoloniexApi::new(creds).unwrap();

    // Let's look at the ticker!
    let list_coins = my_api.return_ticker().unwrap();

    for coin in list_coins {
        // please visit Poloniex API documentation to know how the data is returned
        // or look at the coinnect documentation
        let name = coin.0;
        let price = coin.1.as_object().unwrap().get("last").unwrap().as_str().unwrap();

        println!("Coin {} has price : {}", name, price);
    }
}

For more examples, please see examples.

Testing

You can run the tests suite with cargo test for testing non private data requests (this will ignore tests related to private requests). You can use cargo test --features "bitstamp_private_tests" to run private tests related to bitstamp exchange for example. Before running private tests, make sure you have a keys_real.json file at the root with the following structure :

{
    "account_kraken": {
        "api_key"   : "123456789ABCDEF",
        "api_secret": "ABC&EF?abcdef"
    },
    "account_poloniex": {
        "api_key"   : "XYXY-XYXY-XYXY-XY",
        "api_secret": "A0A0B1B1C2C2"
    },
    "account_bitstamp": {
        "api_key"    : "XYXY-XYXY-XYXY-XY",
        "api_secret" : "A0A0B1B1C2C2",
        "customer_id": "123456"
    }
}

You must insert your real API keys, otherwise private tests may fail. No action is performed if you run the tests : no test will open position, or withdraw, etc. Tests only check for correct authentication method and correct parsing. You can examine the tests folder just to be sure and look at the Cargo.toml file for a complete list of features.

Contribution

Your contribution is highly appreciated. Do not hesitate to open an issue or a pull request. Note that any contribution submitted for inclusion in the project will be licensed according to the terms given in LICENSE.

Disclaimer

This SOFTWARE PRODUCT is provided by THE PROVIDER "as is" and "with all faults." THE PROVIDER makes no representations or warranties of any kind concerning the safety, suitability, lack of viruses, inaccuracies, typographical errors, or other harmful components of this SOFTWARE PRODUCT. There are inherent dangers in the use of any software, and you are solely responsible for determining whether this SOFTWARE PRODUCT is compatible with your equipment and other software installed on your equipment. You are also solely responsible for the protection of your equipment and backup of your data, and THE PROVIDER will not be liable for any damages you may suffer in connection with using, modifying, or distributing this SOFTWARE PRODUCT.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].