Pyth Lazer Router API 0.1.0

This service allows the consumers to fetch price updates.

Authentication

The streaming WebSocket endpoint (/v1/stream) requires authentication. The client may use either of the following methods to specify their access token:

  • Set Authorization header of the request to Bearer <token>.
  • Specify the token in a GET parameter by adding ?ACCESS_TOKEN=<token> to the request URL.

Servers

  • wss://pyth-lazer-staging.dourolabs.app/wsspyth lazer

Operations

  • SEND /v1/stream

    Send a request to the server.

    The schema of the Request message provided below lists the available request types.

    Operation IDrequest

    Available only on servers:

    Accepts the following message:

    Request
    Message IDRequest
    object anyOf

    Examples

  • RECEIVE /v1/stream

    Receive a response from the server.

    The schema of the Response message provided below lists the available response types.

    Operation IDresponse

    Available only on servers:

    Accepts the following message:

    Response
    Message IDResponse
    object anyOf

    Examples

Schemas

  • object anyOf
  • object [SubscribeRequest]

    Subscribe to price updates

    After a successful subscription, the server will respond with a Subscribed message, followed by StreamUpdated messages. If a subscription cannot be made, the server will respond with a SubscriptionError message containing the error message.

      Examples values:
    • {"type":"subscribe","subscriptionId":1,"priceFeedIds":[1,2],"properties":["price"],"chains":["solana"],"deliveryFormat":"json","channel":"fixed_rate@200ms","jsonBinaryEncoding":"hex"}
  • object [UnsubscribeRequest]

    Unsubscribe from price updates.

    After a successful unsubscription, the server will respond with a Unsubscribed message and stop sending StreamUpdated messages for that subscription. If the unsubscription cannot be made, the server will respond with a SubscriptionError message containing the error message.

  • object anyOf
  • object [SubscribedResponse]

    Notification of a successful subscription.

  • object [UnsubscribedResponse]

    Notification of a successful unsubscription.

  • object [StreamUpdated]

    Notification of a price update.

      Examples values:
    • {"type":"streamUpdated","subscriptionId":1,"parsed":{"timestampUs":"1730986152400000","priceFeeds":[{"priceFeedId":1,"price":"1006900000000"},{"priceFeedId":2,"price":"2006900000000"}]},"solana":{"encoding":"hex","data":"b9011a82d239c094c52016990d6ca2b261dbb1157ad503cbd3ea0679493316150cf3457624d19ec3f6e0a0e94373ab0971e39d939beda15cc02eb3c5454eb700f1f7310df65210bee4fcf5b1cee1e537fabcfd95010297653b94af04d454fc473e94834f2a0075d3c7938094b99e52260600030201000000010000b5ea6fea00000002000000010000c58f44d3010000"}}
  • object [SubscriptionError]

    Notification of a failed subscription or unsubscription.

  • object [Error]

    Notification of a general error.