Struct tinkoff_invest::TinkoffInvest[][src]

pub struct TinkoffInvest { /* fields omitted */ }

Implementations

impl TinkoffInvest[src]

pub fn new(token: &str) -> TinkoffInvest[src]

pub async fn accounts(
    &self
) -> Result<Vec<UserAccount>, Box<dyn Error + Send + Sync>>
[src]

Get accounts

pub async fn stock_market_instruments(
    &self
) -> Result<Vec<MarketInstrument>, Box<dyn Error + Send + Sync>>
[src]

Get stocks as market instruments

pub async fn bond_market_instruments(
    &self
) -> Result<Vec<MarketInstrument>, Box<dyn Error + Send + Sync>>
[src]

Get bonds as market instruments

pub async fn etf_market_instruments(
    &self
) -> Result<Vec<MarketInstrument>, Box<dyn Error + Send + Sync>>
[src]

Get etf as market instruments

pub async fn currency_market_instruments(
    &self
) -> Result<Vec<MarketInstrument>, Box<dyn Error + Send + Sync>>
[src]

Get currencies as market instruments

pub async fn stocks(&self) -> Result<Vec<Stock>, Box<dyn Error + Send + Sync>>[src]

Get stocks

pub fn stocks_info(stocks: Vec<Stock>) -> StocksInfo[src]

Get stocks info

pub async fn orders(
    &self,
    account_id: Option<&str>
) -> Result<Vec<Order>, Box<dyn Error + Send + Sync>>
[src]

Get active orders

pub async fn limit_order(
    &self,
    figi: &str,
    operation: OperationType,
    lots: u64,
    price: f64,
    account_id: Option<&str>
) -> Result<PlacedOrder, Box<dyn Error + Send + Sync>>
[src]

Place limit order

pub async fn market_order(
    &self,
    figi: &str,
    operation: OperationType,
    lots: u64,
    account_id: Option<&str>
) -> Result<PlacedOrder, Box<dyn Error + Send + Sync>>
[src]

Place market order

pub async fn cancel_order(
    &self,
    order_id: &str,
    account_id: Option<&str>
) -> Result<(), Box<dyn Error + Send + Sync>>
[src]

Cancel order

pub async fn portfolio(
    &self,
    account_id: Option<&str>
) -> Result<Vec<PortfolioPosition>, Box<dyn Error + Send + Sync>>
[src]

Get portfolio

pub async fn currency_portfolio(
    &self,
    account_id: Option<&str>
) -> Result<Vec<CurrencyPortfolioPosition>, Box<dyn Error + Send + Sync>>
[src]

Get currency portfolio

pub async fn operations<Tz: TimeZone>(
    &self,
    from: DateTime<Tz>,
    to: DateTime<Tz>,
    figi: Option<&str>,
    account_id: Option<&str>
) -> Result<Vec<Operation>, Box<dyn Error + Send + Sync>> where
    Tz::Offset: Display
[src]

Get operations

pub async fn orderbook(
    &self,
    figi: &str,
    depth: usize
) -> Result<Orderbook, Box<dyn Error + Send + Sync>>
[src]

Get orderbook

pub async fn candlesticks<Tz: TimeZone>(
    &self,
    from: DateTime<Tz>,
    to: DateTime<Tz>,
    figi: &str,
    interval: CandlestickResolution
) -> Result<Vec<Candlestick>, Box<dyn Error + Send + Sync>> where
    Tz::Offset: Display
[src]

Get candlesticks

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.