Skip to content

Commit fe908f4

Browse files
committed
Add funding configuration, release workflow, changelog, and update project structure
- Introduced FUNDING.yml for sponsorship options - Added GitHub Actions workflow for automated release creation - Created CHANGELOG.md to document project changes - Updated CMakeLists.txt to reflect repository name change and dependencies - Added SPDX license headers to source files - Enhanced README.md with detailed project features and usage examples - Updated test configurations for consistency with new naming conventions
1 parent 496b31f commit fe908f4

24 files changed

Lines changed: 416 additions & 32 deletions

.github/FUNDING.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# These are supported funding model platforms
2+
3+
github: SlickQuant
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12+
polar: # Replace with a single Polar username
13+
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14+
thanks_dev: # Replace with a single thanks.dev username
15+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/release.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Trigger on version tags like v0.1.0, v1.0.0, etc.
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
create-release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Extract version from tag
19+
id: get_version
20+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
21+
22+
- name: Extract changelog for this version
23+
id: changelog
24+
run: |
25+
if [ -f CHANGELOG.md ]; then
26+
# Extract the section for this version from CHANGELOG.md
27+
VERSION="${{ steps.get_version.outputs.VERSION }}"
28+
# Escape dots in version for regex
29+
VERSION_ESCAPED=$(echo "$VERSION" | sed 's/\./\\./g')
30+
# Use awk to extract content: start at version header, stop at next # header
31+
CHANGES=$(awk "/^## \[$VERSION_ESCAPED\]/{p=1;next} /^## \[/{p=0} p" CHANGELOG.md)
32+
33+
if [ -z "$CHANGES" ]; then
34+
echo "CHANGELOG_CONTENT=No changelog entry found for this version." >> $GITHUB_OUTPUT
35+
else
36+
# Escape newlines for GitHub output
37+
echo "CHANGELOG_CONTENT<<EOF" >> $GITHUB_OUTPUT
38+
echo "$CHANGES" >> $GITHUB_OUTPUT
39+
echo "EOF" >> $GITHUB_OUTPUT
40+
fi
41+
else
42+
echo "CHANGELOG_CONTENT=CHANGELOG.md not found." >> $GITHUB_OUTPUT
43+
fi
44+
45+
- name: Create header archive
46+
run: |
47+
zip -r ./coinbase-advanced-cpp-${{ steps.get_version.outputs.VERSION }}.zip include/
48+
tar -czf ./coinbase-advanced-cpp-${{ steps.get_version.outputs.VERSION }}.tar.gz include/
49+
50+
- name: Create Release
51+
uses: softprops/action-gh-release@v1
52+
with:
53+
name: Release ${{ github.ref_name }}
54+
body: |
55+
## Changes
56+
57+
${{ steps.changelog.outputs.CHANGELOG_CONTENT }}
58+
59+
draft: true
60+
prerelease: false
61+
generate_release_notes: false
62+
files: |
63+
coinbase-advanced-cpp-${{ steps.get_version.outputs.VERSION }}.zip
64+
coinbase-advanced-cpp-${{ steps.get_version.outputs.VERSION }}.tar.gz

CHANGELOG.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased] -
9+
10+
### Added
11+
- Data logger implementation for tracking application activity
12+
- Comprehensive unit tests for REST API endpoints
13+
- Comprehensive unit tests for WebSocket functionality
14+
- Support for multiple order types including market, limit, stop limit, bracket, and TWAP orders
15+
- Async/Await support using C++ coroutines for REST operations
16+
- Documentation in README.md with usage examples
17+
- SPDX header in header files
18+
- CHANGELOG.md
19+
- GitHub release workflow
20+
21+
### Changed
22+
- Separated market data and user data handling functions for better organization
23+
- Fixed level2 message side parsing to correctly handle order book updates
24+
- Inlined dispatchData and processData functions for improved performance
25+
- Refactored WebSocket callbacks to support thread-safe user data handling
26+
- Updated slick-queue to v1.2.2
27+
- Updated slick-net to v1.2.2
28+
- Renamed repository from coinbase_advanced_cpp to coinbase-advanced-cpp (hyphenated naming follows recommended convention)
29+
- License years
30+
31+
### Fixed
32+
- Level2 message side parsing issue that was causing incorrect order book updates
33+
- Various minor bugs in WebSocket message processing
34+
35+
## [0.1.0] - 2025-12-04
36+
37+
### Added
38+
- Initial implementation of Coinbase Advanced API C++ SDK
39+
- REST API client with support for accounts, orders, products, trades, and market data
40+
- WebSocket client with support for level2, ticker, market trades, and user data channels
41+
- Complete implementation of Coinbase Advanced API endpoints
42+
- JWT authentication support using jwt-cpp library
43+
- Type safety with full C++ type definitions for all API responses
44+
- Modern C++ features including C++20, RAII, smart pointers, and modern C++ best practices
45+
- Thread-safe design for multi-threaded applications
46+
47+
### Changed
48+
- Initial project structure with include/coinbase/ directory for all headers
49+
- Implemented basic REST API and WebSocket API functionality
50+
- Added support for various order types and market data channels
51+
52+
### Fixed
53+
- Initial implementation issues and bugs in core functionality
54+
55+
[Unreleased]: https://github.com/SlickQuant/coinbase_advanced_cpp/compare/v0.1.0...HEAD
56+
[0.1.0]: https://github.com/SlickQuant/coinbase_advanced_cpp/commits/v0.1.0

CMakeLists.txt

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ cmake_minimum_required(VERSION 3.20)
22

33
set(CMAKE_CXX_STANDARD 20)
44

5-
project(coinbase_advanced_cpp
5+
project(coinbase-advanced-cpp
66
VERSION 0.1.0
77
LANGUAGES CXX)
88

9-
message(STATUS "coinbase_advance_cpp: ${PROJECT_VERSION}")
10-
119
if (CMAKE_BUILD_TYPE MATCHES Debug)
1210
add_definitions(-DDEBUG)
1311
endif()
@@ -24,19 +22,16 @@ include(FetchContent)
2422
set(BUILD_SLICK_NET_EXAMPLES OFF CACHE BOOL "" FORCE)
2523
set(BUILD_SLICK_NET_TESTS OFF CACHE BOOL "" FORCE)
2624
FetchContent_Declare(
27-
slick_net
28-
GIT_REPOSITORY https://github.com/SlickQuant/slick_net.git
29-
GIT_TAG v1.2.1
25+
slick-net
26+
GIT_REPOSITORY https://github.com/SlickQuant/slick-net.git
27+
GIT_TAG v1.2.2
3028
)
31-
FetchContent_MakeAvailable(slick_net)
32-
33-
message(STATUS "Slick Queue: ${slick_queue_SOURCE_DIR}")
34-
message(STATUS "Slick Net: ${slick_net_SOURCE_DIR}")
29+
FetchContent_MakeAvailable(slick-net)
3530

36-
add_library(coinbase_advanced_cpp INTERFACE)
37-
target_include_directories(coinbase_advanced_cpp INTERFACE include)
38-
target_link_libraries(coinbase_advanced_cpp INTERFACE slick_net #[[Boost::asio Boost::beast Boost::context OpenSSL::SSL OpenSSL::Crypto]])
39-
target_precompile_headers(coinbase_advanced_cpp INTERFACE
31+
add_library(coinbase-advanced-cpp INTERFACE)
32+
target_include_directories(coinbase-advanced-cpp INTERFACE include)
33+
target_link_libraries(coinbase-advanced-cpp INTERFACE slick::net jwt-cpp::jwt-cpp)
34+
target_precompile_headers(coinbase-advanced-cpp INTERFACE
4035
<nlohmann/json.hpp>
4136
<atomic>
4237
<cstdlib>
@@ -63,22 +58,26 @@ target_precompile_headers(coinbase_advanced_cpp INTERFACE
6358
# External dependencies
6459
<slick/queue.h>
6560
)
61+
6662
if (MSVC)
6763
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
6864
add_definitions(-D_WIN32_WINNT=0x0A00)
6965
set(CMAKE_SUPPRESS_REGENERATION true) # supress zero_check
70-
set_target_properties(coinbase_advanced_cpp PROPERTIES LINK_INCREMENTAL ON)
71-
target_compile_options(coinbase_advanced_cpp INTERFACE "/MP" "/FS" "/bigobj" "/wd4101")
66+
set_target_properties(coinbase-advanced-cpp PROPERTIES LINK_INCREMENTAL ON)
67+
target_compile_options(coinbase-advanced-cpp INTERFACE "/MP" "/FS" "/bigobj" "/wd4101")
7268
# Faster linking
7369
add_link_options(/DEBUG:FASTLINK)
7470
else()
7571
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
7672
endif()
7773

78-
option(BUILD_COINBASE_ADVANCED_TESTS "Build tests" OFF)
74+
option(BUILD_COINBASE_ADVANCED_TESTS "Build tests" ON)
7975
if (BUILD_COINBASE_ADVANCED_TESTS)
80-
message(STATUS "Building coinbase_advanced_cpp tests")
76+
message(STATUS "Building coinbase-advanced-cpp tests")
77+
enable_testing()
8178
add_subdirectory(tests)
8279
else()
83-
message(STATUS "Skipping coinbase_advanced_cpp tests")
84-
endif()
80+
message(STATUS "Skipping coinbase-advanced-cpp tests")
81+
endif()
82+
83+
message(STATUS "coinbase-advance-cpp: ${PROJECT_VERSION}")

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 Slick Quant
3+
Copyright (c) 2025-2026 Slick Quant
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)