Inventory Inquiry
inventories
Input Parameters
| Parameter | Type | Description |
|---|---|---|
| account | Account | Account number |
Return Result
| Parameter | Type | Description |
|---|---|---|
| is_success | bool | Success status |
| data | BankRemain | Returns balance information |
| message | string | Returns error message when is_success = False |
Inventory Fields
Return type : Object
| Parameter | Type | Description |
|---|---|---|
| > date | string | Trade Date |
| > account | string | Account number |
| > branch_no | string | Branch code |
| > stock_no | string | Stock symbol |
| > order_type | OrderType | Order Type: STOCK, MARGIN, SHORT, DAY_TRADE, SBL |
| > lastday_qty | int | Previous Day Balance |
| > buy_qty | int | Today's Buy Order Qty |
| > buy_filled_qty | int | Today's Buy Filled Qty |
| > buy_value | int | Buy Value |
| > today_qty | int | Today's Balance |
| > tradable_qty | int | Tradable Quantity |
| > sell_qty | int | Today's Sell Order Qty |
| > sell_filled_qty | int | Today's Sell Filled Qty |
| > sell_value | int | Sell Value |
| > odd | list | Object |
| >> lastday_qty | int | Previous Day Balance |
| >> buy_qty | int | Today's Buy Order Qty |
| >> buy_filled_qty | int | Today's Buy Filled Qty |
| >> buy_value | int | Buy Value |
| >> today_qty | int | Today's Balance |
| >> tradable_qty | int | Tradable Quantity |
| >> sell_qty | int | Today's Sell Order Qty |
| >> sell_filled_qty | int | Today's Sell Filled Qty |
| >> sell_value | int | Sell Value |
Request Example
auto inventories_response = sdk->accounting->inventories(target_account);
if (!inventories_response.is_success) {
std::cerr << "Inventories query failed: "
<< (inventories_response.message.has_value() ? inventories_response.message.value() : "No message")
<< std::endl;
}
// With custom .cpp & hpp Output
else if (inventories_response.data.has_value()) {
const auto& inventories = inventories_response.data.value();
for (const auto& inventory : inventories) {
std::cout << inventory << std::endl;
}
}
else {
std::cout << "Inventories query succeeded but no data returned." << std::endl;
}
Response Example
{
isSuccess = true,
message = ,
data = [
Inventory{
date = 2023/10/13, // Trade Date (string)
account = 26, // Account Number (string)
branchNo = 6460, // Branch Code (string)
stockNo = 1101, // Stock Symbol (string)
orderType = STOCK, // Order Type (OrderType)
lastdayQty = 2000, // Previous Day Balance (int)
buyQty = 0, // Today's Buy Order Qty (int)
buyFilledQty = 0, // Today's Buy Filled Qty (int)
buyValue = 0, // Buy Value (int)
todayQty = 2000, // Today's Balance (int)
tradableQty = 2000, // Tradable Qty (int)
sellQty = 0, // Today's Sell Order Qty (int)
sellFilledQty = 0, // Today's Sell Filled Qty (int)
sellValue = 0, // Sell Value (int)
odd = InventoryOdd { // Odd Lot Object
lastdayQty = 0, // Previous Day Balance (int)
buyQty = 0, // Today's Buy Order Qty (int)
buyFilledQty = 0, // Today's Buy Filled Qty (int)
buyValue = 0, // Buy Value (int)
todayQty = 0, // Today's Balance (int)
tradableQty = 0, // Tradable Qty (int)
sellQty = 0, // Today's Sell Order Qty (int)
sellFilledQty = 0, // Today's Sell Filled Qty (int)
sellValue = 0 // Sell Value (int)
}
},
...
]
}