Option Exercise
Submit Option Exercise
Signature
pub async fn submit_option_exercise(&self, mut req: OptionExerciseSubmitRequest) -> Result<Option<bool>, TigerError>Description
Submit an option exercise or expiry handling request.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.secret_key | Option<String> | Optional | None (omitted) |
| req.contract_id | Option<i64> | Required by the server; not prevalidated by the SDK | None (omitted) |
| req.exercise_type | Option<String> | Required by the server; legal values: Exercise, Expire; not prevalidated by the SDK | None (omitted) |
| req.quantity | Option<f64> | Required by the server; not prevalidated by the SDK | None (omitted) |
| req.executing_date | Option<String> | Required for Exercise; format yyyy-MM-dd | None (omitted) |
| req.is_force | Option<bool> | Required for Exercise | None (omitted) |
| req.itm_rate | Option<i32> | Required for Expire; range 0..10 | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Response
Result<Option<bool>, TigerError> — Some(true) indicates the request was accepted.
Example
use tigeropen::model::trade_requests::OptionExerciseSubmitRequest;
let success = trade.submit_option_exercise(OptionExerciseSubmitRequest {
contract_id: Some(55678),
exercise_type: Some("Exercise".into()),
quantity: Some(1.0),
executing_date: Some("2026-09-19".into()),
is_force: Some(false),
..Default::default()
}).await?;Response example
trueRate limit
The base rate limit is 60 requests/min.
Cancel Option Exercise
Signature
pub async fn cancel_option_exercise(&self, mut req: OptionExerciseCancelRequest) -> Result<Option<bool>, TigerError>Description
Cancel a submitted exercise record. Only records in New status can be cancelled.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.secret_key | Option<String> | Optional | None (omitted) |
| req.id | Option<i64> | Required by the server; not prevalidated by the SDK | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Response
Result<Option<bool>, TigerError> — Some(true) indicates cancellation was successful.
Example
use tigeropen::model::trade_requests::OptionExerciseCancelRequest;
let cancelled = trade.cancel_option_exercise(OptionExerciseCancelRequest {
id: Some(12345),
..Default::default()
}).await?;Response example
trueRate limit
The base rate limit is 60 requests/min.
Option Exercise Check
Signature
pub async fn option_exercise_check(&self, mut req: OptionExerciseCheckRequest) -> Result<Option<OptionExerciseCheckResult>, TigerError>Description
Check whether an option exercise is feasible.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.secret_key | Option<String> | Optional | None (omitted) |
| req.contract_id | Option<i64> | Required by the server; not prevalidated by the SDK | None (omitted) |
| req.exercise_type | Option<String> | Required by the server; legal values: Exercise, Expire; not prevalidated by the SDK | None (omitted) |
| req.quantity | Option<f64> | Required by the server; not prevalidated by the SDK | None (omitted) |
| req.executing_date | Option<String> | Recommended for Exercise; format yyyy-MM-dd | None (omitted) |
| req.is_force | Option<bool> | Recommended for Exercise | None (omitted) |
| req.itm_rate | Option<i32> | Optional for Expire; range 0..10 | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Response
Result<Option<OptionExerciseCheckResult>, TigerError>; empty data becomes None. Fields are available_quantity, position, stk_position, stk_position_change, stk_position_before, stk_position_after, and symbol.
| Field | Rust type | Description |
|---|---|---|
| available_quantity | f64 | Available exercise quantity |
| position | f64 | Option position quantity |
| stk_position | f64 | Current underlying-stock position quantity |
| stk_position_change | f64 | Underlying-stock position change caused by exercise or expiry handling |
| stk_position_before | f64 | Underlying-stock position quantity before handling |
| stk_position_after | f64 | Underlying-stock position quantity after handling |
| symbol | String | Underlying symbol |
Example
use tigeropen::model::trade_requests::OptionExerciseCheckRequest;
let ok = trade.option_exercise_check(OptionExerciseCheckRequest {
contract_id: Some(55678),
exercise_type: Some("Exercise".into()),
quantity: Some(1.0),
executing_date: Some("2026-09-19".into()),
..Default::default()
}).await?;
if let Some(check) = ok {
println!(
"available={} option_position={} stock_position={} stock_change={} before={} after={} symbol={}",
check.available_quantity,
check.position,
check.stk_position,
check.stk_position_change,
check.stk_position_before,
check.stk_position_after,
check.symbol
);
}Response example
{"availableQuantity":2.0,"position":2.0,"stkPosition":0.0,"stkPositionChange":200.0,"stkPositionBefore":0.0,"stkPositionAfter":200.0,"symbol":"AAPL"}Rate limit
The base rate limit is 60 requests/min.
Get Option Exercise Positions
Signature
pub async fn get_option_exercise_positions(&self, mut req: OptionExercisePositionRequest) -> Result<Option<OptionExercisePositionPageResult>, TigerError>Description
Get exercisable option positions.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.secret_key | Option<String> | Optional | None (omitted) |
| req.exercise_type | Option<String> | Required by the server; legal values: Exercise, Expire | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Response
| Field | Type | Description |
|---|---|---|
| page_num | i32 | Current page |
| page_size | i32 | Page size |
| item_count | i32 | Total records |
| page_count | i32 | Total pages |
| items | Vec<OptionExercisePosition> | Positions |
items elements (OptionExercisePosition):
| Field | Type | Description |
|---|---|---|
| contract_id | i64 | Contract ID |
| symbol | String | Option symbol |
| stk_symbol | String | Underlying symbol |
| expire_date | String | Expiration date |
| strike | String | Strike price |
| call_put | String | CALL/PUT |
| market | String | Market |
| account_id | i64 | Account ID |
| position | f64 | Position quantity |
| available_quantity | f64 | Exercisable quantity |
Example
use tigeropen::model::trade_requests::OptionExercisePositionRequest;
let positions = trade.get_option_exercise_positions(
OptionExercisePositionRequest {
exercise_type: Some("Exercise".into()),
..Default::default()
}
).await?;
if let Some(page) = positions {
for p in &page.items { println!("{} {} strike={} qty={}", p.symbol, p.call_put, p.strike, p.position); }
}Response Example
{"pageNum":1,"pageSize":20,"itemCount":1,"pageCount":1,"items":[{"contractId":55678,"symbol":"AAPL","stkSymbol":"AAPL","expireDate":"20260919","strike":"200","callPut":"CALL","market":"US","accountId":123,"position":2.0,"availableQuantity":2.0}]}Rate limit
The base rate limit is 60 requests/min.
Get Option Exercise Records
Signature
pub async fn get_option_exercise_records(&self, mut req: OptionExerciseRecordsRequest) -> Result<Option<OptionExerciseRecordPageResult>, TigerError>Description
Get historical exercise/expiry records.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.secret_key | Option<String> | Optional | None (omitted) |
| req.page | Option<i32> | Optional; starts at 1 | Server default: 1 |
| req.size | Option<i32> | Optional; range 1–100 | Server default: 20 |
| req.status | Option<String> | Optional; legal values: New, Cancel, Success, Fail | None (omitted) |
| req.exercise_type | Option<String> | Optional; legal values: Exercise, Expire | None (omitted) |
| req.symbol | Option<String> | Optional | None (omitted) |
| req.order_by | Option<String> | Optional; legal values: symbol, expire_date, strike, is_call | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Response
Result<Option<OptionExerciseRecordPageResult>, TigerError>; empty data becomes None.
| Field | Type | Description |
|---|---|---|
| page_num | i32 | Current page |
| page_size | i32 | Page size |
| item_count | i32 | Total records |
| page_count | i32 | Total pages |
| items | Vec<OptionExerciseRecord> | Exercise records |
items elements (OptionExerciseRecord):
| Field | Type | Description |
|---|---|---|
| id | i64 | Record ID |
| contract_id | i64 | Contract ID |
| symbol | String | Symbol |
| stk_symbol | String | Underlying symbol |
| expire_date | String | Expiration date |
| strike | String | Strike price |
| call_put | String | CALL/PUT |
| exercise_type | String | Exercise/Expire; JSON field: type |
| request_quantity | f64 | Requested quantity |
| quantity | f64 | Exercise quantity |
| status | String | Status |
| executing_date | String | Execution date |
| itm_rate | i32 | In-the-money rate |
| is_force | bool | Force-exercise flag |
| reason | String | Reason |
| account_id | i64 | Account ID |
Example
use tigeropen::model::trade_requests::OptionExerciseRecordsRequest;
let records = trade.get_option_exercise_records(
OptionExerciseRecordsRequest::default()
).await?;
if let Some(page) = records {
for r in &page.items { println!("{} {} qty={} status={}", r.symbol, r.exercise_type, r.quantity, r.status); }
}Response Example
{"pageNum":1,"pageSize":20,"itemCount":1,"pageCount":1,"items":[{"id":12345,"contractId":55678,"symbol":"AAPL","stkSymbol":"AAPL","expireDate":"20260919","strike":"200","callPut":"CALL","type":"Exercise","requestQuantity":1.0,"quantity":1.0,"status":"New","executingDate":"2026-09-19","itmRate":0,"isForce":false,"reason":"","accountId":123}]}Rate limit
The base rate limit is 60 requests/min.
Updated about 1 month ago
