Holder Count
curl --request GET \
--url https://codex-api.nomos.trade/v1/markets/{conditionId}/holder-count \
--header 'Authorization: Bearer <token>'import requests
url = "https://codex-api.nomos.trade/v1/markets/{conditionId}/holder-count"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://codex-api.nomos.trade/v1/markets/{conditionId}/holder-count', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"conditionId": "0x8db33416a2d1ebde7438c80129e898f89a5deb3852ca64b37c4bf46513204409",
"block": 94812402,
"exact": true,
"unique": 3911,
"perToken": [
{
"outcomeIndex": 0,
"tokenId": "85254962656314962064648492774584063365849461315753521676016468731069088672",
"count": 1843
},
{
"outcomeIndex": 1,
"tokenId": "62331129939054715776656174958711147816331430749148481920944611984618598825251",
"count": 2210
}
]
}{
"error": "unknown or revoked API key"
}{
"error": "market not indexed"
}{
"error": "rate limit: 600 requests a minute; retry in 1 s"
}Markets
Holder Count
Exact holders per outcome, and unique holders across outcomes (a wallet holding both sides counts once). Cheap: use it for badges.
GET
/
v1
/
markets
/
{conditionId}
/
holder-count
Holder Count
curl --request GET \
--url https://codex-api.nomos.trade/v1/markets/{conditionId}/holder-count \
--header 'Authorization: Bearer <token>'import requests
url = "https://codex-api.nomos.trade/v1/markets/{conditionId}/holder-count"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://codex-api.nomos.trade/v1/markets/{conditionId}/holder-count', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"conditionId": "0x8db33416a2d1ebde7438c80129e898f89a5deb3852ca64b37c4bf46513204409",
"block": 94812402,
"exact": true,
"unique": 3911,
"perToken": [
{
"outcomeIndex": 0,
"tokenId": "85254962656314962064648492774584063365849461315753521676016468731069088672",
"count": 1843
},
{
"outcomeIndex": 1,
"tokenId": "62331129939054715776656174958711147816331430749148481920944611984618598825251",
"count": 2210
}
]
}{
"error": "unknown or revoked API key"
}{
"error": "market not indexed"
}{
"error": "rate limit: 600 requests a minute; retry in 1 s"
}Authorizations
Your API key: codex_ and 48 hex characters.
Path Parameters
The market: 0x and 64 hex.
Pattern:
^0x[0-9a-fA-F]{64}$