32 stable releases

new 1.3.8 Mar 4, 2021
1.3.7 Mar 2, 2021
1.3.4 Feb 26, 2021
1.1.2 Jan 28, 2021
0.1.0 Dec 30, 2020

#65 in Cryptocurrencies

Download history 10/week @ 2020-12-26 17/week @ 2021-01-02 27/week @ 2021-01-09 189/week @ 2021-01-16 248/week @ 2021-01-23 168/week @ 2021-01-30 101/week @ 2021-02-06 261/week @ 2021-02-13 291/week @ 2021-02-20 157/week @ 2021-02-27

480 downloads per month

Apache-2.0

410KB
10K SLoC

crypto-crawler

A rock-solid cryprocurrency crawler.

Crawl realtime trades

use std::sync::{Arc, Mutex};
use crypto_crawler::{crawl_trade, MarketType, Message};

fn main() {
    let on_msg = Arc::new(Mutex::new(|msg: Message| {
        println!("{}", msg);
    }));

    // Crawl BitMEX inverse_swap market, for all symbols
    crawl_trade("bitmex", MarketType::InverseSwap, None, on_msg, None);
}

Crawl level2 orderbook update events

use std::sync::{Arc, Mutex};
use crypto_crawler::{crawl_l2_event, MarketType, Message};

fn main() {
    let on_msg = Arc::new(Mutex::new(|msg: Message| {
        println!("{}", msg);
    }));

    // Crawl BitMEX inverse_swap market, for all symbols
    crawl_l2_event("bitmex", MarketType::InverseSwap, None, on_msg, None);
}

Crawl level2 orderbook snapshots

use std::sync::{Arc, Mutex};
use crypto_crawler::{crawl_l2_snapshot, MarketType, Message};

fn main() {
    let on_msg = Arc::new(Mutex::new(|msg: Message| {
        println!("{}", msg);
    }));

    // Crawl BitMEX inverse_swap market level2 orderbook snapshots every 60 seconds, for all symbols
    crawl_l2_snapshot("bitmex", MarketType::InverseSwap, None, on_msg, Some(60), None);
}

Crawl level3 orderbook update events

use std::sync::{Arc, Mutex};
use crypto_crawler::{crawl_l3_event, MarketType, Message};

fn main() {
    let on_msg = Arc::new(Mutex::new(|msg: Message| {
        println!("{}", msg);
    }));

    // Crawl CoinbasePro spot market, for all symbols
    crawl_l3_event("coinbase_pro", MarketType::Spot, None, on_msg, None);
}

Crawl level3 orderbook snapshots

use std::sync::{Arc, Mutex};
use crypto_crawler::{crawl_l3_snapshot, MarketType, Message};

fn main() {
    let on_msg = Arc::new(Mutex::new(|msg: Message| {
        println!("{}", msg);
    }));

    // Crawl CoinbasePro spot market level2 orderbook snapshots every 60 seconds, for all symbols
    crawl_l3_snapshot("coinbase_pro", MarketType::Spot, None, on_msg, Some(60), None);
}

Dependencies

~12–17MB
~416K SLoC