Skip to content

Add KuCoin WebSocket adapter for spot and futures with auth, batch subscriptions, and sandbox#22

Open
cto-new[bot] wants to merge 3 commits into
mainfrom
feat-kucoin-websocket-adapter-spot-futures
Open

Add KuCoin WebSocket adapter for spot and futures with auth, batch subscriptions, and sandbox#22
cto-new[bot] wants to merge 3 commits into
mainfrom
feat-kucoin-websocket-adapter-spot-futures

Conversation

@cto-new
Copy link
Copy Markdown
Contributor

@cto-new cto-new Bot commented Jan 20, 2026

Summary

This PR implements a KuCoin WebSocket adapter that supports both spot and futures trading, including token-based authentication, automatic token refresh, and batch subscriptions. Public market data channels (ticker, order book, trades, OHLCV) and private account channels (balance, orders) are implemented. Sandbox/testnet support and robust error handling are included.

Details

  • Implemented in src/websocket/adapters/kucoin.zig with an RPC-like subscribe/response model
  • Added token-based authentication flow with periodic refresh
  • Supported public channels: ticker, level2 (20/100), trades, OHLCV across multiple timeframes
  • Supported private channels: balance updates and orders for authenticated users
  • Added batch subscription and unsubscribe workflows
  • Included sandbox endpoints support for spot and futures
  • Added tests (kucoin_test.zig, kucoin_basic_test.zig, kucoin_integration_test.zig) and documentation
  • Included performance considerations and memory-safety improvements
  • Implemented robust error handling and reconnection logic

…res with token-based auth, token refresh, batch subscriptions, and sandbox support
@Macho0x Macho0x marked this pull request as ready for review January 20, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant