cargo new hodl-backend --bin
brew install rustup
# https://doc.rust-lang.org/edition-guide/rust-2018/rustup-for-managing-rust-versions.html
# https://rust-lang.github.io/rustup-components-history/
rustup toolchain install nightly-2021-05-30
rustup default nightly-2021-05-20
rustup component add clippy
cargo clippy
// have this at top of file
#![warn(
clippy::all,
clippy::restriction,
clippy::pedantic,
clippy::cargo
)]
cargo build
cargo run
code --install-extension matklad.rust-analyzer
code --install-extension vadimcn.vscode-lldb
https://rust-lang.github.io/rustup-components-history/
https://kerkour.com/blog/rust-small-docker-image/
https://blog.logrocket.com/packaging-a-rust-web-service-using-docker/
https://lunarcrush.com/developers/docs#assets
https://docs.cryptowat.ch/websocket-api/
F2INJ703C974UAAG3CNP iq9kWxgeyxaboRzsIEjhVFlsRIjb6S1mCxL/Xn0C
wscat --connect "wss://stream.cryptowat.ch/connect?apikey=F2INJ703C974UAAG3CNP"
# https://docs.cryptowat.ch/websocket-api/data-subscriptions
> {"subscribe":{"subscriptions":[{"streamSubscription":{"resource":"pairs:9:trades"}}]}}
> {"subscribe":{"subscriptions":[{"streamSubscription":{"resource":"instruments:9:trades"}}]}}
https://pro.coinmarketcap.com/
❯ curl -H "X-CMC_PRO_API_KEY: 791711f6-efb5-461c-87ac-3d8d810f71e0" -H "Accept: application/json" -d "start=1&limit=100&convert=USD" -G https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest
wscat --connect "wss://ftx.com/ws/"
> {"op": "subscribe", "channel": "trades", "market": "BTC-PERP"}
Sample
{
"channel": "trades",
"market": "BTC-PERP",
"type": "update",
"data": [
{
"id": 1298904051,
"price": 39798.0,
"size": 0.1028,
"side": "sell",
"liquidation": false,
"time": "2021-06-15T11:54:13.596405+00:00"
},
{
"id": 1298904052,
"price": 39798.0,
"size": 0.0047,
"side": "sell",
"liquidation": false,
"time": "2021-06-15T11:54:13.596405+00:00"
},
{
"id": 1298904053,
"price": 39798.0,
"size": 0.19,
"side": "sell",
"liquidation": false,
"time": "2021-06-15T11:54:13.596405+00:00"
}
]
}
wscat --connect wss://stream.binance.com:9443/ws/BTC/USDT@bookTicker
> {"method": "SUBSCRIBE","params":["btcusdt@aggTrade","btcusdt@depth"],"id": 1}