pub struct TradeService { /* private fields */ }Expand description
Trade service for accessing trading parameters.
Implementations§
Source§impl TradeService
impl TradeService
Sourcepub async fn get_day_trade_param(
&self,
req: &DayTradeParamRequest,
opts: Option<RequestOptions>,
) -> Result<Vec<TradeParam>>
pub async fn get_day_trade_param( &self, req: &DayTradeParamRequest, opts: Option<RequestOptions>, ) -> Result<Vec<TradeParam>>
Get daily trading parameters.
Returns margin rates, price limits, etc. for a variety.
§Arguments
req- Request with variety_id, trade_type, and langopts- Optional request options
Sourcepub async fn get_month_trade_param(
&self,
opts: Option<RequestOptions>,
) -> Result<HashMap<String, Value>>
pub async fn get_month_trade_param( &self, opts: Option<RequestOptions>, ) -> Result<HashMap<String, Value>>
Sourcepub async fn get_contract_info(
&self,
req: &ContractInfoRequest,
opts: Option<RequestOptions>,
) -> Result<Vec<ContractInfo>>
pub async fn get_contract_info( &self, req: &ContractInfoRequest, opts: Option<RequestOptions>, ) -> Result<Vec<ContractInfo>>
Get contract information.
Returns contract details including trading dates, unit, tick, etc.
§Arguments
req- Request with variety_id, trade_type, and langopts- Optional request options
Sourcepub async fn get_arbitrage_contract(
&self,
lang: Option<&str>,
opts: Option<RequestOptions>,
) -> Result<Vec<ArbitrageContract>>
pub async fn get_arbitrage_contract( &self, lang: Option<&str>, opts: Option<RequestOptions>, ) -> Result<Vec<ArbitrageContract>>
Get arbitrage contracts.
Returns available spread/arbitrage trading contracts.
§Arguments
lang- Language (“zh” or “en”), defaults to “zh”opts- Optional request options
Trait Implementations§
Source§impl Clone for TradeService
impl Clone for TradeService
Source§fn clone(&self) -> TradeService
fn clone(&self) -> TradeService
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TradeService
impl !RefUnwindSafe for TradeService
impl Send for TradeService
impl Sync for TradeService
impl Unpin for TradeService
impl !UnwindSafe for TradeService
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