Skip to main content

1. Create an API key

To authenticate your requests you need an API key.
1

Go to your Dashboard

Navigate to your Dashboard and sign in.
2

Open API Keys

Click API Keys in the sidebar.
3

Create a new key

Click Create New API Key and give it a name.
4

Copy your key

Copy the API key immediately — it won’t be shown again.

2. Make your first request

Use the API key in the Authorization header as a Bearer token.
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.entityml.com/api/v1/market/data?condition_id=0008043c3ed513ecff7ee64380fc943dc73eb3dfb6674f281149efe4769f7515&date=2025-09-03"

3. Code examples

import os
import requests

def get_market_data():
    api_key = os.environ.get('ENTITY_API_KEY')

    headers = {
        'Authorization': f'Bearer {api_key}'
    }

    params = {
        'condition_id': '0008043c3ed513ecff7ee64380fc943dc73eb3dfb6674f281149efe4769f7515',
        'date': '2025-09-03'
    }

    response = requests.get(
        'https://api.entityml.com/api/v1/market/data',
        headers=headers,
        params=params
    )

    return response.json()

# Example usage
data = get_market_data()
print(data)

4. Demo

Watch the walkthrough to see the API in action:
We also provide helper scripts that, given a slug, will list all market condition IDs:

poly-storage-public-helpers

Python scripts for finding condition IDs, fetching data, and reproducing the graphs shown in the demo.