Skip to main content

Inventory Inquiry

inventories

Input Parameters

ParameterTypeDescription
accountAccountAccount number

Return Result

ParameterTypeDescription
is_successboolSuccess status
dataBankRemainReturns balance information
messagestringReturns error message when is_success = False

Inventory Fields

Return type : Object

ParameterTypeDescription
> datestringTrade Date
> accountstringAccount number
> branch_nostringBranch code
> stock_nostringStock symbol
> order_typeOrderTypeOrder Type: STOCK, MARGIN, SHORT, DAY_TRADE, SBL
> lastday_qtyintPrevious Day Balance
> buy_qtyintToday's Buy Order Qty
> buy_filled_qtyintToday's Buy Filled Qty
> buy_valueintBuy Value
> today_qtyintToday's Balance
> tradable_qtyintTradable Quantity
> sell_qtyintToday's Sell Order Qty
> sell_filled_qtyintToday's Sell Filled Qty
> sell_valueintSell Value
> oddlistObject
>> lastday_qtyintPrevious Day Balance
>> buy_qtyintToday's Buy Order Qty
>> buy_filled_qtyintToday's Buy Filled Qty
>> buy_valueintBuy Value
>> today_qtyintToday's Balance
>> tradable_qtyintTradable Quantity
>> sell_qtyintToday's Sell Order Qty
>> sell_filled_qtyintToday's Sell Filled Qty
>> sell_valueintSell 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)
}
},
...
]
}