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
Sourcepub async fn get_trading_param(
&self,
lang: Option<&str>,
opts: Option<RequestOptions>,
) -> Result<Vec<TradingParam>>
pub async fn get_trading_param( &self, lang: Option<&str>, opts: Option<RequestOptions>, ) -> Result<Vec<TradingParam>>
Get trading parameters by variety.
Returns comprehensive trading parameters including margins, fees, limits for all varieties.
§Arguments
lang- Language (“zh” or “en”), defaults to “zh”opts- Optional request options
Sourcepub async fn get_margin_arbi_perf_para(
&self,
req: &MarginArbiPerfParaRequest,
opts: Option<RequestOptions>,
) -> Result<Vec<MarginArbiPerfPara>>
pub async fn get_margin_arbi_perf_para( &self, req: &MarginArbiPerfParaRequest, opts: Option<RequestOptions>, ) -> Result<Vec<MarginArbiPerfPara>>
Get margin arbitrage performance parameters.
Returns margin requirements and fees for arbitrage strategies.
§Arguments
req- Request with variety_idopts- Optional request options
Sourcepub async fn get_new_contract_info(
&self,
req: &NewContractInfoRequest,
opts: Option<RequestOptions>,
) -> Result<Vec<NewContractInfo>>
pub async fn get_new_contract_info( &self, req: &NewContractInfoRequest, opts: Option<RequestOptions>, ) -> Result<Vec<NewContractInfo>>
Get new contract information (newly listed contracts).
Returns information about futures/options contracts that were recently added.
§Arguments
req- Request with variety_id, trade_type, and contract_monthopts- Optional request options
Sourcepub async fn get_main_series_info(
&self,
req: &MainSeriesInfoRequest,
opts: Option<RequestOptions>,
) -> Result<Vec<MainSeriesInfo>>
pub async fn get_main_series_info( &self, req: &MainSeriesInfoRequest, opts: Option<RequestOptions>, ) -> Result<Vec<MainSeriesInfo>>
Get main series information (market maker continuous quote contracts).
Returns contracts designated for market maker continuous quoting.
§Arguments
req- Request with variety_id and trade_typeopts- Optional request options
Trait Implementations§
Source§impl Clone for TradeService
impl Clone for TradeService
Source§fn clone(&self) -> TradeService
fn clone(&self) -> TradeService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more