Share Reservation Application
ReserveStock
Version
Available in v2.2.9 and later.
Usage limits
- Applications are accepted on trading days from 08:00 to 14:30. Requests outside this window are rejected by the backend.
- An application cannot be cancelled through the API after it is submitted.
- For the complete workflow, see Reservations and Transfers.
Parameters
| Field | Type | Description |
|---|---|---|
| account | Account | Account |
| stock_no | string | Stock symbol |
| quantity | int | Number of shares to reserve. Unit: shares (1 lot = 1,000 shares); must be greater than 0 |
Result
| Field | Type | Description |
|---|---|---|
| is_success | bool | Whether the request succeeded |
| data | ReserveStockRecord | Share reservation application details |
| message | string | Error message when is_success is false |
Share reservation record: ReserveStockRecord fields
Return type : Object
| Field | Type | Description |
|---|---|---|
| seq_no | string | Sequence number |
| stock_no | string | Stock symbol |
| reserved_share | int | Shares reserved in this request |
Request example
auto reserve_stock_response = sdk->stock->reserve_stock(target_account, "2330", 599);
// Output using custom .cpp and .hpp helpers
if (!reserve_stock_response.is_success) {
std::cout << "reserve stock failed reason: "
<< (reserve_stock_response.message.has_value() ? reserve_stock_response.message.value() : "No message")
<< std::endl;
}
else {
if (reserve_stock_response.data.has_value()) {
std::cout << reserve_stock_response.data.value() << std::endl;
}
else {
std::cout << "Reserve stock success but no data returned." << std::endl;
}
}
Response example
// Output using custom .cpp and .hpp helpers
[ReserveStockRecord]
seq_no: 417106 // Sequence number (string)
stock_no: 2330 // Stock symbol (string)
reserved_share: 599 // Shares reserved in this request (int)