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

# POST /dex/last-price

`POST /dex/last-price`

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

## Request body

- DexLastPriceRequest
  - `type` 'buy' | 'sell' | 'mean', required
  - `assetPairs` object[], required
    - `asset2` Asset, nullable, required
      - `assetName` string, required
      - `policyId` string, required
    - `asset1` Asset, nullable, required
      - `assetName` string, required
      - `policyId` string, required

## Response `200`

- DexLastPriceResponse
  - `lastPrice` DexLastPrice[], required
    - `dex` 'WingRiders' | 'SundaeSwap' | 'MinSwap', 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

## 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/last-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)
