[−][src]Struct questrade_rs::Questrade
Questrade client
Implementations
impl Questrade
[src]
pub fn new() -> Self
[src]
Creates a new API instance with the default client.
pub fn with_client(client: Client) -> Self
[src]
Creates a new API instance with the specified client
pub fn with_authentication(
auth_info: AuthenticationInfo,
client: Client
) -> Self
[src]
auth_info: AuthenticationInfo,
client: Client
) -> Self
Creates a new API instance with the specified auth info.
pub async fn authenticate<'_, '_>(
&'_ self,
refresh_token: &'_ str,
is_demo: bool
) -> Result<(), Box<dyn Error>>
[src]
&'_ self,
refresh_token: &'_ str,
is_demo: bool
) -> Result<(), Box<dyn Error>>
Authenticates using the supplied token.
pub fn get_auth_info(&self) -> Option<AuthenticationInfo>
[src]
Retrieves the current authentication info (if set).
pub async fn accounts<'_>(&'_ self) -> Result<Vec<Account>, Box<dyn Error>>
[src]
List all accounts associated with the authenticated user.
pub async fn account_activity<'_, '_>(
&'_ self,
account_number: &'_ str,
start_time: DateTime<Utc>,
end_time: DateTime<Utc>
) -> Result<Vec<AccountActivity>, Box<dyn Error>>
[src]
&'_ self,
account_number: &'_ str,
start_time: DateTime<Utc>,
end_time: DateTime<Utc>
) -> Result<Vec<AccountActivity>, Box<dyn Error>>
Retrieve account activities, including cash transactions, dividends, trades, etc.
pub async fn account_orders<'_, '_>(
&'_ self,
account_number: &'_ str,
start_time: Option<DateTime<Utc>>,
end_time: Option<DateTime<Utc>>,
state: Option<OrderStateFilter>
) -> Result<Vec<AccountOrder>, Box<dyn Error>>
[src]
&'_ self,
account_number: &'_ str,
start_time: Option<DateTime<Utc>>,
end_time: Option<DateTime<Utc>>,
state: Option<OrderStateFilter>
) -> Result<Vec<AccountOrder>, Box<dyn Error>>
Search for account orders.
Parameters:
- start_time
optional start of time range. Defaults to start of today, 12:00am
- end_time
optional end of time range. Defaults to end of today, 11:59pm
- state_filter
optionally filters order states
pub async fn account_order<'_, '_>(
&'_ self,
account_number: &'_ str,
order_id: u32
) -> Result<Option<AccountOrder>, Box<dyn Error>>
[src]
&'_ self,
account_number: &'_ str,
order_id: u32
) -> Result<Option<AccountOrder>, Box<dyn Error>>
Retrieve details for an order with a specific id
pub async fn account_executions<'_, '_>(
&'_ self,
account_number: &'_ str,
start_time: Option<DateTime<Utc>>,
end_time: Option<DateTime<Utc>>
) -> Result<Vec<AccountExecution>, Box<dyn Error>>
[src]
&'_ self,
account_number: &'_ str,
start_time: Option<DateTime<Utc>>,
end_time: Option<DateTime<Utc>>
) -> Result<Vec<AccountExecution>, Box<dyn Error>>
Retrieves executions for a specific account.
Parameters:
- start_time
optional start of time range. Defaults to start of today, 12:00am
- end_time
optional end of time range. Defaults to end of today, 11:59pm
pub async fn account_balance<'_, '_>(
&'_ self,
account_number: &'_ str
) -> Result<AccountBalances, Box<dyn Error>>
[src]
&'_ self,
account_number: &'_ str
) -> Result<AccountBalances, Box<dyn Error>>
Retrieves per-currency and combined balances for a specified account.
pub async fn account_positions<'_, '_>(
&'_ self,
account_number: &'_ str
) -> Result<Vec<AccountPosition>, Box<dyn Error>>
[src]
&'_ self,
account_number: &'_ str
) -> Result<Vec<AccountPosition>, Box<dyn Error>>
Retrieves positions in a specified account.
pub async fn market_quote<'_, '_>(
&'_ self,
ids: &'_ [u32]
) -> Result<Vec<MarketQuote>, Box<dyn Error>>
[src]
&'_ self,
ids: &'_ [u32]
) -> Result<Vec<MarketQuote>, Box<dyn Error>>
Retrieves a single Level 1 market data quote for one or more symbols.
IMPORTANT NOTE: Questrade user needs to be subscribed to a real-time data package, to receive market quotes in real-time, otherwise call to get quote is considered snap quote and limit per market can be quickly reached. Without real-time data package, once limit is reached, the response will return delayed data. (Please check "delay" parameter in response always)
pub async fn symbol_search<'_, '_>(
&'_ self,
prefix: &'_ str,
offset: u32
) -> Result<Vec<SearchEquitySymbol>, Box<dyn Error>>
[src]
&'_ self,
prefix: &'_ str,
offset: u32
) -> Result<Vec<SearchEquitySymbol>, Box<dyn Error>>
Searches for the specified symbol.
params
prefix
Prefix of a symbol or any word in the description.offset
Offset in number of records from the beginning of a result set.
pub async fn time<'_>(&'_ self) -> Result<DateTime<Utc>, Box<dyn Error>>
[src]
Retrieves current server time.
Auto Trait Implementations
impl !RefUnwindSafe for Questrade
impl Send for Questrade
impl !Sync for Questrade
impl Unpin for Questrade
impl !UnwindSafe for Questrade
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,