Skip to content

Commit

Permalink
Merge pull request #455 from MrrDrr/develop
Browse files Browse the repository at this point in the history
fix: extract account info in binance derivatives error
  • Loading branch information
cryptochassis authored Dec 12, 2023
2 parents 2eb0ab2 + 573d078 commit 8956581
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 8956581

Please sign in to comment.