Warrants
get_warrant_filter
get_warrant_filterSignature
pub async fn get_warrant_filter( &self, req: WarrantFilterRequest, ) -> Result<Option<WarrantFilterResult>, TigerError>
Description
symbol required; paging, sort, issuer, expiry month optional.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.symbol | Option<String> | Required by server; SDK does not pre-validate | None (omitted) |
| req.page | Option<i32> | Optional | None (omitted) |
| req.page_size | Option<i32> | Optional | None (omitted) |
| req.sort_field_name | Option<String> | Optional | None (omitted) |
| req.sort_dir | Option<String> | Optional | None (omitted) |
| req.issuer_name | Option<String> | Optional | None (omitted) |
| req.expire_ym | Option<String> | Optional | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Return
QuoteClient:Result<Option<WarrantFilterResult>, TigerError>. total: i32, items: Vec
Filter result.
Example
use std::sync::Arc;
use tigeropen::client::http_client::HttpClient;
use tigeropen::config::ClientConfig;
use tigeropen::error::TigerError;
use tigeropen::model::order::*;
use tigeropen::model::quote::*;
use tigeropen::model::quote_requests::*;
use tigeropen::model::trade_requests::*;
use tigeropen::push::*;
use tigeropen::quote::QuoteClient;
use tigeropen::trade::TradeClient;
async fn example_get_warrant_filter(config: ClientConfig, quote: &QuoteClient, trade: &TradeClient, push: &Arc<PushClient>) -> Result<(), TigerError> {
let result_0 = quote.get_warrant_filter(WarrantFilterRequest { symbol: Some("AAPL".into()), ..Default::default() }).await?;
Ok(())
}
Response example
{
"total": 128,
"items": [
{
"symbol": "13412",
"name": "TENCENT C2506A",
"latest_price": 0.285,
"change": 0.015,
"change_rate": 0.0556,
"volume": 8500000,
"underlying": "00700"
}
],
"page_size": 20,
"page": 1
}get_warrant_quote
get_warrant_quoteSignature
pub async fn get_warrant_quote( &self, req: WarrantQuoteRequest, ) -> Result<Vec<WarrantBrief>, TigerError>
Description
Symbols and HK derivative permission required.
Deprecated alias:
get_warrant_briefsforwards to this method and has been marked#[deprecated]in the SDK since 0.5.1. It adds no behavior. Useget_warrant_quotein new code.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.symbols | Option<Vec<String>> | Required by server; SDK does not pre-validate | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Return
QuoteClient:Result<Vec<WarrantBrief>, TigerError>. symbol: String, name: String, latest_price: f64, change: f64, change_rate: f64, volume: i64, amount: f64, underlying: String, issuer: String, expiry_date: String, strike_price: f64, warrant_type: String.
Quote and issuer/underlying/expiry.
Example
use std::sync::Arc;
use tigeropen::client::http_client::HttpClient;
use tigeropen::config::ClientConfig;
use tigeropen::error::TigerError;
use tigeropen::model::order::*;
use tigeropen::model::quote::*;
use tigeropen::model::quote_requests::*;
use tigeropen::model::trade_requests::*;
use tigeropen::push::*;
use tigeropen::quote::QuoteClient;
use tigeropen::trade::TradeClient;
async fn example_get_warrant_quote(config: ClientConfig, quote: &QuoteClient, trade: &TradeClient, push: &Arc<PushClient>) -> Result<(), TigerError> {
let result_0 = quote.get_warrant_quote(WarrantQuoteRequest { symbols: Some(vec!["12345".into()]), ..Default::default() }).await?;
Ok(())
}
Response example
[
{
"symbol": "13412",
"name": "TENCENT C2506A",
"latest_price": 0.285,
"change": 0.015,
"change_rate": 0.0556,
"volume": 8500000,
"amount": 2422500.0,
"underlying": "00700"
}
]Updated about 13 hours ago
Did this page help you?
