Skip to content
DonutStatsAPI
Sign up
Items and prices

Get price history

The full price history of one product, hourly or daily.

GET/v1/items/{key}/history

Every hourly or daily price point ever recorded for a product, oldest first, with buy order depth included. Up to 5,000 points per page: a single request covers more than 13 years of daily prices or about 7 months of hourly ones.

Hours and days with no data are left out rather than filled in, so plot gaps as gaps.

Authentication

API key with the read scope

Cached for

1 min

Data updates

A new hourly point every hour and a daily point every day. Kept forever.

Path parameters

  • keystringrequired

    Product key. Find keys with GET /v1/items.

Query parameters

  • intervalstringoptionaldefault day

    day: one point per UTC day. hour: one point per hour.

    dayhour
  • fromtimestampoptional

    Only entries at or after this time, in Unix milliseconds.

  • totimestampoptional

    Only entries before this time, in Unix milliseconds.

  • limitintegeroptionaldefault 1000

    Entries per page.

    1 to 5,000
  • cursorstringoptional

    The next value from the previous response. Leave it out for the first page. See cursors.

Response

A feed of price points, oldest first. from and to apply to t.

  • keystring

    The product key you asked for.

  • intervalstring

    day or hour.

  • limitinteger

    Entries per page.

  • nextstring | null

    Pass this as cursor to get the next page. null on the last page.

  • The entries on this page, oldest first.

    Show9 child fields
    • ttimestamp

      Start of the hour or day this point covers, in UTC.

    • pricenumber | null

      Market price at the end of the period.

    • lownumber | null

      Cheapest listing at the end of the period.

    • mediannumber | null

      Median listing at the end of the period.

    • bidnumber | null

      Best buy order at the end of the period.

    • listingsinteger

      Open listings at the end of the period.

    • quantityinteger

      Items for sale at the end of the period.

    • ordersinteger

      Open buy orders at the end of the period. Only in the full price history.

    • demandinteger

      Items those buy orders still wanted. Only in the full price history.

Status codes

StatusWhen
400Bad RequestA malformed interval, window or cursor.
404Not FoundNo product has this key.