https://github.com/iyedexe/libxchange
Unofficial Client Library for Binance in C++
https://github.com/iyedexe/libxchange
async binance bitcoin cpp17 cpp20 crypto fix low-latency rest websocket
Last synced: about 1 month ago
JSON representation
Unofficial Client Library for Binance in C++
- Host: GitHub
- URL: https://github.com/iyedexe/libxchange
- Owner: iyedexe
- Created: 2025-01-02T11:26:30.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2026-03-08T10:33:01.000Z (3 months ago)
- Last Synced: 2026-04-04T04:57:33.078Z (2 months ago)
- Topics: async, binance, bitcoin, cpp17, cpp20, crypto, fix, low-latency, rest, websocket
- Language: C++
- Homepage:
- Size: 10.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A blazing-fast, multi-protocol Binance client library β bridging your code to the Binance universe.
"Like the mythical Bifrost bridge, Binfrost connects you instantly and securely β only here, itβs crypto, not Asgard."
---
## π Overview
**Binfrost** is a C++ client library for Binance with a focus on **performance** and **ease of use**.
It supports:
- **FIX protocol**
- **WebSocket streams**
- **REST API**
You can establish **Order Entry**, **Market Data**, and **Drop Copy** FIX connections.
The architecture is designed for **low latency**, **cross-platform builds**, and **scalability**.
---
## π¦ Features
- β
**FIX Protocol** β TLS connections, custom message cracker, order management
- β
**WebSocket API** β Exchange info, order placement, cancel orders, test orders, user streams
- β
**REST API** β Fully integrated with HMAC signing and examples
- β
**Portable Build** β Windows & Linux with [vcpkg](https://vcpkg.io)
- β
**Unit Tests** β For key components (signatures, payloads, key loading)
- β
**Performance-Oriented** β Designed for low-latency trading systems
---
## π οΈ Building
### Windows
```powershell
set VCPKG_ROOT=C:\Users\Administrator\Desktop\workbench\vcpkg
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake
cmake --build build
```
### Linux
Make sure vcpkg is installed and VCPKG_ROOT & PATH are configured:
```
export VCPKG_ROOT=$HOME/workbench/vcpkg
export PATH=$PATH:$VCPKG_ROOT
```
Build from the build folder:
```
cmake .. -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake
make
```
## β
DONE
- β
**FIX** Build basic client
- β
**FIX** Connect TLS to Binance
- β
**FIX** ED25519 signature generation
- β
**FIX** Unit tests added
- β
**FIX** Separated client session & router
- β
**WS_API** Base implementation
- β
**UTILS** Refactored utils, added HMAC
- β
**REST_CLIENT** Full implementation
- β
**WS_STREAMS** User streams tested & refactored
- β
**WS_API** Exchange info, Place/Test/Cancel Orders
- β
**BUILD** vcpkg dependencies, cross-platform builds
- β
**FIX** Migrated from **fix8** β **QuickFIX**
- β
**FIX** Implemented `placeOrder` & `subscribeToFeed`
- β
**FIX** Integrated codegen classes & custom message cracker
- β
**FIX** Dual session config for feeder/broker
- β
**FIX** `onMessage` handler for user
- β
**CRYPTO** ED25519 key loading
- β
**FIX** Feeder & broker wrapper
- β
**FIX** Get Market Info implementation
---
## π TODO
- β
**WS** Example builds via vcpkg
- β
**LIBRARY** Export as library for RTEX integration
- β
**LIBRARY** Version 0.0 Beta
- β
**WS_API** Rework WS to use beast instead of wspp
- β
**WS_API** Logon without signature after authentication
- β
**FIX** Add response type with code, type, and data
- β
**REST** Remove singleton request builder and aggregate to client
- β
**WS** Remove singleton request builder and aggregate to client
- β
**UTESTS** More coverage for signatures, payloads, key loading
- β
**WS_ALL** Parameter enforcement for request types
- β
**FIX** Implement FIX messages fully
- β
**WS** Feeder-Broker implementation
- β
**CRYPTO** RSA key loading and sign
## β‘ Inspiration
The name Binfrost is a nod to the Bifrost bridge from Norse mythology β a rainbow bridge connecting worlds.
Here, itβs the bridge between your C++ code and the Binance trading universe.
## π License
MIT License β free to use, modify, and share.