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
Auto Trait Implementations§
impl Freeze for BitstampRestClient
impl RefUnwindSafe for BitstampRestClient
impl Send for BitstampRestClient
impl Sync for BitstampRestClient
impl Unpin for BitstampRestClient
impl UnsafeUnpin for BitstampRestClient
impl UnwindSafe for BitstampRestClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more