Open-source exchange connectors for the Flox engine.
Available adapters:
- Bybit V5 WebSocket + REST executor
- Bitget V2 WebSocket + classic account REST executor
- Hyperliquid WebSocket + REST executor (must use utils/hl_signerd.py as a signing daemon)
- Polymarket WebSocket + Rust FFI executor
- C++23 compiler, CMake ≥ 3.20
- Submodules (fetched with
--recurse-submodules):- Flox – core engine interfaces
- simdjson – JSON parsing
- IXWebSocket – TLS WebSocket client
- System libs: OpenSSL, Zlib, pthread, curl
- For Hyperliquid connector:
- python3
- hyperliquid-python-sdk (install via
pip install git+https://github.com/hyperliquid-dex/hyperliquid-python-sdk.git)
- For Polymarket connector:
- Rust toolchain (cargo)
Clone with:
git clone --recurse-submodules https://github.com/eeiaao/flox-connectors.gitmkdir build && cd build
cmake -DBUILD_TESTS=OFF .. # set to ON to compile GoogleTest units
cmake --build . -jThe static library exports the target flox::flox-connectors, ready for add_subdirectory or find_package.
The Polymarket connector requires a proxy wallet setup for trading. You need:
- Private Key (
privateKey) - Hex-encoded private key of your trading wallet (with or without0xprefix) - Funder Wallet (
funderWallet) - Address of the proxy/funder wallet that holds USDC allowance (with0xprefix)
- Go to polymarket.com and connect your wallet
- Enable trading - this creates a proxy wallet on Polygon
- Deposit USDC to fund your proxy wallet
- Find your proxy wallet address in account settings or via the API
#include <flox-connectors/polymarket/polymarket_order_executor.h>
flox::PolymarketOrderExecutor executor(
"0xYOUR_PRIVATE_KEY_HEX", // Trading wallet private key
"0xYOUR_PROXY_WALLET_ADDRESS", // Funder/proxy wallet address
logger
);
if (executor.init()) {
executor.warmup(); // Pre-establish TLS connections
executor.prefetch(tokenId); // Cache token metadata
auto result = executor.buy(tokenId, Volume::fromDouble(10.0)); // Buy $10 worth
}Store credentials securely:
export PM_PRIVATE_KEY="0x..."
export PM_FUNDER_WALLET="0x..."Contributions are welcome! Please follow the project's .clang-format style and keep pull requests focused.
For commercial support, enterprise connectors, and custom development services, visit floxlabs.dev
This software is provided “as is”, without warranty of any kind. The authors are not affiliated with Bybit or any other exchange and are not responsible for financial losses or regulatory issues arising from the use of this code. Use at your own risk and ensure compliance with each venue’s terms of service.