pub struct Spot { /* private fields */ }Expand description
Client for Binance spot public market data. No credentials are needed.
Implementations§
Source§impl Spot
impl Spot
Sourcepub fn new() -> Result<Self, SpotError>
pub fn new() -> Result<Self, SpotError>
A client with default settings and its own WeightBudget.
Sourcepub fn builder() -> SpotBuilder
pub fn builder() -> SpotBuilder
Start configuring a client.
Sourcepub fn exchange(&self) -> ExchangeApi
pub fn exchange(&self) -> ExchangeApi
Reference data: exchangeInfo.
Sourcepub fn market(&self) -> MarketApi
pub fn market(&self) -> MarketApi
Market data: depth, trades, aggregate trades, klines, the average price and the tickers.
Sourcepub fn weight_budget(&self) -> &WeightBudget
pub fn weight_budget(&self) -> &WeightBudget
The budget this client charges.
Trait Implementations§
Source§impl Candles for Spot
impl Candles for Spot
Source§async fn candles(
&self,
key: &MarketKey,
query: &CandleQuery,
) -> Result<Vec<Candle>, ClassifiedError>
async fn candles( &self, key: &MarketKey, query: &CandleQuery, ) -> Result<Vec<Candle>, ClassifiedError>
Candles opening between
query.start and query.end, oldest first:
as many as the venue returns in one request. Read on from the last
candle’s open time for more. Read moreSource§fn intervals(&self) -> &'static [CandleInterval]
fn intervals(&self) -> &'static [CandleInterval]
The candle widths this product serves, shortest first. Every width
(
CandleInterval::ALL) unless the
implementation says otherwise; a product that serves only some
overrides it, and its module’s docs list them.Source§impl Instruments for Spot
impl Instruments for Spot
Source§async fn instruments(&self) -> Result<Vec<Instrument>, ClassifiedError>
async fn instruments(&self) -> Result<Vec<Instrument>, ClassifiedError>
Every pair exchangeInfo lists. A row that does not convert (a symbol
no key can carry) is logged at WARN with its symbol and the error, and
skipped: the rest are returned.
Source§impl MarketData for Spot
impl MarketData for Spot
Source§async fn instrument(
&self,
key: &MarketKey,
) -> Result<Instrument, ClassifiedError>
async fn instrument( &self, key: &MarketKey, ) -> Result<Instrument, ClassifiedError>
The instrument
key names. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for Spot
impl !UnwindSafe for Spot
impl Freeze for Spot
impl Send for Spot
impl Sync for Spot
impl Unpin for Spot
impl UnsafeUnpin for Spot
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