Struct ig_brokers::api::IG [−][src]
pub struct IG { /* fields omitted */ }
Implementations
Creates a new API instance with the production configuration.
Creates a new API instnace with the demo configuration.
Creates a new API instance with a config.
GET /accounts Returns a list of accounts belonging to the logged-in client.
GET /accounts/preferences Returns account preferences.
PUT /accounts/preferences Updates account preferences.
pub fn get_activity_history(
&self,
query: &ActivityHistoryQuery
) -> Result<ActivityHistory, Error>
pub fn get_activity_history(
&self,
query: &ActivityHistoryQuery
) -> Result<ActivityHistory, Error>
GET /history/activity Returns the account activity history.
pub fn get_transaction_history(
&self,
query: &TransactionHistoryQuery
) -> Result<TransactionHistory, Error>
pub fn get_transaction_history(
&self,
query: &TransactionHistoryQuery
) -> Result<TransactionHistory, Error>
GET /history/transactions Returns the transaction history. By default returns the minute prices within the last 10 minutes.
GET /clientsentiment Returns the client sentiment for the given instrument’s market.
GET /clientsentiment/{marketId} Returns the client sentiment for the given instrument’s market.
GET /clientsentiment/related/{marketId} Returns a list of related (what others have traded) client sentiment for the given instrument’s market.
pub fn get_deal_confirmation(
&self,
deal_reference: &String
) -> Result<DealConfirmation, Error>
pub fn get_deal_confirmation(
&self,
deal_reference: &String
) -> Result<DealConfirmation, Error>
GET /confirms/{dealReference} Returns a deal confirmation for the given deal reference.
GET /positions Returns all open positions for the active account.
GET /positions/{dealId} Returns an open position for the active account by deal identifier.
DELETE /positions/otc Closes one or more OTC positions.
POST /positions/otc Creates an OTC position.
pub fn update_position(
&self,
deal_id: &String,
req: &UpdatePosition
) -> Result<DealRef, Error>
pub fn update_position(
&self,
deal_id: &String,
req: &UpdatePosition
) -> Result<DealRef, Error>
PUT /positions/otc/{dealId} Updates an OTC position.
GET /positions/sprintmarkets A list of sprint market positions.
pub fn create_sprint_market_position(
&self,
req: &CreateSprintMarketPosition
) -> Result<DealRef, Error>
pub fn create_sprint_market_position(
&self,
req: &CreateSprintMarketPosition
) -> Result<DealRef, Error>
POST /positions/sprintmarkets Creates a sprint market position.
GET /workingorders Returns all open working orders for the active account.
POST /workingorders/otc Creates an OTC working order.
DELETE /workingorders/otc/{dealId} Deletes an OTC working order.
pub fn update_working_order(
&self,
deal_id: &String,
req: &UpdateWorkingOrder
) -> Result<DealRef, Error>
pub fn update_working_order(
&self,
deal_id: &String,
req: &UpdateWorkingOrder
) -> Result<DealRef, Error>
PUT /workingorders/otc/{dealId} Updates an OTC working order.
GET /operations/application Returns a list of client owned applications.
PUT /operations/application Alters the details of a given user application.
GET /session Returns the user’s session details and optionally tokens.
GET /marketnavigation Returns all top-level nodes (market categories) in the market navigation hierarchy.
GET /marketnavigation/{nodeId} Returns all sub-nodes of the given node in the market navigation hierarchy.
GET /markets Returns the details of the given markets.
GET /markets/{epic} Returns the details of the given market.
GET /markets?searchTerm={searchTerm} Returns all markets matching the search term.
GET /prices/{epic} Returns historical prices for a particular instrument. By default returns the minute prices within the last 10 minutes.
GET /watchlists Returns all watchlists belonging to the active account
POST /watchlists Creates a watchlist.
DELETE /watchlists/{watchlistId} Deletes a watchlist.
GET /watchlists/{watchlistId} Returns a watchlist.
pub fn add_market_to_watchlist(
&self,
watchlist_id: &String,
req: &AddToWatchlist
) -> Result<OkResponse, Error>
pub fn add_market_to_watchlist(
&self,
watchlist_id: &String,
req: &AddToWatchlist
) -> Result<OkResponse, Error>
PUT /watchlists/{watchlistId} Add a market to watchlist.
pub fn remove_market_from_watchlist(
&self,
watchlist_id: &String,
epic: &String
) -> Result<OkResponse, Error>
pub fn remove_market_from_watchlist(
&self,
watchlist_id: &String,
epic: &String
) -> Result<OkResponse, Error>
DELETE /watchlists/{watchlistId}/{epic} Remove a market from a watchlist.