The DFRDS API
The same numbers the charts plot, over JSON: markets and bars, liquidations and health factors, the event registry, exports, citation hashes and your research pages. Keys belong to your organization and come with the Plus plan.
Keys and scopes
Send the key as a bearer token. Each key carries the scopes it was minted with and, optionally, the addresses it may be used from. A request outside either is a 403 whose error names the rule: missing_scope or ip_not_allowed.
curl -H "Authorization: Bearer dfk_your_key" \ "https://dfrds.com/api/v1/me"
| Scope | Unlocks |
|---|---|
| read | Read data: prices, datasets, research pages, status |
| research:write | Write findings: append research blocks, create citations |
| exports | Queue and download data exports |
A key minted on sandbox.dfrds.com works only there, against sandbox data. Production keys are separate; nothing is shared between the two.
Endpoints
| Method | Path and parameters | Scope | What it returns |
|---|---|---|---|
| GET |
/api/v1/me
|
read | The organization, plan, entitlements and limits behind this key |
| GET |
/api/v1/status
|
read | Warehouse reachability and ingest lag |
| GET |
/api/v1/public/status
|
public | The status page as JSON (public, no key) |
| GET |
/api/v1/public/resolve
q as
|
public | What a typed string names on chain (public, no key) |
| GET |
/api/v1/session
|
public | Who the SPA is talking to (the Rails session) |
| GET |
/api/v1/session/search
q
|
public | The search bar's results for the signed-in person |
| GET |
/api/v1/session/library
|
public | The signed-in person's library (saved views and favourite pairs) |
| POST |
/api/v1/session/saved_queries
X-CSRF-Token
|
public | Save a finder search or a chart view |
| DELETE |
/api/v1/session/saved_queries/{id}
{id} X-CSRF-Token
|
public | Remove a saved view |
| POST |
/api/v1/session/watchlist
X-CSRF-Token
|
public | Favourite a pair (a tracked market, by pool address) |
| DELETE |
/api/v1/session/watchlist/{id}
{id} X-CSRF-Token
|
public | Remove a favourite |
| GET |
/api/v1/session/onboarding
|
public | The first-steps checklist |
| PATCH |
/api/v1/session/onboarding/dismiss
X-CSRF-Token
|
public | Put the checklist away |
| GET |
/api/v1/session/notifications
|
public | The inbox (the newest 100) |
| PATCH |
/api/v1/session/notifications/read_all
X-CSRF-Token
|
public | Mark every notification read |
| PATCH |
/api/v1/session/notifications/{id}/read
{id} X-CSRF-Token
|
public | Mark one notification read |
| GET |
/api/v1/session/alerts
|
public | The alert centre (the Rails session) |
| PATCH |
/api/v1/session/alerts/email_frequency
X-CSRF-Token
|
public | Set the alert email cadence |
| POST |
/api/v1/session/alerts/prices
X-CSRF-Token
|
public | Set a price threshold on a pool |
| PATCH |
/api/v1/session/alerts/prices/{id}/rearm
{id} X-CSRF-Token
|
public | Re-arm a fired price threshold |
| DELETE |
/api/v1/session/alerts/prices/{id}
{id} X-CSRF-Token
|
public | Remove a price threshold for the whole space |
| POST |
/api/v1/session/alerts/watches
X-CSRF-Token
|
public | Watch a token's liquidations, or the timeline |
| PATCH |
/api/v1/session/alerts/watches/{id}/rearm
{id} X-CSRF-Token
|
public | Re-arm a fired watch |
| DELETE |
/api/v1/session/alerts/watches/{id}
{id} X-CSRF-Token
|
public | Remove a watch for the whole space |
| GET |
/api/v1/session/data
|
public | The data catalogue for the signed-in reader (the SPA's /app/data) |
| GET |
/api/v1/session/data/categories/{category}
{category}
|
public | One category's datasets |
| GET |
/api/v1/session/data/datasets/{key}
{key}
|
public | A dataset's query manager |
| POST |
/api/v1/session/data/datasets/{key}/requests
{key} X-CSRF-Token
|
public | Build and size a draft export |
| GET |
/api/v1/session/data/requests
|
public | The reader's exports, newest first (/data/exports) |
| GET |
/api/v1/session/data/requests/{id}
{id}
|
public | One export as its page shows it |
| POST |
/api/v1/session/data/requests/{id}/submit
{id} X-CSRF-Token
|
public | Run a draft export |
| GET |
/api/v1/session/data/requests/{id}/download
{id}
|
public | The export's download link, as JSON |
| GET |
/api/v1/session/classroom
|
public | The viewer's assignments and the organizations they may pin for |
| POST |
/api/v1/session/classroom
X-CSRF-Token
|
public | Pin a price series or a dataset query for a class |
| GET |
/api/v1/session/classroom/{join_code}
{join_code}
|
public | One assignment, by its join code |
| GET |
/api/v1/session/spaces
|
public | The signed-in person's research spaces |
| POST |
/api/v1/session/spaces
X-CSRF-Token
|
public | Make a space |
| GET |
/api/v1/session/spaces/{id}
{id}
|
public | One space, its members and its property schema |
| PATCH |
/api/v1/session/spaces/{id}
{id} X-CSRF-Token
|
public | Rename a space (owners) |
| POST |
/api/v1/session/spaces/{id}/activate
{id} X-CSRF-Token
|
public | Work in this space |
| POST |
/api/v1/session/spaces/{id}/leave
{id} X-CSRF-Token
|
public | Leave a space |
| POST |
/api/v1/session/spaces/{space_id}/memberships
{space_id} X-CSRF-Token
|
public | Invite a member by the email of an existing account (owners) |
| DELETE |
/api/v1/session/spaces/{space_id}/memberships/{id}
{space_id} {id} X-CSRF-Token
|
public | Remove a member (owners) |
| POST |
/api/v1/session/spaces/{space_id}/properties
{space_id} X-CSRF-Token
|
public | Add a page property to the space's schema (owners and editors) |
| PATCH |
/api/v1/session/spaces/{space_id}/properties/{id}
{space_id} {id} X-CSRF-Token
|
public | Rename a property or change a select's options (owners and editors) |
| DELETE |
/api/v1/session/spaces/{space_id}/properties/{id}
{space_id} {id} X-CSRF-Token
|
public | Remove a property and every value it held (owners and editors) |
| POST |
/api/v1/session/notes/lookup
X-CSRF-Token
|
public | The notes the viewer's space holds on a page's values |
| POST |
/api/v1/session/value_notes
X-CSRF-Token
|
public | A global note on a value |
| PATCH |
/api/v1/session/value_notes/{id}
{id} X-CSRF-Token
|
public | Change a global note's words or colour |
| DELETE |
/api/v1/session/value_notes/{id}
{id} X-CSRF-Token
|
public | Remove a global note everywhere |
| POST |
/api/v1/session/annotations
X-CSRF-Token
|
public | Annotate a field of a research block or a saved copy |
| PATCH |
/api/v1/session/annotations/{id}
{id} X-CSRF-Token
|
public | Change an annotation |
| DELETE |
/api/v1/session/annotations/{id}
{id} X-CSRF-Token
|
public | Remove an annotation |
| GET |
/api/v1/session/research/pages/{id}/annotations
{id}
|
public | A page's annotation view |
| GET |
/api/v1/session/saved_items
hash
|
public | The copies of one transaction or block already in the viewer's research |
| POST |
/api/v1/session/saved_items
X-CSRF-Token
|
public | Save a transaction or a block to research |
| GET |
/api/v1/session/saved_items/destinations
|
public | Where "Save to research" may file a snapshot |
| PATCH |
/api/v1/session/saved_items/{id}
{id} X-CSRF-Token
|
public | Change a saved copy's notes |
| DELETE |
/api/v1/session/saved_items/{id}
{id} X-CSRF-Token
|
public | Remove a saved copy (and its annotations) |
| GET |
/api/v1/session/citations/transactions/{hash}
{hash}
|
public | The citable fields of one transaction |
| POST |
/api/v1/session/citations
X-CSRF-Token
|
public | Cite one decoded field |
| DELETE |
/api/v1/session/citations/{id}
{id} X-CSRF-Token
|
public | Remove a citation of the active space |
| GET |
/api/v1/session/research
|
public | The research workspace index |
| GET |
/api/v1/session/research/trash
|
public | Discarded projects and pages, and how long they are kept |
| POST |
/api/v1/session/research/projects
X-CSRF-Token
|
public | Start a project in the active space |
| GET |
/api/v1/session/research/projects/{id}
{id}
|
public | A project's folder tree, its pages and the space's templates |
| PATCH |
/api/v1/session/research/projects/{id}
{id} X-CSRF-Token
|
public | Rename a project or change its description (editors) |
| DELETE |
/api/v1/session/research/projects/{id}
{id} X-CSRF-Token
|
public | Move a project to the trash (owners) |
| PATCH |
/api/v1/session/research/projects/{id}/restore
{id} X-CSRF-Token
|
public | Bring a project back from the trash (owners) |
| POST |
/api/v1/session/research/projects/{id}/folders
{id} X-CSRF-Token
|
public | Make a folder in a project (editors) |
| PATCH |
/api/v1/session/research/projects/{id}/folders/{folder_id}
{id} {folder_id} X-CSRF-Token
|
public | Rename a folder (editors) |
| DELETE |
/api/v1/session/research/projects/{id}/folders/{folder_id}
{id} {folder_id} X-CSRF-Token
|
public | Delete a folder and the pages in it (editors) |
| POST |
/api/v1/session/research/projects/{project_id}/pages
{project_id} X-CSRF-Token
|
public | Make a page in a project (editors), optionally from a template |
| GET |
/api/v1/session/research/pages/{id}
{id}
|
public | A research page as its reader sees it |
| PATCH |
/api/v1/session/research/pages/{id}
{id} X-CSRF-Token
|
public | Change a page's own fields (editors) |
| DELETE |
/api/v1/session/research/pages/{id}
{id} X-CSRF-Token
|
public | Move a page to the trash (owners) |
| PATCH |
/api/v1/session/research/pages/{id}/restore
{id} X-CSRF-Token
|
public | Bring a page back from the trash (editors) |
| GET |
/api/v1/session/research/pages/{id}/export
{id} format
|
public | Download the page |
| PATCH |
/api/v1/session/research/pages/{id}/verify
{id} X-CSRF-Token
|
public | Claim the page was checked against chain data (owners) |
| PATCH |
/api/v1/session/research/pages/{id}/publish
{id} X-CSRF-Token
|
public | Publish the page (owners) |
| PATCH |
/api/v1/session/research/pages/{id}/unpublish
{id} X-CSRF-Token
|
public | Withdraw a published page (owners) |
| GET |
/api/v1/session/research/pages/{id}/document
{id}
|
public | The page body as the editor's document |
| POST |
/api/v1/session/research/pages/{id}/document
{id}
|
public | Save the editor's document as the tab closes (a beacon) |
| PUT |
/api/v1/session/research/pages/{id}/document
{id} X-CSRF-Token
|
public | Save the editor's document (editors) |
| GET |
/api/v1/session/research/pages/{id}/comments
{id} limit cursor
|
public | Every comment on the page, oldest first |
| POST |
/api/v1/session/research/pages/{id}/comments
{id} X-CSRF-Token
|
public | Comment on a block, reply, or add to the page discussion (commenters) |
| PATCH |
/api/v1/session/research/pages/{id}/comments/{comment_id}/resolve
{id} {comment_id} X-CSRF-Token
|
public | Resolve a thread (commenters) |
| PATCH |
/api/v1/session/research/pages/{id}/comments/{comment_id}/reopen
{id} {comment_id} X-CSRF-Token
|
public | Reopen a resolved thread (commenters) |
| DELETE |
/api/v1/session/research/pages/{id}/comments/{comment_id}
{id} {comment_id} X-CSRF-Token
|
public | Remove your own comment |
| POST |
/api/v1/session/research/pages/{id}/guest_passes
{id} X-CSRF-Token
|
public | Create a review link for one outside reader (owners) |
| DELETE |
/api/v1/session/research/pages/{id}/guest_passes/{pass_id}
{id} {pass_id} X-CSRF-Token
|
public | Revoke a review link (owners) |
| POST |
/api/v1/session/research/blocks/{id}/refresh
{id} X-CSRF-Token
|
public | Fetch now (a chain-native block) or Re-derive now (a live value) |
| GET |
/api/v1/public/review/{token}
{token}
|
public | One unpublished page for the outside reviewer holding its link |
| GET |
/api/v1/public/auth
|
public | How the SPA signs in (public, no key) |
| POST |
/api/v1/auth/exchange
X-DFRDS-Client
|
public | Redeem an Accounts sign-in (the SPA's BFF) |
| POST |
/api/v1/auth/refresh
X-DFRDS-Client
|
public | Rotate the Accounts refresh token (the SPA's BFF) |
| POST |
/api/v1/auth/logout
X-DFRDS-Client
|
public | Sign out of Accounts here (the SPA's BFF) |
| GET |
/api/v1/session/cable_token
|
public | A ticket for the next Action Cable connection |
| GET |
/api/v1/public/site
|
public | The public site's facts (public, no key) |
| GET |
/api/v1/public/home
|
public | The landing page (public, no key) |
| GET |
/api/v1/public/plans
|
public | The pricing page's plans (public, no key) |
| GET |
/api/v1/public/about
|
public | What the about page lists as covered today (public, no key) |
| GET |
/api/v1/public/api_reference
|
public | The API reference page (public, no key) |
| GET |
/api/v1/public/docs
q audience
|
public | The documentation index (public, no key) |
| GET |
/api/v1/public/docs/{slug}
{slug}
|
public | One guide (public, no key) |
| GET |
/api/v1/public/legal
|
public | The legal documents (public, no key) |
| GET |
/api/v1/public/legal/{slug}
{slug}
|
public | One legal document (public, no key) |
| GET |
/api/v1/public/blog
category
|
public | The blog's published articles (public, no key) |
| GET |
/api/v1/public/blog/{slug}
{slug}
|
public | One published article (public, no key) |
| GET |
/api/v1/public/published_pages/{slug}
{slug}
|
public | A published research page (public, no key) |
| GET |
/api/v1/public/citations/{hash}
{hash}
|
public | One citation record as its page prints it (public, no key) |
| GET |
/api/v1/public/explorer
chain
|
public | The explorer's idle console (public, no key) |
| GET |
/api/v1/public/explorer/address/{address}
{address} chain block_from block_to date_from date_to topic0 before after
|
public | Logs touching an address (public, no key) |
| GET |
/api/v1/public/explorer/events/{topic}
{topic} chain block_from block_to date_from date_to before after
|
public | Logs carrying an event signature (public, no key) |
| GET |
/api/v1/public/blocks/{number}
{number} chain expect_hash cursor limit
|
public | One block and its transactions (public, no key) |
| GET |
/api/v1/public/transactions/{hash}
{hash} chain
|
public | One transaction, its receipt and decoded logs (public, no key) |
| GET |
/api/v1/public/prices
base quote source chain
|
public | The price finder (public, no key) |
| GET |
/api/v1/public/prices/{address}
{address} period range from to invert compare chain
|
public | One pool's price chart (public, no key) |
| GET |
/api/v1/public/tracking
|
public | The tracked protocols, live and planned (public, no key) |
| GET |
/api/v1/public/tracking/{slug}
{slug} chain range from to
|
public | One protocol's tracking page (public, no key) |
| GET |
/api/v1/public/tracking/{slug}/liquidations
{slug} chain symbol from to range cursor limit
|
public | A pool lender's liquidation dataset (public, no key) |
| GET |
/api/v1/public/tracking/{slug}/accounts/{address}
{slug} {address} chain
|
public | One account's position on a pool lender (public, no key) |
| GET |
/api/v1/public/timeline
category chain from to verified limit cursor
|
public | The event timeline as JSON (public, no key) |
| GET |
/api/v1/public/timeline/{id}
{id}
|
public | One timeline event with its provenance (public, no key) |
| GET |
/api/v1/tokens
q limit cursor
|
read | Token symbols that trade in a tracked market |
| GET |
/api/v1/pairs
base quote q source limit
|
read | Pools trading a pair, ranked by activity |
| GET |
/api/v1/pools/{address}/prices
{address} period from to
|
read | OHLC and volume bars for one pool |
| GET |
/api/v1/liquidations
protocol collateral from to block_from block_to limit cursor
|
read | Aave-style liquidations, newest first |
| GET |
/api/v1/health_factors
protocol block account min_hf max_hf limit cursor
|
read | Aave-style health factors at a snapshot block |
| GET |
/api/v1/absorptions
market from to limit cursor
|
read | Compound v3 absorptions, newest first |
| GET |
/api/v1/charts/{source}
{source} protocol deployment block pool period from to category events
|
read | The series behind a research chart, by source |
| GET |
/api/v1/events
category chain from to limit cursor
|
read | The sourced event registry (the timeline) |
| GET |
/api/v1/datasets
|
read | The data catalogue |
| POST |
/api/v1/datasets/{key}/requests
{key}
|
exports | Create and submit an export |
| GET |
/api/v1/datasets/requests/{id}
{id}
|
exports | Poll an export |
| GET |
/api/v1/datasets/requests/{id}/download
{id} format
|
exports | Fetch a completed export |
| POST |
/api/v1/citations
|
research:write | Cite a price series, a dataset query or a computed figure |
| GET |
/api/v1/citations/{hash}
{hash}
|
public | Resolve a citation hash (public, no key) |
| GET |
/api/v1/research/pages
limit cursor
|
read | Research pages this key can reach, newest first |
| POST |
/api/v1/research/pages
|
research:write | Create a research page in a project |
| GET |
/api/v1/research/pages/{id}
{id}
|
read | One research page, its blocks and its cited values |
| PATCH |
/api/v1/research/pages/{id}
{id}
|
research:write | Rename a page, move its status, or retag it |
| DELETE |
/api/v1/research/pages/{id}
{id}
|
research:write | Move a page to the trash |
| GET |
/api/v1/research/pages/{id}/document
{id}
|
read | The page body as one document |
| PUT |
/api/v1/research/pages/{id}/document
{id}
|
research:write | Put a whole document back |
| GET |
/api/v1/research/pages/{id}/comments
{id} limit cursor
|
read | The review comments on a page, oldest first |
| POST |
/api/v1/research/pages/{id}/comments
{id}
|
research:write | Open a thread on a block, or reply in one |
| POST |
/api/v1/research/pages/{id}/export
{id} format
|
exports | Download the page's bundle |
| GET |
/api/v1/research/projects
limit cursor
|
read | Research projects this key can reach, newest first |
| POST |
/api/v1/research/pages/{id}/blocks
{id}
|
research:write | Append a block to a research page |
| GET |
/api/v1/session/research/pages/{id}/pick
{id} kind q
|
public | What `@` and `[[` list from a page |
| POST |
/api/v1/session/research/pages/{id}/pick
{id} X-CSRF-Token
|
public | Create page, from the `[[` picker (editors) |
| GET |
/api/v1/session/research/pages/{id}/citable_fields
{id} tx_hash chain
|
public | The decoded fields "Cite a field" lists |
| POST |
/api/v1/session/research/pages/{id}/cite
{id} X-CSRF-Token
|
public | Cite one decoded field into the page's space (editors) |
| GET |
/api/v1/session/research/pages/{id}/editor_options
{id}
|
public | The derived builder's choices and the viewer's upload rules |
| POST |
/api/v1/session/research/pages/{id}/derived_preview
{id} X-CSRF-Token
|
public | Preview a derived value |
| POST |
/api/v1/session/research/pages/{id}/derive
{id} X-CSRF-Token
|
public | Insert as live value (editors) |
| POST |
/api/v1/session/research/pages/{id}/uploads
{id} X-CSRF-Token
|
public | Sign a direct upload for an image or file block (editors) |
| GET |
/api/v1/session/research/pages/{id}/history
{id}
|
public | A page's history (any member of its space) |
| PATCH |
/api/v1/session/research/pages/{id}/versions/{version_id}/restore
{id} {version_id} X-CSRF-Token
|
public | Put one block back to a past state (editors) |
| GET |
/api/v1/session/research/pages/{id}/page-versions/compare
{id} from to
|
public | Two states of a page compared, block by block |
| POST |
/api/v1/session/research/pages/{id}/page-versions
{id} X-CSRF-Token
|
public | Name this version (editors) |
| GET |
/api/v1/session/research/pages/{id}/page-versions/{version_id}
{id} {version_id}
|
public | A page version, read-only |
| POST |
/api/v1/session/research/pages/{id}/page-versions/{version_id}/restore
{id} {version_id} X-CSRF-Token
|
public | Put the whole page back to a version (editors) |
| POST |
/api/v1/session/research/pages/{id}/templates
{id} X-CSRF-Token
|
public | Save the page's blocks as a template of its space (editors) |
| POST |
/api/v1/session/research/pages/{id}/import
{id} X-CSRF-Token
|
public | Import markdown into the page (editors) |
| GET |
/api/v1/session/research/projects/{id}/board
{id} group_by view_id
|
public | A project's pipeline board |
| GET |
/api/v1/session/research/projects/{id}/table
{id} view_id q sort columns[] properties
|
public | A project's pages as a table |
| GET |
/api/v1/session/research/projects/{id}/tags
{id} q
|
public | The tag field's completions |
| GET |
/api/v1/session/research/pages/{id}/properties
{id}
|
public | A page's property values |
| PATCH |
/api/v1/session/research/pages/{id}/properties
{id} X-CSRF-Token
|
public | Set a page's property values (editors) |
| GET |
/api/v1/session/research/property_definitions/{id}/candidates
{id} q except
|
public | The relation picker's candidates |
| POST |
/api/v1/session/research/views
X-CSRF-Token
|
public | Save a view of a project |
| DELETE |
/api/v1/session/research/views/{id}
{id} X-CSRF-Token
|
public | Remove a saved view (its creator) |
| PATCH |
/api/v1/session/research/views/{id}/toggle_shared
{id} X-CSRF-Token
|
public | Share a saved view with the space, or take it back (its creator) |
| GET |
/api/v1/session/research/search
q
|
public | Search your research (the long form) |
| GET |
/api/v1/session/research/pages/{id}/saved_items
{id} page
|
public | The page's saved-item cards, ten to a page |
| POST |
/api/v1/session/research/pages/{id}/presence
{id} X-CSRF-Token
|
public | The presence heartbeat, and who else is on the page |
| GET |
/api/v1/session/research/pages/{id}/threads
{id} block_id
|
public | One thread group as the rail shows it |
| GET |
/api/v1/session/research/assistant
q
|
public | Ask your own research |
| GET |
/api/v1/session/research/pages/{id}/assistant
{id}
|
public | The assistant panel's opening state |
| POST |
/api/v1/session/research/pages/{id}/assistant
{id} X-CSRF-Token
|
public | One turn of the assistant, as Server-Sent Events |
| POST |
/api/v1/session/research/pages/{id}/assistant/apply
{id} X-CSRF-Token
|
public | Apply an assistant proposal (editors) |
| GET |
/api/v1/session/research/pages/{id}/suggest_metadata
{id}
|
public | Suggested tags and a one-line finding (editors) |
| GET |
/api/v1/session/organizations
|
public | The organizations the signed-in person can open |
| GET |
/api/v1/session/organizations/{id}
{id}
|
public | One organization's page |
| PATCH |
/api/v1/session/organizations/{id}
{id} X-CSRF-Token
|
public | Change the organization's settings (admins) |
| GET |
/api/v1/session/organizations/{id}/audit
{id} action_filter from to
|
public | What happened in the organization (admins) |
| POST |
/api/v1/session/organizations/{id}/verify_domain
{id} X-CSRF-Token
|
public | Check the email domain's TXT record now (admins) |
| POST |
/api/v1/session/organizations/{id}/rotate_domain_token
{id} X-CSRF-Token
|
public | Generate a new TXT record for the email domain (admins) |
| PATCH |
/api/v1/session/organizations/{organization_id}/memberships/{id}
{organization_id} {id} X-CSRF-Token
|
public | Change a member's role (admins, staff with orgs_manage) |
| DELETE |
/api/v1/session/organizations/{organization_id}/memberships/{id}
{organization_id} {id} X-CSRF-Token
|
public | Remove a member, or leave |
| POST |
/api/v1/session/organizations/{organization_id}/invitations
{organization_id} X-CSRF-Token
|
public | Invite by email (admins) |
| DELETE |
/api/v1/session/organizations/{organization_id}/invitations/{id}
{organization_id} {id} X-CSRF-Token
|
public | Withdraw a pending invitation (admins) |
| PATCH |
/api/v1/session/organizations/{organization_id}/sso
{organization_id} X-CSRF-Token
|
public | Save the identity provider (admins) |
| POST |
/api/v1/session/organizations/{organization_id}/sso/test
{organization_id} X-CSRF-Token
|
public | Start a test connection with the identity provider (admins) |
| GET |
/api/v1/session/organizations/{organization_id}/api_keys
{organization_id}
|
public | An organization's API keys (its admins) |
| POST |
/api/v1/session/organizations/{organization_id}/api_keys
{organization_id} X-CSRF-Token
|
public | Mint an API key (its admins) |
| DELETE |
/api/v1/session/organizations/{organization_id}/api_keys/{id}
{organization_id} {id} X-CSRF-Token
|
public | Revoke an API key (its admins) |
| GET |
/api/v1/session/organizations/{organization_id}/webhooks
{organization_id}
|
public | An organization's webhook endpoints (its admins) |
| POST |
/api/v1/session/organizations/{organization_id}/webhooks
{organization_id} X-CSRF-Token
|
public | Add a webhook endpoint (its admins) |
| PATCH |
/api/v1/session/organizations/{organization_id}/webhooks/{id}
{organization_id} {id} X-CSRF-Token
|
public | Re-enable a webhook endpoint (its admins) |
| DELETE |
/api/v1/session/organizations/{organization_id}/webhooks/{id}
{organization_id} {id} X-CSRF-Token
|
public | Remove a webhook endpoint (its admins) |
| POST |
/api/v1/session/organizations/{organization_id}/api_keys/{id}/rotate
{organization_id} {id} X-CSRF-Token
|
public | Rotate an API key (its admins) |
| POST |
/api/v1/session/organizations/{organization_id}/webhooks/{id}/rotate_secret
{organization_id} {id} X-CSRF-Token
|
public | Give a webhook endpoint a new signing secret (its admins) |
| GET |
/api/v1/session/account
|
public | The signed-in person's account page |
| PATCH |
/api/v1/session/account
X-CSRF-Token
|
public | Save the profile |
| DELETE |
/api/v1/session/account
X-CSRF-Token
|
public | Delete the account |
| PATCH |
/api/v1/session/account/password
X-CSRF-Token
|
public | Change the password |
| DELETE |
/api/v1/session/account/sessions
X-CSRF-Token
|
public | Sign out everywhere else |
| POST |
/api/v1/session/account/export
X-CSRF-Token
|
public | Export my data |
| POST |
/api/v1/session/account/two_factor/setup
X-CSRF-Token
|
public | Start (or resume) two-factor setup |
| POST |
/api/v1/session/account/two_factor
X-CSRF-Token
|
public | Confirm the authenticator with a code |
| DELETE |
/api/v1/session/account/two_factor
X-CSRF-Token
|
public | Turn two-factor off |
| POST |
/api/v1/session/account/two_factor/recovery_codes
X-CSRF-Token
|
public | New recovery codes |
| POST |
/api/v1/session/account/two_factor/replace
X-CSRF-Token
|
public | Replace the authenticator |
| DELETE |
/api/v1/session/account/two_factor/replace
X-CSRF-Token
|
public | Keep the current authenticator |
| GET |
/api/v1/session/billing
organization_id
|
public | The billing page of an organization the viewer admins |
| GET |
/api/v1/session/billing/dunning
|
public | The dunning banner |
| POST |
/api/v1/session/billing/checkout
X-CSRF-Token
|
public | Start Stripe Checkout for a plan |
| POST |
/api/v1/session/billing/portal
X-CSRF-Token
|
public | Open the Stripe Billing Portal |
| POST |
/api/v1/session/billing/seats
X-CSRF-Token
|
public | Change the seat count, or buy more seats |
| GET |
/api/v1/session/billing/seat_quote
organization_id seats
|
public | BILLING_PROVIDER=crm: what more seats cost |
| GET |
/api/v1/session/billing/bundles
organization_id
|
public | BILLING_PROVIDER=crm: the bundles on sale |
| POST |
/api/v1/session/billing/bundles
X-CSRF-Token
|
public | BILLING_PROVIDER=crm: buy a bundle |
| GET |
/api/v1/session/organizations/{id}/invoicing
{id}
|
public | An institution's invoicing details |
| PATCH |
/api/v1/session/organizations/{id}/invoicing
{id} X-CSRF-Token
|
public | Save an institution's invoicing details |
| GET |
/api/v1/session/sudo
|
public | The recent-password window |
| POST |
/api/v1/session/sudo
X-CSRF-Token
|
public | Confirm the password, opening the window |
| POST |
/api/v1/session/admin/impersonations
X-CSRF-Token
|
public | View as a user (staff) |
| DELETE |
/api/v1/session/admin/impersonation
X-CSRF-Token
|
public | Return to your own account |
| GET |
/api/v1/session/admin/blog_posts
category
|
public | The blog's editorial desk (staff) |
| POST |
/api/v1/session/admin/blog_posts
X-CSRF-Token
|
public | Write a post (staff) |
| GET |
/api/v1/session/admin/blog_posts/new
|
public | What a new post starts as (staff) |
| POST |
/api/v1/session/admin/blog_posts/preview
X-CSRF-Token
|
public | Preview a post as /blog will show it (staff) |
| GET |
/api/v1/session/admin/blog_posts/{id}
|
public | A post, as the edit form reads it (staff) |
| PATCH |
/api/v1/session/admin/blog_posts/{id}
X-CSRF-Token
|
public | Edit a post (staff) |
| DELETE |
/api/v1/session/admin/blog_posts/{id}
X-CSRF-Token
|
public | Delete a post (staff) |
| PATCH |
/api/v1/session/admin/blog_posts/{id}/publish
X-CSRF-Token
|
public | Publish a post (staff) |
| PATCH |
/api/v1/session/admin/blog_posts/{id}/unpublish
X-CSRF-Token
|
public | Withdraw a post from the blog (staff) |
| GET |
/api/v1/session/admin/chain_events
q category
|
public | The timeline's curation desk (staff) |
| POST |
/api/v1/session/admin/chain_events
X-CSRF-Token
|
public | Add an event (staff) |
| GET |
/api/v1/session/admin/chain_events/new
|
public | What a new event starts as (staff) |
| POST |
/api/v1/session/admin/chain_events/import
X-CSRF-Token
|
public | Import from the provider registry (staff) |
| GET |
/api/v1/session/admin/chain_events/{id}
|
public | An event, as the edit form reads it (staff) |
| PATCH |
/api/v1/session/admin/chain_events/{id}
X-CSRF-Token
|
public | Edit an event (staff) |
| DELETE |
/api/v1/session/admin/chain_events/{id}
X-CSRF-Token
|
public | Remove an event from the timeline (staff) |
| PATCH |
/api/v1/session/admin/chain_events/{id}/score
X-CSRF-Token
|
public | Score an event's severity (staff) |
| PATCH |
/api/v1/session/admin/chain_events/{id}/verify_anchors
X-CSRF-Token
|
public | Check an event's transactions against the chain (staff) |
| POST |
/api/v1/session/admin/status_notes
X-CSRF-Token
|
public | Post a notice to the status page (staff) |
| PATCH |
/api/v1/session/admin/status_notes/{id}/resolve
X-CSRF-Token
|
public | Resolve a status notice (staff) |
| GET |
/api/v1/session/admin/demo_sessions
|
public | The demonstration accounts (alpha, development and sandbox) |
| POST |
/api/v1/session/admin/demo_sessions
X-CSRF-Token
|
public | Review the platform as a demonstration account (alpha) |
| GET |
/api/v1/session/admin/users
q
|
public | The user roster (staff) |
| PATCH |
/api/v1/session/admin/users/{id}/update_role
{id} X-CSRF-Token
|
public | Change a user's platform role (staff) |
| PATCH |
/api/v1/session/admin/users/{id}/update_subscription
{id} X-CSRF-Token
|
public | Grant or cancel a courtesy subscription (staff) |
| PATCH |
/api/v1/session/admin/users/{id}/toggle_disabled
{id} X-CSRF-Token
|
public | Disable or re-enable an account (staff) |
| PATCH |
/api/v1/session/admin/users/{id}/reset_two_factor
{id} X-CSRF-Token
|
public | Clear a user's second factor (staff) |
| PATCH |
/api/v1/session/admin/users/{id}/sign_out_everywhere
{id} X-CSRF-Token
|
public | End every session a user has open (staff) |
| PATCH |
/api/v1/session/admin/users/{id}/revoke_api_keys
{id} X-CSRF-Token
|
public | Revoke the API keys of a user's organizations (staff) |
| GET |
/api/v1/session/admin/organizations
q kind status
|
public | The tenant list (staff) |
| GET |
/api/v1/session/admin/organizations/{id}
{id}
|
public | One tenant in depth (staff) |
| PATCH |
/api/v1/session/admin/organizations/{id}
{id} X-CSRF-Token
|
public | Edit the staff settings (staff) |
| PATCH |
/api/v1/session/admin/organizations/{id}/update_subscription
{id} X-CSRF-Token
|
public | Grant or cancel a courtesy subscription (staff) |
| POST |
/api/v1/session/admin/organizations/{id}/invoice_subscription
{id} X-CSRF-Token
|
public | Start an invoiced subscription (staff) |
| PATCH |
/api/v1/session/admin/organizations/{id}/override_entitlement
{id} X-CSRF-Token
|
public | Override one feature whatever the plan says (staff) |
| PATCH |
/api/v1/session/admin/organizations/{id}/suspend
{id} X-CSRF-Token
|
public | Suspend an organization (staff) |
| PATCH |
/api/v1/session/admin/organizations/{id}/restore
{id} X-CSRF-Token
|
public | Lift a suspension (staff) |
| DELETE |
/api/v1/session/admin/organizations/{id}/clear_overrides
{id} X-CSRF-Token
|
public | Clear the entitlement overrides (staff) |
| GET |
/api/v1/session/admin/staff
|
public | Who is staff (alpha) |
| GET |
/api/v1/session/admin/staff/{id}
{id}
|
public | One staff member's permissions (alpha) |
| PATCH |
/api/v1/session/admin/staff/{id}
{id} X-CSRF-Token
|
public | Edit a staff member's permissions (alpha) |
| PATCH |
/api/v1/session/admin/staff/{id}/promote
{id} X-CSRF-Token
|
public | Make someone staff (alpha) |
| DELETE |
/api/v1/session/admin/staff/{id}/demote
{id} X-CSRF-Token
|
public | Remove someone's staff access (alpha) |
| GET |
/api/v1/session/partner
|
public | The partner console's front page |
| GET |
/api/v1/session/partner/organizations
|
public | The institutions a partner sponsors |
| POST |
/api/v1/session/partner/organizations
X-CSRF-Token
|
public | Set up an institution |
| GET |
/api/v1/session/partner/organizations/new
|
public | The new-institution form |
| GET |
/api/v1/session/partner/organizations/{id}
{id}
|
public | One institution a partner sponsors |
| POST |
/api/v1/session/partner/organizations/{id}/invite
X-CSRF-Token {id}
|
public | Invite an institution's first admin |
| GET |
/api/v1/session/partner/sales
|
public | A partner's sales and earnings |
| POST |
/api/v1/session/partner/sales
X-CSRF-Token
|
public | Sell a bundle to an institution |
| GET |
/api/v1/session/partner/sales/new
|
public | The sell-a-bundle form |
| GET |
/api/v1/session/partner/statements
|
public | A partner's monthly statements |
| GET |
/api/v1/session/partner/statements/{id}
{id}
|
public | One monthly statement |
| GET |
/api/v1/session/admin/partners
|
public | The partners (staff) |
| POST |
/api/v1/session/admin/partners
X-CSRF-Token
|
public | Create a partner (staff) |
| GET |
/api/v1/session/admin/partners/new
|
public | The new-partner form (staff) |
| GET |
/api/v1/session/admin/partners/{id}
{id}
|
public | A partner's page (staff) |
| PATCH |
/api/v1/session/admin/partners/{id}
X-CSRF-Token {id}
|
public | Change a partner's terms (staff) |
| PATCH |
/api/v1/session/admin/partners/{id}/end_partnership
X-CSRF-Token {id}
|
public | End a partnership (staff) |
| POST |
/api/v1/session/admin/partners/{id}/assign_user
X-CSRF-Token {id}
|
public | Make someone a partner administrator (staff) |
| DELETE |
/api/v1/session/admin/partners/{id}/unassign_user
X-CSRF-Token {id}
|
public | Return a partner administrator to a member (staff) |
| POST |
/api/v1/session/admin/partners/{partner_id}/statements
X-CSRF-Token {partner_id}
|
public | Build and issue a month's statement (staff) |
| GET |
/api/v1/session/admin/partners/{partner_id}/statements/{id}
{partner_id} {id}
|
public | One partner statement (staff) |
| POST |
/api/v1/session/admin/partners/{partner_id}/statements/{id}/mark_paid
X-CSRF-Token {partner_id} {id}
|
public | Record a statement's payout (staff) |
| GET |
/api/v1/session/admin/bundles
|
public | The bundle catalogue (staff) |
| POST |
/api/v1/session/admin/bundles
X-CSRF-Token
|
public | Create a bundle (staff) |
| GET |
/api/v1/session/admin/bundles/new
|
public | The new-bundle form (staff) |
| GET |
/api/v1/session/admin/bundles/{id}
{id}
|
public | A bundle's page (staff) |
| PATCH |
/api/v1/session/admin/bundles/{id}
X-CSRF-Token {id}
|
public | Change a bundle (staff) |
| POST |
/api/v1/session/admin/bundles/{id}/authorize_partner
X-CSRF-Token {id}
|
public | Let a partner sell a bundle (staff) |
| DELETE |
/api/v1/session/admin/bundles/{id}/revoke_partner
X-CSRF-Token {id}
|
public | Stop a partner selling a bundle (staff) |
| GET |
/api/v1/session/admin/dashboard
|
public | The staff overview (any staff) |
| GET |
/api/v1/session/admin/plans
|
public | Every plan (plans_manage) |
| POST |
/api/v1/session/admin/plans
X-CSRF-Token
|
public | Create a plan (plans_manage) |
| GET |
/api/v1/session/admin/plans/new
|
public | A new plan's form (plans_manage) |
| GET |
/api/v1/session/admin/plans/{id}
{id}
|
public | One plan's form (plans_manage) |
| PATCH |
/api/v1/session/admin/plans/{id}
{id} X-CSRF-Token
|
public | Change a plan (plans_manage) |
| GET |
/api/v1/session/admin/modules
|
public | The platform's modules (modules_manage) |
| PATCH |
/api/v1/session/admin/modules/{id}/toggle
{id} X-CSRF-Token
|
public | Switch a module on or off (modules_manage) |
| GET |
/api/v1/session/admin/billing
|
public | The payments monitor's overview (billing_manage) |
| GET |
/api/v1/session/admin/billing/receivables
|
public | The receivables ledger (billing_manage) |
| GET |
/api/v1/session/admin/clickhouse
|
public | Warehouse health (audit_view) |
| GET |
/api/v1/session/admin/clickhouse/decode_coverage
|
public | Decode coverage of the recent log stream (audit_view) |
| GET |
/api/v1/session/admin/audit
actor action_filter target_type target_id organization_id from to cursor limit
|
public | The whole audit log (audit_view) |
| GET |
/api/v1/session/admin/coverage
chain
|
public | The protocol candidate registry (audit_view) |
| GET |
/api/v1/session/admin/spa_routes
|
public | The SPA routes switchboard (modules_manage) |
| PATCH |
/api/v1/session/admin/spa_routes/{key}/toggle
{key} X-CSRF-Token
|
public | Switch one SPA route on or off (modules_manage) |
Errors are JSON, {"error": "rate_limited", "detail": "…"}, with conventional status codes: 401, 403, 404, 409, 422, 429, 503. A null figure means the value could not be derived. It never means zero.
Pages and cursors
Every list pages by cursor. A page carries next_cursor (null on the last page) and a Link: <…>; rel="next" header with the same request and the next cursor filled in. Pass it back as cursor. The cursor is opaque and stays valid while rows are appended above it, which an offset would not. Page size is limit, default 50, never more than 500 rows: a larger slice is an export.
GET /api/v1/liquidations?protocol=aave_v3&collateral=WETH&limit=200
{
"protocol": "aave_v3",
"matching": 1834,
"count": 200,
"next_cursor": "WzIxMzQ1Njc4LDEyXQ",
"limit": 200,
"max_rows": 500,
"liquidations": [ … ]
}
Rate limits
The REST limit is per key, per clock hour, from your plan (api_requests_per_hour). Every response carries X-RateLimit-Limit and X-RateLimit-Remaining; the 429 says when the window resets. The counter is a row per key per window, so it survives a deploy, a restart and a cache flush. MCP has its own daily budget (mcp_calls_per_day) so an agent session cannot spend a script's hour.
Versioning and deprecation
The version is in the path (/api/v1). Fields are added without a version change; a field is never removed or renamed inside a version. When an endpoint is retired it answers for at least six months with two headers first: Deprecation (when it was deprecated) and Sunset (the date it stops), plus a Link: rel="successor-version" to what replaces it. Nothing is deprecated today. Watch for those headers in your client and you will never be surprised.
Examples
Pools for a pair, then two years of daily bars for the busiest.
API=https://dfrds.com/api/v1 H='Authorization: Bearer dfk_your_key' curl -s -H "$H" "$API/pairs?base=WETH"e=USDC" \ | jq -r '.pools[0].address' # 0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640 curl -s -H "$H" \ "$API/pools/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/prices?period=daily&from=2024-09-01"
Walk every Spark liquidation since a date with the cursor.
url="$API/liquidations?protocol=spark&from=2026-01-01&limit=500"
while [ -n "$url" ]; do
page=$(curl -s -H "$H" "$url")
echo "$page" | jq -c '.liquidations[]' >> spark.jsonl
url=$(curl -sI -H "$H" "$url" \
| sed -n 's/^[Ll]ink: <\(.*\)>; rel="next".*/\1/p')
done
Queue an export (needs the exports scope), poll it, fetch the file.
curl -s -H "$H" -H 'Content-Type: application/json' \
-d '{"filters": {"protocols": ["aave_v3"], "date_from": "2026-01-01"}}' \
"$API/datasets/aave_liquidations/requests"
# {"id": 418, "status": "queued", …}
curl -s -H "$H" "$API/datasets/requests/418" | jq .status
curl -L -H "$H" "$API/datasets/requests/418/download" -o liquidations.csv.gz
Cite a computed figure (needs research:write) and paste it into a page.
curl -s -H "$H" -H 'Content-Type: application/json' \
-d '{"dataset": "aave_liquidations", "aggregate": "count",
"date_from": "2026-01-01", "label": "liquidations this year"}' \
"$API/citations"
# {"token": "{{derived:91}}", "value": "1834", "hash": "3f9c…", …}
curl -s -H "$H" -H 'Content-Type: application/json' \
-d '{"kind": "callout", "body": "There were {{derived:91}} this year."}' \
"$API/research/pages/12/blocks"
What a key reaches
An API key belongs to an organization; research belongs to a space. A key reaches the spaces its organization’s members belong to, and no wider. It grants no access the organization doesn’t already have. Exports and derived citations are made as the member who minted the key: the monthly export quota is theirs and the citation lands in their research space.
Each cited value on a page carries verification_state: verified, mismatch or unresolved. A consumer can tell a figure that still holds from one that has drifted since it was written. Treat mismatch as a finding, not a formatting detail.
Webhooks
Register an https endpoint on your organization page to be pushed events instead of polling. Every delivery is signed: X-DFRDS-Event names the event and X-DFRDS-Signature is the HMAC-SHA256 of the raw body, hex encoded, keyed with your endpoint secret. Sign the raw bytes you received, before any JSON parsing, and compare in constant time.
import hmac, hashlib
def verify(raw_body: bytes, signature: str, secret: str) -> bool:
expected = hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, signature)
- Events: price_alert.triggered, data_export.ready, liquidation.recorded, chain_event.created.
- A null figure means we could not derive that value. It does not mean zero.
- Reply 2xx within 10 seconds and do the work asynchronously. Deliveries retry with backoff; ten consecutive failures disable the endpoint until you re-enable it.
- A retry can deliver twice. Treat the event as idempotent on its identifiers.
The same data from an AI assistant
Every tool runs the same service as its REST twin, under the same key, scopes, allow list and plan. There is no SQL passthrough: each tool is a bounded query.
{
"mcpServers": {
"dfrds": {
"type": "http",
"url": "https://dfrds.com/mcp",
"headers": { "Authorization": "Bearer dfk_your_key" }
}
}
}
| Tool | REST twin | Scope |
|---|---|---|
| search_markets | GET /api/v1/pairs | read |
| get_price_bars | GET /api/v1/pools/{address}/prices | read |
| get_canonical_series | POST /api/v1/citations | research:write |
| get_entitlements | GET /api/v1/me | read |
| platform_status | GET /api/v1/status | read |
| get_health_factors | GET /api/v1/health_factors | read |
| get_liquidations | GET /api/v1/liquidations | read |
| get_events | GET /api/v1/events | read |
| list_research_pages | GET /api/v1/research/pages | read |
| get_research_page | GET /api/v1/research/pages/{id} | read |
| append_research_block | POST /api/v1/research/pages/{id}/blocks | research:write |
| cite_query | POST /api/v1/citations | research:write |
Ground rules
- Prices are estimated from on-chain events (V2 reserves, V3 swap prices); the methodology notes on each market page apply.
- Series are token0-per-token1 and the response names the orientation. Invert client-side if you need the other direction.
- Hashes and addresses are complete, always. Nothing is truncated for you to guess at.
- Reads are research-sized and capped at 500 rows. Anything larger is an export through /datasets, or Data Downloads.