pub struct SyncBroker { /* private fields */ }Expand description
Adaptador sincrono: envuelve el núcleo async con un runtime propio.
Implementations§
Source§impl SyncBroker
impl SyncBroker
Sourcepub fn connect(params: BrokerParams) -> Result<Self, BrokerError>
pub fn connect(params: BrokerParams) -> Result<Self, BrokerError>
Conecta creando el runtime y la sesión async.
Sourcepub fn async_core(&self) -> &IqOptionBroker
pub fn async_core(&self) -> &IqOptionBroker
Acceso al núcleo async (para quien quiera ambos mundos).
pub fn session(&self) -> Result<Session, BrokerError>
pub fn is_connected(&self) -> bool
pub fn disconnect(&mut self) -> Result<(), BrokerError>
pub fn get_balance(&self) -> Result<Balance, BrokerError>
pub fn get_account_type(&self) -> Result<AccountType, BrokerError>
pub fn switch_account(&mut self, kind: AccountType) -> Result<(), BrokerError>
pub fn list_assets(&self) -> Result<Vec<Asset>, BrokerError>
pub fn asset_status(&self, symbol: &str) -> Result<MarketStatus, BrokerError>
pub fn get_candles( &self, req: CandleRequest, ) -> Result<Vec<Candle>, BrokerError>
Sourcepub fn subscribe_candles(
&self,
req: CandleSubscribe,
) -> Result<CandleIter, BrokerError>
pub fn subscribe_candles( &self, req: CandleSubscribe, ) -> Result<CandleIter, BrokerError>
Stream de velas como iterador bloqueante.
pub fn get_position_history( &self, symbol: Option<&str>, limit: usize, offset: usize, ) -> Result<PositionHistory, BrokerError>
pub fn get_payout( &self, symbol: &str, expiration_seconds: u64, ) -> Result<Payout, BrokerError>
pub fn get_asset_profile( &self, symbol: &str, ) -> Result<AssetProfile, BrokerError>
pub fn get_technical_indicators( &self, symbol: &str, ) -> Result<TechnicalIndicators, BrokerError>
pub fn subscribe_live_deals(&self, symbol: &str) -> Result<(), BrokerError>
pub fn subscribe_commission_changes(&self) -> Result<(), BrokerError>
Sourcepub fn events(&self) -> Result<EventIter, BrokerError>
pub fn events(&self) -> Result<EventIter, BrokerError>
Iterador bloqueante de eventos (cierre, balance, ticks, deals…).
pub fn buy_binary(&self, req: BuyBinaryRequest) -> Result<OrderId, BrokerError>
pub fn buy_digital_spot( &self, req: BuyDigitalRequest, ) -> Result<OrderId, BrokerError>
pub fn sell_option(&self, order_id: &OrderId) -> Result<(), BrokerError>
pub fn get_operation_result( &self, order_id: &OrderId, ) -> Result<OperationResult, BrokerError>
Auto Trait Implementations§
impl !Freeze for SyncBroker
impl !RefUnwindSafe for SyncBroker
impl !UnwindSafe for SyncBroker
impl Forget for SyncBroker
impl Send for SyncBroker
impl Sync for SyncBroker
impl Unpin for SyncBroker
impl UnsafeUnpin for SyncBroker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more