Get API key
On-chain updates

Reduce price payload

posthttps://pyth-lazer.dourolabs.app/v1/reduce_price

An API key or short-lived access token, in an Authorization: Bearer <token> header.

Returns an update containing only the selected feeds. Use this endpoint to reduce the price data included in an on-chain transaction.

Submit an existing update from the WebSocket stream or either price endpoint. The router verifies the signatures, retains the selected feeds, and signs the reduced evm, solana, and leEcdsa payloads again. It also filters parsed and leUnsigned when present.

postv1/reduce_price
curl "https://pyth-lazer.dourolabs.app/v1/reduce_price" \
  -H "Authorization: Bearer $PYTH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "payload": {
      "evm": {
        "data": "2a22999addab728fb2c91fe672c977809b9d75dfe312b35e1bc9e65a1099998250db7e5f1cf36f42dfd03dcbbe835e7b4b5d2913451a0cdcfc9a9d879cf8f6a592228fd100003093c7d37500065c56d00e39c00302000000010200000007a59b2ad58a04fff80000000202000000003eb32f732004fff8",
        "encoding": "hex"
      }
    },
    "priceFeedIds": [1]
  }'
Response
{
  "evm": {
    "data": "2a22999a2bd019221815ab35dbd08b1bb69b2c425c50dbde48caf7e8deeb5e986986fb01475b54ae4864ab26d1cbe373a256afb47c80d39237bc95be37e7904bf7e97b9a01001f93c7d37500065c56d00e39c00301000000010200000007a59b2ad58a04fff8",
    "encoding": "hex"
  }
}

Request body

application/json

Send a JSON object with these fields.

payloadobjectRequired

The original, unmodified update from Stream price updates, Get latest prices, or Get signed prices at a timestamp.

evmobject | nullOptional

Signed payload for EVM chains.

datastringRequired

Binary payload encoded using the format specified by encoding.

encodingstringRequired

The encoding of data.

  • base64
  • hex
leEcdsaobject | nullOptional

Signed payload for Sui, IOTA and Stellar, with a little-endian layout and an ECDSA (secp256k1) signature.

datastringRequired

Binary payload encoded using the format specified by encoding.

encodingstringRequired

The encoding of data.

  • base64
  • hex
leUnsignedobject | nullOptional

Unsigned payload.

datastringRequired

Binary payload encoded using the format specified by encoding.

encodingstringRequired

The encoding of data.

  • base64
  • hex
parsedobject | nullOptional

Decoded feed values in the supplied update.

priceFeedsobject[]Required

Feed values included in this update.

priceFeedIdintegerRequired

Numeric ID of the price feed.

bestAskPricestring | nullOptional

Best ask price, before applying exponent.

bestBidPricestring | nullOptional

Best bid price, before applying exponent.

confidenceinteger | nullOptional

Confidence interval of the price, before applying exponent.

emaConfidenceinteger | nullOptional

Exponential moving average of the confidence interval, before applying exponent.

emaPricestring | nullOptional

Exponential moving average of the price, before applying exponent.

exponentinteger | nullOptional

Power of ten that scales the decimal fields: decimal value = mantissa * 10^exponent.

feedUpdateTimestampinteger | nullOptional

Feed update timestamp, in Unix microseconds.

Show 6 more
fundingRateinteger | nullOptional

Perpetual futures funding rate, before applying exponent.

fundingRateIntervalinteger | nullOptional

Time between funding rate updates, in microseconds.

fundingTimestampinteger | nullOptional

Timestamp of the latest funding rate, in Unix microseconds.

marketSessionstring | nullOptional

Market session of the feed update.

  • regular
  • preMarket
  • postMarket
  • overNight
  • closed
pricestring | nullOptional

Price, before applying exponent. On funding-rate feeds, the funding price.

publisherCountinteger | nullOptional

Number of publishers contributing to the update.

timestampUsstringRequired

The update timestamp, in Unix microseconds.

solanaobject | nullOptional

Signed payload for Solana.

datastringRequired

Binary payload encoded using the format specified by encoding.

encodingstringRequired

The encoding of data.

  • base64
  • hex
priceFeedIdsinteger[]Required

IDs of the feeds to retain. The router ignores IDs absent from the input update. An empty array retains no feeds.

Response

200 · application/json

Returns a JSON object with the following fields.

parsedobject

Decoded feed values retained in the reduced update.

priceFeedsobject[]

Feed values included in this update.

priceFeedIdinteger

Numeric ID of the price feed.

bestAskPricestring

Best ask price, before applying exponent.

bestBidPricestring

Best bid price, before applying exponent.

confidenceinteger

Confidence interval of the price, before applying exponent.

emaConfidenceinteger

Exponential moving average of the confidence interval, before applying exponent.

emaPricestring

Exponential moving average of the price, before applying exponent.

exponentinteger

Power of ten that scales the decimal fields: decimal value = mantissa * 10^exponent.

feedUpdateTimestampinteger

Feed update timestamp, in Unix microseconds.

Show 6 more
fundingRateinteger

Perpetual futures funding rate, before applying exponent.

fundingRateIntervalinteger

Time between funding rate updates, in microseconds.

fundingTimestampinteger

Timestamp of the latest funding rate, in Unix microseconds.

marketSessionstring

Market session of the feed update.

  • regular
  • preMarket
  • postMarket
  • overNight
  • closed
pricestring

Price, before applying exponent. On funding-rate feeds, the funding price.

publisherCountinteger

Number of publishers contributing to the update.

timestampUsstring

The update timestamp, in Unix microseconds.

evmleEcdsaleUnsignedsolanaobject

Each payload contains encoding and data. The evm, solana, and leEcdsa payloads include signatures. The leUnsigned payload does not include a signature.

datastring

Binary payload encoded using the format specified by encoding.

encodingstring

The encoding of data.

  • base64
  • hex

Errors

Status codes returned when a request fails.

400
The router could not verify the supplied payload.
401
The API key or access token is invalid.
403
Authentication is missing or the credentials do not grant access to a requested feed or channel.
429
The request rate limit for this API key was exceeded.