> ## Documentation Index
> Fetch the complete documentation index at: https://digraphsas-docs-cli.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Market API reference

> The Market API finds the best price across major DEXs and AMMs on 10+ EVM chains and returns it as ready-to-broadcast Augustus v6.2 calldata.

The Market API is Velora's DEX aggregator, served as a REST API. One request prices your swap, a second turns the quote into calldata for the [Augustus v6.2](/resources/chains-and-contracts) router, and you sign and broadcast it yourself. All you need to start is a `partner` string to tag your app.

<Note>
  Want gasless, MEV-protected swaps instead of self-broadcast calldata? Call
  [`GET /v2/quote`](/api-reference/market/quote) with `mode=ALL` and Velora returns a
  Delta intent or a Market route, whichever is better. See [Trading modes](/integrate/trading-modes).
</Note>

## Lifecycle

<Steps>
  <Step title="Price">
    `GET /prices` — returns the optimal `priceRoute` (`destAmount`, `gasCostUSD`, `bestRoute`, and an `hmac` integrity tag).
  </Step>

  <Step title="Build">
    `POST /transactions/:chainId` — turns the `priceRoute` into a broadcastable `txParams` envelope. Attach `permit` / `permit2` here to skip the approve tx.
  </Step>

  <Step title="Approve">
    ERC-20 `approve(to, amount)` against the Augustus v6.2 router (`txParams.to`). Native sources (ETH) skip this; the amount rides in `txParams.value`.
  </Step>

  <Step title="Send">
    Estimate gas locally, sign `txParams`, and broadcast. Settlement is atomic: it reverts if the delivered amount falls below the slippage-adjusted minimum.
  </Step>
</Steps>

<Tip>
  In a hurry? [`GET /swap`](/api-reference/market/swap) fuses price + build into one call, at lower rate limits and without RFQ liquidity.
</Tip>

## Endpoints

| Method | Path                                                           | Purpose                                                                          |
| ------ | -------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `GET`  | [`/v2/quote`](/api-reference/market/quote)                     | Delta intent or Market route from one request (`mode=DELTA`, `MARKET`, or `ALL`) |
| `GET`  | [`/prices`](/api-reference/market/prices)                      | Best route for a token pair — inspect, display, or cache it                      |
| `POST` | [`/transactions/:chainId`](/api-reference/market/transactions) | Build ready-to-broadcast calldata from a `priceRoute`                            |
| `GET`  | [`/swap`](/api-reference/market/swap)                          | Route + ready-to-broadcast tx in a single call                                   |

## SDK shortcut

Every endpoint is wrapped by [`sdk.swap.*`](/sdk/products/swap). The SDK handles the price → build orchestration, allowance checks, and partner-fee defaults. For a 5-minute walkthrough see [SDK → Market](/sdk/products/swap).

## Related pages

* [Why Market API](/market/overview) — when atomic, self-broadcast execution is the right choice.
* [How Market works](/market/how-it-works) — price → build → approve → settle, end to end.
* [Market examples](/market/examples/typescript) — copy-paste TypeScript, Python, Go, and Rust.
* [Monetization](/overview/monetization) — partner fees and positive slippage via `partner` / `partnerFeeBps`.
* [Troubleshooting](/api-reference/troubleshooting) — Market failure modes by symptom, cause, and fix.
* [Pro API accounts](/overview/pro-api-accounts) — higher RPS, quotas, and SLA support.
