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

ParameterRust typeRequirementSDK default
req.symbolOption<String>Required by server; SDK does not pre-validateNone (omitted)
req.pageOption<i32>OptionalNone (omitted)
req.page_sizeOption<i32>OptionalNone (omitted)
req.sort_field_nameOption<String>OptionalNone (omitted)
req.sort_dirOption<String>OptionalNone (omitted)
req.issuer_nameOption<String>OptionalNone (omitted)
req.expire_ymOption<String>OptionalNone (omitted)
req.langOption<String>OptionalNone (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

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_briefs forwards to this method and has been marked #[deprecated] in the SDK since 0.5.1. It adds no behavior. Use get_warrant_quote in new code.

Parameters

ParameterRust typeRequirementSDK default
req.symbolsOption<Vec<String>>Required by server; SDK does not pre-validateNone (omitted)
req.langOption<String>OptionalNone (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"
  }
]


Did this page help you?