Documentation
    Preparing search index...

    Class SuiPriceServiceConnection

    Hierarchy

    • PriceServiceConnection
      • SuiPriceServiceConnection
    Index

    Constructors

    • Constructs a new Connection.

      Parameters

      • endpoint: string

        endpoint URL to the price service.

      • Optionalconfig: PriceServiceConnectionConfig

        Optional configuration for custom setups.

      Returns SuiPriceServiceConnection

    Methods

    • Fetch the latest price update data for the given price IDs.

      Uses Hermes v2 (/v2/updates/price/latest). The v1 endpoint (/api/latest_vaas) is deprecated; it returned the same payload this reads out of binary.data.

      Hermes returns one accumulator message covering every requested feed, not one per feed, so the result is normally a single element regardless of priceIds.length.

      Parameters

      • priceIds: string[]

        Array of hex-encoded price IDs.

      Returns Promise<string[]>

      Array of base64-encoded update messages.

    • Fetch price feed update data.

      Parameters

      • priceIds: string[]

        Array of hex-encoded price IDs.

      Returns Promise<Uint8Array<ArrayBufferLike>[]>

      Array of buffers containing the price update data.