One position
const url = 'https://api.getchord.xyz/v1/lp/position/5042/example/example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.getchord.xyz/v1/lp/position/5042/example/exampleA position by its NFT: the valued row, its events, and a hold-instead comparison (what the same tokens would be worth unpooled). native carries the same position in the chain’s own coin (nativeSymbol): what went in, came out and was paid as fees, each event converted at the coin’s price of its own hour, and the value and waiting fees at the coin’s price now. It is null while the chain’s ledger has no figures in its coin.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”EVM address, hex, case-insensitive.
Position manager contract.
Token id.
Responses
Section titled “ Responses ”object
object
EVM address, hex, case-insensitive.
A pool: a 20-byte contract address (V2 / V3) or a 32-byte Uniswap V4 pool id.
EVM address, hex, case-insensitive.
EVM address, hex, case-insensitive.
EVM address, hex, case-insensitive.
Dollars added.
Dollars removed.
Fees collected.
Unix time, seconds, UTC.
Unix time, seconds, UTC.
Unix time, seconds, UTC.
Live value of the liquidity (open positions).
Uncollected fees (V3).
Liquidity leg only.
Distance from the price to the nearest range edge, percent.
Opened and closed within seconds — a swap trick, shown but not scored.
Dollars out exceed dollars in by far — the tape missed an add; shown, never scored.
object
Transaction hash.
Unix time, seconds, UTC.
object
object
In, in the coin.
Out, in the coin.
Fees paid out, in the coin.
Value now at the coin’s price now; null for a closed position.
Fees waiting, at the coin’s price now.
Closed: out + fees − in. Open: value + waiting + out + fees − in.
pnl in percent of in.
The chain’s coin (ETH, MON, USDC); null with native.
Unix time, milliseconds — when the server built this answer.
Example
{ "position": { "kind": "v3", "status": "open" }}Invalid parameters — error names the check that failed (INVALID_PARAMS, BAD_ADDRESS, BAD_LIMIT, BAD_HOURS, …).
Every non-2xx body.
object
Stable machine code, e.g. INVALID_PARAMS, NOT_READY, RATE_LIMIT_EXCEEDED.
For humans.
HTTP status, when included.
Example
{ "error": "INVALID_PARAMS", "message": "amount must be an integer string in the token's smallest unit"}Nothing at this identity (NOT_FOUND, UNKNOWN_TOKEN, NO_ROUTE).
Every non-2xx body.
object
Stable machine code, e.g. INVALID_PARAMS, NOT_READY, RATE_LIMIT_EXCEEDED.
For humans.
HTTP status, when included.
Example
{ "error": "INVALID_PARAMS", "message": "amount must be an integer string in the token's smallest unit"}