Traders
curl --request GET \
--url https://codex-api.nomos.trade/v1/markets/{conditionId}/traders \
--header 'Authorization: Bearer <token>'import requests
url = "https://codex-api.nomos.trade/v1/markets/{conditionId}/traders"
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}/traders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"conditionId": "0x8db33416a2d1ebde7438c80129e898f89a5deb3852ca64b37c4bf46513204409",
"block": 94812402,
"sort": "total",
"marks": [
0.24,
0.76
],
"traderCount": 4019,
"traders": [
{
"wallet": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"realizedPnl": 1204.18,
"unrealizedPnl": 412.5,
"totalPnl": 1616.68,
"shares": [
41250.5,
0
],
"outcomes": [
{
"wallet": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"outcomeIndex": 0,
"shares": 41250.5,
"costBasis": 9487.62,
"avgPrice": 0.23,
"avgBuyPrice": 0.2291,
"realizedPnl": 1204.18,
"boughtShares": 52000,
"boughtUsd": 11913.2,
"soldShares": 10749.5,
"soldUsd": 3601.08,
"avgSellPrice": 0.335,
"splitShares": 0,
"mergedShares": 0,
"mergeUsd": 0,
"redeemedShares": 0,
"redeemUsd": 0,
"fees": 24.31,
"fills": 37,
"firstTradeAt": 1783987320,
"lastTradeAt": 1790862117,
"partialHistory": false,
"basisApprox": false,
"converted": false,
"amm": false
}
]
}
]
}{
"error": "unknown or revoked API key"
}{
"error": "market not indexed"
}{
"error": "rate limit: 600 requests a minute; retry in 1 s"
}Markets
Traders
Every trader of the market folded to one row per wallet, sorted by total or realized PnL. Here marks are prices by outcome index, unlike Top Traders.
GET
/
v1
/
markets
/
{conditionId}
/
traders
Traders
curl --request GET \
--url https://codex-api.nomos.trade/v1/markets/{conditionId}/traders \
--header 'Authorization: Bearer <token>'import requests
url = "https://codex-api.nomos.trade/v1/markets/{conditionId}/traders"
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}/traders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"conditionId": "0x8db33416a2d1ebde7438c80129e898f89a5deb3852ca64b37c4bf46513204409",
"block": 94812402,
"sort": "total",
"marks": [
0.24,
0.76
],
"traderCount": 4019,
"traders": [
{
"wallet": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"realizedPnl": 1204.18,
"unrealizedPnl": 412.5,
"totalPnl": 1616.68,
"shares": [
41250.5,
0
],
"outcomes": [
{
"wallet": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"outcomeIndex": 0,
"shares": 41250.5,
"costBasis": 9487.62,
"avgPrice": 0.23,
"avgBuyPrice": 0.2291,
"realizedPnl": 1204.18,
"boughtShares": 52000,
"boughtUsd": 11913.2,
"soldShares": 10749.5,
"soldUsd": 3601.08,
"avgSellPrice": 0.335,
"splitShares": 0,
"mergedShares": 0,
"mergeUsd": 0,
"redeemedShares": 0,
"redeemUsd": 0,
"fees": 24.31,
"fills": 37,
"firstTradeAt": 1783987320,
"lastTradeAt": 1790862117,
"partialHistory": false,
"basisApprox": false,
"converted": false,
"amm": false
}
]
}
]
}{
"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}$Query Parameters
Rows, 1 to 1,000. Out of range is clamped.
Required range:
1 <= x <= 1000Total (open legs at the marks) or realized.
Available options:
total, realized Prices by outcome index: 0.24,0.76.