From e19e583000361d49773b34f22e817bac00585642 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:36:44 +0000 Subject: [PATCH 01/15] Initial plan From 8415a8fb06c75bd08541b4715bd633ce5dd32ac7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:48:03 +0000 Subject: [PATCH 02/15] Fix Windows OS build issues with CMake and DLL exports Co-authored-by: blackb1rd <2668486+blackb1rd@users.noreply.github.com> --- CMakeLists.txt | 9 +++++++++ src/CMakeLists.txt | 11 +++++++++-- src/binance.h | 13 ++++++++++++- src/binance_logger.h | 13 ++++++++++++- src/binance_websocket.cpp | 5 ++++- src/binance_websocket.h | 14 +++++++++++++- 6 files changed, 59 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cd5519..623b8d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,10 +13,19 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) if(APPLE) set(CMAKE_INSTALL_RPATH "@loader_path/../lib") +elseif(WIN32) + # On Windows, DLLs are found via PATH or same directory as executable + set(CMAKE_INSTALL_RPATH "") endif() # Options option(BINANCECPP_BUILD_EXAMPLES "Build examples" ON) +option(BINANCECPP_DEPLOY_MODE "Enable deployment mode, disables examples" OFF) + +# Deployment mode overrides examples setting +if(BINANCECPP_DEPLOY_MODE) + set(BINANCECPP_BUILD_EXAMPLES OFF CACHE BOOL "Deploy mode disables examples" FORCE) +endif() # Find packages diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0557f5f..95292bc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -23,12 +23,15 @@ set_target_properties(binancecpp PROPERTIES EXPORT_NAME binancecpp ) +# Define export macro for Windows DLL +target_compile_definitions(binancecpp PRIVATE BINANCECPP_EXPORTS) + # Link libraries target_link_libraries(binancecpp PRIVATE JsonCpp::JsonCpp CURL::libcurl - websockets + $,websockets,websockets_shared> ) # Include directories @@ -43,9 +46,13 @@ target_include_directories(binancecpp # Compiler-specific options for C++20 target_compile_options(binancecpp PRIVATE - -fPIC + # Position Independent Code for Unix systems only + $<$>:-fPIC> + # C++20 concepts support $<$:-fconcepts> $<$:-fconcepts-ts> + # Windows-specific options + $<$:/std:c++20> ) # Add alias for consistent naming diff --git a/src/binance.h b/src/binance.h index 70999a8..d704ee9 100644 --- a/src/binance.h +++ b/src/binance.h @@ -11,6 +11,17 @@ #ifndef BINANCE_CPP_H #define BINANCE_CPP_H +// Windows DLL export/import macros +#ifdef _WIN32 + #ifdef BINANCECPP_EXPORTS + #define BINANCECPP_API __declspec(dllexport) + #else + #define BINANCECPP_API __declspec(dllimport) + #endif +#else + #define BINANCECPP_API +#endif + #include #include @@ -46,7 +57,7 @@ concept Numeric = std::integral || std::floating_point; #include "financial_trading/spot_trading.h" #include "financial_trading/wallet.h" -class BinanceCPP +class BINANCECPP_API BinanceCPP { static std::string api_key; static std::string secret_key; diff --git a/src/binance_logger.h b/src/binance_logger.h index f541bf6..f2e6b33 100644 --- a/src/binance_logger.h +++ b/src/binance_logger.h @@ -1,6 +1,17 @@ #ifndef BINANCE_LOGGER_H #define BINANCE_LOGGER_H +// Windows DLL export/import macros +#ifdef _WIN32 + #ifdef BINANCECPP_EXPORTS + #define BINANCECPP_API __declspec(dllexport) + #else + #define BINANCECPP_API __declspec(dllimport) + #endif +#else + #define BINANCECPP_API +#endif + // Platform-specific includes #ifdef _WIN32 #include @@ -36,7 +47,7 @@ #define HAS_STD_FORMAT 0 #endif -class BinanceCPP_logger +class BINANCECPP_API BinanceCPP_logger { static int debug_level; static std::string debug_log_file; diff --git a/src/binance_websocket.cpp b/src/binance_websocket.cpp index 1a5dea9..f6f0b48 100644 --- a/src/binance_websocket.cpp +++ b/src/binance_websocket.cpp @@ -91,7 +91,10 @@ void BinanceCPP_websocket::init() void BinanceCPP_websocket::connect_endpoint(CB cb, std::string_view path) { char ws_path[1024]; - strcpy(ws_path, path.data()); + // Use safer string copy with bounds checking + size_t path_len = std::min(path.length(), sizeof(ws_path) - 1); + std::memcpy(ws_path, path.data(), path_len); + ws_path[path_len] = '\0'; /* Connect if we are not connected to the server. */ struct lws_client_connect_info ccinfo = {0}; diff --git a/src/binance_websocket.h b/src/binance_websocket.h index ef465f2..f8caa80 100644 --- a/src/binance_websocket.h +++ b/src/binance_websocket.h @@ -2,6 +2,17 @@ #ifndef BINANCE_WEBSOCKET_H #define BINANCE_WEBSOCKET_H +// Windows DLL export/import macros +#ifdef _WIN32 + #ifdef BINANCECPP_EXPORTS + #define BINANCECPP_API __declspec(dllexport) + #else + #define BINANCECPP_API __declspec(dllimport) + #endif +#else + #define BINANCECPP_API +#endif + // Modern C++20 headers #include #include @@ -10,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -25,7 +37,7 @@ constexpr int BINANCE_WS_PORT = 9443; // Modern C++20 callback type using std::function using CB = std::function; -class BinanceCPP_websocket +class BINANCECPP_API BinanceCPP_websocket { static struct lws_context *context; static struct lws_protocols protocols[]; From 392f61ce4f3bee1a7073a7f234249925f47656e3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 16 Aug 2025 16:22:40 +0000 Subject: [PATCH 03/15] Update Windows CMake presets to use Ninja generator with MSVC compiler Co-authored-by: blackb1rd <2668486+blackb1rd@users.noreply.github.com> --- CMakePresets.json | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 663faa3..0e81271 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -50,26 +50,32 @@ "name": "windows-debug", "inherits": "debug", "displayName": "Windows Debug", - "description": "Debug Windows build using vcpkg with Visual Studio", - "generator": "Visual Studio 17 2022", - "architecture": "x64", + "description": "Debug Windows build using vcpkg with Ninja and MSVC", + "generator": "Ninja", "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" + }, + "cacheVariables": { + "CMAKE_CXX_COMPILER": "cl", + "CMAKE_C_COMPILER": "cl" } }, { "name": "windows-release", "inherits": "release", "displayName": "Windows Release", - "description": "Release Windows build using vcpkg with Visual Studio", - "generator": "Visual Studio 17 2022", - "architecture": "x64", + "description": "Release Windows build using vcpkg with Ninja and MSVC", + "generator": "Ninja", "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" + }, + "cacheVariables": { + "CMAKE_CXX_COMPILER": "cl", + "CMAKE_C_COMPILER": "cl" } }, { @@ -132,13 +138,16 @@ "name": "windows-deploy", "inherits": "deploy", "displayName": "Windows Deploy", - "description": "Production Windows deployment build without examples", - "generator": "Visual Studio 17 2022", - "architecture": "x64", + "description": "Production Windows deployment build without examples using Ninja and MSVC", + "generator": "Ninja", "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" + }, + "cacheVariables": { + "CMAKE_CXX_COMPILER": "cl", + "CMAKE_C_COMPILER": "cl" } }, { From 7f15aebefb6dfe65a270802677d6fcecc8ff2f54 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 Aug 2025 11:25:04 +0000 Subject: [PATCH 04/15] Update Windows CMake presets to use cl.exe instead of cl for compiler definitions Co-authored-by: blackb1rd <2668486+blackb1rd@users.noreply.github.com> --- CMakePresets.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 0e81271..228d8f7 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -58,8 +58,8 @@ "rhs": "Windows" }, "cacheVariables": { - "CMAKE_CXX_COMPILER": "cl", - "CMAKE_C_COMPILER": "cl" + "CMAKE_CXX_COMPILER": "cl.exe", + "CMAKE_C_COMPILER": "cl.exe" } }, { @@ -74,8 +74,8 @@ "rhs": "Windows" }, "cacheVariables": { - "CMAKE_CXX_COMPILER": "cl", - "CMAKE_C_COMPILER": "cl" + "CMAKE_CXX_COMPILER": "cl.exe", + "CMAKE_C_COMPILER": "cl.exe" } }, { @@ -146,8 +146,8 @@ "rhs": "Windows" }, "cacheVariables": { - "CMAKE_CXX_COMPILER": "cl", - "CMAKE_C_COMPILER": "cl" + "CMAKE_CXX_COMPILER": "cl.exe", + "CMAKE_C_COMPILER": "cl.exe" } }, { From 0160f52f01331cdd41006b50239184fabd58b8ed Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 18 Aug 2025 05:38:04 +0000 Subject: [PATCH 05/15] Add ilammy/msvc-dev-cmd action for Windows MSVC setup Co-authored-by: blackb1rd <2668486+blackb1rd@users.noreply.github.com> --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1e70a6..b6783aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,10 @@ jobs: run: | choco install ninja + - name: Setup MSVC Developer Command Prompt (Windows) + if: runner.os == 'Windows' + uses: ilammy/msvc-dev-cmd@v1 + - name: Setup CMake and vcpkg uses: lukka/get-cmake@latest From e5a5208498edb36f7d5ee8db567838137e9778e0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 18 Aug 2025 16:20:11 +0000 Subject: [PATCH 06/15] Fix Windows build error by resolving header guard conflict Co-authored-by: blackb1rd <2668486+blackb1rd@users.noreply.github.com> --- src/binance.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/binance.h b/src/binance.h index d704ee9..64dead7 100644 --- a/src/binance.h +++ b/src/binance.h @@ -8,8 +8,8 @@ https://developers.binance.com/ */ -#ifndef BINANCE_CPP_H -#define BINANCE_CPP_H +#ifndef BINANCE_H_LEGACY +#define BINANCE_H_LEGACY // Windows DLL export/import macros #ifdef _WIN32 @@ -195,4 +195,4 @@ namespace binance_cpp // - financial_trading::copy_trading } // namespace binance_cpp -#endif // BINANCE_CPP_H +#endif // BINANCE_H_LEGACY From b4e825d99295b532b571f33c35e601dfbd198ade Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 19 Aug 2025 01:10:48 +0000 Subject: [PATCH 07/15] Fix Windows std::min compilation error by adding NOMINMAX definition Co-authored-by: blackb1rd <2668486+blackb1rd@users.noreply.github.com> --- src/binance_logger.h | 1 + src/binance_utils.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/binance_logger.h b/src/binance_logger.h index f2e6b33..d1b881d 100644 --- a/src/binance_logger.h +++ b/src/binance_logger.h @@ -14,6 +14,7 @@ // Platform-specific includes #ifdef _WIN32 +#define NOMINMAX // Prevent Windows min/max macros from conflicting with std::min/max #include #include #include diff --git a/src/binance_utils.h b/src/binance_utils.h index f657cf7..89af37c 100644 --- a/src/binance_utils.h +++ b/src/binance_utils.h @@ -6,6 +6,7 @@ // Cross-platform includes #ifdef _WIN32 +#define NOMINMAX // Prevent Windows min/max macros from conflicting with std::min/max #include #include #define F_OK 0 From ba5dae5c36261a04063430a68dfe4241825a35bd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 21 Aug 2025 16:15:21 +0000 Subject: [PATCH 08/15] Fix Windows std::min build error by adding NOMINMAX to binance_websocket.h Co-authored-by: blackb1rd <2668486+blackb1rd@users.noreply.github.com> --- src/binance_websocket.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/binance_websocket.h b/src/binance_websocket.h index f8caa80..e520bbb 100644 --- a/src/binance_websocket.h +++ b/src/binance_websocket.h @@ -9,6 +9,7 @@ #else #define BINANCECPP_API __declspec(dllimport) #endif + #define NOMINMAX // Prevent Windows min/max macros from conflicting with std::min/max #else #define BINANCECPP_API #endif From 8ae52145e2df0318a3c6c979fdce360882d2e03a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 24 Aug 2025 13:46:21 +0000 Subject: [PATCH 09/15] Fix Windows std::min build error by defining NOMINMAX before all includes in binance_websocket.cpp Co-authored-by: blackb1rd <2668486+blackb1rd@users.noreply.github.com> --- src/binance_websocket.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/binance_websocket.cpp b/src/binance_websocket.cpp index f6f0b48..771ee7e 100644 --- a/src/binance_websocket.cpp +++ b/src/binance_websocket.cpp @@ -1,3 +1,7 @@ +#ifdef _WIN32 +#define NOMINMAX // Prevent Windows min/max macros from conflicting with std::min/max +#endif + #include "binance_websocket.h" #include "binance_logger.h" From d953d79231403b90d75a1d16b9e0f20bd0f1eb2b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Sep 2025 14:04:19 +0000 Subject: [PATCH 10/15] Fix Windows DLL export issues and JsonCpp linking for proper symbol resolution Co-authored-by: blackb1rd <2668486+blackb1rd@users.noreply.github.com> --- src/CMakeLists.txt | 3 ++- src/binance_cpp.h | 13 ++++++++++++- src/financial_trading/spot_trading.h | 23 ++++++++++++++++++----- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 95292bc..544f886 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -28,8 +28,9 @@ target_compile_definitions(binancecpp PRIVATE BINANCECPP_EXPORTS) # Link libraries target_link_libraries(binancecpp - PRIVATE + PUBLIC JsonCpp::JsonCpp + PRIVATE CURL::libcurl $,websockets,websockets_shared> ) diff --git a/src/binance_cpp.h b/src/binance_cpp.h index eafffe2..549f23b 100644 --- a/src/binance_cpp.h +++ b/src/binance_cpp.h @@ -11,6 +11,17 @@ #ifndef BINANCE_CPP_H #define BINANCE_CPP_H +// Windows DLL export/import macros +#ifdef _WIN32 + #ifdef BINANCECPP_EXPORTS + #define BINANCECPP_API __declspec(dllexport) + #else + #define BINANCECPP_API __declspec(dllimport) + #endif +#else + #define BINANCECPP_API +#endif + #include #include @@ -52,7 +63,7 @@ namespace binance_cpp // Core API functionality namespace core { -class BinanceAPI +class BINANCECPP_API BinanceAPI { public: static std::string api_key_; diff --git a/src/financial_trading/spot_trading.h b/src/financial_trading/spot_trading.h index 4d065d9..21d2b1f 100644 --- a/src/financial_trading/spot_trading.h +++ b/src/financial_trading/spot_trading.h @@ -10,6 +10,19 @@ #ifndef BINANCE_CPP_SPOT_TRADING_H #define BINANCE_CPP_SPOT_TRADING_H +// Forward declare BINANCECPP_API if not already defined +#ifndef BINANCECPP_API + #ifdef _WIN32 + #ifdef BINANCECPP_EXPORTS + #define BINANCECPP_API __declspec(dllexport) + #else + #define BINANCECPP_API __declspec(dllimport) + #endif + #else + #define BINANCECPP_API + #endif +#endif + #include #include @@ -37,7 +50,7 @@ class ExchangeInformation static void GetSystemStatus(Json::Value& json_result); }; -class ServerTime +class BINANCECPP_API ServerTime { public: static void GetServerTime(Json::Value& json_result); @@ -47,7 +60,7 @@ class ServerTime // Market Data Endpoints (Public) namespace market_data_endpoints { -class OrderBook +class BINANCECPP_API OrderBook { public: static void GetOrderBook(std::string_view symbol, @@ -116,7 +129,7 @@ class KlineCandlestickData Json::Value& json_result); }; -class TradeData +class BINANCECPP_API TradeData { public: static void GetAggregateTradesList(std::string_view symbol, @@ -137,7 +150,7 @@ class TradeData // Account Endpoints (Private - Requires API Key + Signature) namespace account_endpoints { -class AccountInformation +class BINANCECPP_API AccountInformation { public: static void GetAccountInformation(long recv_window, Json::Value& json_result); @@ -350,7 +363,7 @@ class SOROrders // User Data Stream Endpoints (Requires API Key) namespace user_data_stream_endpoints { -class UserDataStream +class BINANCECPP_API UserDataStream { public: static void CreateListenKey(Json::Value& json_result); From 49b8743624dcf0d0019395d2fc696184e3ef9e3e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Sep 2025 14:44:55 +0000 Subject: [PATCH 11/15] Fix Windows DLL export issues for wallet operations classes Co-authored-by: blackb1rd <2668486+blackb1rd@users.noreply.github.com> --- src/financial_trading/wallet.h | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/src/financial_trading/wallet.h b/src/financial_trading/wallet.h index 04a1a17..376ba12 100644 --- a/src/financial_trading/wallet.h +++ b/src/financial_trading/wallet.h @@ -10,6 +10,19 @@ #ifndef BINANCE_CPP_WALLET_H #define BINANCE_CPP_WALLET_H +// Forward declare BINANCECPP_API if not already defined +#ifndef BINANCECPP_API + #ifdef _WIN32 + #ifdef BINANCECPP_EXPORTS + #define BINANCECPP_API __declspec(dllexport) + #else + #define BINANCECPP_API __declspec(dllimport) + #endif + #else + #define BINANCECPP_API + #endif +#endif + #include #include @@ -24,7 +37,7 @@ namespace wallet // System Status namespace system_status { -class SystemInformation +class BINANCECPP_API SystemInformation { public: static void GetSystemStatus(Json::Value& json_result); @@ -46,7 +59,7 @@ class SystemInformation // Deposit Management namespace deposit { -class DepositOperations +class BINANCECPP_API DepositOperations { public: static void GetDepositHistory(std::string_view coin, @@ -74,7 +87,7 @@ class DepositOperations // Withdrawal Management namespace withdraw { -class WithdrawOperations +class BINANCECPP_API WithdrawOperations { public: static void Withdraw(std::string_view coin, @@ -98,7 +111,7 @@ class WithdrawOperations Json::Value& json_result); }; -class WithdrawSettings +class BINANCECPP_API WithdrawSettings { public: static void GetCapitalConfigGetall(long recv_window, @@ -130,7 +143,7 @@ class WithdrawSettings // Asset Management namespace asset_management { -class AssetDetails +class BINANCECPP_API AssetDetails { public: static void GetAssetDetail(std::string_view asset, @@ -150,7 +163,7 @@ class AssetDetails Json::Value& json_result); }; -class UniversalTransferOperations +class BINANCECPP_API UniversalTransferOperations { public: static void UniversalTransfer(std::string_view type, @@ -162,7 +175,7 @@ class UniversalTransferOperations Json::Value& json_result); }; -class FundingWallet +class BINANCECPP_API FundingWallet { public: static void GetFundingWallet(std::string_view asset, @@ -195,7 +208,7 @@ class FundingWallet // API Key Management namespace api_management { -class APIKeyInformation +class BINANCECPP_API APIKeyInformation { public: static void GetAPIKeyPermission(long recv_window, Json::Value& json_result); @@ -205,7 +218,7 @@ class APIKeyInformation // Convert Management namespace convert { -class ConvertOperations +class BINANCECPP_API ConvertOperations { public: static void GetConvertTradeHistory(long start_time, @@ -238,7 +251,7 @@ class ConvertOperations // Sub-Account Management namespace sub_account { -class SubAccountOperations +class BINANCECPP_API SubAccountOperations { public: static void CreateVirtualSubAccount(std::string_view sub_account_string, From 390b2503ea1c3f8194812366e9dd94db4170b8c8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Sep 2025 15:05:20 +0000 Subject: [PATCH 12/15] Fix Windows DLL export issues by adding BINANCECPP_API to method definitions - Added BINANCECPP_API export macros to method definitions in deposit_operations.cpp - Added BINANCECPP_API export macros to method definitions in withdraw_operations.cpp - Updated include comments to ensure proper BINANCECPP_API definition order - Fixes unresolved external symbol errors for GetDepositHistory, GetDepositAddress, Withdraw, and GetWithdrawHistory methods - Addresses Windows DLL export/import requirements where both declaration and definition need export attributes Co-authored-by: blackb1rd <2668486+blackb1rd@users.noreply.github.com> --- src/financial_trading/wallet/deposit_operations.cpp | 5 +++-- src/financial_trading/wallet/withdraw_operations.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/financial_trading/wallet/deposit_operations.cpp b/src/financial_trading/wallet/deposit_operations.cpp index 349d68b..797fa9b 100644 --- a/src/financial_trading/wallet/deposit_operations.cpp +++ b/src/financial_trading/wallet/deposit_operations.cpp @@ -6,6 +6,7 @@ Implementation of deposit operations for wallet functionality */ +// Include the main header first to ensure BINANCECPP_API is defined #include "../../binance_cpp.h" #include "../../binance_logger.h" #include "../../binance_utils.h" @@ -19,7 +20,7 @@ namespace wallet namespace deposit { -void DepositOperations::GetDepositHistory(std::string_view coin, +BINANCECPP_API void DepositOperations::GetDepositHistory(std::string_view coin, int status, long start_time, long end_time, @@ -107,7 +108,7 @@ void DepositOperations::GetDepositHistory(std::string_view coin, } } -void DepositOperations::GetDepositAddress(std::string_view coin, +BINANCECPP_API void DepositOperations::GetDepositAddress(std::string_view coin, std::string_view network, long recv_window, Json::Value& json_result) diff --git a/src/financial_trading/wallet/withdraw_operations.cpp b/src/financial_trading/wallet/withdraw_operations.cpp index cbaa2f7..f2f7fab 100644 --- a/src/financial_trading/wallet/withdraw_operations.cpp +++ b/src/financial_trading/wallet/withdraw_operations.cpp @@ -6,6 +6,7 @@ Implementation of withdraw operations for wallet functionality */ +// Include the main header first to ensure BINANCECPP_API is defined #include "../../binance_cpp.h" #include "../../binance_logger.h" #include "../../binance_utils.h" @@ -19,7 +20,7 @@ namespace wallet namespace withdraw { -void WithdrawOperations::Withdraw(std::string_view coin, +BINANCECPP_API void WithdrawOperations::Withdraw(std::string_view coin, std::string_view address, double amount, std::string_view address_tag, @@ -105,7 +106,7 @@ void WithdrawOperations::Withdraw(std::string_view coin, } } -void WithdrawOperations::GetWithdrawHistory(std::string_view coin, +BINANCECPP_API void WithdrawOperations::GetWithdrawHistory(std::string_view coin, std::string_view withdraw_order_id, int status, long start_time, From c4faa7f679f8fa2086af60394785a75bdeb25fb9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Sep 2025 16:25:30 +0000 Subject: [PATCH 13/15] Fix Windows CI workflow directory path for executable testing Co-authored-by: blackb1rd <2668486+blackb1rd@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6783aa..06f0a1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: - name: Test library linkage (Windows) if: runner.os == 'Windows' run: | - cd bin/build/${{ env.PRESET_NAME }}/example/${{ matrix.build_type }} + cd bin/build/${{ env.PRESET_NAME }}/example dir - name: Upload build artifacts From ae3cac448517ee7d977f83d0d00d00f3b8f89ab6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Sep 2025 15:47:15 +0000 Subject: [PATCH 14/15] Rename header files and consolidate BINANCECPP_API definition as requested - Renamed binance_cpp.h to binance_api.h - Renamed binance.h to binance_cpp.h - Consolidated BINANCECPP_API define in binance_cpp.h - Updated all include statements throughout codebase - Removed duplicate BINANCECPP_API definitions from other headers - Added NOMINMAX define to binance_cpp.h for Windows compatibility Co-authored-by: blackb1rd <2668486+blackb1rd@users.noreply.github.com> --- example/example.cpp | 2 +- example/example_aggTrades.cpp | 2 +- example/example_depthCache.cpp | 2 +- example/example_klines.cpp | 2 +- example/example_template.cpp | 2 +- example/example_userStream.cpp | 2 +- example/example_wapi.cpp | 2 +- src/binance.h | 198 ------------------ src/binance_api.h | 98 +++++++++ src/binance_cpp.h | 165 +++++++++++---- src/binance_logger.h | 12 +- src/binance_websocket.h | 12 +- src/core/binance_api.cpp | 2 +- src/financial_trading/spot_trading.h | 13 -- .../get_account_information.cpp | 2 +- .../get_account_trade_list.cpp | 2 +- .../general_endpoints/get_exchange_info.cpp | 2 +- .../general_endpoints/get_system_status.cpp | 2 +- .../general_endpoints/server_time.cpp | 2 +- .../general_endpoints/test_connectivity.cpp | 2 +- ...4hr_ticker_price_change_statistics_all.cpp | 2 +- ...er_price_change_statistics_with_symbol.cpp | 2 +- .../get_aggregate_trades_list.cpp | 2 +- .../get_klines_candlestick_data.cpp | 2 +- .../market_data_endpoints/get_price.cpp | 2 +- ...ing_window_price_change_statistics_all.cpp | 2 +- ...ow_price_change_statistics_with_symbol.cpp | 2 +- .../get_symbol_order_book_ticker_all.cpp | 2 +- ...t_symbol_order_book_ticker_with_symbol.cpp | 2 +- .../get_symbol_price_ticker_all.cpp | 2 +- .../get_symbol_price_ticker_with_symbol.cpp | 2 +- .../market_data_endpoints/order_book.cpp | 2 +- .../close_listen_key.cpp | 2 +- .../create_listen_key.cpp | 2 +- .../ping_extend_listen_key.cpp | 2 +- src/financial_trading/wallet.h | 13 -- .../wallet/deposit_operations.cpp | 2 +- .../wallet/withdraw_operations.cpp | 2 +- test_api_structure.cpp | 2 +- test_new_structure.cpp | 2 +- 40 files changed, 257 insertions(+), 320 deletions(-) delete mode 100644 src/binance.h create mode 100644 src/binance_api.h diff --git a/example/example.cpp b/example/example.cpp index 82152e8..86930a9 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -9,7 +9,7 @@ #include #include -#include "binance_cpp.h" +#include "binance_api.h" #include "binance_websocket.h" constexpr const char* API_KEY = "api key"; diff --git a/example/example_aggTrades.cpp b/example/example_aggTrades.cpp index 776348f..56b3b16 100644 --- a/example/example_aggTrades.cpp +++ b/example/example_aggTrades.cpp @@ -5,7 +5,7 @@ #include #include -#include "binance_cpp.h" +#include "binance_api.h" #include "binance_websocket.h" std::map> aggTradeCache; diff --git a/example/example_depthCache.cpp b/example/example_depthCache.cpp index a15c85f..5b9c8c2 100644 --- a/example/example_depthCache.cpp +++ b/example/example_depthCache.cpp @@ -5,7 +5,7 @@ #include #include -#include "binance_cpp.h" +#include "binance_api.h" #include "binance_websocket.h" std::map> depthCache; diff --git a/example/example_klines.cpp b/example/example_klines.cpp index 60d09e0..bdfc7fa 100644 --- a/example/example_klines.cpp +++ b/example/example_klines.cpp @@ -5,7 +5,7 @@ #include #include -#include "binance_cpp.h" +#include "binance_api.h" #include "binance_websocket.h" std::map> klinesCache; diff --git a/example/example_template.cpp b/example/example_template.cpp index 34ede2e..73b9968 100644 --- a/example/example_template.cpp +++ b/example/example_template.cpp @@ -4,7 +4,7 @@ #include -#include "binance_cpp.h" +#include "binance_api.h" #include "binance_websocket.h" #define API_KEY "myapikey" diff --git a/example/example_userStream.cpp b/example/example_userStream.cpp index 06d9337..e0cc7e5 100644 --- a/example/example_userStream.cpp +++ b/example/example_userStream.cpp @@ -4,7 +4,7 @@ #include #include -#include "binance_cpp.h" +#include "binance_api.h" #include "binance_websocket.h" #define API_KEY "api key" diff --git a/example/example_wapi.cpp b/example/example_wapi.cpp index b2d36aa..7f3bfc8 100644 --- a/example/example_wapi.cpp +++ b/example/example_wapi.cpp @@ -5,7 +5,7 @@ #include #include -#include "binance_cpp.h" +#include "binance_api.h" #include "binance_websocket.h" #define API_KEY "api key" diff --git a/src/binance.h b/src/binance.h deleted file mode 100644 index 64dead7..0000000 --- a/src/binance.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - Author: blackb1rd - Date : 2025/08/11 - - C++ library for Binance API - Main Header - Following Google C++ Style Guide naming conventions - Modular design based on official Binance API documentation structure - https://developers.binance.com/ -*/ - -#ifndef BINANCE_H_LEGACY -#define BINANCE_H_LEGACY - -// Windows DLL export/import macros -#ifdef _WIN32 - #ifdef BINANCECPP_EXPORTS - #define BINANCECPP_API __declspec(dllexport) - #else - #define BINANCECPP_API __declspec(dllimport) - #endif -#else - #define BINANCECPP_API -#endif - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define BINANCE_HOST "https://api.binance.com" - -template -concept StringLike = std::convertible_to; - -template -concept Numeric = std::integral || std::floating_point; - -// Include all Financial Trading modules following official Binance API -// structure -#include "financial_trading/algo_trading.h" -#include "financial_trading/copy_trading.h" -#include "financial_trading/derivatives_trading.h" -#include "financial_trading/margin_trading.h" -#include "financial_trading/spot_trading.h" -#include "financial_trading/wallet.h" - -class BINANCECPP_API BinanceCPP -{ - static std::string api_key; - static std::string secret_key; - static CURL *curl; - - public: - static void curl_api(std::string &url, std::string &result_json); - static void curl_api_with_header(std::string &url, - std::string &result_json, - std::vector &extra_http_header, - std::string &post_data, - std::string &action); - [[nodiscard]] static size_t curl_cb(void *content, - size_t size, - size_t nmemb, - std::string *buffer); - - static void init(); - static void init(std::string_view api_key, std::string_view secret_key); - static void cleanup() noexcept; - - // Public API - static void get_exchangeInfo(Json::Value &json_result); - static void get_serverTime(Json::Value &json_result); - - static void get_allPrices(Json::Value &json_result); - [[nodiscard]] static double get_price(std::string_view symbol); - - static void get_allBookTickers(Json::Value &json_result); - static void get_bookTicker(std::string_view symbol, Json::Value &json_result); - - static void get_depth(std::string_view symbol, - int limit, - Json::Value &json_result); - static void get_aggTrades(std::string_view symbol, - int fromId, - time_t startTime, - time_t endTime, - int limit, - Json::Value &json_result); - static void get_24hr(std::string_view symbol, Json::Value &json_result); - static void get_klines(std::string_view symbol, - std::string_view interval, - int limit, - time_t startTime, - time_t endTime, - Json::Value &json_result); - - // API + Secret keys required - static void get_account(long recvWindow, Json::Value &json_result); - - static void get_myTrades(std::string_view symbol, - int limit, - long fromId, - long recvWindow, - Json::Value &json_result); - - static void get_openOrders(std::string_view symbol, - long recvWindow, - Json::Value &json_result); - - static void get_allOrders(std::string_view symbol, - long orderId, - int limit, - long recvWindow, - Json::Value &json_result); - - static void send_order(std::string_view symbol, - std::string_view side, - std::string_view type, - std::string_view timeInForce, - double quantity, - double price, - std::string_view newClientOrderId, - double stopPrice, - double icebergQty, - long recvWindow, - Json::Value &json_result); - - static void get_order(std::string_view symbol, - long orderId, - std::string_view origClientOrderId, - long recvWindow, - Json::Value &json_result); - - static void cancel_order(std::string_view symbol, - long orderId, - std::string_view origClientOrderId, - std::string_view newClientOrderId, - long recvWindow, - Json::Value &json_result); - - // API key required - static void start_userDataStream(Json::Value &json_result); - static void keep_userDataStream(std::string_view listenKey); - static void close_userDataStream(std::string_view listenKey); - - // WAPI - static void withdraw(std::string_view asset, - std::string_view address, - std::string_view addressTag, - double amount, - std::string_view name, - long recvWindow, - Json::Value &json_result); - - static void get_depositHistory(std::string_view asset, - int status, - long startTime, - long endTime, - long recvWindow, - Json::Value &json_result); - - static void get_withdrawHistory(std::string_view asset, - int status, - long startTime, - long endTime, - long recvWindow, - Json::Value &json_result); - - static void get_depositAddress(std::string_view asset, - long recvWindow, - Json::Value &json_result); -}; - -namespace binance_cpp -{ -// Main API namespace bringing together all financial trading modules -// Use the specific namespace modules for organized API access: -// - financial_trading::spot_trading -// - financial_trading::derivatives_trading -// - financial_trading::margin_trading -// - financial_trading::algo_trading -// - financial_trading::wallet -// - financial_trading::copy_trading -} // namespace binance_cpp - -#endif // BINANCE_H_LEGACY diff --git a/src/binance_api.h b/src/binance_api.h new file mode 100644 index 0000000..c4ea159 --- /dev/null +++ b/src/binance_api.h @@ -0,0 +1,98 @@ +/* + Author: blackb1rd + Date : 2025/08/11 + + C++ library for Binance API - Main Header + Following Google C++ Style Guide naming conventions + Modular design based on official Binance API documentation structure + https://developers.binance.com/ +*/ + +#ifndef BINANCE_API_H +#define BINANCE_API_H + +#include "binance_cpp.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BINANCE_HOST "https://api.binance.com" + +template +concept StringLike = std::convertible_to; + +template +concept Numeric = std::integral || std::floating_point; + +// Include all Financial Trading modules following official Binance API +// structure +#include "financial_trading/algo_trading.h" +#include "financial_trading/copy_trading.h" +#include "financial_trading/derivatives_trading.h" +#include "financial_trading/margin_trading.h" +#include "financial_trading/spot_trading.h" +#include "financial_trading/wallet.h" + +namespace binance_cpp +{ + +// Core API functionality +namespace core +{ +class BINANCECPP_API BinanceAPI +{ + public: + static std::string api_key_; + static std::string secret_key_; + static CURL* curl_; + + static void CurlAPI(std::string& url, std::string& result_json); + static void CurlAPIWithHeader(std::string& url, + std::string& result_json, + std::vector& extra_http_header, + std::string& post_data, + std::string& action); + [[nodiscard]] static size_t CurlCallback(void* content, + size_t size, + size_t nmemb, + std::string* buffer); + + static void Init(); + static void Init(std::string_view api_key, std::string_view secret_key); + static void Cleanup() noexcept; + + // API key management + static void SetAPIKey(std::string_view api_key); + static void SetSecretKey(std::string_view secret_key); + [[nodiscard]] static const std::string& GetAPIKey() noexcept; + [[nodiscard]] static const std::string& GetSecretKey() noexcept; +}; +} // namespace core + +// Main API namespace bringing together all financial trading modules +// Use the specific namespace modules for organized API access: +// - financial_trading::spot_trading +// - financial_trading::derivatives_trading +// - financial_trading::margin_trading +// - financial_trading::algo_trading +// - financial_trading::wallet +// - financial_trading::copy_trading + +} // namespace binance_cpp + +#endif // BINANCE_API_H diff --git a/src/binance_cpp.h b/src/binance_cpp.h index 549f23b..76ade7d 100644 --- a/src/binance_cpp.h +++ b/src/binance_cpp.h @@ -18,6 +18,7 @@ #else #define BINANCECPP_API __declspec(dllimport) #endif + #define NOMINMAX // Prevent Windows min/max macros from conflicting with std::min/max #else #define BINANCECPP_API #endif @@ -48,51 +49,134 @@ concept StringLike = std::convertible_to; template concept Numeric = std::integral || std::floating_point; -// Include all Financial Trading modules following official Binance API -// structure -#include "financial_trading/algo_trading.h" -#include "financial_trading/copy_trading.h" -#include "financial_trading/derivatives_trading.h" -#include "financial_trading/margin_trading.h" -#include "financial_trading/spot_trading.h" -#include "financial_trading/wallet.h" - -namespace binance_cpp +class BINANCECPP_API BinanceCPP { + static std::string api_key; + static std::string secret_key; + static CURL *curl; -// Core API functionality -namespace core -{ -class BINANCECPP_API BinanceAPI -{ public: - static std::string api_key_; - static std::string secret_key_; - static CURL* curl_; - - static void CurlAPI(std::string& url, std::string& result_json); - static void CurlAPIWithHeader(std::string& url, - std::string& result_json, - std::vector& extra_http_header, - std::string& post_data, - std::string& action); - [[nodiscard]] static size_t CurlCallback(void* content, - size_t size, - size_t nmemb, - std::string* buffer); - - static void Init(); - static void Init(std::string_view api_key, std::string_view secret_key); - static void Cleanup() noexcept; - - // API key management - static void SetAPIKey(std::string_view api_key); - static void SetSecretKey(std::string_view secret_key); - [[nodiscard]] static const std::string& GetAPIKey() noexcept; - [[nodiscard]] static const std::string& GetSecretKey() noexcept; + static void curl_api(std::string &url, std::string &result_json); + static void curl_api_with_header(std::string &url, + std::string &result_json, + std::vector &extra_http_header, + std::string &post_data, + std::string &action); + [[nodiscard]] static size_t curl_cb(void *content, + size_t size, + size_t nmemb, + std::string *buffer); + + static void init(); + static void init(std::string_view api_key, std::string_view secret_key); + static void cleanup() noexcept; + + // Public API + static void get_exchangeInfo(Json::Value &json_result); + static void get_serverTime(Json::Value &json_result); + + static void get_allPrices(Json::Value &json_result); + [[nodiscard]] static double get_price(std::string_view symbol); + + static void get_allBookTickers(Json::Value &json_result); + static void get_bookTicker(std::string_view symbol, Json::Value &json_result); + + static void get_depth(std::string_view symbol, + int limit, + Json::Value &json_result); + static void get_aggTrades(std::string_view symbol, + int fromId, + time_t startTime, + time_t endTime, + int limit, + Json::Value &json_result); + static void get_24hr(std::string_view symbol, Json::Value &json_result); + static void get_klines(std::string_view symbol, + std::string_view interval, + int limit, + time_t startTime, + time_t endTime, + Json::Value &json_result); + + // API + Secret keys required + static void get_account(long recvWindow, Json::Value &json_result); + + static void get_myTrades(std::string_view symbol, + int limit, + long fromId, + long recvWindow, + Json::Value &json_result); + + static void get_openOrders(std::string_view symbol, + long recvWindow, + Json::Value &json_result); + + static void get_allOrders(std::string_view symbol, + long orderId, + int limit, + long recvWindow, + Json::Value &json_result); + + static void send_order(std::string_view symbol, + std::string_view side, + std::string_view type, + std::string_view timeInForce, + double quantity, + double price, + std::string_view newClientOrderId, + double stopPrice, + double icebergQty, + long recvWindow, + Json::Value &json_result); + + static void get_order(std::string_view symbol, + long orderId, + std::string_view origClientOrderId, + long recvWindow, + Json::Value &json_result); + + static void cancel_order(std::string_view symbol, + long orderId, + std::string_view origClientOrderId, + std::string_view newClientOrderId, + long recvWindow, + Json::Value &json_result); + + // API key required + static void start_userDataStream(Json::Value &json_result); + static void keep_userDataStream(std::string_view listenKey); + static void close_userDataStream(std::string_view listenKey); + + // WAPI + static void withdraw(std::string_view asset, + std::string_view address, + std::string_view addressTag, + double amount, + std::string_view name, + long recvWindow, + Json::Value &json_result); + + static void get_depositHistory(std::string_view asset, + int status, + long startTime, + long endTime, + long recvWindow, + Json::Value &json_result); + + static void get_withdrawHistory(std::string_view asset, + int status, + long startTime, + long endTime, + long recvWindow, + Json::Value &json_result); + + static void get_depositAddress(std::string_view asset, + long recvWindow, + Json::Value &json_result); }; -} // namespace core +namespace binance_cpp +{ // Main API namespace bringing together all financial trading modules // Use the specific namespace modules for organized API access: // - financial_trading::spot_trading @@ -101,7 +185,6 @@ class BINANCECPP_API BinanceAPI // - financial_trading::algo_trading // - financial_trading::wallet // - financial_trading::copy_trading - } // namespace binance_cpp #endif // BINANCE_CPP_H diff --git a/src/binance_logger.h b/src/binance_logger.h index d1b881d..2bdbd5f 100644 --- a/src/binance_logger.h +++ b/src/binance_logger.h @@ -1,20 +1,10 @@ #ifndef BINANCE_LOGGER_H #define BINANCE_LOGGER_H -// Windows DLL export/import macros -#ifdef _WIN32 - #ifdef BINANCECPP_EXPORTS - #define BINANCECPP_API __declspec(dllexport) - #else - #define BINANCECPP_API __declspec(dllimport) - #endif -#else - #define BINANCECPP_API -#endif +#include "binance_cpp.h" // Platform-specific includes #ifdef _WIN32 -#define NOMINMAX // Prevent Windows min/max macros from conflicting with std::min/max #include #include #include diff --git a/src/binance_websocket.h b/src/binance_websocket.h index e520bbb..ea1a913 100644 --- a/src/binance_websocket.h +++ b/src/binance_websocket.h @@ -2,17 +2,7 @@ #ifndef BINANCE_WEBSOCKET_H #define BINANCE_WEBSOCKET_H -// Windows DLL export/import macros -#ifdef _WIN32 - #ifdef BINANCECPP_EXPORTS - #define BINANCECPP_API __declspec(dllexport) - #else - #define BINANCECPP_API __declspec(dllimport) - #endif - #define NOMINMAX // Prevent Windows min/max macros from conflicting with std::min/max -#else - #define BINANCECPP_API -#endif +#include "binance_cpp.h" // Modern C++20 headers #include diff --git a/src/core/binance_api.cpp b/src/core/binance_api.cpp index eb1775d..5178978 100644 --- a/src/core/binance_api.cpp +++ b/src/core/binance_api.cpp @@ -10,7 +10,7 @@ #include #include -#include "../binance_cpp.h" +#include "../binance_api.h" #include "../binance_logger.h" #include "../binance_utils.h" diff --git a/src/financial_trading/spot_trading.h b/src/financial_trading/spot_trading.h index 21d2b1f..a64ff99 100644 --- a/src/financial_trading/spot_trading.h +++ b/src/financial_trading/spot_trading.h @@ -10,19 +10,6 @@ #ifndef BINANCE_CPP_SPOT_TRADING_H #define BINANCE_CPP_SPOT_TRADING_H -// Forward declare BINANCECPP_API if not already defined -#ifndef BINANCECPP_API - #ifdef _WIN32 - #ifdef BINANCECPP_EXPORTS - #define BINANCECPP_API __declspec(dllexport) - #else - #define BINANCECPP_API __declspec(dllimport) - #endif - #else - #define BINANCECPP_API - #endif -#endif - #include #include diff --git a/src/financial_trading/spot_trading/account_endpoints/get_account_information.cpp b/src/financial_trading/spot_trading/account_endpoints/get_account_information.cpp index c0b6e9c..b699883 100644 --- a/src/financial_trading/spot_trading/account_endpoints/get_account_information.cpp +++ b/src/financial_trading/spot_trading/account_endpoints/get_account_information.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" #include "../../../binance_utils.h" diff --git a/src/financial_trading/spot_trading/account_endpoints/get_account_trade_list.cpp b/src/financial_trading/spot_trading/account_endpoints/get_account_trade_list.cpp index c93dab8..bfeb4c8 100644 --- a/src/financial_trading/spot_trading/account_endpoints/get_account_trade_list.cpp +++ b/src/financial_trading/spot_trading/account_endpoints/get_account_trade_list.cpp @@ -8,7 +8,7 @@ (SIGNED) Following Google C++ Style Guide naming conventions */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" #include "../../../binance_utils.h" diff --git a/src/financial_trading/spot_trading/general_endpoints/get_exchange_info.cpp b/src/financial_trading/spot_trading/general_endpoints/get_exchange_info.cpp index b98f8d0..6d11e69 100644 --- a/src/financial_trading/spot_trading/general_endpoints/get_exchange_info.cpp +++ b/src/financial_trading/spot_trading/general_endpoints/get_exchange_info.cpp @@ -8,7 +8,7 @@ information Following Google C++ Style Guide naming conventions */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/general_endpoints/get_system_status.cpp b/src/financial_trading/spot_trading/general_endpoints/get_system_status.cpp index bd660f0..715e12e 100644 --- a/src/financial_trading/spot_trading/general_endpoints/get_system_status.cpp +++ b/src/financial_trading/spot_trading/general_endpoints/get_system_status.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/general_endpoints/server_time.cpp b/src/financial_trading/spot_trading/general_endpoints/server_time.cpp index 6c37c38..2765f70 100644 --- a/src/financial_trading/spot_trading/general_endpoints/server_time.cpp +++ b/src/financial_trading/spot_trading/general_endpoints/server_time.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "binance_cpp.h" +#include "../../binance_api.h" #include "binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/general_endpoints/test_connectivity.cpp b/src/financial_trading/spot_trading/general_endpoints/test_connectivity.cpp index db46362..b13bfeb 100644 --- a/src/financial_trading/spot_trading/general_endpoints/test_connectivity.cpp +++ b/src/financial_trading/spot_trading/general_endpoints/test_connectivity.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "binance_cpp.h" +#include "../../binance_api.h" #include "binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_all.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_all.cpp index 3b7e1f0..8496917 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_all.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_all.cpp @@ -8,7 +8,7 @@ symbols) Following Google C++ Style Guide naming conventions */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_with_symbol.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_with_symbol.cpp index f3157c4..b766715 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_with_symbol.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_with_symbol.cpp @@ -8,7 +8,7 @@ symbol) Following Google C++ Style Guide naming conventions */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_aggregate_trades_list.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_aggregate_trades_list.cpp index 561b439..74ef196 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_aggregate_trades_list.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_aggregate_trades_list.cpp @@ -6,7 +6,7 @@ GET /api/v3/aggTrades - Compressed/Aggregate trades list */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" #include "../../../binance_utils.h" diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_klines_candlestick_data.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_klines_candlestick_data.cpp index b4d45da..f1ad553 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_klines_candlestick_data.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_klines_candlestick_data.cpp @@ -6,7 +6,7 @@ GET /api/v3/klines - Kline/candlestick bars for a symbol */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" #include "../../../binance_utils.h" diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_price.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_price.cpp index 38889d2..b9130a6 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_price.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_price.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_all.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_all.cpp index e2244ab..f1f29e0 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_all.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_all.cpp @@ -8,7 +8,7 @@ symbols) Following Google C++ Style Guide naming conventions */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_with_symbol.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_with_symbol.cpp index 0267995..e5b64dc 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_with_symbol.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_with_symbol.cpp @@ -8,7 +8,7 @@ symbol) Following Google C++ Style Guide naming conventions */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_all.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_all.cpp index 98523e3..d719d0e 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_all.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_all.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_with_symbol.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_with_symbol.cpp index ff005ae..693cf88 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_with_symbol.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_with_symbol.cpp @@ -8,7 +8,7 @@ parameter) Following Google C++ Style Guide naming conventions */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_all.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_all.cpp index a7169eb..52b6555 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_all.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_all.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_with_symbol.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_with_symbol.cpp index 47fd150..0f365d0 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_with_symbol.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_with_symbol.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/order_book.cpp b/src/financial_trading/spot_trading/market_data_endpoints/order_book.cpp index d3a994a..d01e4d7 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/order_book.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/order_book.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "binance_cpp.h" +#include "../../binance_api.h" #include "binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/user_data_stream_endpoints/close_listen_key.cpp b/src/financial_trading/spot_trading/user_data_stream_endpoints/close_listen_key.cpp index 41261e9..4d1114b 100644 --- a/src/financial_trading/spot_trading/user_data_stream_endpoints/close_listen_key.cpp +++ b/src/financial_trading/spot_trading/user_data_stream_endpoints/close_listen_key.cpp @@ -6,7 +6,7 @@ DELETE /api/v3/userDataStream - Close out a user data stream */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" #include "../../../binance_utils.h" diff --git a/src/financial_trading/spot_trading/user_data_stream_endpoints/create_listen_key.cpp b/src/financial_trading/spot_trading/user_data_stream_endpoints/create_listen_key.cpp index 42fabbc..277577c 100644 --- a/src/financial_trading/spot_trading/user_data_stream_endpoints/create_listen_key.cpp +++ b/src/financial_trading/spot_trading/user_data_stream_endpoints/create_listen_key.cpp @@ -6,7 +6,7 @@ POST /api/v3/userDataStream - Create a ListenKey */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" #include "../../../binance_utils.h" diff --git a/src/financial_trading/spot_trading/user_data_stream_endpoints/ping_extend_listen_key.cpp b/src/financial_trading/spot_trading/user_data_stream_endpoints/ping_extend_listen_key.cpp index b3cff58..91d0725 100644 --- a/src/financial_trading/spot_trading/user_data_stream_endpoints/ping_extend_listen_key.cpp +++ b/src/financial_trading/spot_trading/user_data_stream_endpoints/ping_extend_listen_key.cpp @@ -6,7 +6,7 @@ PUT /api/v3/userDataStream - Ping/Keep-alive a ListenKey */ -#include "../../../binance_cpp.h" +#include "../../binance_api.h" #include "../../../binance_logger.h" #include "../../../binance_utils.h" diff --git a/src/financial_trading/wallet.h b/src/financial_trading/wallet.h index 376ba12..4054178 100644 --- a/src/financial_trading/wallet.h +++ b/src/financial_trading/wallet.h @@ -10,19 +10,6 @@ #ifndef BINANCE_CPP_WALLET_H #define BINANCE_CPP_WALLET_H -// Forward declare BINANCECPP_API if not already defined -#ifndef BINANCECPP_API - #ifdef _WIN32 - #ifdef BINANCECPP_EXPORTS - #define BINANCECPP_API __declspec(dllexport) - #else - #define BINANCECPP_API __declspec(dllimport) - #endif - #else - #define BINANCECPP_API - #endif -#endif - #include #include diff --git a/src/financial_trading/wallet/deposit_operations.cpp b/src/financial_trading/wallet/deposit_operations.cpp index 797fa9b..f5e406f 100644 --- a/src/financial_trading/wallet/deposit_operations.cpp +++ b/src/financial_trading/wallet/deposit_operations.cpp @@ -7,7 +7,7 @@ */ // Include the main header first to ensure BINANCECPP_API is defined -#include "../../binance_cpp.h" +#include "../../binance_api.h" #include "../../binance_logger.h" #include "../../binance_utils.h" diff --git a/src/financial_trading/wallet/withdraw_operations.cpp b/src/financial_trading/wallet/withdraw_operations.cpp index f2f7fab..73431d6 100644 --- a/src/financial_trading/wallet/withdraw_operations.cpp +++ b/src/financial_trading/wallet/withdraw_operations.cpp @@ -7,7 +7,7 @@ */ // Include the main header first to ensure BINANCECPP_API is defined -#include "../../binance_cpp.h" +#include "../../binance_api.h" #include "../../binance_logger.h" #include "../../binance_utils.h" diff --git a/test_api_structure.cpp b/test_api_structure.cpp index 803e2f6..a5cd04e 100644 --- a/test_api_structure.cpp +++ b/test_api_structure.cpp @@ -7,7 +7,7 @@ #include -#include "src/binance_cpp.h" +#include "binance_api.h" int main() { diff --git a/test_new_structure.cpp b/test_new_structure.cpp index e9839ef..8a023bc 100644 --- a/test_new_structure.cpp +++ b/test_new_structure.cpp @@ -7,7 +7,7 @@ #include -#include "src/binance_cpp.h" +#include "binance_api.h" int main() { From 8be40fd3468415a8f80cccb0c44ebae0fb206bf0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Sep 2025 16:27:17 +0000 Subject: [PATCH 15/15] Fix build issues after header reorganization - fix include paths and remove duplicate concepts Co-authored-by: blackb1rd <2668486+blackb1rd@users.noreply.github.com> --- src/binance_api.h | 6 +----- src/financial_trading/spot_trading.h | 2 ++ .../account_endpoints/get_account_information.cpp | 2 +- .../account_endpoints/get_account_trade_list.cpp | 2 +- .../spot_trading/general_endpoints/get_exchange_info.cpp | 2 +- .../spot_trading/general_endpoints/get_system_status.cpp | 2 +- .../spot_trading/general_endpoints/server_time.cpp | 2 +- .../spot_trading/general_endpoints/test_connectivity.cpp | 2 +- .../get_24hr_ticker_price_change_statistics_all.cpp | 2 +- .../get_24hr_ticker_price_change_statistics_with_symbol.cpp | 2 +- .../market_data_endpoints/get_aggregate_trades_list.cpp | 2 +- .../market_data_endpoints/get_klines_candlestick_data.cpp | 2 +- .../spot_trading/market_data_endpoints/get_price.cpp | 2 +- .../get_rolling_window_price_change_statistics_all.cpp | 2 +- ...t_rolling_window_price_change_statistics_with_symbol.cpp | 2 +- .../get_symbol_order_book_ticker_all.cpp | 2 +- .../get_symbol_order_book_ticker_with_symbol.cpp | 2 +- .../market_data_endpoints/get_symbol_price_ticker_all.cpp | 2 +- .../get_symbol_price_ticker_with_symbol.cpp | 2 +- .../spot_trading/market_data_endpoints/order_book.cpp | 2 +- .../user_data_stream_endpoints/close_listen_key.cpp | 2 +- .../user_data_stream_endpoints/create_listen_key.cpp | 2 +- .../user_data_stream_endpoints/ping_extend_listen_key.cpp | 2 +- src/financial_trading/wallet.h | 2 ++ 24 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/binance_api.h b/src/binance_api.h index c4ea159..78f754d 100644 --- a/src/binance_api.h +++ b/src/binance_api.h @@ -33,11 +33,7 @@ #define BINANCE_HOST "https://api.binance.com" -template -concept StringLike = std::convertible_to; - -template -concept Numeric = std::integral || std::floating_point; +// Note: StringLike and Numeric concepts are defined in binance_cpp.h // Include all Financial Trading modules following official Binance API // structure diff --git a/src/financial_trading/spot_trading.h b/src/financial_trading/spot_trading.h index a64ff99..a8e434c 100644 --- a/src/financial_trading/spot_trading.h +++ b/src/financial_trading/spot_trading.h @@ -10,6 +10,8 @@ #ifndef BINANCE_CPP_SPOT_TRADING_H #define BINANCE_CPP_SPOT_TRADING_H +#include "../binance_cpp.h" + #include #include diff --git a/src/financial_trading/spot_trading/account_endpoints/get_account_information.cpp b/src/financial_trading/spot_trading/account_endpoints/get_account_information.cpp index b699883..11a11d4 100644 --- a/src/financial_trading/spot_trading/account_endpoints/get_account_information.cpp +++ b/src/financial_trading/spot_trading/account_endpoints/get_account_information.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" #include "../../../binance_utils.h" diff --git a/src/financial_trading/spot_trading/account_endpoints/get_account_trade_list.cpp b/src/financial_trading/spot_trading/account_endpoints/get_account_trade_list.cpp index bfeb4c8..28d7b57 100644 --- a/src/financial_trading/spot_trading/account_endpoints/get_account_trade_list.cpp +++ b/src/financial_trading/spot_trading/account_endpoints/get_account_trade_list.cpp @@ -8,7 +8,7 @@ (SIGNED) Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" #include "../../../binance_utils.h" diff --git a/src/financial_trading/spot_trading/general_endpoints/get_exchange_info.cpp b/src/financial_trading/spot_trading/general_endpoints/get_exchange_info.cpp index 6d11e69..e93add0 100644 --- a/src/financial_trading/spot_trading/general_endpoints/get_exchange_info.cpp +++ b/src/financial_trading/spot_trading/general_endpoints/get_exchange_info.cpp @@ -8,7 +8,7 @@ information Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/general_endpoints/get_system_status.cpp b/src/financial_trading/spot_trading/general_endpoints/get_system_status.cpp index 715e12e..8f3f4e1 100644 --- a/src/financial_trading/spot_trading/general_endpoints/get_system_status.cpp +++ b/src/financial_trading/spot_trading/general_endpoints/get_system_status.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/general_endpoints/server_time.cpp b/src/financial_trading/spot_trading/general_endpoints/server_time.cpp index 2765f70..ca0aa56 100644 --- a/src/financial_trading/spot_trading/general_endpoints/server_time.cpp +++ b/src/financial_trading/spot_trading/general_endpoints/server_time.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/general_endpoints/test_connectivity.cpp b/src/financial_trading/spot_trading/general_endpoints/test_connectivity.cpp index b13bfeb..5a44c9d 100644 --- a/src/financial_trading/spot_trading/general_endpoints/test_connectivity.cpp +++ b/src/financial_trading/spot_trading/general_endpoints/test_connectivity.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_all.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_all.cpp index 8496917..1f9ec2c 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_all.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_all.cpp @@ -8,7 +8,7 @@ symbols) Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_with_symbol.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_with_symbol.cpp index b766715..d26ee37 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_with_symbol.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_24hr_ticker_price_change_statistics_with_symbol.cpp @@ -8,7 +8,7 @@ symbol) Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_aggregate_trades_list.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_aggregate_trades_list.cpp index 74ef196..9a51fc8 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_aggregate_trades_list.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_aggregate_trades_list.cpp @@ -6,7 +6,7 @@ GET /api/v3/aggTrades - Compressed/Aggregate trades list */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" #include "../../../binance_utils.h" diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_klines_candlestick_data.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_klines_candlestick_data.cpp index f1ad553..97e93b1 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_klines_candlestick_data.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_klines_candlestick_data.cpp @@ -6,7 +6,7 @@ GET /api/v3/klines - Kline/candlestick bars for a symbol */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" #include "../../../binance_utils.h" diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_price.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_price.cpp index b9130a6..55d1fb0 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_price.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_price.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_all.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_all.cpp index f1f29e0..62a3907 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_all.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_all.cpp @@ -8,7 +8,7 @@ symbols) Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_with_symbol.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_with_symbol.cpp index e5b64dc..230ff06 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_with_symbol.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_rolling_window_price_change_statistics_with_symbol.cpp @@ -8,7 +8,7 @@ symbol) Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_all.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_all.cpp index d719d0e..736bc9d 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_all.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_all.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_with_symbol.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_with_symbol.cpp index 693cf88..9db079d 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_with_symbol.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_order_book_ticker_with_symbol.cpp @@ -8,7 +8,7 @@ parameter) Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_all.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_all.cpp index 52b6555..19915fb 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_all.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_all.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_with_symbol.cpp b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_with_symbol.cpp index 0f365d0..da7f710 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_with_symbol.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/get_symbol_price_ticker_with_symbol.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/market_data_endpoints/order_book.cpp b/src/financial_trading/spot_trading/market_data_endpoints/order_book.cpp index d01e4d7..cb5bfdd 100644 --- a/src/financial_trading/spot_trading/market_data_endpoints/order_book.cpp +++ b/src/financial_trading/spot_trading/market_data_endpoints/order_book.cpp @@ -8,7 +8,7 @@ Following Google C++ Style Guide naming conventions */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "binance_logger.h" namespace binance_cpp diff --git a/src/financial_trading/spot_trading/user_data_stream_endpoints/close_listen_key.cpp b/src/financial_trading/spot_trading/user_data_stream_endpoints/close_listen_key.cpp index 4d1114b..69b1dee 100644 --- a/src/financial_trading/spot_trading/user_data_stream_endpoints/close_listen_key.cpp +++ b/src/financial_trading/spot_trading/user_data_stream_endpoints/close_listen_key.cpp @@ -6,7 +6,7 @@ DELETE /api/v3/userDataStream - Close out a user data stream */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" #include "../../../binance_utils.h" diff --git a/src/financial_trading/spot_trading/user_data_stream_endpoints/create_listen_key.cpp b/src/financial_trading/spot_trading/user_data_stream_endpoints/create_listen_key.cpp index 277577c..d5cfbb0 100644 --- a/src/financial_trading/spot_trading/user_data_stream_endpoints/create_listen_key.cpp +++ b/src/financial_trading/spot_trading/user_data_stream_endpoints/create_listen_key.cpp @@ -6,7 +6,7 @@ POST /api/v3/userDataStream - Create a ListenKey */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" #include "../../../binance_utils.h" diff --git a/src/financial_trading/spot_trading/user_data_stream_endpoints/ping_extend_listen_key.cpp b/src/financial_trading/spot_trading/user_data_stream_endpoints/ping_extend_listen_key.cpp index 91d0725..82a73e6 100644 --- a/src/financial_trading/spot_trading/user_data_stream_endpoints/ping_extend_listen_key.cpp +++ b/src/financial_trading/spot_trading/user_data_stream_endpoints/ping_extend_listen_key.cpp @@ -6,7 +6,7 @@ PUT /api/v3/userDataStream - Ping/Keep-alive a ListenKey */ -#include "../../binance_api.h" +#include "../../../binance_api.h" #include "../../../binance_logger.h" #include "../../../binance_utils.h" diff --git a/src/financial_trading/wallet.h b/src/financial_trading/wallet.h index 4054178..bf157f5 100644 --- a/src/financial_trading/wallet.h +++ b/src/financial_trading/wallet.h @@ -10,6 +10,8 @@ #ifndef BINANCE_CPP_WALLET_H #define BINANCE_CPP_WALLET_H +#include "../binance_cpp.h" + #include #include