Show the mood in your own app

Display the AssetFeed Sentiment Index in a dashboard, a widget or an app, with one call a day.

You need: an API key (opens in a new tab), a place to store one number a day and a small chart library.

  1. Get an API key

    Create a key on the API keys (opens in a new tab) page and keep it in an environment variable, not in your code. Each request uses credits.

    The API keys page
  2. Call the API once a day

    Call get_market_index once a day. The value for a day is calculated once, for the previous UTC day, so more calls do not help. See the REST docs (opens in a new tab) for the request.

    An example request to the API
  3. Store the value

    Save the date and the value in your database. Over time this gives you a longer history than one call returns.

  4. Draw it

    Show the last value and a line of the last 30 days. Link to the Sentiment index (opens in a new tab) for readers who want more.

  • What you will see

    A widget with today's mood value and a small chart, updated once a day.

  • Data used

    get_market_index through the API (opens in a new tab) with one key.

  • Limits

    • Show the date the value is for.
    • Describe the mood, not prices.