---
title: "Backtest one range"
method: GET
path: "/lp/simulate"
tags: ["Liquidity"]
---

# Backtest one range

`GET /lp/simulate`

## Request

- Base URL: `https://api.getchord.xyz/v1`
- URL: `https://api.getchord.xyz/v1/lp/simulate`
- Auth: none declared

One explicit price range replayed over the last `days` of candles in the token's pool: fees earned at the pool's real tier and the position's share, impermanent loss, exits, LP value versus hold.

## Query parameters

- `chain` 5042 | 4663 | 143, required
- `token` string, required: EVM address, hex, case-insensitive.
- `lower` number, required
- `upper` number, required
- `amountUsd` number
- `days` integer
- `pool` string: A pool: a 20-byte contract address (V2 / V3) or a 32-byte Uniswap V4 pool id.

## Response `200`

- object: One range, backtested on Chord's own candles and the pool's real fee tier.
  - `chain` integer
  - `token` string: EVM address, hex, case-insensitive.
  - `updatedAt` integer: Unix time, milliseconds — when the server built this answer.
  - `pool` string: A pool: a 20-byte contract address (V2 / V3) or a 32-byte Uniswap V4 pool id.
  - `dex` string
  - `feeBps` number, nullable
  - `tvlUsd` number, nullable
  - `days` integer
  - `hours` integer: Candles replayed.
  - `hoursInRange` integer
  - `inRangePct` number
  - `exits` integer: Times the price left the range.
  - `lower` number
  - `upper` number
  - `unreliable` string, nullable: Why the number should not be trusted, when it should not.
  - `entryPrice` number
  - `exitPrice` number
  - `priceChangePct` number
  - `feesUsd` number
  - `lpValueEndUsd` number
  - `holdValueEndUsd` number
  - `ilUsd` number: Impermanent loss (negative = loss).
  - `netVsHoldUsd` number
  - `totalReturnUsd` number
  - `totalReturnPct` number
  - `feeAprPct` number
  - `capitalEfficiency` number: Versus full range.
  - `shareOfPoolPct` number
  - `shareModel` 'liquidity' | 'bins' | 'tvl': What that share was measured against: the pool's in-range liquidity at its price now (V3 / V4 / Raydium CLMM), its active bin (Meteora DLMM), or its TVL counted as if spread over every price when the pool's depth could not be read (narrow ranges then read high).
  - `note` string

## Other responses

- `400`: Invalid parameters — `error` names the check that failed (`INVALID_PARAMS`, `BAD_ADDRESS`, `BAD_LIMIT`, `BAD_HOURS`, …).
- `404`: Nothing at this identity (`NOT_FOUND`, `UNKNOWN_TOKEN`, `NO_ROUTE`).

---

[API](https://skmtc.dev/getchord/apis/chord-api.md) · [All operations](https://skmtc.dev/getchord/apis/chord-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getchord/apis/chord-api/revisions/d3bc4640fea0?raw)
