> For the complete documentation index, see [llms.txt](https://docs.pangolin.exchange/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pangolin.exchange/pangoperps/trading-api/positions/get-position-history.md).

# Get Position History

## Get Position History

Returns historical position records for the authenticated account.

### Endpoint

**GET /v1/position\_history**

Mainnet: GET <https://api.orderly.org/v1/position\\_history\\>
Testnet: GET <https://testnet-api.orderly.org/v1/position\\_history>

Rate limit: 10 requests per second.

### Headers

* `orderly-timestamp` (string, required): Signed request timestamp in milliseconds.
* `orderly-account-id` (string, required): Authenticated account ID.
* `orderly-key` (string, required): Public key used to sign the request.
* `orderly-signature` (string, required): Signature of the request payload.

### Query parameters

* `symbol` (string): Optional symbol filter.
* `limit` (number, required): Maximum number of history records to return.

### Response

HTTP 200 returns `success`, required `data`, and server `timestamp`. `data.rows` is an array. Each row can include `position_id` (number), `status` and `type` (strings), `symbol` (string), numeric `avg_open_price`, `avg_close_price`, `max_position_qty`, `closed_position_qty`, `trading_fee`, `accumulated_funding_fee`, `insurance_fund_fee`, `liquidator_fee`, `liquidation_id` (number or null), and `realized_pnl`; `side` is a string; `open_timestamp`, `close_timestamp`, and `last_update_timestamp` are numbers; `leverage` is an integer; and `margin_mode` is `CROSS` or `ISOLATED`.

```
{"success":true,"data":{"rows":[{"position_id":1,"status":"closed","type":"liquidated","symbol":"PERP_ETH_USDC","avg_open_price":61016.1,"avg_close_price":61016.1,"max_position_qty":56.6,"closed_position_qty":56.6,"side":"LONG","trading_fee":0.015,"accumulated_funding_fee":0.11,"insurance_fund_fee":0,"liquidator_fee":0,"liquidation_id":null,"realized_pnl":-9.09691927314905,"open_timestamp":1685429350571,"close_timestamp":1685429350571,"last_update_timestamp":1685429350571,"leverage":10,"margin_mode":"CROSS"}]},"timestamp":1702989203989}
```
