API Reference

A read-mostly HTTP interface, served fromhttps://dash-intents.org/v1. The OpenAPI document is served at/v1/openapi.json and a Swagger UI at/v1.

Endpoints

The Observed column is the status returned at the time this page was built. It is recorded honestly because the protocol's own rule is that a document must not describe a stronger state than the system is in.

MethodPathPurposeObserved
GET/v1/healthLiveness and timestamp200
GET/v1/treasuryTreasury balance and proposals200
GET/v1/statsProtocol statistics523
GET/v1/intentsList intents523
GET/v1/intents/:idOne intent by DocumentID523
GET/v1/intents/:id/offersOffers against one intent523
POST/v1/intentsCreate an intent501
POST/v1/offersPublish an offer501
GET/v1/settlementsList settlements523
POST/v1/settlementsRecord a settlement501
GET/v1/solversKnown market makers523
GET/v1/solvers/:proTxHash/verifyCheck one ProTxHash523
GET/v1/id/:documentIdAny Platform document by ID523

Reading the status column

  • 200 — live and answering.
  • 523 — the endpoint is deployed but its upstream DAPI node is currently unreachable. The service failed loudly rather than returning an empty result that could be mistaken for "no intents". These reads recover when the upstream recovers.
  • 501 — not implemented by design. Every write endpoint that would require a signing key returns501. The API holds no key material, so a write cannot be performed here and is not pretended to be.

Shape of a request

network is a top-level field in the JSON body, not a header and not a query parameter. This is stated explicitly because it is a common point of confusion when integrating.

GET /v1/intents?network=testnet

POST /v1/intents
{
  "network": "testnet",
  "fromAsset": "DASH",
  "toAsset": "USDT",
  "inputAmount": 100000000,
  "minOutputAmount": 9900000,
  "expiresAt": 1790000000000
}

intentId isthe Dash Platform DocumentID. There is no separate protocol-side identifier to resolve.

CORS

With DEV set, the origin is* so the static web app may call the worker from a local port. Without it, only the configured origins are reflected back.