{"openapi":"3.1.0","info":{"title":"Daggs API","version":"1.0.0","summary":"Swap and bridge tokens across EVM chains, Solana and Bitcoin.","description":"Public REST API behind daggs.xyz. Quote routes from LI.FI, Relay, Mayan, NEAR Intents, Jupiter and Titan, build unsigned transactions for one route step, broadcast Bitcoin deposits and track delivery. Read-only and non-custodial: you sign every transaction in your own wallet. No API key or login; requests are rate-limited per IP.\n\nTypical flow: GET /api/bridge/chains → GET /api/bridge/token-search → POST /api/bridge/routes → POST /api/bridge/build → sign and send → GET the status endpoint named by the build response's statusHint.\n\nAI agents can use the same features as tools over MCP: https://daggs.xyz/mcp (Streamable HTTP).","contact":{"url":"https://daggs.xyz"},"termsOfService":"https://daggs.xyz/terms"},"externalDocs":{"description":"Agent guide (llms.txt)","url":"https://daggs.xyz/llms.txt"},"servers":[{"url":"https://daggs.xyz"}],"security":[],"tags":[{"name":"Chains and tokens"},{"name":"Routes"},{"name":"Status"},{"name":"MCP","description":"Model Context Protocol server for AI agents."}],"paths":{"/api/bridge/chains":{"get":{"operationId":"listChains","tags":["Chains and tokens"],"summary":"List supported chains","description":"Every chain you can swap or bridge on: EVM chains, Solana and Bitcoin.","responses":{"200":{"description":"Supported chains.","content":{"application/json":{"schema":{"type":"object","properties":{"chains":{"type":"array","items":{"$ref":"#/components/schemas/Chain"}}}}}}},"429":{"description":"Rate limited (per IP, per minute). Wait for the retry-after header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/bridge/token-search":{"get":{"operationId":"searchTokens","tags":["Chains and tokens"],"summary":"Search tokens on every chain","description":"By symbol, name or address. Exact symbol/address matches come first, then popular chains.","parameters":[{"name":"q","in":"query","required":true,"description":"Symbol, name or address, 2–100 characters, e.g. \"usdc\".","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Max results (default 60, max 100).","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Matching tokens.","content":{"application/json":{"schema":{"type":"object","properties":{"tokens":{"type":"array","items":{"$ref":"#/components/schemas/Token"}}}}}}},"429":{"description":"Rate limited (per IP, per minute). Wait for the retry-after header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/bridge/tokens":{"get":{"operationId":"listTokens","tags":["Chains and tokens"],"summary":"List a chain's tokens","parameters":[{"name":"chain","in":"query","required":true,"description":"Chain id, e.g. 8453 (Base).","schema":{"type":"integer"}}],"responses":{"200":{"description":"Tokens keyed by chain id.","content":{"application/json":{"schema":{"type":"object","properties":{"tokens":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/Token"}}}}}}}},"400":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per IP, per minute). Wait for the retry-after header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/bridge/token":{"get":{"operationId":"getToken","tags":["Chains and tokens"],"summary":"Look up one token","parameters":[{"name":"chain","in":"query","required":true,"description":"Chain id or key.","schema":{"type":"string"}},{"name":"token","in":"query","required":true,"description":"Token symbol or address.","schema":{"type":"string"}}],"responses":{"200":{"description":"The token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"400":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per IP, per minute). Wait for the retry-after header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/bridge/routes":{"post":{"operationId":"getRoutes","tags":["Routes"],"summary":"Quote routes","description":"Routes from every source for one trade, best first (most received for CHEAPEST, quickest for FASTEST). Same chain = swap. Amounts are in the token's smallest units. Includes the site fee.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fromChainId","toChainId","fromTokenAddress","toTokenAddress","fromAmount"],"properties":{"fromChainId":{"type":"integer","description":"Source chain id."},"toChainId":{"type":"integer","description":"Destination chain id."},"fromTokenAddress":{"type":"string","description":"Token to pay (address from token-search)."},"toTokenAddress":{"type":"string","description":"Token to receive."},"fromAmount":{"type":"string","pattern":"^\\d+$","description":"Amount to pay in smallest units."},"fromAddress":{"type":"string","description":"Sender wallet. Needed by some sources and to build transactions."},"toAddress":{"type":"string","description":"Recipient. Defaults to fromAddress; required when receiving native BTC."},"slippage":{"type":"number","exclusiveMinimum":0,"maximum":0.5,"default":0.005,"description":"Max slippage as a fraction."},"order":{"type":"string","enum":["CHEAPEST","FASTEST"],"default":"CHEAPEST"}}}}}},"responses":{"200":{"description":"Quoted routes.","content":{"application/json":{"schema":{"type":"object","properties":{"routes":{"type":"array","items":{"$ref":"#/components/schemas/Route"}}}}}}},"400":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per IP, per minute). Wait for the retry-after header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/bridge/build":{"post":{"operationId":"buildTransactions","tags":["Routes"],"summary":"Build transactions for one route step","description":"Unsigned transactions to sign and send in order (EVM approvals first). Multi-step routes are built one step at a time: after a step is delivered, build `next.step` with `fromAmount` = what that step delivered.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["route","fromAddress"],"properties":{"route":{"$ref":"#/components/schemas/Route"},"step":{"type":"integer","minimum":0,"default":0},"fromAddress":{"type":"string","description":"Wallet that signs."},"toAddress":{"type":"string","description":"Recipient. Defaults to fromAddress."},"fromAmount":{"type":"string","pattern":"^\\d+$","description":"Required for step > 0: smallest units the previous step delivered."},"slippage":{"type":"number","exclusiveMinimum":0,"maximum":0.5,"default":0.005}}}}}},"responses":{"200":{"description":"Transactions to sign.","content":{"application/json":{"schema":{"type":"object","properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"outAmount":{"type":"string","description":"Fresh quote's output in smallest units, where the source re-quotes."},"statusHint":{"type":"object","description":"Which status endpoint and arguments track this transfer."},"depositAddress":{"type":"string","description":"NEAR Intents deposit address, for /api/bridge/near/status."},"next":{"type":"object","description":"Present on multi-step routes: the step to build next.","properties":{"routeId":{"type":"string"},"step":{"type":"integer"}}}}}}}},"400":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Price moved: a fresh quote pays less than the route's minimum. Quote again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per IP, per minute). Wait for the retry-after header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/bridge/bitcoin/broadcast":{"post":{"operationId":"broadcastBitcoin","tags":["Routes"],"summary":"Broadcast a signed Bitcoin deposit","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["transaction"],"properties":{"transaction":{"type":"string","description":"Signed PSBT (hex or base64) or raw transaction hex."}}}}}},"responses":{"200":{"description":"Broadcast.","content":{"application/json":{"schema":{"type":"object","properties":{"txid":{"type":"string"}}}}}},"400":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per IP, per minute). Wait for the retry-after header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/bridge/status":{"get":{"operationId":"getStatus","tags":["Status"],"summary":"Transfer status (LI.FI, Jupiter, Titan routes)","parameters":[{"name":"txHash","in":"query","required":true,"description":"Source-chain transaction hash or Solana signature.","schema":{"type":"string"}},{"name":"bridge","in":"query","required":false,"description":"Tool from the build response's statusHint.","schema":{"type":"string"}},{"name":"fromChain","in":"query","required":false,"description":"Source chain id.","schema":{"type":"string"}},{"name":"toChain","in":"query","required":false,"description":"Destination chain id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Status: NOT_FOUND, PENDING, DONE or FAILED, with received amounts.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per IP, per minute). Wait for the retry-after header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/bridge/relay/status":{"get":{"operationId":"getRelayStatus","tags":["Status"],"summary":"Transfer status (Relay routes)","parameters":[{"name":"requestId","in":"query","required":true,"description":"Relay request id from the build response.","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Status.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per IP, per minute). Wait for the retry-after header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/bridge/near/status":{"get":{"operationId":"getNearIntentsStatus","tags":["Status"],"summary":"Transfer status (NEAR Intents routes)","parameters":[{"name":"depositAddress","in":"query","required":true,"description":"Deposit address from the build response.","schema":{"type":"string"}},{"name":"txHash","in":"query","required":false,"description":"Deposit transaction hash, to speed up detection.","schema":{"type":"string"}}],"responses":{"200":{"description":"Status.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per IP, per minute). Wait for the retry-after header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/bridge/mayan/status":{"get":{"operationId":"getMayanStatus","tags":["Status"],"summary":"Transfer status (Mayan routes)","parameters":[{"name":"txHash","in":"query","required":true,"description":"Source transaction hash or Solana signature.","schema":{"type":"string"}},{"name":"decimals","in":"query","required":false,"description":"Destination token decimals, to report the received amount.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Status.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per IP, per minute). Wait for the retry-after header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/mcp":{"post":{"operationId":"mcp","tags":["MCP"],"summary":"MCP server (Streamable HTTP, JSON-RPC 2.0)","description":"Tools: list_chains, search_tokens, get_quote, build_transaction, send_transaction, get_transfer_status. Add it with: claude mcp add --transport http daggs https://daggs.xyz/mcp","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","integer","null"]},"method":{"type":"string","examples":["initialize","tools/list","tools/call"]},"params":{"type":"object"}}}}}},"responses":{"200":{"description":"JSON-RPC response.","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Accepted (notification, no response)."},"429":{"description":"Rate limited (per IP, per minute). Wait for the retry-after header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"statusCode":{"type":"integer"},"statusMessage":{"type":"string"},"message":{"type":"string"}}},"Chain":{"type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"chainType":{"type":"string","enum":["EVM","SVM","UTXO"]},"nativeToken":{"$ref":"#/components/schemas/Token"}}},"Token":{"type":"object","properties":{"address":{"type":"string"},"chainId":{"type":"integer"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer"},"logoURI":{"type":"string"},"priceUSD":{"type":"string"}}},"Route":{"type":"object","description":"A quoted route. Pass it back unchanged to /api/bridge/build.","additionalProperties":true,"properties":{"id":{"type":"string"},"fromAmount":{"type":"string"},"toAmount":{"type":"string"},"toAmountMin":{"type":"string"},"fromAmountUSD":{"type":"string"},"toAmountUSD":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"steps":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"tool":{"type":"string"},"action":{"type":"object"},"estimate":{"type":"object"}}}}}},"Transaction":{"oneOf":[{"type":"object","title":"EVM","required":["chainType","chainId","to","data","value"],"properties":{"chainType":{"const":"EVM"},"chainId":{"type":"integer"},"to":{"type":"string"},"data":{"type":"string"},"value":{"type":"string","description":"Wei, decimal string."},"gas":{"type":"string"}}},{"type":"object","title":"Solana","required":["chainType","data"],"properties":{"chainType":{"const":"SVM"},"data":{"type":"string","description":"Base64 versioned transaction."}}},{"type":"object","title":"Bitcoin","required":["chainType","psbt"],"properties":{"chainType":{"const":"UTXO"},"psbt":{"type":"string","description":"Hex PSBT to sign."}}}]}}}}