WebSocket API
Real-time bidirectional messaging for custom clients and apps.
Message format
Send a message
{
"type": "message",
"content": "审计这个合约 0x...",
"channelId": "ws-session-1",
"userId": "user-123",
"token": "your-gateway-token"
}Receive a reply
{
"type": "reply",
"content": "合约审计结果:\n风险等级: LOW\n..."
}Ping and pong
Error message
JavaScript example
Last updated