Skip to main content
Ankr WebSockets are available through Uniblock with a validation endpoint and a matching WSS endpoint.

Endpoints

  • WebSocket (WSS): wss://lively-dust-7404.lively-fog-f2d9.workers.dev/ankr?chainId=1
  • HTTP (Validation): https://lively-dust-7404.lively-fog-f2d9.workers.dev/ankr/validate?chainId=1

Required parameters

  • chainId is required.
  • Include the X-API-KEY header in both validation and connection requests.

Workflow

  1. Validate the request with the HTTP endpoint.
  2. Connect to the WSS endpoint using the same chainId.
  3. Send your Ankr WebSocket subscription message.

Example validation request

curl --request GET \
  --url 'https://lively-dust-7404.lively-fog-f2d9.workers.dev/ankr/validate?chainId=1' \
  --header 'X-API-KEY: YOUR_UNIBLOCK_API_KEY'

Pricing

Responses are billed using the shared WebSocket pricing formula:
  • 0.1 CU * 3181.819 per response returned