Skip to content

Commit

Permalink
dev: add cumulative fee quantity
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptochassis committed Oct 23, 2023
1 parent bd067b0 commit b4b4b79
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/ccapi_cpp/ccapi_macro.h
Expand Up @@ -442,6 +442,9 @@
#ifndef CCAPI_EM_ORDER_FEE_QUANTITY
#define CCAPI_EM_ORDER_FEE_QUANTITY "FEE_QUANTITY"
#endif
#ifndef CCAPI_EM_ORDER_CUMULATIVE_FEE_QUANTITY
#define CCAPI_EM_ORDER_CUMULATIVE_FEE_QUANTITY "CUMULATIVE_FEE_QUANTITY"
#endif
#ifndef CCAPI_EM_ORDER_FEE_ASSET
#define CCAPI_EM_ORDER_FEE_ASSET "FEE_ASSET"
#endif
Expand Down
Expand Up @@ -198,6 +198,7 @@ class ExecutionManagementServiceBybitDerivatives : public ExecutionManagementSer
{CCAPI_EM_ORDER_REMAINING_QUANTITY, std::make_pair("leavesQty", JsonDataType::STRING)},
{CCAPI_EM_ORDER_STATUS, std::make_pair("orderStatus", JsonDataType::STRING)},
{CCAPI_EM_ORDER_INSTRUMENT, std::make_pair("symbol", JsonDataType::STRING)},
{CCAPI_EM_ORDER_CUMULATIVE_FEE_QUANTITY, std::make_pair("cumExecFee", JsonDataType::STRING)},
};
if (operation == Request::Operation::GET_ORDER || operation == Request::Operation::GET_OPEN_ORDERS || operation == Request::Operation::CANCEL_OPEN_ORDERS) {
for (const auto& x : document["result"]["list"].GetArray()) {
Expand Down
Expand Up @@ -522,6 +522,8 @@ class ExecutionManagementServiceOkx : public ExecutionManagementService {
{CCAPI_EM_ORDER_CUMULATIVE_FILLED_QUANTITY, std::make_pair("accFillSz", JsonDataType::STRING)},
{CCAPI_EM_ORDER_AVERAGE_FILLED_PRICE, std::make_pair("avgPx", JsonDataType::STRING)},
{CCAPI_EM_ORDER_STATUS, std::make_pair("state", JsonDataType::STRING)},
{CCAPI_EM_ORDER_CUMULATIVE_FEE_QUANTITY, std::make_pair("fee", JsonDataType::STRING)},
{CCAPI_EM_ORDER_FEE_ASSET, std::make_pair("feeCcy", JsonDataType::STRING)},
};
Element info;
this->extractOrderInfo(info, x, extractionFieldNameMap);
Expand Down

0 comments on commit b4b4b79

Please sign in to comment.