Direct API Integration

Integrate directly into your trading systems, bots, dashboards, or analytical workflows via REST API.

Base URL

All endpoints use a single POST URL. The agent_id in the body determines which data you get.

https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized

cURL

cURL
curl -X POST \
  https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "agent_id": 574,
    "params": {
      "min_volume": "1000",
      "closed": "False"
    },
    "pagination": { "limit": 10, "offset": 0 },
    "formatter_config": { "format_type": "raw" }
  }'

Python

Python
import requests

response = requests.post(
    "https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized",
    headers={"Authorization": "Bearer YOUR_API_TOKEN"},
    json={
        "agent_id": 574,
        "params": {"closed": "False", "min_volume": "1000"},
        "pagination": {"limit": 10, "offset": 0},
        "formatter_config": {"format_type": "raw"}
    }
)
data = response.json()
print(data["data"]["results"])

JavaScript

JavaScript
const response = await fetch("https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    agent_id: 574,
    params: { closed: "False", min_volume: "1000" },
    pagination: { limit: 10, offset: 0 },
    formatter_config: { format_type: "raw" }
  })
});
const data = await response.json();
console.log(data.data.results);

Next Steps