Oracle Snapshots

Query historical oracle prices.

Rate limits

  • Dynamic based on # of product_ids and interval.count (weight = product_ids * interval.count / 100). If no product_ids are specified, # of product_ids = 100.

    • E.g: With product_ids=[1, 2, 3, 4] and interval.count=60 you can make up to 100 requests per min or 25 requests/10 secs.

See more details in API Rate limits

Request

Query oracle snapshots ordered by timestamp desc.

POST [ARCHIVE_ENDPOINT]

Body

{
    "oracle_snapshots": {
        "interval": {
          "count": 2,
          "granularity": 3600,
          "max_time": 1691083697,
        },
        "product_ids": [1, 2]
    }
}

Request Parameters

Parameter
Type
Required
Description

interval

object

Yes

Object to specify desired time period for data

interval.count

number

Yes

Number of snapshots to return, limit 100. Also limited to interval.count * # product_ids < 2000

interval.granularity

number

Yes

Granularity value in seconds

interval.max_time

number / string

No

When providing max_time (unix epoch in seconds), only return snapshots with timestamp <= max_time. If no value is entered, max_time defaults to the current time.

product_ids

number[]

No

list of product ids to fetch snapshots for, defaults to all products

Response

Note: Returns a map of product_id -> oracle_price

{
    "snapshots": [
        {
            "timestamp": 1750947789,
            "oracle_prices": {
                "1": "107070085854928675234384",
                "2": "107142264360834928244199",
                "3": "2429504824306351505279",
                "4": "2432555704353591678775"
            }
        },
        {
            "timestamp": 1750946389,
            "oracle_prices": {
                "3": "2429308011631032156662",
                "1": "106963557680819440289916",
                "2": "106954360458642468300594",
                "4": "2432317727821684993445"
            }
        }
    ]
}

Last updated