---
title: "Get a prepared position replay snapshot"
method: GET
path: "/v1/positions/{positionId}/replay"
tags: ["positions"]
---

# Get a prepared position replay snapshot

`GET /v1/positions/{positionId}/replay`

## Request

- Base URL: `https://app.legend.trade/api/rest`
- URL: `https://app.legend.trade/api/rest/v1/positions/{positionId}/replay`
- Auth: none declared

## Path parameters

- `positionId` string, uuid, required

## Response `200`

Successful response

- PositionReplay
  - `version` 1, required
  - `id` string, required
  - `network` string, required
  - `capturedAt` integer, required: Unix timestamp in milliseconds.
  - `openedAt` string, required
  - `closedAt` string, nullable, required
  - `symbol` string, required
  - `side` 'long' | 'short', required
  - `leverage` number, required
  - `user` object, required
    - `id` string, required
    - `username` string, nullable, required
    - `display_name` string, nullable, required
    - `avatar_url` string, nullable, required
  - `interval` string, required
  - `intervalMs` number, required
  - `prices` object[], required
    - `time` integer, required: Unix timestamp in milliseconds.
    - `price` number, required
  - `candleSnapshot` object, required
    - `intervalMs` number, required
    - `candles` object[], required
      - `time` integer, required: Unix timestamp in milliseconds.
      - `end` integer, required: Unix timestamp in milliseconds.
      - `open` number, required
      - `high` number, required
      - `low` number, required
      - `close` number, required
  - `marketContext` object, required
    - `samples` object[], required
      - `time` integer, required: Unix timestamp in milliseconds.
      - `price` number, required
      - `change24h` number, nullable, required
      - `volume` number, nullable, required
    - `volumeUnit` 'base', required
    - `lookbackMs` number, required
  - `trades` object[], required
    - `id` string, required
    - `time` integer, required: Unix timestamp in milliseconds.
    - `price` number, required
    - `quantity` number, required
    - `action` 'Open' | 'Add' | 'Reduce' | 'Close', required
    - `fee` number, required
    - `closedPnl` number, required
    - `twapId` string
    - `fillCount` integer
  - `markers` object[], required
    - `id` string, required
    - `time` integer, required: Unix timestamp in milliseconds.
    - `price` number, required
    - `quantity` number, required
    - `action` 'Open' | 'Add' | 'Reduce' | 'Close', required
    - `fee` number, required
    - `closedPnl` number, required
    - `twapId` string
    - `fillCount` integer
    - `notional` number, required
  - `twaps` ReplayTwapGroupOutput[], required
    - `id` string, required
    - `first` object, required
      - `id` string, required
      - `time` integer, required: Unix timestamp in milliseconds.
      - `price` number, required
      - `action` 'Open' | 'Add' | 'Reduce' | 'Close', required
    - `last` object, required: Last recorded execution in this snapshot. This does not indicate TWAP completion or cancellation.
      - `id` string, required
      - `time` integer, required: Unix timestamp in milliseconds.
      - `price` number, required
      - `action` 'Open' | 'Add' | 'Reduce' | 'Close', required
    - `executions` object[], required: Cumulative checkpoints in time order. At the replay cursor, use the last array entry with time <= cursor, including the last entry when timestamps match. Do not sum these values. Before the first entry, no execution has occurred.
      - `time` integer, required: Unix timestamp in milliseconds.
      - `notional` number, required: Cumulative executed notional in USD through this array entry.
  - `displayGroups` object[]
    - `id` string, required
    - `kind` 'twap' | 'activity' | 'event', required
    - `action` 'Open' | 'Add' | 'Reduce' | 'Close', required
    - `time` integer, required
    - `executionIds` string[], required
    - `twapIds` string[]
    - `events` object[]
      - `id` string, required
      - `time` number, required
      - `action` 'Open' | 'Close', required
    - `checkpoints` object[], required: Cumulative checkpoints in time order. At the replay cursor, use the last checkpoint with time <= cursor. Do not sum checkpoints. Before the first checkpoint, do not display the group.
      - `time` integer, required: Unix timestamp in milliseconds.
      - `quantity` number, required: Cumulative executed quantity in base units.
      - `notional` number, required: Cumulative executed notional in USD.
      - `price` number, required: Quantity-weighted average execution price in USD.
      - `fillCount` integer, required: Cumulative fill count.
  - `playbackMs` number, required: Duration in milliseconds of the moving trade segment; excludes intro, entry and ending holds. Shared by live playback and the prepared timeline.
  - `timeline` object[], required
    - `time` integer, required: Unix timestamp in milliseconds.
    - `elapsed` number, required: Seconds since the prepared timeline began, including intro and holds.
    - `ended` boolean, required
    - `introProgress` number
  - `financials` ReplayFinancials, required
    - `states` ReplayFinancialState[], required: Chronological financial checkpoints at price, execution, funding and cutoff timestamps (Unix milliseconds). Select the last state whose time is at or before the cursor; hold all values without interpolation. Accounting and monetary calculations are already applied by the server.
      - `time` integer, required
      - `price` number, required
      - `size` number, required
      - `averageEntry` number, required: Running weighted cost basis of the remaining position; zero before entry and retained at the last basis after closing.
      - `realized` number, required
      - `unrealized` number, required
      - `fees` number, required: Cumulative fees in USD; positive is a cost, negative is a rebate.
      - `funding` number, required: Cumulative funding in USD; positive is received, negative is paid.
      - `total` number, required: Net PnL in USD: realized + unrealized - fees + funding.
      - `positionValue` number, required
      - `eventCount` integer, required: Number of raw trades included at this checkpoint, including all executions at its timestamp.
      - `closed` boolean, required
    - `summary` ReplayFinancialSummaryOutput, required
      - `peakValue` number, required
      - `peakQuantity` number, required
      - `entryQuantity` number, required
      - `averageEntry` number, nullable, required: Quantity-weighted price across all opening and adding executions; differs from the running cost basis after reductions.
      - `averageExit` number, nullable, required
      - `pnlPercent` number, nullable, required: Final net PnL divided by first opening-fill notional / response leverage, times 100. This preserves the replay share-card metric; it is not historical margin ROI.
  - `funding` object[], required
    - `time` integer, required: Unix timestamp in milliseconds.
    - `amount` number, required
  - `notes` object[], required
    - `id` string, required
    - `positionId` string, required
    - `time` integer, required: Unix timestamp in milliseconds.
    - `createdAt` integer, required: Unix timestamp in milliseconds.
    - `content` string, required
    - `author` string, required
    - `avatar` string, nullable, required
    - `likes` object, required
      - `count` integer, required
      - `users` object[], required
        - `id` string, required
        - `username` string, nullable, required
        - `display_name` string, nullable, required
        - `avatar_url` string, nullable, required
    - `comments` object[], required
      - `id` string, required
      - `content` string, required
      - `author` string, required
      - `avatar` string, nullable, required
  - `moments` object, required
    - `version` 1, required
    - `comebacks` object[], required
      - `time` integer, required: Unix timestamp in milliseconds.
      - `major` boolean, required
    - `slowMoments` object[], required
      - `time` integer, required: Unix timestamp in milliseconds.
      - `strength` number, required
    - `pnlFlashes` object[]
      - `time` integer, required: Unix timestamp in milliseconds.
      - `direction` 'up' | 'down', required
      - `delta` number, required
    - `candleFlashes` object[]
      - `time` integer, required: Unix timestamp in milliseconds.
      - `candleTime` integer, required: Unix timestamp in milliseconds.
  - `coverage` object, required
    - `marketContextComplete` boolean, required
    - `notesTruncated` boolean, required
    - `commentsTruncated` boolean, required
    - `lastCandleAt` integer, required: Unix timestamp in milliseconds.

## Other responses

- `400`: Invalid input data
- `404`: Not found
- `412`: Replay is unavailable. Use data.replayReason to identify the cause.
- `500`: Internal server error

## Changes

- **2026-10-25** `8d368659667e`: 13 breaking, 13 info
  - the response property `closedAt` became nullable for the status `200`
  - the response property `financials/summary/averageEntry` became nullable for the status `200`
  - the response property `financials/summary/averageExit` became nullable for the status `200`
  - the response property `financials/summary/pnlPercent` became nullable for the status `200`
  - …22 more
- **2026-10-24** `47071fafc154`: 6 info
  - added the non-success response with the status `412`
  - added the required property `displayGroups/items/checkpoints/items/price` to the response with the `200` status
  - added the required property `financials` to the response with the `200` status
  - added the required property `markers/items/notional` to the response with the `200` status
  - …2 more
- **2026-10-22** `34ed4ffb50d7`: 2 breaking
  - removed the required property `copyActivity` from the response with the `200` status
  - removed the required property `coverage/autocopiesTruncated` from the response with the `200` status
- **2026-10-22** `71524db9527a`: 3 info
  - added the optional property `displayGroups` to the response with the `200` status
  - added the optional property `markers/items/twapId` to the response with the `200` status
  - added the optional property `trades/items/twapId` to the response with the `200` status
- …earlier changes not shown

[Operation history](https://skmtc.dev/legend/apis/legend-api/changes/v1/positions/:positionId/replay/get.md)

---

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