Introduction to WebSocket
- The WebSocket API automatically pushes relevant information to all clients when the server receives an EEW
- Heartbeat mechanism: The server sends a heartbeat packet every minute or after the connection is established to maintain the connection. The client can optionally reply with a ping packet (recommended).
Connection and Usage Guidelines
- As a general rule, each client should maintain only one active connection to the Wolfx Project EEW WebSocket service at a time. Avoid unnecessary duplicate connections, including separate connections for multiple UI components, and reuse an existing connection wherever possible.
- Manage reconnections reasonably to avoid unnecessary repeated connections and resource waste. A brief overlap between old and new connections during a normal connection transition does not in itself constitute malicious duplication. This is a client reasonable-use requirement, not a statement that the server enforces an exact one-connection limit.
- If multiple EEW data sources are needed simultaneously, consider the existing
all_eewaggregate channel first, according to your actual requirements and the endpoint descriptions below. This guidance does not guarantee coverage of unverified data. - Ordinary information use that complies with Section 6 of the Terms of Service, including processing and transmission through your own servers, requires no individual permission. Independent data provision as defined in that Section requires prior express permission. All other usage conditions and applicable data-source conditions must also be followed.
WebSocket Call URLs
- Receive all JSON API pushes:
text
wss://ws-api.wolfx.jp/all_eew
- Sichuan Earthquake Early Warning JSON API:
text
wss://ws-api.wolfx.jp/sc_eew
- JMA Earthquake Early Warning JSON API:
text
wss://ws-api.wolfx.jp/jma_eew
- Fujian Earthquake Early Warning JSON API:
text
wss://ws-api.wolfx.jp/fj_eew
- Chongqing Earthquake Early Warning JSON API:
text
wss://ws-api.wolfx.jp/cq_eew
- China Earthquake Networks Center Earthquake Early Warning JSON API:
text
wss://ws-api.wolfx.jp/cenc_eew
- China Earthquake Networks Center Earthquake Information JSON API:
text
wss://ws-api.wolfx.jp/cenc_eqlist
- JMA Earthquake Information JSON API:
text
wss://ws-api.wolfx.jp/jma_eqlist
- For detailed JSON field parsing, refer to: https://api.wolfx.jp
WebSocket Manual Query Commands
- Ping:
text
ping
- Sichuan Earthquake Early Warning JSON:
text
query_sceew
- JMA Earthquake Early Warning JSON:
text
query_jmaeew
- Fujian Earthquake Early Warning JSON:
text
query_fjeew
- Chongqing Earthquake Early Warning JSON:
text
query_cqeew
- China Earthquake Networks Center Earthquake Early Warning JSON:
text
query_cenceew
- China Earthquake Networks Center Earthquake Information JSON:
text
query_cenceqlist
- JMA Earthquake Information JSON:
text
query_jmaeqlist
WebSocket JSON Data Specification
- Common JSON Field Description:
| Field | Description |
|---|---|
type | Data type / data source (see API homepage for specific values) (String) |
- WebSocket Heartbeat Packet - JSON Field Description:
| Field | Description |
|---|---|
type | heartbeat (String) |
ver | Server version number (Number) |
id | Client connection UUID (String) |
timestamp | Heartbeat sent timestamp in milliseconds (String) |
- WebSocket Pong Packet - JSON Field Description:
| Field | Description |
|---|---|
type | pong (String) |
timestamp | Pong sent timestamp in milliseconds (String) |