pub trait SentimentService: Send + Sync {
// Required methods
fn get_client_sentiment<'life0, 'life1, 'async_trait>(
&'life0 self,
market_ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<ClientSentimentResponse, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_client_sentiment_by_market<'life0, 'life1, 'async_trait>(
&'life0 self,
market_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<MarketSentiment, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_related_sentiment<'life0, 'life1, 'async_trait>(
&'life0 self,
market_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ClientSentimentResponse, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Service for retrieving client sentiment data from the IG Markets API
Client sentiment shows the percentage of IG clients holding long versus short positions on a given instrument, providing insight into market positioning.
Required Methods§
Sourcefn get_client_sentiment<'life0, 'life1, 'async_trait>(
&'life0 self,
market_ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<ClientSentimentResponse, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_client_sentiment<'life0, 'life1, 'async_trait>(
&'life0 self,
market_ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<ClientSentimentResponse, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn get_client_sentiment_by_market<'life0, 'life1, 'async_trait>(
&'life0 self,
market_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<MarketSentiment, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_client_sentiment_by_market<'life0, 'life1, 'async_trait>(
&'life0 self,
market_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<MarketSentiment, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns client sentiment for related markets
Returns a list of related (also traded) client sentiment for the given instrument’s market.
§Arguments
market_id- The market ID to get related sentiments for
§Returns
Ok(ClientSentimentResponse)- Sentiment data for related marketsErr(AppError)- If the request fails