Wallet Categories
curl --request GET \
--url https://codex-api.nomos.trade/v1/wallets/{wallet}/categories \
--header 'Authorization: Bearer <token>'import requests
url = "https://codex-api.nomos.trade/v1/wallets/{wallet}/categories"
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/wallets/{wallet}/categories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"block": 94812300,
"asOf": 1790862180,
"wallet": "0x1f0ebc543b2d411f66947041625c0aa1ce61cf79",
"period": "all",
"category": "global",
"from": 0,
"to": 1790862180,
"basis": "board",
"rows": [
{
"wallet": "0x1f0ebc543b2d411f66947041625c0aa1ce61cf79",
"category": "Politics",
"totalPnl": 1910220.4,
"realizedPnl": 2790210.44,
"unrealizedPnl": 50822.68,
"capital": 18320511.9,
"roi": 0.1551,
"volume": 39811240.33,
"buyVolume": 20114002.1,
"sellVolume": 19697238.23,
"shareVolume": 61210455.2,
"fees": 18322.4,
"fills": 48211,
"marketsTraded": 1822,
"marketsDecided": 1790,
"marketsWon": 1011,
"marketsLost": 761,
"winRate": 0.5705,
"profitFactor": 1.62,
"profitFactorInfinite": false,
"winsUsd": 7290211.5,
"lossesUsd": -4500001.06,
"avgWin": 7210.89,
"avgLoss": -5913.27,
"best": {
"pnl": 412880.5,
"conditionId": "0x8db33416a2d1ebde7438c80129e898f89a5deb3852ca64b37c4bf46513204409",
"question": "US announces end of Iranian blockade by March 31, 2027?",
"slug": "us-announces-end-of-iranian-blockade-by-march-31-2027",
"eventSlug": "us-announces-end-of-iranian-blockade",
"image": "https://polymarket-upload.s3.us-east-2.amazonaws.com/example.png"
},
"worst": {
"pnl": -188004.2,
"conditionId": "0x2c5e0f3a9b81d47e6c05f2a1b3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f6",
"question": "Example market",
"slug": "example",
"eventSlug": "example",
"image": null
},
"avgHoldSeconds": 1209600,
"redemptions": 902,
"firstActivityAt": 1667001600,
"lastActivityAt": 1790862117,
"open": {
"count": 31,
"value": 402118.2,
"cost": 351295.52
},
"approxMarkets": 4,
"updatedAt": 1790862180
}
]
}{
"error": "unknown or revoked API key"
}{
"error": "rate limit: 600 requests a minute; retry in 1 s"
}Wallets
Wallet Categories
One board row per category the wallet traded in the window, biggest realized PnL first. Other is markets in none of the nine.
GET
/
v1
/
wallets
/
{wallet}
/
categories
Wallet Categories
curl --request GET \
--url https://codex-api.nomos.trade/v1/wallets/{wallet}/categories \
--header 'Authorization: Bearer <token>'import requests
url = "https://codex-api.nomos.trade/v1/wallets/{wallet}/categories"
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/wallets/{wallet}/categories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"block": 94812300,
"asOf": 1790862180,
"wallet": "0x1f0ebc543b2d411f66947041625c0aa1ce61cf79",
"period": "all",
"category": "global",
"from": 0,
"to": 1790862180,
"basis": "board",
"rows": [
{
"wallet": "0x1f0ebc543b2d411f66947041625c0aa1ce61cf79",
"category": "Politics",
"totalPnl": 1910220.4,
"realizedPnl": 2790210.44,
"unrealizedPnl": 50822.68,
"capital": 18320511.9,
"roi": 0.1551,
"volume": 39811240.33,
"buyVolume": 20114002.1,
"sellVolume": 19697238.23,
"shareVolume": 61210455.2,
"fees": 18322.4,
"fills": 48211,
"marketsTraded": 1822,
"marketsDecided": 1790,
"marketsWon": 1011,
"marketsLost": 761,
"winRate": 0.5705,
"profitFactor": 1.62,
"profitFactorInfinite": false,
"winsUsd": 7290211.5,
"lossesUsd": -4500001.06,
"avgWin": 7210.89,
"avgLoss": -5913.27,
"best": {
"pnl": 412880.5,
"conditionId": "0x8db33416a2d1ebde7438c80129e898f89a5deb3852ca64b37c4bf46513204409",
"question": "US announces end of Iranian blockade by March 31, 2027?",
"slug": "us-announces-end-of-iranian-blockade-by-march-31-2027",
"eventSlug": "us-announces-end-of-iranian-blockade",
"image": "https://polymarket-upload.s3.us-east-2.amazonaws.com/example.png"
},
"worst": {
"pnl": -188004.2,
"conditionId": "0x2c5e0f3a9b81d47e6c05f2a1b3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f6",
"question": "Example market",
"slug": "example",
"eventSlug": "example",
"image": null
},
"avgHoldSeconds": 1209600,
"redemptions": 902,
"firstActivityAt": 1667001600,
"lastActivityAt": 1790862117,
"open": {
"count": 31,
"value": 402118.2,
"cost": 351295.52
},
"approxMarkets": 4,
"updatedAt": 1790862180
}
]
}{
"error": "unknown or revoked API key"
}{
"error": "rate limit: 600 requests a minute; retry in 1 s"
}Authorizations
Your API key: codex_ and 48 hex characters.
Path Parameters
The wallet: 0x and 40 hex.
Pattern:
^0x[0-9a-fA-F]{40}$Query Parameters
A rolling window ending now, or the lifetime. Or give from and to instead.
Available options:
all, 1d, 7d, 30d, 90d, 1y A custom window's start, unix seconds.
Its end, unix seconds, exclusive. Now when left out.
Response
OK
The leaderboard rollup's block.
When the rollup ran. Unix seconds.
The window asked for.
Unix seconds.
Unix seconds.
board: the lifetime board row; settled: a computed window.
Available options:
board, settled Show child attributes
Show child attributes