• Pricing
  • Story
  • Sign in
Get started
Docs/Swap API

Swap API

API model for treasury swaps in Dino, including current status and planned request/response contracts.

Dino Swap is the execution layer between treasury intent and settlement:

intent -> quote -> policy -> execute -> book

#Current status

Current production UX for Swap is available in Dino dashboard.

Public REST contract for Swap is being formalized. Until the public endpoints are announced, treat the following schema as the implementation target for planning and integration design.

#Planned endpoint model

#POST /v1/swap/quote

Request body:

{
  "team_id": "team_xxx",
  "sell_token": "USDC",
  "buy_token": "ETH",
  "sell_amount": "1000.00"
}

Response body:

{
  "quote_id": "quote_xxx",
  "provider": "0x",
  "route": {},
  "expected_buy_amount": "0.3412",
  "estimated_fees": {
    "network": "3.15",
    "protocol": "0.42"
  },
  "slippage_bps": 100,
  "expires_at": "2026-05-08T15:04:00.000Z"
}

#POST /v1/swap/policy-check

Request body:

{
  "team_id": "team_xxx",
  "quote_id": "quote_xxx",
  "sell_token": "USDC",
  "buy_token": "ETH",
  "sell_amount": "1000.00",
  "expected_buy_amount": "0.3412"
}

Response body:

{
  "status": "pass",
  "reasons": [],
  "evaluated_at": "2026-05-08T15:03:35.000Z"
}

#POST /v1/swap/execute

Request body:

{
  "team_id": "team_xxx",
  "quote_id": "quote_xxx",
  "confirmation_token": "confirm_xxx",
  "idempotency_key": "idemp_xxx"
}

Response body:

{
  "swap_id": "swap_xxx",
  "execution_status": "submitted",
  "tx_hash": "0xabc...",
  "provider": "0x"
}

#GET /v1/swap/:swap_id

Response body:

{
  "swap_id": "swap_xxx",
  "execution_status": "confirmed",
  "policy_status": "pass",
  "tx_hash": "0xabc...",
  "provider": "0x",
  "updated_at": "2026-05-08T15:05:11.000Z"
}

#Suggested client flow

  1. Create quote.
  2. Run policy check.
  3. If policy passes, execute with idempotency key.
  4. Poll status until terminal state.
  5. Store receipt and accounting reference.

#Guardrails to design for

  • Quote TTL: refresh expired quotes before execution.
  • Idempotency: always provide a stable idempotency key on execute.
  • Policy first: block execution on failed policy status.
  • Auditability: persist swap_id, provider, and tx_hash.

#Related docs

  • API Reference
  • Agent Bank API
  • Agent Spend Quickstart

Interactive API reference

Same Scalar experience as api.dino.id — all routes, schemas, and try-it auth. Use the sidebar search to jump to a tag or path (for example Agent spend and /v1 for spending keys; treasury or swap routes appear here as they ship publicly).

Agent Spend ChangelogBuild an OAuth App