Skip to main content

Monaco Protocol SDK v0.5.0

WebSocket API Refresh & Trades Endpoint

This release introduces a new Trades REST API, real-time trades WebSocket channel, and updates the WebSocket SDK to use a cleaner functional pattern.

What’s New

Trades API
  • REST Endpoint: GET /api/v1/trades/{trading_pair_id} for fetching recent trade history
  • WebSocket Channel: trades:{trading_pair_id} for real-time trade event streaming
  • Paginated Results: Support for skip and limit query parameters
WebSocket SDK Improvements
  • Functional Pattern: New cleaner API with sdk.ws.orders(), sdk.ws.orderbook(), sdk.ws.ohlcv(), sdk.ws.trades()
  • Unsubscribe Functions: All subscription methods now return cleanup functions
  • Required wsUrl: WebSocket URL is now a required configuration parameter
Documentation Updates
  • Complete WebSocket documentation rewrite with updated examples
  • New Trades API reference documentation
  • Fixed balance endpoint path parameter (asset_id instead of token)

Breaking Changes

WebSocket Channels Now Use UUIDs All WebSocket channels (orders, orderbook, ohlcv, trades) now require trading pair IDs (UUIDs) instead of symbols:
WebSocket API Pattern Change The WebSocket SDK has been refactored from a class-based pattern to a functional pattern:
Required wsUrl Parameter The wsUrl parameter is now required when initializing the SDK:

New Features

Trades REST API Fetch recent trades for any trading pair:
Trades WebSocket Channel Subscribe to real-time trade events:
Updated WebSocket Subscriptions All WebSocket channels now follow the same functional pattern:

Migration Guide

1. Update SDK Initialization Add the required wsUrl parameter:
2. Update WebSocket Code Replace the old pattern with the new functional approach:
3. Use Trading Pair IDs WebSocket subscriptions now use trading pair IDs (UUIDs) instead of symbols:

Packages Updated

Installation


This release includes breaking changes to the WebSocket API. Please review the migration guide before upgrading.