> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snek.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# User history feed

> Orders across wallets, open orders, and lookup by beacon

Endpoints under `user-history-feed` return **orders** across one or more wallets (PKH list), optionally filtered by asset or “open only”.

**Auth:** Public

***

## POST /v1/user-history-feed/initial/state

Initial ledger + mempool snapshot for the given PKHs.

### Query parameters

Paging: `offset`, `limit` (default limit `100`, max `100`).

### Body

JSON array of at least one PKH:

```json theme={null}
["41fa17b2…", "e62df682…"]
```

### Response

Same `OrderInitialStateResponse` shape as [Orders feed](/api-reference/snekfun-provider/http/orders-feed): `{ "ledger": { "count", "items" }, "mempool": [] }`.

***

## POST /v1/user-history-feed/initial/state/by/asset

Same as above but restricted to a single **asset** (adds query).

### Query parameters

<ParamField query="asset" type="string" required>
  Asset id to filter.
</ParamField>

Plus paging query params.

### Body

Non-empty PKH array.

***

## POST /v1/user-history-feed/initial/state/open

Only **non-completed** orders for the wallets.

Same body and paging as `initial/state`.

***

## GET /v1/user-history-feed/order/trades

Returns a single **trade** record by **beacon** (currency symbol).

### Query parameters

<ParamField query="beacon" type="string" required>
  Beacon / currency symbol identifier for the order.
</ParamField>

### Response

`TradeOrder` — discriminated union: `CFMM` or `Spot` with fields such as `orderType`, `orderStatus`, amounts, assets, prices, fill percent, etc.

```bash theme={null}
curl -sS "https://analytics.snek.fun/v1/user-history-feed/order/trades?beacon=…"
```

## WebSocket

Subscribe to **UserHistoryByAddress** or **UserHistoryByAddressAndAsset** with the appropriate `data` payload. See [WebSocket](/api-reference/snekfun-provider/websocket).
