## Documentation Index Fetch the complete documentation index at: https://docs.relay.link/llms.txt Use this file to discover all available pages before exploring further.
## Agent Instructions To quote bridges and swaps, look up chains and tokens, or track Relay transactions from an agent, use the Relay MCP server: npx -y @relayprotocol/relay-mcp. It is read-only and does not sign or broadcast transactions. Setup: https://docs.relay.link/resources/developing-with-ai.md For Relay Protocol's trust model, security architecture, and audits, see https://docs.relay.link/references/protocol/security.md. For address screening, see https://docs.relay.link/security/transaction-screening.md.Intent Status
Stream transaction statuses for Relay transactions.
Subscription limits
Each WebSocket message is bounded before any channels are allocated. A subscribe or unsubscribe request that violates any of the limits below is rejected as a whole and no partial subscriptions are created.
| Limit | Value | Applies to | |
|---|---|---|---|
| Incoming message size | 16 KiB | Every client-to-server frame | |
| Filter keys per message | 16 | Keys in the filters object of a subscribe or unsubscribe request | |
| Filter combinations per message | 1000 | Cartesian product of the array values in filters | |
| Subscriptions per connection | Tier-dependent | Total active subscriptions on a single WebSocket connection |
A subscribe request whose filters would expand to more new channels than the connection has remaining capacity is rejected without subscribing to any of them. Re-subscribing to channels the connection already holds does not consume additional capacity.
The filter-key and filter-combination limits also apply to unsubscribe requests, so a connection whose subscriptions were created under older, more permissive limits should release them in appropriately sized batches.
Error responses
A rejected subscribe or unsubscribe request produces a response with status: "error" and a data.message describing the reason — for example, exceeding the filter-key limit, exceeding the filter-combination limit, exceeding remaining subscription capacity, or supplying a malformed filters object. The request has no effect on the connection's subscriptions when this happens.
AsyncAPI
id: relay-ws
title: Relay-ws
description: Stream transaction statuses for Relay transactions.
servers:
- id: production
protocol: wss
host: ws.relay.link
bindings: []
variables:
- id: apiKey
description: Relay API key
defaultValue: YOUR_API_KEY
allowedValues: []
examples: []
address: relay-ws
parameters: []
bindings: []
operations:
- &ref_3
id: receiveConnectionReady
title: Receive connection ready
description: Receive a connection-ready message from the server.
type: send
messages:
- &ref_9
id: ConnectionReady
contentType: application/json
payload:
- name: ConnectionReady
description: Sent by the server when the WebSocket connection is ready.
type: object
properties:
- name: type
type: string
enumValues:
- connection
required: true
- name: status
type: string
enumValues:
- ready
required: true
- name: data
type: object
required: true
properties:
- name: id
type: string
required: true
headers: []
jsonPayloadSchema:
type: object
properties:
type:
type: string
enum:
- connection
x-parser-schema-id: <anonymous-schema-2>
status:
type: string
enum:
- ready
x-parser-schema-id: <anonymous-schema-3>
data:
type: object
properties:
id:
type: string
x-parser-schema-id: <anonymous-schema-5>
required:
- id
x-parser-schema-id: <anonymous-schema-4>
required:
- type
- status
- data
x-parser-schema-id: <anonymous-schema-1>
title: Connection ready
description: Sent by the server when the WebSocket connection is ready.
example: |-
{
"type": "connection",
"status": "ready",
"data": {
"id": "9nqpzwmwh86"
}
}
bindings: []
extensions:
- id: x-parser-unique-object-id
value: ConnectionReady
bindings: []
extensions: &ref_0
- id: x-parser-unique-object-id
value: relay-ws
- &ref_1
id: sendSubscribeRequest
title: Send subscribe request
description: Send a subscribe request to the server.
type: receive
messages:
- &ref_7
id: SubscribeRequest
contentType: application/json
payload:
- name: SubscribeRequest
description: >-
Client requests subscription to real-time transaction status
events.
type: object
properties:
- name: type
type: string
enumValues:
- subscribe
required: true
- name: event
type: string
required: true
- name: filters
type: object
required: false
properties:
- name: id
type: string
required: true
headers: []
jsonPayloadSchema:
type: object
properties:
type:
type: string
enum:
- subscribe
default: subscribe
x-parser-schema-id: <anonymous-schema-7>
event:
type: string
default: request.status.updated
x-parser-schema-id: <anonymous-schema-8>
filters:
type: object
properties:
id:
type: string
x-parser-schema-id: <anonymous-schema-10>
required:
- id
x-parser-schema-id: <anonymous-schema-9>
required:
- type
- event
x-parser-schema-id: <anonymous-schema-6>
title: Subscribe request
description: Client requests subscription to real-time transaction status events.
example: |-
{
"type": "subscribe",
"event": "request.status.updated",
"filters": {
"id": "0xae0827617d4ae75b406969971c2d4df9a8e8d819ff0f09581fb45ca123fcc7a0"
}
}
bindings: []
extensions:
- id: x-parser-unique-object-id
value: SubscribeRequest
bindings: []
extensions: *ref_0
- &ref_4
id: receiveSubscribeResponse
title: Receive subscribe response
description: Receive subscription confirmation from the server.
type: send
messages:
- &ref_10
id: SubscribeResponse
contentType: application/json
payload:
- name: SubscribeResponse
description: Server acknowledges a successful subscription.
type: object
properties:
- name: type
type: string
enumValues:
- subscribe
required: true
- name: status
type: string
enumValues:
- success
required: true
- name: data
type: object
required: true
properties:
- name: event
type: string
required: true
- name: filters
type: object
required: false
properties:
- name: id
type: string
required: true
headers: []
jsonPayloadSchema:
type: object
properties:
type:
type: string
enum:
- subscribe
x-parser-schema-id: <anonymous-schema-12>
status:
type: string
enum:
- success
x-parser-schema-id: <anonymous-schema-13>
data:
type: object
properties:
event:
type: string
x-parser-schema-id: <anonymous-schema-15>
filters:
type: object
properties:
id:
type: string
x-parser-schema-id: <anonymous-schema-17>
required:
- id
x-parser-schema-id: <anonymous-schema-16>
required:
- event
x-parser-schema-id: <anonymous-schema-14>
required:
- type
- status
- data
x-parser-schema-id: <anonymous-schema-11>
title: Subscribe response
description: Server acknowledges a successful subscription.
example: |-
{
"type": "subscribe",
"status": "success",
"data": {
"event": "request.status.updated",
"filters": {
"id": "0xae0827617d4ae75b406969971c2d4df9a8e8d819ff0f09581fb45ca123fcc7a0"
}
}
}
bindings: []
extensions:
- id: x-parser-unique-object-id
value: SubscribeResponse
bindings: []
extensions: *ref_0
- &ref_5
id: receiveRequestStatusUpdatedEvent
title: Receive request status updated event
description: Receive request.status.updated events from the server.
type: send
messages:
- &ref_11
id: RequestStatusUpdatedEvent
contentType: application/json
payload:
- name: RequestStatusUpdatedEvent
description: Server pushes real-time transaction status events.
type: object
properties:
- name: event
type: string
enumValues:
- request.status.updated
required: true
- name: data
type: object
required: true
properties:
- name: status
type: string
required: true
- name: inTxHashes
type: array
required: false
properties:
- name: item
type: string
required: false
- name: txHashes
type: array
required: false
properties:
- name: item
type: string
required: false
- name: updatedAt
type: number
required: true
- name: originChainId
type: number
required: true
- name: destinationChainId
type: number
required: true
- name: requestId
type: string
required: true
- name: publishedAt
type: number
required: true
headers: []
jsonPayloadSchema:
type: object
properties:
event:
type: string
enum:
- request.status.updated
x-parser-schema-id: <anonymous-schema-29>
data:
type: object
properties:
status:
type: string
x-parser-schema-id: <anonymous-schema-31>
inTxHashes:
type: array
items:
type: string
x-parser-schema-id: <anonymous-schema-33>
x-parser-schema-id: <anonymous-schema-32>
txHashes:
type: array
items:
type: string
x-parser-schema-id: <anonymous-schema-35>
x-parser-schema-id: <anonymous-schema-34>
updatedAt:
type: number
x-parser-schema-id: <anonymous-schema-36>
originChainId:
type: number
x-parser-schema-id: <anonymous-schema-37>
destinationChainId:
type: number
x-parser-schema-id: <anonymous-schema-38>
requestId:
type: string
x-parser-schema-id: <anonymous-schema-39>
required:
- status
- updatedAt
- originChainId
- destinationChainId
- requestId
x-parser-schema-id: <anonymous-schema-30>
publishedAt:
type: number
x-parser-schema-id: <anonymous-schema-40>
required:
- event
- data
- publishedAt
x-parser-schema-id: <anonymous-schema-28>
title: Request status updated event
description: Server pushes real-time transaction status events.
example: |-
{
"event": "request.status.updated",
"data": {
"status": "pending",
"inTxHashes": [
"5Mmr6W2xicDPW3QuNVYcEiyVTxxVSBZ39zMugn9ePkuvZKc9ask4p33i4c81HTVthNFab5oKRCshCK6a1tveUyN6"
],
"txHashes": [],
"updatedAt": 1765989801294,
"originChainId": 792703809,
"destinationChainId": 8453,
"requestId": "0x0931cd6b5a77317ccfe2513d29309db748bbad68eeda9b1235f902622d2af43d"
},
"publishedAt": 1765989801309
}
bindings: []
extensions:
- id: x-parser-unique-object-id
value: RequestStatusUpdatedEvent
bindings: []
extensions: *ref_0
- &ref_2
id: sendUnsubscribeRequest
title: Send unsubscribe request
description: Send an unsubscribe request to the server.
type: receive
messages:
- &ref_8
id: UnsubscribeRequest
contentType: application/json
payload:
- name: UnsubscribeRequest
description: >-
Client unsubscribes from request.status.updated events. Not
required if disconnecting from the websocket as the server cleans
up automatically.
type: object
properties:
- name: type
type: string
enumValues:
- unsubscribe
required: true
- name: event
type: string
required: true
- name: filters
type: object
required: false
properties:
- name: id
type: string
required: true
headers: []
jsonPayloadSchema:
type: object
properties:
type:
type: string
enum:
- unsubscribe
default: unsubscribe
x-parser-schema-id: <anonymous-schema-19>
event:
type: string
default: request.status.updated
x-parser-schema-id: <anonymous-schema-20>
filters:
type: object
properties:
id:
type: string
x-parser-schema-id: <anonymous-schema-22>
required:
- id
x-parser-schema-id: <anonymous-schema-21>
required:
- type
- event
x-parser-schema-id: <anonymous-schema-18>
title: Unsubscribe request
description: >-
Client unsubscribes from request.status.updated events. Not required
if disconnecting from the websocket as the server cleans up
automatically.
example: |-
{
"type": "unsubscribe",
"event": "request.status.updated",
"filters": {
"id": "0xae0827617d4ae75b406969971c2d4df9a8e8d819ff0f09581fb45ca123fcc7a0"
}
}
bindings: []
extensions:
- id: x-parser-unique-object-id
value: UnsubscribeRequest
bindings: []
extensions: *ref_0
- &ref_6
id: receiveUnsubscribeResponse
title: Receive unsubscribe response
description: Receive an unsubscribe confirmation from the server.
type: send
messages:
- &ref_12
id: UnsubscribeResponse
contentType: application/json
payload:
- name: UnsubscribeResponse
description: Server confirms unsubscription.
type: object
properties:
- name: type
type: string
enumValues:
- unsubscribe
required: true
- name: status
type: string
enumValues:
- success
required: true
- name: data
type: object
required: true
properties:
- name: event
type: string
required: true
headers: []
jsonPayloadSchema:
type: object
properties:
type:
type: string
enum:
- unsubscribe
x-parser-schema-id: <anonymous-schema-24>
status:
type: string
enum:
- success
x-parser-schema-id: <anonymous-schema-25>
data:
type: object
properties:
event:
type: string
x-parser-schema-id: <anonymous-schema-27>
required:
- event
x-parser-schema-id: <anonymous-schema-26>
required:
- type
- status
- data
x-parser-schema-id: <anonymous-schema-23>
title: Unsubscribe response
description: Server confirms unsubscription.
example: |-
{
"type": "unsubscribe",
"status": "success",
"data": {
"event": "request.status.updated"
}
}
bindings: []
extensions:
- id: x-parser-unique-object-id
value: UnsubscribeResponse
bindings: []
extensions: *ref_0
sendOperations:
- *ref_1
- *ref_2
receiveOperations:
- *ref_3
- *ref_4
- *ref_5
- *ref_6
sendMessages:
- *ref_7
- *ref_8
receiveMessages:
- *ref_9
- *ref_10
- *ref_11
- *ref_12
extensions:
- id: x-parser-unique-object-id
value: relay-ws
securitySchemes: []
This documentation is built and hosted on Mintlify, a developer documentation platform.