API of Metric ‘OHLC’ | Santiment Knowledge Base

Santiment Team

Fetch open, high, low close price values for a given slug and time interval. Projects are referred to by a unique identifier (slug).

This metric is calculated daily, so the interval should be selected accordingly.

Run in explorer

{
  ohlc(from: "2019-05-10T00:00:00.000Z", interval: "1d", slug: "bitcoin", to: "2019-06-23T00:00:00.000Z") {
    datetime
    openPriceUsd
    highPriceUsd
    lowPriceUsd
    closePriceUsd
  }
}

Run in terminal

curl \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{ "query": "query{ohlc(from:\"2019-05-10T00:00:00.000Z\",interval:\"1d\",slug:\"bitcoin\",to:\"2019-06-23T00:00:00.000Z\"){datetime, openPriceUsd, highPriceUsd, lowPriceUsd, closePriceUsd}}" }' \
  https://api.santiment.net/graphql