Warrants
Get Warrant Filter
Signature
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 the server; not prevalidated by the SDK | 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>.
WarrantFilterResult fields:
| Field | Rust type | Description |
|---|---|---|
| total | i32 | Total result count |
| items | Vec<WarrantBrief> | Warrant list |
| page_size | i32 | Results per page |
| page | i32 | Page number |
Each WarrantBrief in items:
| Field | Rust type | Description |
|---|---|---|
| symbol | String | Warrant symbol |
| name | String | Name |
| latest_price | f64 | Latest price |
| change | f64 | Price change |
| change_rate | f64 | Change rate |
| volume | i64 | Volume |
| amount | f64 | Turnover |
| underlying | String | Underlying symbol |
| issuer | String | Issuer |
| expiry_date | String | Expiry date |
| strike_price | f64 | Strike price |
| warrant_type | String | Warrant type |
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",
"latestPrice": 0.285,
"change": 0.015,
"changeRate": 0.0556,
"volume": 8500000,
"underlying": "00700"
}
],
"pageSize": 20,
"page": 1
}Rate limit
The base rate limit is 60 requests/min.
Get Warrant Quote
Signature
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. Both Rust methods send thewarrant_briefswire method; the current server registers onlywarrant_real_time_quote, so this wire call is unsupported. New code should useget_warrant_quote, but renaming the SDK call does not bypass this server limitation.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.symbols | Option<Vec<String>> | Required by the server; not prevalidated by the SDK | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Return
QuoteClient: Result<Vec<WarrantBrief>, TigerError>.
Each WarrantBrief:
| Field | Rust type | Description |
|---|---|---|
| symbol | String | Warrant symbol |
| name | String | Name |
| latest_price | f64 | Latest price |
| change | f64 | Price change |
| change_rate | f64 | Change rate |
| volume | i64 | Volume |
| amount | f64 | Turnover |
| underlying | String | Underlying symbol |
| issuer | String | Issuer |
| expiry_date | String | Expiry date |
| strike_price | f64 | Strike price |
| warrant_type | String | Warrant type |
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",
"latestPrice": 0.285,
"change": 0.015,
"changeRate": 0.0556,
"volume": 8500000,
"amount": 2422500.0,
"underlying": "00700"
}
]Updated about 1 month ago
