pub struct IgClient { /* private fields */ }Expand description
Cheap-to-clone handle to an authenticated (or about-to-be-authenticated) IG client. Internally a shared transport plus shared session state.
Implementations§
Source§impl IgClient
impl IgClient
pub fn builder() -> IgClientBuilder
Sourcepub fn accounts(&self) -> AccountsApi<'_>
pub fn accounts(&self) -> AccountsApi<'_>
Accounts API: list accounts and manage preferences.
Sourcepub fn client_sentiment(&self) -> ClientSentimentApi<'_>
pub fn client_sentiment(&self) -> ClientSentimentApi<'_>
Client sentiment API: long/short percentages for IG markets.
Sourcepub fn dealing(&self) -> DealingApi<'_>
pub fn dealing(&self) -> DealingApi<'_>
Dealing API: positions, working orders.
Sourcepub fn history(&self) -> HistoryApi<'_>
pub fn history(&self) -> HistoryApi<'_>
History API: activity (v1 + v3) and transactions (v1 + v2).
Sourcepub fn markets(&self) -> MarketsApi<'_>
pub fn markets(&self) -> MarketsApi<'_>
Markets API: search, fetch, and navigate IG market instruments.
Sourcepub fn operations(&self) -> OperationsApi<'_>
pub fn operations(&self) -> OperationsApi<'_>
Operations API: manage API application keys.
Sourcepub fn prices(&self) -> PricesApi<'_>
pub fn prices(&self) -> PricesApi<'_>
Historical prices API: v1, v2, v3 endpoints and auto-pagination.
Sourcepub fn repeat_dealing(&self) -> RepeatDealingApi<'_>
pub fn repeat_dealing(&self) -> RepeatDealingApi<'_>
Repeat dealing API: windows for re-trading recently dealt instruments.
Sourcepub fn session(&self) -> SessionApi
pub fn session(&self) -> SessionApi
Session API: login, refresh, switch account, logout.
Sourcepub fn watchlists(&self) -> WatchlistsApi<'_>
pub fn watchlists(&self) -> WatchlistsApi<'_>
Watchlists API: list, create, delete watchlists; add/remove markets.
Sourcepub fn streaming(&self) -> StreamingApi<'_>
Available on crate feature stream only.
pub fn streaming(&self) -> StreamingApi<'_>
stream only.Streaming API: connect to the Lightstreamer endpoint and subscribe to live market, chart, account, and trade updates.
Requires the stream feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IgClient
impl !RefUnwindSafe for IgClient
impl Send for IgClient
impl Sync for IgClient
impl Unpin for IgClient
impl UnsafeUnpin for IgClient
impl !UnwindSafe for IgClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more