Put attention charts on a watchlist page

Show a small mention chart next to each asset on your own watchlist page.

You need: an API key (opens in a new tab), a list of assets 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. Request the daily mentions

    For each asset call get_chart_data with kind mentions and 30 days. Cache the answers, since the values change once a day.

    A JavaScript example that asks for a daily series
  3. Draw a small chart per row

    Draw a small line next to each asset, without axes. Show the last value as a number beside it.

  4. Link to the asset

    Link each row to the asset page on AssetFeed, so readers can see the details.

  • What you will see

    A watchlist page where each asset has a small chart of its daily mentions.

  • Data used

    get_chart_data with kind mentions through the API (opens in a new tab).

  • Limits

    • Cache the values: asking for the same day again gives the same number.
    • Mentions are not prices.