Live per-market PnL for a (wallet, market) pair
Live “hover” PnL for a single wallet on a single market, sourced from a fast real-time pipeline — quick regardless of how far back the wallet’s earliest trade goes. Returns one row per token held on the contract (e.g. YES + NO for a binary market) plus aggregate totals across those tokens. Only providers on this pipeline are supported: polymarket, predictfun; kalshi and hyperliquid are rejected with 400 and must use /pnl/{user_id}. When the underlying pipeline is disabled (e.g. while a backfill is ramping), the endpoint returns a well-formed zero/empty payload (tokens: [], all totals 0.0) instead of erroring, matching the “no data” state the frontend already renders gracefully. No credentials are required. If you send an API key, it needs position:read, and the requested provider must have API access enabled.
curl --request GET \
--url https://data.kairos.trade/pnl/hover/{provider_id}/{wallet}/{contract_id}import requests
url = "https://data.kairos.trade/pnl/hover/{provider_id}/{wallet}/{contract_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://data.kairos.trade/pnl/hover/{provider_id}/{wallet}/{contract_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://data.kairos.trade/pnl/hover/{provider_id}/{wallet}/{contract_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://data.kairos.trade/pnl/hover/{provider_id}/{wallet}/{contract_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data.kairos.trade/pnl/hover/{provider_id}/{wallet}/{contract_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.kairos.trade/pnl/hover/{provider_id}/{wallet}/{contract_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"provider_id": "polymarket",
"wallet_address": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b",
"contract_id": "0xabc123condition",
"tokens": [
{
"token_id": "10723948572...4",
"outcome": "YES",
"balance": 150,
"avg_entry_price": 0.42,
"cost_basis_usd": 63,
"realized_pnl_usd": 0,
"mark_price": 0.55,
"position_value_usd": 82.5,
"unrealized_pnl_usd": 19.5
}
],
"total_unrealized_pnl_usd": 19.5,
"total_realized_pnl_usd": 0,
"total_position_value_usd": 82.5
}{
"detail": "Invalid API credentials"
}{
"detail": [
{}
]
}{
"error": "Rate limit exceeded: 100 per 1 minute"
}{
"detail": "Invalid provider"
}Path Parameters
Response
Per-token PnL rows and aggregate totals for the wallet on this market. Returns an empty/zeroed payload (not a 404) when the underlying PnL pipeline is disabled.
Live hover-on-wallet PnL for a single (wallet, market) pair. Returns a zeroed/empty payload (tokens: []) instead of erroring when the underlying PnL pipeline is disabled.
Was this page helpful?
curl --request GET \
--url https://data.kairos.trade/pnl/hover/{provider_id}/{wallet}/{contract_id}import requests
url = "https://data.kairos.trade/pnl/hover/{provider_id}/{wallet}/{contract_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://data.kairos.trade/pnl/hover/{provider_id}/{wallet}/{contract_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://data.kairos.trade/pnl/hover/{provider_id}/{wallet}/{contract_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://data.kairos.trade/pnl/hover/{provider_id}/{wallet}/{contract_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data.kairos.trade/pnl/hover/{provider_id}/{wallet}/{contract_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.kairos.trade/pnl/hover/{provider_id}/{wallet}/{contract_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"provider_id": "polymarket",
"wallet_address": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b",
"contract_id": "0xabc123condition",
"tokens": [
{
"token_id": "10723948572...4",
"outcome": "YES",
"balance": 150,
"avg_entry_price": 0.42,
"cost_basis_usd": 63,
"realized_pnl_usd": 0,
"mark_price": 0.55,
"position_value_usd": 82.5,
"unrealized_pnl_usd": 19.5
}
],
"total_unrealized_pnl_usd": 19.5,
"total_realized_pnl_usd": 0,
"total_position_value_usd": 82.5
}{
"detail": "Invalid API credentials"
}{
"detail": [
{}
]
}{
"error": "Rate limit exceeded: 100 per 1 minute"
}{
"detail": "Invalid provider"
}
