Struct crypto_rest_client::BitfinexRestClient
source · pub struct BitfinexRestClient { /* private fields */ }
Expand description
The REST client for Bitfinex, including all markets.
Implementations§
source§impl BitfinexRestClient
impl BitfinexRestClient
pub fn new(api_key: Option<String>, api_secret: Option<String>) -> Self
sourcepub fn fetch_trades(
symbol: &str,
limit: Option<u16>,
start: Option<u64>,
end: Option<u64>,
sort: Option<i8>
) -> Result<String, Error>
pub fn fetch_trades( symbol: &str, limit: Option<u16>, start: Option<u64>, end: Option<u64>, sort: Option<i8> ) -> Result<String, Error>
/v2/trades/Symbol/hist
sourcepub fn fetch_l2_snapshot(symbol: &str) -> Result<String, Error>
pub fn fetch_l2_snapshot(symbol: &str) -> Result<String, Error>
Get a Level2 snapshot of orderbook.
Equivalent to /v2/book/Symbol/P0
with len=100
For example: https://api-pub.bitfinex.com/v2/book/tBTCUSD/P0?len=100
Ratelimit: 90 req/min
sourcepub fn fetch_l3_snapshot(symbol: &str) -> Result<String, Error>
pub fn fetch_l3_snapshot(symbol: &str) -> Result<String, Error>
Get a Level3 snapshot of orderbook.
Equivalent to /v2/book/Symbol/R0
with len=100
For example: https://api-pub.bitfinex.com/v2/book/tBTCUSD/R0?len=100