Struct tda_sdk::Client [−][src]
pub struct Client {
pub access_token: Option<AccessToken>,
// some fields omitted
}Expand description
Client for interacting with the TDA API.
Most API methods will panic if an access token is not set.
Fields
access_token: Option<AccessToken>Implementations
Create a new client with a client ID and refresh token.
Set the internal access token of the client.
Get a new access token from the API.
pub fn get_account(
&self,
account_id: &'a str,
params: GetAccountParams
) -> Result<Account, ClientError>
pub fn get_account(
&self,
account_id: &'a str,
params: GetAccountParams
) -> Result<Account, ClientError>
Account balances, positions, and orders for a specific account.
Account balances, positions, and orders for all linked accounts.
pub fn get_movers(
&self,
index: &'a str,
params: GetMoversParams
) -> Result<Vec<Mover>, ClientError>
pub fn get_movers(
&self,
index: &'a str,
params: GetMoversParams
) -> Result<Vec<Mover>, ClientError>
Top 10 (up or down) movers by value or percent for a particular market
pub fn get_price_history(
&self,
symbol: &str,
params: GetPriceHistoryParams
) -> Result<GetPriceHistoryResponse, ClientError>
pub fn get_price_history(
&self,
symbol: &str,
params: GetPriceHistoryParams
) -> Result<GetPriceHistoryResponse, ClientError>
Get price history for a symbol