docs.rs failed to build crypto-crawler-4.1.0
Please check the
build logs for more information.
See
Builds for ideas on how to fix a failed build,
or
Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault,
open an issue.
crypto-crawler

A rock-solid cryprocurrency crawler.
Crawl realtime trades
use crypto_crawler::{crawl_trade, MarketType};
#[tokio::main(flavor = "multi_thread")]
async fn main() {
let (tx, rx) = std::sync::mpsc::channel();
tokio::task::spawn(async move {
for msg in rx {
println!("{}", msg);
}
});
crawl_trade("binance", MarketType::InverseSwap, None, tx).await;
}
Crawl realtime level2 orderbook incremental updates
use crypto_crawler::{crawl_l2_event, MarketType};
#[tokio::main(flavor = "multi_thread")]
async fn main() {
let (tx, rx) = std::sync::mpsc::channel();
tokio::task::spawn(async move {
for msg in rx {
println!("{}", msg);
}
});
crawl_l2_event("binance", MarketType::InverseSwap, None, tx).await;
}
Crawl level2 orderbook full snapshots from RESTful API
use crypto_crawler::{crawl_l2_snapshot, MarketType};
fn main() {
let (tx, rx) = std::sync::mpsc::channel();
std::thread::spawn(move || {
for msg in rx {
println!("{}", msg);
}
});
crawl_l2_snapshot("binance", MarketType::InverseSwap, None, tx);
}
Crawl realtime level2 orderbook top-K snapshots
use crypto_crawler::{crawl_l2_topk, MarketType};
#[tokio::main(flavor = "multi_thread")]
async fn main() {
let (tx, rx) = std::sync::mpsc::channel();
tokio::task::spawn(async move {
for msg in rx {
println!("{}", msg);
}
});
crawl_l2_topk("binance", MarketType::InverseSwap, None, tx).await;
}
Crawl realtime level3 orderbook incremental updates
use crypto_crawler::{crawl_l3_event, MarketType};
#[tokio::main(flavor = "multi_thread")]
async fn main() {
let (tx, rx) = std::sync::mpsc::channel();
tokio::task::spawn(async move {
for msg in rx {
println!("{}", msg);
}
});
crawl_l3_event("coinbase_pro", MarketType::Spot, None, tx).await;
}
Crawl level3 orderbook full snapshots from RESTful API
use crypto_crawler::{crawl_l3_snapshot, MarketType};
fn main() {
let (tx, rx) = std::sync::mpsc::channel();
std::thread::spawn(move || {
for msg in rx {
println!("{}", msg);
}
});
crawl_l3_snapshot("coinbase_pro", MarketType::Spot, None, tx);
}
Crawl realtime BBO
use crypto_crawler::{crawl_bbo, MarketType};
#[tokio::main(flavor = "multi_thread")]
async fn main() {
let (tx, rx) = std::sync::mpsc::channel();
tokio::task::spawn(async move {
for msg in rx {
println!("{}", msg);
}
});
crawl_bbo("binance", MarketType::InverseSwap, None, tx).await;
}
Crawl 24hr rolling window tickers
use crypto_crawler::{crawl_ticker, MarketType};
#[tokio::main(flavor = "multi_thread")]
async fn main() {
let (tx, rx) = std::sync::mpsc::channel();
tokio::task::spawn(async move {
for msg in rx {
println!("{}", msg);
}
});
crawl_ticker("binance", MarketType::InverseSwap, None, tx).await;
}
Crawl candlesticks(i.e., OHLCV)
use crypto_crawler::{crawl_candlestick, MarketType};
#[tokio::main(flavor = "multi_thread")]
async fn main() {
let (tx, rx) = std::sync::mpsc::channel();
tokio::task::spawn(async move {
for msg in rx {
println!("{}", msg);
}
});
crawl_candlestick("binance", MarketType::InverseSwap, None, tx).await;
}
Crawl funding rates
use crypto_crawler::{crawl_funding_rate, MarketType};
#[tokio::main(flavor = "multi_thread")]
async fn main() {
let (tx, rx) = std::sync::mpsc::channel();
tokio::task::spawn(async move {
for msg in rx {
println!("{}", msg);
}
});
crawl_funding_rate("binance", MarketType::InverseSwap, None, tx).await;
}