---
title: "POST /dex/mean-price"
method: POST
path: "/dex/mean-price"
---

# POST /dex/mean-price

`POST /dex/mean-price`

Gets the mean prices for the given liquidity pool and asset pairs.
Mean is not AVG from the last values, but the remaining amount of assets on the pool output

## Request body

- DexMeanPriceRequest
  - `limit` number, double — Defaults to `DEX_PRICE_LIMIT.RESPONSE`
  - `dexes` Dex[], required
  - `assetPairs` object[], required
    - `asset2` Asset, nullable, required
      - `assetName` string, required
      - `policyId` string, required
    - `asset1` Asset, nullable, required
      - `assetName` string, required
      - `policyId` string, required
  - `after` BlockTxPair
    - `tx` string, required — tx hash
    - `block` string, required — block hash
  - `untilBlock` string, required — block hash - inclusive

## Response `200`

- DexMeanPriceResponse
  - `meanPrices` DexMeanPrice[], required
    - `amount2` string, required
    - `amount1` string, required
    - `asset2` Asset, nullable, required
      - `assetName` string, required
      - `policyId` string, required
    - `asset1` Asset, nullable, required
      - `assetName` string, required
      - `policyId` string, required
    - `dex` 'WingRiders' | 'SundaeSwap' | 'MinSwap', required
    - `tx_hash` string, required

## Other responses

- `400`
- `409`
- `422`

## Changes

- **2022-12-09** `d0885b1c9101` — 1 info
  - endpoint added
- **2022-05-10** `f39bef51175a` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/dcspark/apis/carp/changes/dex/mean-price/post.md)

---

[API](https://skmtc.dev/dcspark/apis/carp.md) · [All operations](https://skmtc.dev/dcspark/apis/carp/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dcspark/carp/revisions/ab189523ed9a/schema)
