diff --git a/include/ccapi_cpp/ccapi_macro.h b/include/ccapi_cpp/ccapi_macro.h index 588a33a3..2cfcdcdb 100644 --- a/include/ccapi_cpp/ccapi_macro.h +++ b/include/ccapi_cpp/ccapi_macro.h @@ -265,6 +265,9 @@ #ifndef CCAPI_ORDER_QUANTITY_MIN #define CCAPI_ORDER_QUANTITY_MIN "QUANTITY_MIN" #endif +#ifndef CCAPI_ORDER_QUANTITY_MAX +#define CCAPI_ORDER_QUANTITY_MAX "QUANTITY_MAX" +#endif #ifndef CCAPI_ORDER_PRICE_TIMES_QUANTITY_MIN #define CCAPI_ORDER_PRICE_TIMES_QUANTITY_MIN "PRICE_TIMES_QUANTITY_MIN" #endif @@ -538,6 +541,9 @@ #ifndef CCAPI_EM_POSITION_LEVERAGE #define CCAPI_EM_POSITION_LEVERAGE "LEVERAGE" #endif +#ifndef CCAPI_EM_UNREALIZED_PNL +#define CCAPI_EM_UNREALIZED_PNL "UNREALIZED_PNL" +#endif #ifndef CCAPI_HTTP_STATUS_CODE #define CCAPI_HTTP_STATUS_CODE "HTTP_STATUS_CODE" #endif diff --git a/include/ccapi_cpp/service/ccapi_execution_management_service_binance_derivatives_base.h b/include/ccapi_cpp/service/ccapi_execution_management_service_binance_derivatives_base.h index 611f47a3..41bfe1cd 100644 --- a/include/ccapi_cpp/service/ccapi_execution_management_service_binance_derivatives_base.h +++ b/include/ccapi_cpp/service/ccapi_execution_management_service_binance_derivatives_base.h @@ -45,6 +45,7 @@ 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()); elementList.emplace_back(std::move(element)); } } break; diff --git a/include/ccapi_cpp/service/ccapi_market_data_service_binance_derivatives_base.h b/include/ccapi_cpp/service/ccapi_market_data_service_binance_derivatives_base.h index bd9d5b0e..947f9997 100644 --- a/include/ccapi_cpp/service/ccapi_market_data_service_binance_derivatives_base.h +++ b/include/ccapi_cpp/service/ccapi_market_data_service_binance_derivatives_base.h @@ -45,6 +45,9 @@ class MarketDataServiceBinanceDerivativesBase : public MarketDataServiceBinanceB } } void extractInstrumentInfo(Element& element, const rj::Value& x) { + element.insert(CCAPI_INSTRUMENT, x["symbol"].GetString()); + element.insert(CCAPI_BASE_ASSET, x["baseAsset"].GetString()); + element.insert(CCAPI_QUOTE_ASSET, x["quoteAsset"].GetString()); element.insert(CCAPI_INSTRUMENT, x["symbol"].GetString()); element.insert(CCAPI_MARGIN_ASSET, x["marginAsset"].GetString()); element.insert(CCAPI_UNDERLYING_SYMBOL, x["pair"].GetString()); @@ -55,6 +58,7 @@ class MarketDataServiceBinanceDerivativesBase : public MarketDataServiceBinanceB } else if (filterType == "LOT_SIZE") { element.insert(CCAPI_ORDER_QUANTITY_INCREMENT, y["stepSize"].GetString()); element.insert(CCAPI_ORDER_QUANTITY_MIN, y["minQty"].GetString()); + element.insert(CCAPI_ORDER_QUANTITY_MAX, y["maxQty"].GetString()); } else if (filterType == "MIN_NOTIONAL") { element.insert(CCAPI_ORDER_PRICE_TIMES_QUANTITY_MIN, y["notional"].GetString()); }