开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Decimal remaining value retrival


 

Hello Folks,

Is is possible to get Decimal remaining value?
in the below callback

//! [execdetails]
void execDetails(int reqId, const Contract& contract, const Execution& execution) {
? printf("ExecDetails. ReqId: %d - %s, %s, %s - %s, %s, %s, %s, %s\n", reqId, contract.symbol.c_str(),
? ? ? ? ?contract.secType.c_str(), contract.currency.c_str(), execution.execId.c_str(),
? ? ? ? ?longMaxString(execution.orderId).c_str(), decimalStringToDisplay(execution.shares).c_str(),
? ? ? ? ?decimalStringToDisplay(execution.cumQty).c_str(), intMaxString(execution.lastLiquidity).c_str());


like we receive in Order Status callback
void orderStatus(OrderId orderId, const std::string& status, Decimal filled, Decimal remaining,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?double avgFillPrice, int permId, int parentId, double lastFillPrice, int clientId,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const std::string& whyHeld, double mktCapPrice) {
? printf(
? ? ? "OrderStatus. Id: %ld, Status: %s, Filled: %s, Remaining: %s, AvgFillPrice: %s, PermId: %s, LastFillPrice: %s, "
? ? ? "ClientId: %s, WhyHeld: %s, MktCapPrice: %s\n",
? ? ? orderId, status.c_str(), decimalStringToDisplay(filled).c_str(), decimalStringToDisplay(remaining).c_str(),
? ? ? doubleMaxString(avgFillPrice).c_str(), intMaxString(permId).c_str(), doubleMaxString(lastFillPrice).c_str(),
? ? ? intMaxString(clientId).c_str(), whyHeld.c_str(), doubleMaxString(mktCapPrice).c_str());


I wan't to get? decimalStringToDisplay(remaining).c_str() in ?execdetails callback.

Thanks.

Join [email protected] to automatically receive all group messages.