Struct binance::futures::market::FuturesMarket
source · pub struct FuturesMarket {
pub client: Client,
pub recv_window: u64,
}
Fields§
§client: Client
§recv_window: u64
Implementations§
source§impl FuturesMarket
impl FuturesMarket
sourcepub async fn get_depth<S>(&self, symbol: S) -> Result<OrderBook>
pub async fn get_depth<S>(&self, symbol: S) -> Result<OrderBook>
Order book (Default 100; max 1000)
sourcepub async fn get_trades<S>(&self, symbol: S) -> Result<Trades>
pub async fn get_trades<S>(&self, symbol: S) -> Result<Trades>
Get trades for a pair
sourcepub async fn get_historical_trades<S1, S2, S3>(
&self,
symbol: S1,
from_id: S2,
limit: S3
) -> Result<Trades>
pub async fn get_historical_trades<S1, S2, S3>( &self, symbol: S1, from_id: S2, limit: S3 ) -> Result<Trades>
Get historical trades
sourcepub async fn get_agg_trades<S1, S2, S3, S4, S5>(
&self,
symbol: S1,
from_id: S2,
start_time: S3,
end_time: S4,
limit: S5
) -> Result<AggTrades>
pub async fn get_agg_trades<S1, S2, S3, S4, S5>( &self, symbol: S1, from_id: S2, start_time: S3, end_time: S4, limit: S5 ) -> Result<AggTrades>
Get aggregated trades
sourcepub async fn get_funding_rate<S1, S3, S4, S5>(
&self,
symbol: S1,
start_time: S3,
end_time: S4,
limit: S5
) -> Result<Vec<FundingRate>>
pub async fn get_funding_rate<S1, S3, S4, S5>( &self, symbol: S1, start_time: S3, end_time: S4, limit: S5 ) -> Result<Vec<FundingRate>>
Get funding rate history
sourcepub async fn get_open_interest_history<S1, S2, S3, S4, S5>(
&self,
symbol: S1,
period: S2,
start_time: S3,
end_time: S4,
limit: S5
) -> Result<Vec<OpenInterestHistory>>
pub async fn get_open_interest_history<S1, S2, S3, S4, S5>( &self, symbol: S1, period: S2, start_time: S3, end_time: S4, limit: S5 ) -> Result<Vec<OpenInterestHistory>>
Get open interest history
sourcepub async fn get_trader_account_long_short_ratio<S1, S2, S3, S4, S5>(
&self,
symbol: S1,
period: S2,
start_time: S3,
end_time: S4,
limit: S5
) -> Result<Vec<LongShortRatio>>
pub async fn get_trader_account_long_short_ratio<S1, S2, S3, S4, S5>( &self, symbol: S1, period: S2, start_time: S3, end_time: S4, limit: S5 ) -> Result<Vec<LongShortRatio>>
Get Top Trader Account Long/Short Ratio
sourcepub async fn get_trader_position_long_short_ratio<S1, S2, S3, S4, S5>(
&self,
symbol: S1,
period: S2,
start_time: S3,
end_time: S4,
limit: S5
) -> Result<Vec<LongShortRatio>>
pub async fn get_trader_position_long_short_ratio<S1, S2, S3, S4, S5>( &self, symbol: S1, period: S2, start_time: S3, end_time: S4, limit: S5 ) -> Result<Vec<LongShortRatio>>
Get Top Trader Position Long/Short Ratio
sourcepub async fn get_long_short_ratio<S1, S2, S3, S4, S5>(
&self,
symbol: S1,
period: S2,
start_time: S3,
end_time: S4,
limit: S5
) -> Result<Vec<LongShortRatio>>
pub async fn get_long_short_ratio<S1, S2, S3, S4, S5>( &self, symbol: S1, period: S2, start_time: S3, end_time: S4, limit: S5 ) -> Result<Vec<LongShortRatio>>
Get Long/Short Ratio
sourcepub async fn get_taker_long_short_ratio<S1, S2, S3, S4, S5>(
&self,
symbol: S1,
period: S2,
start_time: S3,
end_time: S4,
limit: S5
) -> Result<Vec<LongShortRatio>>
pub async fn get_taker_long_short_ratio<S1, S2, S3, S4, S5>( &self, symbol: S1, period: S2, start_time: S3, end_time: S4, limit: S5 ) -> Result<Vec<LongShortRatio>>
Get Taker Long/Short Ratio
sourcepub async fn get_klines<S1, S2, S3, S4, S5>(
&self,
symbol: S1,
interval: S2,
limit: S3,
start_time: S4,
end_time: S5
) -> Result<KlineSummaries>
pub async fn get_klines<S1, S2, S3, S4, S5>( &self, symbol: S1, interval: S2, limit: S3, start_time: S4, end_time: S5 ) -> Result<KlineSummaries>
Returns up to ‘limit’ klines for given symbol and interval (“1m”, “5m”, …) https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#klinecandlestick-data
sourcepub async fn get_blvt_klines_v<S1, S2, S3, S4, S5>(
&self,
symbol: S1,
interval: S2,
limit: S3,
start_time: S4,
end_time: S5
) -> Result<Vec<Vec<Value>>>
pub async fn get_blvt_klines_v<S1, S2, S3, S4, S5>( &self, symbol: S1, interval: S2, limit: S3, start_time: S4, end_time: S5 ) -> Result<Vec<Vec<Value>>>
Returns up to ‘limit’ blvt klines for given symbol and interval (“1m”, “5m”, …) Note that the symbol is not the traditional pair but rather {symbol}{UP|DOWN} https://binance-docs.github.io/apidocs/futures/en/#blvt-nav-kline-candlestick-streams As the vector fields are undocumented on binance futures you are un your own, follow KlineSummary for an example
sourcepub async fn get_mark_price_klines_v<S1, S2, S3, S4, S5>(
&self,
symbol: S1,
interval: S2,
limit: S3,
start_time: S4,
end_time: S5
) -> Result<Vec<Vec<Value>>>
pub async fn get_mark_price_klines_v<S1, S2, S3, S4, S5>( &self, symbol: S1, interval: S2, limit: S3, start_time: S4, end_time: S5 ) -> Result<Vec<Vec<Value>>>
Returns up to ‘limit’ mark price klines for given symbol and interval (“1m”, “5m”, …) https://binance-docs.github.io/apidocs/futures/en/#mark-price-kline-candlestick-data As the vector fields are undocumented on binance futures you are un your own, follow KlineSummary for an example
sourcepub async fn get_index_price_klines_v<S1, S2, S3, S4, S5>(
&self,
symbol: S1,
interval: S2,
limit: S3,
start_time: S4,
end_time: S5
) -> Result<Vec<Vec<Value>>>
pub async fn get_index_price_klines_v<S1, S2, S3, S4, S5>( &self, symbol: S1, interval: S2, limit: S3, start_time: S4, end_time: S5 ) -> Result<Vec<Vec<Value>>>
Returns up to ‘limit’ index price klines for given symbol and interval (“1m”, “5m”, …) https://binance-docs.github.io/apidocs/futures/en/#index-price-kline-candlestick-data As the vector fields are undocumented on binance futures you are un your own, follow KlineSummary for an example
sourcepub async fn get_continuous_contract_klines_v<S1, S2, S3, S4, S5>(
&self,
symbol: S1,
interval: S2,
limit: S3,
start_time: S4,
end_time: S5
) -> Result<Vec<Vec<Value>>>
pub async fn get_continuous_contract_klines_v<S1, S2, S3, S4, S5>( &self, symbol: S1, interval: S2, limit: S3, start_time: S4, end_time: S5 ) -> Result<Vec<Vec<Value>>>
Returns up to ‘limit’ continuous contract klines for given symbol and interval (“1m”, “5m”, …) https://binance-docs.github.io/apidocs/futures/en/#continuous-contract-kline-candlestick-data As the vector fields are undocumented on binance futures you are un your own, follow KlineSummary for an example
sourcepub async fn get_notional_leverage_brackets<S>(
&self,
symbol: S
) -> Result<Vec<SymbolBrackets>>
pub async fn get_notional_leverage_brackets<S>( &self, symbol: S ) -> Result<Vec<SymbolBrackets>>
https://binance-docs.github.io/apidocs/futures/en/#notional-and-leverage-brackets-user_data
sourcepub async fn get_index_info<S>(&self, symbol: Option<S>) -> Result<PriceStats>
pub async fn get_index_info<S>(&self, symbol: Option<S>) -> Result<PriceStats>
https://binance-docs.github.io/apidocs/futures/en/#composite-index-symbol-information Only for composite symbols (ex: DEFIUSDT)
sourcepub async fn get_24h_price_stats<S>(&self, symbol: S) -> Result<PriceStats>
pub async fn get_24h_price_stats<S>(&self, symbol: S) -> Result<PriceStats>
24hr ticker price change statistics
sourcepub async fn get_all_24h_price_stats(&self) -> Result<Vec<PriceStats>>
pub async fn get_all_24h_price_stats(&self) -> Result<Vec<PriceStats>>
24hr ticker price change statistics for all symbols
sourcepub async fn get_price<S>(&self, symbol: S) -> Result<SymbolPrice>
pub async fn get_price<S>(&self, symbol: S) -> Result<SymbolPrice>
Latest price for ONE symbol.
sourcepub async fn get_all_book_tickers(&self) -> Result<BookTickers>
pub async fn get_all_book_tickers(&self) -> Result<BookTickers>
Symbols order book ticker -> Best price/qty on the order book for ALL symbols.
pub async fn get_book_ticker<S>(&self, symbol: S) -> Result<Tickers>
pub async fn get_mark_prices( &self, symbol: Option<String> ) -> Result<Vec<MarkPrice>>
pub async fn get_all_liquidation_orders(&self) -> Result<LiquidationOrders>
pub async fn open_interest<S>(&self, symbol: S) -> Result<OpenInterest>
Trait Implementations§
source§impl Binance for FuturesMarket
impl Binance for FuturesMarket
fn new_with_config( api_key: Option<String>, secret_key: Option<String>, config: &Config ) -> Self
fn new(api_key: Option<String>, secret_key: Option<String>) -> Self
source§fn new_with_env(config: &Config) -> Self
fn new_with_env(config: &Config) -> Self
source§impl Clone for FuturesMarket
impl Clone for FuturesMarket
source§fn clone(&self) -> FuturesMarket
fn clone(&self) -> FuturesMarket
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more