Skip to content

Commit

Permalink
fix: extract account info in binance derivatives error
Browse files Browse the repository at this point in the history
  • Loading branch information
MrrDrr committed Dec 11, 2023
1 parent 2eb0ab2 commit 573d078
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ class ExecutionManagementServiceBinanceDerivativesBase : public ExecutionManagem
element.insert(CCAPI_EM_POSITION_QUANTITY, positionAmt);
element.insert(CCAPI_EM_POSITION_ENTRY_PRICE, x["entryPrice"].GetString());
element.insert(CCAPI_EM_POSITION_LEVERAGE, x["leverage"].GetString());
element.insert(CCAPI_EM_UNREALIZED_PNL, x["unrealizedProfit"].GetString());
if (x.HasMember("unrealizedProfit")) {
element.insert(CCAPI_EM_UNREALIZED_PNL, x["unrealizedProfit"].GetString());
} else {
element.insert(CCAPI_EM_UNREALIZED_PNL, x["unRealizedProfit"].GetString());
}
element.insert(CCAPI_LAST_UPDATED_TIME_SECONDS, UtilTime::convertMillisecondsStrToSecondsStr(x["updateTime"].GetString()));
elementList.emplace_back(std::move(element));
}
Expand Down

0 comments on commit 573d078

Please sign in to comment.