MarketHunt Chart
Generate a PNG chart from an item's price history on MarketHunt.
Get a price chart
Replace :chart with a MarketHunt item ID. A .png suffix is optional.
Add -small to the ID or include the small query parameter to generate a compact chart.
Path parameters
- Name
chartTypestringDescriptionMarketHunt item ID, optionally followed by
.pngor-small.png.
Query parameters
- Name
smallTypebooleanDescriptionGenerate the compact chart when present, regardless of its value.
Response
A PNG image with a Content-Type of image/png. Returns 404 when MarketHunt does not recognize the item ID.
Request
GET
https://api.mouse.rip/markethunt-chart/926.pngconst response = await fetch(
'https://api.mouse.rip/markethunt-chart/926.png',
)
const chart = await response.blob()
document.querySelector('img').src = URL.createObjectURL(chart)
Response
HTTP/1.1 200 OK
Content-Type: image/png
Cache-Control: public, max-age=86400
<PNG image data>