POST
/
api
/
indices
Create a new index
curl --request POST \
  --url https://api.data.adj.news/api/indices \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "constituents": [
    {
      "adj_ticker": "<string>",
      "weight": 50
    }
  ]
}'
{
  "data": {
    "index_id": "<string>",
    "name": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "constituents": [
      {
        "adj_ticker": "<string>",
        "weight": 50
      }
    ]
  }
}

Create a New Index

Create an index composed of market constituents. Constituent weights must sum to 100.

Request Body

{
  "name": "AI MegaCap Index",
  "constituents": [
    { "adj_ticker": "PM-TRUMP-2024", "weight": 40 },
    { "adj_ticker": "KLSHI-CPI-2025", "weight": 30 },
    { "adj_ticker": "MANI-AI-2025", "weight": 30 }
  ]
}

Response

{
  "data": {
    "index_id": "22e1c8b3-9f3a-4a0a-8c3c-9c2b9b9f4a10",
    "name": "AI MegaCap Index",
    "created_at": "2025-01-20T12:00:00Z",
    "updated_at": "2025-01-20T12:00:00Z",
    "constituents": [
      { "adj_ticker": "PM-TRUMP-2024", "weight": 40 },
      { "adj_ticker": "KLSHI-CPI-2025", "weight": 30 },
      { "adj_ticker": "MANI-AI-2025", "weight": 30 }
    ]
  }
}

Example

curl -X POST "https://api.data.adj.news/api/indices" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "AI MegaCap Index",
    "constituents": [
      { "adj_ticker": "PM-TRUMP-2024", "weight": 40 },
      { "adj_ticker": "KLSHI-CPI-2025", "weight": 30 },
      { "adj_ticker": "MANI-AI-2025", "weight": 30 }
    ]
  }'

Authorizations

Authorization
string
header
required

Enter your API key as the bearer token

Body

application/json

Response

200
application/json

Index created successfully

The response is of type object.