Skip to main content

Endpoint

wss://api.parsecapi.com/ws
Send an auth message immediately after connecting. Authentication must complete within 15 seconds.

Client Auth Messages

type
string
required
auth for API-key auth, or auth_terminal for terminal-token auth.
api_key
string
Your Parsec API key. Required when type is auth.
token
string
Terminal token. Required when type is auth_terminal.
{ "type": "auth", "api_key": "pk_live_YOUR_KEY" }

Server Responses

{ "type": "auth_ok", "customer_id": "cust_abc123" }
After auth_ok, you can send subscription messages immediately.

Notes

  • Sending a second auth message on the same connection returns a normal error frame with code 1001 and message already authenticated.
  • Connection-level auth failures do not include a market identifier.
  • If the auth window expires, reconnect and authenticate again.