cURL
curl --request POST \
--url https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"agent_id": 569,
"params": {
"granularity": "1d",
"wallet": "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd",
"start_time": "2026-02-10",
"end_time": "2026-02-28"
},
"pagination": { "limit": 10, "offset": 0 },
"formatter_config": { "format_type": "raw" }
}'import requests
response = requests.post(
"https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized",
headers={"Authorization": "Bearer YOUR_TOKEN"},
json={
"agent_id": 569,
"params": {
"granularity": "1d",
"wallet": "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd",
"start_time": "2026-02-10",
"end_time": "2026-02-28",
},
"pagination": {"limit": 10, "offset": 0},
"formatter_config": {"format_type": "raw"},
},
)
print(response.json())const response = await fetch(
"https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized",
{
method: "POST",
headers: {
Authorization: "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
agent_id: 569,
params: {
granularity: "1d",
wallet: "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd",
start_time: "2026-02-10",
end_time: "2026-02-28",
},
pagination: { limit: 10, offset: 0 },
formatter_config: { format_type: "raw" },
}),
}
);
const data = await response.json();{
"timestamp": "<string>",
"params": {
"granularity": "<string>",
"wallet": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"condition_id": "<string>"
},
"pagination": {
"limit": 123,
"offset": 123,
"has_more": true
},
"data": {
"results": [
{}
]
},
"request_id": "<string>"
}Polymarket
Profit & Loss
Retrieves realized profit and loss (PnL) for a given wallet address over a specified time range and aggregation interval. You may optionally filter results to a single market using condition_id. Unlike Polymarket’s dashboard, which displays unrealized PnL, this API reports realized gains only, calculated from confirmed sell transactions or fully settled (closed) markets.
POST
/
api
/
v2
/
semantic
/
retrieve
/
parameterized
cURL
curl --request POST \
--url https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"agent_id": 569,
"params": {
"granularity": "1d",
"wallet": "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd",
"start_time": "2026-02-10",
"end_time": "2026-02-28"
},
"pagination": { "limit": 10, "offset": 0 },
"formatter_config": { "format_type": "raw" }
}'import requests
response = requests.post(
"https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized",
headers={"Authorization": "Bearer YOUR_TOKEN"},
json={
"agent_id": 569,
"params": {
"granularity": "1d",
"wallet": "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd",
"start_time": "2026-02-10",
"end_time": "2026-02-28",
},
"pagination": {"limit": 10, "offset": 0},
"formatter_config": {"format_type": "raw"},
},
)
print(response.json())const response = await fetch(
"https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized",
{
method: "POST",
headers: {
Authorization: "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
agent_id: 569,
params: {
granularity: "1d",
wallet: "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd",
start_time: "2026-02-10",
end_time: "2026-02-28",
},
pagination: { limit: 10, offset: 0 },
formatter_config: { format_type: "raw" },
}),
}
);
const data = await response.json();{
"timestamp": "<string>",
"params": {
"granularity": "<string>",
"wallet": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"condition_id": "<string>"
},
"pagination": {
"limit": 123,
"offset": 123,
"has_more": true
},
"data": {
"results": [
{}
]
},
"request_id": "<string>"
}Platform: Polymarket
Endpoint:
Authentication: Bearer token
Endpoint:
POST /v2/semantic/retrieve/parameterizedAuthentication: Bearer token
Query parameters
All requests useagent_id 569 (Profit & Loss). Set filters inside params in the playground — all values must be strings.
| Parameter | Type | Description |
|---|---|---|
granularity | String | Aggregation interval: 1d, 3d, 1w, 1m, or all. |
wallet | String | Wallet address (for example, "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd"). |
start_time | String | Start of the time range (for example, "2026-02-10"). |
end_time | String | End of the time range (for example, "2026-02-28"). |
Example Request
curl --request POST \
--url https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"agent_id": 569,
"params": {
"granularity": "1d",
"wallet": "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd",
"start_time": "2026-02-10",
"end_time": "2026-02-28"
},
"pagination": {
"limit": 10,
"offset": 0
},
"formatter_config": {
"format_type": "raw"
}
}'
import requests
response = requests.post(
"https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized",
headers={"Authorization": "Bearer YOUR_TOKEN"},
json={
"agent_id": 569,
"params": {
"granularity": "1d",
"wallet": "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd",
"start_time": "2026-02-10",
"end_time": "2026-02-28"
},
"pagination": {
"limit": 10,
"offset": 0
},
"formatter_config": {
"format_type": "raw"
}
}
)
print(response.json())
const response = await fetch("https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"agent_id": 569,
"params": {
"granularity": "1d",
"wallet": "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd",
"start_time": "2026-02-10",
"end_time": "2026-02-28"
},
"pagination": {
"limit": 10,
"offset": 0
},
"formatter_config": {
"format_type": "raw"
}
})
});
const data = await response.json();
Example Response
{
"timestamp": "",
"params": {
"condition_id": "ALL",
"end_time": "2026-02-28",
"granularity": "1d",
"start_time": "2026-02-10",
"wallet": "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd"
},
"pagination": {
"limit": 200,
"offset": 0,
"has_more": true
},
"data": {
"results": [
{
"date": "2026-02-19T00:00:00Z",
"invested": "830494.18",
"losses": 0,
"pnl": "0.00",
"proxy_wallet": "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd",
"trades": 3342,
"win_rate": "0.00",
"wins": 0
},
{
"date": "2026-02-20T00:00:00Z",
"invested": "241245.70",
"losses": 18,
"pnl": "-302209.22",
"proxy_wallet": "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd",
"trades": 406,
"win_rate": "0.49",
"wins": 2
}
]
}
}
Response fields
| Field | Type | Description |
|---|---|---|
date | String (ISO 8601) | Date for which the performance metrics are aggregated |
proxy_wallet | String | Wallet address for which performance is calculated |
invested | String (Decimal) | Total amount invested during the period |
pnl | String (Decimal) | Net profit and loss for the period (negative values indicate a loss) |
trades | Integer | Total number of trades executed during the period |
wins | Integer | Number of profitable trades |
losses | Integer | Number of losing trades |
win_rate | String (Decimal) | Proportion of winning trades (0–1 or percentage, depending on client interpretation) |
Authorizations
Your Falcon API key from the dashboard
Body
application/json
Filter parameters. All values must be strings.
Hide child attributes
Hide child attributes
Aggregation interval (for example, "1d").
Available options:
1d, 3d, 1w, 1m, all Wallet address to retrieve PnL for.
Start of the time range (for example, "2026-02-10").
End of the time range (for example, "2026-02-28").
Profit & Loss agent ID.
Available options:
569 Response
Success