Trade Counts
curl --request GET \
--url https://codex-api.nomos.trade/v1/markets/{conditionId}/trade-counts \
--header 'Authorization: Bearer <token>'import requests
url = "https://codex-api.nomos.trade/v1/markets/{conditionId}/trade-counts"
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}/trade-counts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"conditionId": "0x8db33416a2d1ebde7438c80129e898f89a5deb3852ca64b37c4bf46513204409",
"block": 94812402,
"complete": true,
"counts": {
"0x56687bf447db6ffa42ffe2204a05edaa20f55839": 37,
"0x885783760858e1bd5dd09a3c3f916cfa251ac270": 3
},
"lastTs": {
"0x56687bf447db6ffa42ffe2204a05edaa20f55839": 1790862117,
"0x885783760858e1bd5dd09a3c3f916cfa251ac270": 1790411022
}
}{
"error": "wallets: give 0x addresses, comma separated"
}{
"error": "unknown or revoked API key"
}{
"error": "market not indexed"
}{
"error": "rate limit: 600 requests a minute; retry in 1 s"
}Markets
Trade Counts
How many trades (fills) each wallet made in the market over its whole life, and when it was last active there. Every wallet you ask for is answered, 0 when it never traded.
GET
/
v1
/
markets
/
{conditionId}
/
trade-counts
Trade Counts
curl --request GET \
--url https://codex-api.nomos.trade/v1/markets/{conditionId}/trade-counts \
--header 'Authorization: Bearer <token>'import requests
url = "https://codex-api.nomos.trade/v1/markets/{conditionId}/trade-counts"
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}/trade-counts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"conditionId": "0x8db33416a2d1ebde7438c80129e898f89a5deb3852ca64b37c4bf46513204409",
"block": 94812402,
"complete": true,
"counts": {
"0x56687bf447db6ffa42ffe2204a05edaa20f55839": 37,
"0x885783760858e1bd5dd09a3c3f916cfa251ac270": 3
},
"lastTs": {
"0x56687bf447db6ffa42ffe2204a05edaa20f55839": 1790862117,
"0x885783760858e1bd5dd09a3c3f916cfa251ac270": 1790411022
}
}{
"error": "wallets: give 0x addresses, comma separated"
}{
"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
Up to 200 wallets, comma separated. Malformed entries are skipped.
Response
OK
Condition id: 0x and 64 hex, lowercase.
The finalized block the answer reflects.
Codex holds the market's whole history.
Fills by wallet: one per order the wallet owned in a match. Splits, merges and redemptions are not trades.
Show child attributes
Show child attributes
Latest activity by wallet, unix seconds; 0 when none.
Show child attributes
Show child attributes