oracle

Get Price

Fetch the price of a specified token in USDT from supported oracle protocols on both EVM and non-EVM chains. This endpoint allows you to retrieve real-time or historical pricing data for a token by specifying an oracle or querying all available oracles.

💡 Compute Unit Value: 25 (Fixed)

get/defi/v1/oracle/getprice

Request

  • Base URL
    https://svc.blockdaemon.com
  • URL
    https://svc.blockdaemon.com/defi/v1/oracle/getprice
  • Auth
    API key in header X-API-Key

Query parameters

assetstring required

The token name for which the price needs to be fetched (in USDT).

Example:0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
oracleId'1000' | '1001' | '1002' | '1003' | '1004' | '1100' | '1200' | '1300' | '1301' | '1302' | '1303'

The unique ID to specify the oracle protocol for queries or transactions.

Example:1000
oracleNamestring

The name of the oracle protocol to use.

Example:ChainLink
timestampstring

The specific point in time for which the price should be fetched, if required.

Example:1741869257
hoursstring

The array of hours for which the price should be fetched, if required.

Example:1
daysstring

The array of days for which the price should be fetched, if required.

Example:1
weeksstring

The array of weeks for which the price should be fetched, if required.

Example:1
vsCurrenciesstring

A comma-separated list of currency symbols to convert the amount into, such as 'USD,EUR'. This parameter is optional and allows retrieving values in multiple fiat currencies.

Example:usd,eur,gbp

Response

Successful response

statusinteger
msgstring
dataobject

Example response

{
  "status": 200,
  "msg": "success",
  "data": {
    "ChainLink": {
      "priceFeedAddress": "0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6",
      "roundId": "36893488147419104863",
      "answer": "0.99994098",
      "startedAt": "1713945803",
      "updatedAt": "1713945803",
      "answeredInRound": "36893488147419104863"
    },
    "Pyth": {
      "priceFeedAddress": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a",
      "roundId": null,
      "answer": "1.000125",
      "startedAt": null,
      "updatedAt": null,
      "answeredInRound": null
    },
    "averagePrice": "1.00003"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.