# GET /v4/analytics/positions/at/{storingId}

_Merkl Analytics API_

> Get closest position states at a timestamp

Return the closest position state(s) to a Unix timestamp for a storingId.

`order=DESC` (default) returns the last state at or before the timestamp; `order=ASC` returns the first state at or after it.

Each entry mirrors the gRPC `StateV2` shape, so the response carries the raw `state` blob unmodified.

**Examples:**
- Latest state ≤ T:    `GET /v4/analytics/positions/at/<storingId>?timestamp=1748635620`
- First state ≥ T:     `GET /v4/analytics/positions/at/<storingId>?timestamp=1748635620&order=ASC`
- One specific user:   `GET /v4/analytics/positions/at/<storingId>?timestamp=1748635620&positionKey=0xUser`

### Path parameters

- `storingId` (string) _(required)_

### Query parameters

- `timestamp` (string | number) _(required)_
- `order` (string | string) _(required)_
- `positionKey` (string)
- `positionGranularityKey` (string)

## Responses

- **200** Response for status 200

## Example request

```bash
curl -X GET "https://analytics.merkl.xyz/v4/analytics/positions/at/{storingId}?timestamp=<timestamp>&order=<order>" \
  -H "x-api-key: YOUR_API_KEY"
```