use crate::client::FyersClient;
use crate::error::Result;
use crate::models::user::HoldingsResponse;
use crate::transport::get_authenticated_json;
#[derive(Debug, Clone, Copy)]
pub struct HoldingsService<'a> {
client: &'a FyersClient,
}
impl<'a> HoldingsService<'a> {
pub(crate) const fn new(client: &'a FyersClient) -> Self {
Self { client }
}
pub const fn client(&self) -> &'a FyersClient {
self.client
}
pub async fn get(&self) -> Result<HoldingsResponse> {
get_authenticated_json(self.client.http(), self.client.config(), "holdings").await
}
}