readMessages
Retrieve buffered messages from a Bybit subscription, optionally limiting to recent N, and check connection activity. Set clearAfterRead to keep messages for later.
Instructions
读取指定订阅已积累的消息。 默认读取全部并清空缓冲区(clearAfterRead=true);设为 false 可保留消息继续累积。 通过 limit 参数可只取最近 N 条消息。 返回 status 字段可判断连接是否仍然活跃(active / reconnecting / closed)。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"subscriptionId": "<subscriptionId>"
},
"name": "readMessages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | 最多返回最近 N 条消息;不填则返回全部缓冲消息 | |
| clearAfterRead | No | 读取后是否清空缓冲区(默认 true) | |
| subscriptionId | Yes | 由 startSubscription 返回的订阅 ID |