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

# Market API DEX aggregation

> Velora's aggregation API: best-price routing across DEXs with atomic on-chain settlement in a single transaction.

The Market API is Velora's classic swap aggregator. You request a quote, build a transaction, and your user signs and submits it on-chain, in one atomic call. It's the right choice when you need composability inside a larger transaction, when the swap is small, or when you want full control over execution.

## What you get

<CardGroup cols={3}>
  <Card title="Best-price routing" icon="route">
    Aggregates liquidity across major DEXs to find the optimal path.
  </Card>

  <Card title="Atomic execution" icon="bolt">
    Swap settles in a single transaction, composable with any contract call.
  </Card>

  <Card title="Multi-chain" icon="layer-group">
    Ethereum, Polygon, BNB, Arbitrum, Optimism, Base, Avalanche, Gnosis, Unichain.
  </Card>
</CardGroup>

For a side-by-side breakdown of when to pick `mode=DELTA`, `mode=MARKET`, or `mode=ALL`, see [Trading modes](/integrate/trading-modes).

## See it work

The basic flow is two calls (get a price, build a transaction), then your user signs and submits it:

```bash theme={null}
# 1. Get a price quote (returns a priceRoute)
curl -G 'https://api.velora.xyz/prices' \
  --data-urlencode 'srcToken=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' \
  --data-urlencode 'destToken=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' \
  --data-urlencode 'amount=1000000000000000000' \
  --data-urlencode 'srcDecimals=18' \
  --data-urlencode 'destDecimals=6' \
  --data-urlencode 'side=SELL' \
  --data-urlencode 'network=1' \
  --data-urlencode 'userAddress=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' \
  --data-urlencode 'partner=my-app-name' \
  --data-urlencode 'version=6.2' \
  -o price.json

# 2. Build the transaction: wrap the priceRoute verbatim with the swap params
jq '{priceRoute,
     srcToken: .priceRoute.srcToken,
     destToken: .priceRoute.destToken,
     srcAmount: .priceRoute.srcAmount,
     slippage: 50,
     userAddress: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
     partner: "my-app-name"}' price.json > tx.json
curl -X POST 'https://api.velora.xyz/transactions/1' \
  -H 'Content-Type: application/json' -d @tx.json

# 3. User signs and submits the transaction with their wallet
```

## Next steps

<CardGroup cols={3}>
  <Card title="Quickstart" icon="play" href="/overview/quickstart">
    cURL the full flow end-to-end.
  </Card>

  <Card title="How it works" icon="diagram-project" href="/market/how-it-works">
    Price, build, approve, settle: the full Market lifecycle.
  </Card>

  <Card title="API Reference" icon="book" href="/api-reference/market/overview">
    Endpoints, parameters, and response schemas.
  </Card>
</CardGroup>
