WebSocket Setup
Quick Start
For quick integration, follow these steps:
Connect to
wss://ws.noodles.fi/ws/coin-updateSend periodic pings every 30 seconds to keep connection alive
Subscribe using the room-based format (recommended)
Handle messages by checking the
typefieldImplement reconnection: On disconnect, automatically reconnect and resubscribe to your channels
Endpoints
wss://ws.noodles.fi/ws/coin-updateCORS Validation
Web browser connections must pass CORS validation based on the
Originheader.Contact @hiephho on Telegram for whitelisting your domain.
If CORS validation fails, the server will send 403 Forbidden status code and close the connection.
Available Rooms
The WebSocket service supports four main data rooms:
TRADES - Real-time trading transaction data
COIN_UPDATES - Real-time coin updates for coins (price, price change, volume, maker, etc.)
OHLC - Candlestick/OHLC data for various time intervals
Coin ID Format
All coin identifiers follow the format: {package}::{module}::{type}
Examples:
SUI:
0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUIUSDC:
0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC
Message Protocol
Message Types
ping
Client → Server
Keep connection alive
pong
Server → Client
Ping response
subscribe
Client → Server
Subscribe to a channel
unsubscribe
Client → Server
Unsubscribe from a channel
data
Server → Client
Real-time data or acknowledgments
error
Server → Client
Error messages
Client Message Format
Examples:
Subscribe to trades for a single coin:
Subscribe to coin statistic updates for multiple coins:
Subscribe to OHLC data:
Server Message Format
Subscription Confirmation
When you subscribe or unsubscribe, the server sends a confirmation message:
Error Handling
Common Error Messages
"Invalid channel format"
Channel name doesn't follow expected format
Check channel naming convention
"Invalid coin"
Coin ID is not valid
Verify coin ID format
"Invalid room"
Unsupported room type
Use TRADES, COIN_UPDATES, OHLC, or ALERTS
"Invalid bucket"
Unsupported time bucket for OHLC
Use supported time intervals (1, 5, 15, 30, 60, 240, 1440, 10080, 43200)
"Invalid coins format"
Coins array format is incorrect
Ensure coins is an array of valid coin IDs
"Invalid wallet"
Wallet address is not valid
Verify wallet address format
"Invalid message format"
Message JSON is malformed
Check JSON syntax
"Unsupported message type"
Unknown message type
Use ping, subscribe, or unsubscribe
Connection Errors
Rate Limit Exceeded: Temporary IP blocking due to too many connection attempts (http status 429)
Origin Not Allowed: CORS validation failure (http status 403)
Connection Timeout: Network connectivity issues
Rate Limits
Maximum Connections per IP: 20
Maximum Connection Attempts per Minute: 30
Blocking Duration: 10 minutes for IPs exceeding limits
Integration Examples
JavaScript/Web Browser
For more detailed examples including TypeScript integrations, see the individual room documentation pages.
Last updated