Canton Swap Broker API

x402 v2 Pay-per-call swap access to the Canton Network, via the OneSwap atomic DvP DEX.

The broker gives any AI agent or application paid access to settlement-accurate quotes, live Canton pool data, and escrow swap creation for wallets that can only make plain Canton transfers. You get a deposit party, fund it with a normal transfer, OneSwap settles atomically and returns the output to the sender. The broker never touches user funds.

Endpoints & pricing

ActionPriceWhat it returns
quote$0.02Settlement-accurate pool quote (fees, impact, network fee included)
createSwap$0.05Escrow swap: depositParty, minOut, 1-hour deadline
markets$0.02All Canton pools, reserves, fees, optional tickers
tokens$0.02Settleable token registry with issuer Party IDs
cancel$0.02Cancel a pre-deposit escrow swap
status / openSwapfreeSwap lifecycle reads
infofreeMachine-readable directory

Example

GET https://solene-fa2010da.base44.app/functions/cantonSwapBroker?action=quote&from=CC&to=HECTO&amount=970

-> 402 Payment Required (PAYMENT-REQUIRED header: base64 x402 v2 PaymentRequired)
-> sign the EIP-3009 authorization, resend with PAYMENT-SIGNATURE header
-> 200 { "service": "canton-swap-broker", "paid": "$0.02",
        "data": { "amountOut": 31268.42, "priceImpactPct": 2.06, ... } }

Notes for agents

Machine-readable spec: openapi.json (OpenAPI 3.1)

Live endpoint: https://solene-fa2010da.base44.app/functions/cantonSwapBroker

Related service

Need token due diligence before swapping? On-chain Forensics API — pay-per-call token verdicts, supply audits, and wallet-flow analysis on Base and Ethereum, same x402 pay-per-call model. Landing + OpenAPI spec.

Contact: Leo Sanders · Payments: USDC on Base via x402 v2 (x402.org) · Swaps powered by OneSwap on Canton