Struct crypto_rest_client::BitstampRestClient
source · pub struct BitstampRestClient { /* private fields */ }
Expand description
The REST client for Bitstamp.
Bitstamp has only Spot market.
- REST API doc: https://www.bitstamp.net/api/
- Trading at: https://www.bitstamp.net/market/tradeview/
- Rate Limits: https://www.bitstamp.net/api/#what-is-api
- Do not make more than 8000 requests per 10 minutes or we will ban your IP address.
Implementations§
source§impl BitstampRestClient
impl BitstampRestClient
pub fn new(api_key: Option<String>, api_secret: Option<String>) -> Self
sourcepub fn fetch_trades(symbol: &str, time: Option<String>) -> Result<String, Error>
pub fn fetch_trades(symbol: &str, time: Option<String>) -> Result<String, Error>
Get trades.
/v2/transactions/{symbol}/
time
specifies the time interval from which we want the transactions
to be returned. Possible values are “minute”, “hour” (default) or “day”.
For example: https://www.bitstamp.net/api/v2/transactions/btcusd/?time=hour
sourcepub fn fetch_l2_snapshot(symbol: &str) -> Result<String, Error>
pub fn fetch_l2_snapshot(symbol: &str) -> Result<String, Error>
Get a full Level2 orderbook snapshot.
/// Equivalent to /order_book/symbol
with group=1
For example: https://www.bitstamp.net/api/v2/order_book/btcusd/
sourcepub fn fetch_l3_snapshot(symbol: &str) -> Result<String, Error>
pub fn fetch_l3_snapshot(symbol: &str) -> Result<String, Error>
Get a full Level3 orderbook snapshot.
Equivalent to /order_book/symbol
with group=2
For example: https://www.bitstamp.net/api/v2/order_book/btcusd/?group=2