Struct tinkoff_invest::TinkoffInvest [−][src]
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]
&self
) -> Result<Vec<UserAccount>, Box<dyn Error + Send + Sync>>
Get accounts
pub async fn stock_market_instruments(
&self
) -> Result<Vec<MarketInstrument>, Box<dyn Error + Send + Sync>>
[src]
&self
) -> Result<Vec<MarketInstrument>, Box<dyn Error + Send + Sync>>
Get stocks as market instruments
pub async fn bond_market_instruments(
&self
) -> Result<Vec<MarketInstrument>, Box<dyn Error + Send + Sync>>
[src]
&self
) -> Result<Vec<MarketInstrument>, Box<dyn Error + Send + Sync>>
Get bonds as market instruments
pub async fn etf_market_instruments(
&self
) -> Result<Vec<MarketInstrument>, Box<dyn Error + Send + Sync>>
[src]
&self
) -> Result<Vec<MarketInstrument>, Box<dyn Error + Send + Sync>>
Get etf as market instruments
pub async fn currency_market_instruments(
&self
) -> Result<Vec<MarketInstrument>, Box<dyn Error + Send + Sync>>
[src]
&self
) -> Result<Vec<MarketInstrument>, Box<dyn Error + Send + Sync>>
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]
&self,
account_id: Option<&str>
) -> Result<Vec<Order>, Box<dyn Error + Send + Sync>>
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]
&self,
figi: &str,
operation: OperationType,
lots: u64,
price: f64,
account_id: Option<&str>
) -> Result<PlacedOrder, Box<dyn Error + Send + Sync>>
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]
&self,
figi: &str,
operation: OperationType,
lots: u64,
account_id: Option<&str>
) -> Result<PlacedOrder, Box<dyn Error + Send + Sync>>
Place market order
pub async fn cancel_order(
&self,
order_id: &str,
account_id: Option<&str>
) -> Result<(), Box<dyn Error + Send + Sync>>
[src]
&self,
order_id: &str,
account_id: Option<&str>
) -> Result<(), Box<dyn Error + Send + Sync>>
Cancel order
pub async fn portfolio(
&self,
account_id: Option<&str>
) -> Result<Vec<PortfolioPosition>, Box<dyn Error + Send + Sync>>
[src]
&self,
account_id: Option<&str>
) -> Result<Vec<PortfolioPosition>, Box<dyn Error + Send + Sync>>
Get portfolio
pub async fn currency_portfolio(
&self,
account_id: Option<&str>
) -> Result<Vec<CurrencyPortfolioPosition>, Box<dyn Error + Send + Sync>>
[src]
&self,
account_id: Option<&str>
) -> Result<Vec<CurrencyPortfolioPosition>, Box<dyn Error + Send + Sync>>
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]
&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,
Get operations
pub async fn orderbook(
&self,
figi: &str,
depth: usize
) -> Result<Orderbook, Box<dyn Error + Send + Sync>>
[src]
&self,
figi: &str,
depth: usize
) -> Result<Orderbook, Box<dyn Error + Send + Sync>>
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]
&self,
from: DateTime<Tz>,
to: DateTime<Tz>,
figi: &str,
interval: CandlestickResolution
) -> Result<Vec<Candlestick>, Box<dyn Error + Send + Sync>> where
Tz::Offset: Display,
Get candlesticks
Auto Trait Implementations
impl !RefUnwindSafe for TinkoffInvest
impl Send for TinkoffInvest
impl Sync for TinkoffInvest
impl Unpin for TinkoffInvest
impl !UnwindSafe for TinkoffInvest
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]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub 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>,