Developer Hub

Error Codes

Error responses for Pyth Pro APIs

WebSocket Errors

The WebSocket API uses message-based error responses rather than numeric status codes.

Error Response

Returned for general errors such as validation failures or malformed messages.

{
  "type": "error",
  "message": "Human-readable error description"
}

SubscriptionError Response

Returned for subscription-specific errors.

{
  "type": "subscriptionError",
  "subscriptionId": 1,
  "message": "Human-readable error description"
}

Common causes:

  • Invalid or unknown price feed IDs
  • Not entitled to requested feeds
  • Duplicate subscription IDs

SubscribedWithInvalidFeedIdsIgnored Response

Returned when ignoreInvalidFeeds is set to true in the subscription request and some feed IDs were invalid. The subscription succeeds for valid feeds while invalid ones are ignored.

{
  "type": "subscribedWithInvalidFeedIdsIgnored",
  "subscriptionId": 1,
  "subscribedFeedIds": [1],
  "ignoredInvalidFeedIds": {
    "unknownIds": [99999],
    "unknownSymbols": [],
    "unsupportedChannels": [],
    "unstable": []
  }
}

Fields:

  • subscribedFeedIds — the feed IDs that were successfully subscribed
  • ignoredInvalidFeedIds — categorized reasons for ignored feeds:
    • unknownIds — feed IDs that don't exist
    • unknownSymbols — symbol names that don't exist
    • unsupportedChannels — feeds not available on the requested channel
    • unstable — feeds that are currently unstable

If all requested feeds are invalid, a subscriptionError is returned instead, even with ignoreInvalidFeeds: true.

On this page