> For the complete documentation index, see [llms.txt](https://docs.flash.trade/flash-trade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flash.trade/flash-trade/flash-trade-protocol/build-on-flash/flash-trade-v2/reference/account-and-positions.md).

# Account & positions

The basket snapshot and the enriched positions / orders reads.

A wallet's live state, decoded from its basket. Shared conventions: [Conventions](/flash-trade/flash-trade-protocol/build-on-flash/flash-trade-v2/reference/conventions.md).

| Method | Path                       |
| ------ | -------------------------- |
| `GET`  | `/owner/{owner}`           |
| `GET`  | `/positions/owner/{owner}` |
| `GET`  | `/orders/owner/{owner}`    |

For the live WebSocket form, see [WebSocket](/flash-trade/flash-trade-protocol/build-on-flash/flash-trade-v2/reference/websocket.md).

***

## Basket snapshot

`GET /owner/{owner}`

One-shot fetch of the full basket — the same payload the WebSocket streams.

| Param   | In   | Description         |
| ------- | ---- | ------------------- |
| `owner` | path | Owner wallet pubkey |

**Response** — `BasketSnapshotDto`

```json
{
  "owner": "bRXn4PPnUCLKP3kdHbX6FFQFpw2AhFzBVMgo4ZaWvtfb",
  "basketPubkey": "…",
  "basketData": "base64-raw-basket-bytes…",
  "positionMetrics": { "<marketPubkey>": { /* PositionMetricsDto */ } },
  "orderMetrics": { "<marketPubkey>": { /* OrderMetricsDto */ } }
}
```

| Field             | Description                                                                                                                 |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `basketPubkey`    | Basket PDA (derived from owner); `null` if not yet ingested                                                                 |
| `basketData`      | Base64 raw basket bytes; `null` if not yet ingested. Decode with the client SDK for native `PositionMeta[]` / `OrderMeta[]` |
| `positionMetrics` | Per-position metrics keyed by market pubkey (active-pool, non-zero size)                                                    |
| `orderMetrics`    | Per-market order metrics keyed by market pubkey (non-empty slots)                                                           |

Field lists for `PositionMetricsDto` / `OrderMetricsDto` are on [WebSocket](/flash-trade/flash-trade-protocol/build-on-flash/flash-trade-v2/reference/websocket.md#dtos).

***

## Positions

`GET /positions/owner/{owner}`

The snapshot's `positionMetrics` on their own — a map of `marketPubkey → PositionMetricsDto`.

| Param   | In   | Description         |
| ------- | ---- | ------------------- |
| `owner` | path | Owner wallet pubkey |

Key fields per position: `sideUi`, `marketSymbol`, `entryPriceUi`, `sizeUsdUi`, `collateralUsdUi`, `pnlWithFeeUsdUi`, `pnlPercentageWithFee`, `liquidationPriceUi`, `leverageUi` (full list: [WebSocket › DTOs](/flash-trade/flash-trade-protocol/build-on-flash/flash-trade-v2/reference/websocket.md#dtos)).

***

## Orders

`GET /orders/owner/{owner}`

The snapshot's `orderMetrics` on their own — a map of `marketPubkey → OrderMetricsDto`, each with `limitOrders[]`, `takeProfitOrders[]`, `stopLossOrders[]` (trigger price, size, `orderId`, leverage).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flash.trade/flash-trade/flash-trade-protocol/build-on-flash/flash-trade-v2/reference/account-and-positions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
