From b4b4b7956ea7dbe8df0f0392a2dbd9c21430019f Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 23 Oct 2023 20:23:44 +0000 Subject: [PATCH] dev: add cumulative fee quantity --- include/ccapi_cpp/ccapi_macro.h | 3 +++ .../ccapi_execution_management_service_bybit_derivatives.h | 1 + .../ccapi_cpp/service/ccapi_execution_management_service_okx.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/include/ccapi_cpp/ccapi_macro.h b/include/ccapi_cpp/ccapi_macro.h index 384e36f6..bdec712d 100644 --- a/include/ccapi_cpp/ccapi_macro.h +++ b/include/ccapi_cpp/ccapi_macro.h @@ -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 diff --git a/include/ccapi_cpp/service/ccapi_execution_management_service_bybit_derivatives.h b/include/ccapi_cpp/service/ccapi_execution_management_service_bybit_derivatives.h index 24e43c0a..90cf73fa 100644 --- a/include/ccapi_cpp/service/ccapi_execution_management_service_bybit_derivatives.h +++ b/include/ccapi_cpp/service/ccapi_execution_management_service_bybit_derivatives.h @@ -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()) { diff --git a/include/ccapi_cpp/service/ccapi_execution_management_service_okx.h b/include/ccapi_cpp/service/ccapi_execution_management_service_okx.h index 008455e6..8a1be47f 100644 --- a/include/ccapi_cpp/service/ccapi_execution_management_service_okx.h +++ b/include/ccapi_cpp/service/ccapi_execution_management_service_okx.h @@ -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);