Appearance
RTB API
Exchange and Demand reporting share the same API domain, authentication, response envelope, UTC dates, and export options.
| Report | Endpoint | Resource | Explicit key scope | Breakdowns |
|---|---|---|---|---|
| Exchange statistics | GET /exchanges/stats | Granted xid | rtb:exchange:read | Day, app/source, domain |
| Demand statistics | GET /demands/stats | Granted dsp | rtb:demand:read | Day |
First request
Use an active member key with the required explicit scope and an existing resource assignment. Keys with missing or empty scopes cannot access RTB. See authentication and security for the required permissions.
bash
curl --get "https://api.example.com/exchanges/stats" \
--header "Authorization: Bearer YOUR_NEXUS_API_KEY" \
--data-urlencode "xid=7" \
--data-urlencode "date_from=2026-10-28" \
--data-urlencode "date_to=2026-10-28"For Demand reporting, change the path to /demands/stats and replace xid with the granted dsp. The compatible token query parameter remains available, but do not combine it with an Authorization header.
Shared contract
date_fromanddate_toare inclusive UTC days; a one-day request counts as one day. The maximum is 90 days, including both endpoints.- Responses use
{ "status": "success", "message": "...", "data": [...] }. Counts are exact decimal strings; rates are formatted strings and spend is a number. export=csvdownloads the same fields. Formula-like text is escaped, including leading control/Unicode whitespace and full-width formula prefixes. Spreadsheet applications can remove escaping when re-saving; prefer JSON for automated processing and do not enable spreadsheet content from untrusted sources.- Empty periods return
404andcode: "NO_DATA"; JSON saysNo data for requested period, CSV saysNo data to export. - Reports are non-cacheable, limited to 100,000 rows and rate-limited. There is no silent truncation.
- Failures contain a stable error code; clients should not match the human-readable message.
Metric differences
| Metric | Exchange | Demand |
|---|---|---|
| Spend source | SUM(spend) / 1000000 | SUM(aff_price) / 1000000 |
| Included rows | Supply-side dsp = 0 | Requested positive DSP across exchanges |
| Synchronization | Not returned | SUM(requests_sync) / total requests * 100 |
Both reports retain native reporting units, without currency conversion. See the Exchange overview, Demand overview, and shared OpenAPI specification.