1 个不稳定版本
0.0.9 | 2022年9月8日 |
---|---|
0.0.8 |
|
#14 in #市场
每月下载量 23
14KB
291 行
爬虫数据客户端
这是一个 CLI 工具,用于自动化市场数据分发过程。
设置
首先确保系统已安装 Rust,使用 rustup。
然后使用以下命令安装 CLI:
cargoinstall crawler_data_client
为了解压缩文件,还需要安装 zstd 包的有效版本。
用法
crawler_data_client --address <ADDRESS> --username <USERNAME> --password <PASSWORD> --crawler-type <CRAWLER_TYPE> --exchange <EXCHANGE> --market <MARKET> --symbol <SYMBOL> --month <MONTH> --output <OUTPUT>
OPTIONS:
-h, --help (display help text)
-a, --address <ADDRESS> ---------- (ftp server address, eg 12.34.56.78:21. Usually the port is 21)
-u, --username <USERNAME> -------- (your ftp login username)
-p, --password <PASSWORD> -------- (your ftp login password)
-c, --crawler-type <CRAWLER_TYPE> (options: trades, l2_events, l2_topk, bbo, funding_rate, ticker (raw only))
-e, --exchange <EXCHANGE> -------- (options: binance, ftx, bybit)
-m, --market <MARKET> ------------ (options: spot, linear_swap, inverse_swap)
-s, --symbol <SYMBOL> ------------ (eg. BTCUSDT)
-o, --output <OUTPUT> ------------ (the local download destination folder, eg ~/Downloads/crawler-data)
--month <MONTH> -------------- (optional. the year-month in ISO, eg 2022-08. required if not using --latest-day or --latest-month)
--day <DAY> ------------------ (optional. the day of the month, eg. 07. if not provided, will download whole month. this needs to be ISO, so days less than 10 need a zero in front)
--keep-compressed ------------ (optional. if set, the data will be kept compressed as zst. default is to decompress the file for usage)
--raw ------------------------ (optional. download the raw data instead of parsed)
--latest-day ----------------- (optional. download the latest day, ie the previous utc day at time of download)
--latest-month --------------- (optional. download the latest whole month, ie the month that the previous utc day is in)
依赖项
~12MB
~203K SLoC