https://api.velora.xyz; no SDK required.
Market is the right path when the user has gas and wants synchronous, atomic settlement. For gasless, MEV-protected swaps that Delta settles from a signed intent, use a Delta swap instead. For the conceptual model, see Market → How it works; for a typed wrapper, see SDK → Market.
The flow
Get a price route
GET /prices returns a priceRoute: the best path, the expected destAmount, and a gas estimate. See GET /prices.Build the transaction
POST /transactions/{chainId} with the priceRoute passed verbatim and a slippage tolerance. You get ready-to-broadcast calldata. See build transaction.Approve the router (ERC-20 only)
For an ERC-20 source, the user approves the Augustus v6.2 router as spender, or passes a permit in the build call to avoid the round-trip. Native source skips this. See Approvals and permit.
1. Price
priceRoute is stateless and unsigned, just a routing plan, and it expires quickly as prices move. Market /prices takes network; the build call below takes chainId in its path.
2. Build the transaction
Pass thepriceRoute verbatim and a slippage tolerance (basis points):
3. Approve the router (ERC-20 only)
If the source token is an ERC-20, the user approves the Augustus v6.2 router (theto address) before swapping: a standard approve(spender, amount). Augustus v6.2 is the only spender to authorize. Native source tokens skip this; the build call returns the value to send with the swap directly. To avoid the extra round-trip, pass an EIP-2612 permit or Permit2 payload in the build call’s permit field instead of approving on-chain. See Approvals and permit for the full picture and build transaction for the field. Router addresses are in Chains & contracts.
4. Sign and broadcast
Send the{ to, data, value } from the build response as a transaction from the user’s wallet. Augustus pulls the source token, walks the route, checks the result against the user’s minimum (price × 1 − slippage), and delivers destToken. If any hop fails or slippage is exceeded, the transaction reverts; there’s no partial-fill state.
Partner fee
Passpartner on /prices and the build call to attribute volume and capture a fee; add partnerAddress, partnerFeeBps, and partnerTakesSurplus to configure it. See Monetize for the field reference.
Related pages
- Market → How it works: the routing and atomic-settlement model behind these calls.
- Delta swap, the gasless, MEV-protected alternative.
- Trading modes covers when to pick Market over Delta.
- Market API reference for full parameters and response schemas.
- SDK → Market, a typed wrapper over this flow.