Position history
Review your past closed positions for performance tracking.
Review your past closed positions for performance tracking, for one currency. Same default and isolation as Open Positions. PnL is in the position's currency.
Each row is one close event: a partial close, a full close, a reverse, or a liquidation. Rows for the same position share its position_id.
Request
# USDT (default)
curl -X GET "https://trade.mudrex.com/fapi/v1/futures/positions/history?limit=2" \
-H "X-Authentication: your-secret-key"# INR
curl -X GET "https://trade.mudrex.com/fapi/v1/futures/positions/history?limit=5&trade_currency=INR" \
-H "X-Authentication: your-secret-key"# Next page (offset = last row's created_at in epoch ms, plus 1)
curl -X GET "https://trade.mudrex.com/fapi/v1/futures/positions/history?limit=50&offset=1790762979001" \
-H "X-Authentication: your-secret-key"Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
trade_currency | string | No | USDT or INR. Defaults to USDT. One currency per call. |
limit | number | No | Maximum number of records to return (default: 20). |
offset | number | No | Time cursor in epoch milliseconds. Returns rows whose created_at is earlier than this value. See Notes. |
Response
Status: 200 OK
USDT — one position partially closed, reversed, then closed:
{
"success": true,
"data": [
{
"id": "01a0f1ca-eacd-71cf-8a00-1934f57d65d6",
"position_id": "01a0f1ca-8e83-7c9f-b3e6-d51b34cba2e3",
"order_id": "01a0f1ca-e9ac-7ed4-8dd0-86098e4c445e",
"position_type": "LONG",
"status": "PARTIAL",
"leverage": "5",
"entry_price": "1.50965",
"closed_price": "1.5094",
"quantity": "4",
"pnl": "-0.001",
"created_at": "2026-09-30T10:09:39Z",
"updated_at": "2026-09-30T10:10:02Z",
"asset_uuid": "01903bcc-8452-78e1-b276-3e897dda2908",
"symbol": "XRPUSDT",
"trade_currency": "USDT",
"entry_hedge_rate": "1",
"exit_hedge_rate": "1"
},
{
"id": "01a0f1ca-fdb9-7c81-85e3-fd3e5881a764",
"position_id": "01a0f1ca-8e83-7c9f-b3e6-d51b34cba2e3",
"order_id": "01a0f1ca-fc9d-7c56-bfcf-04de44af7ff1",
"position_type": "LONG",
"status": "CLOSED",
"leverage": "5",
"entry_price": "1.50965",
"closed_price": "1.5093",
"quantity": "4",
"pnl": "-0.0014",
"created_at": "2026-09-30T10:09:39Z",
"updated_at": "2026-09-30T10:10:07Z",
"asset_uuid": "01903bcc-8452-78e1-b276-3e897dda2908",
"symbol": "XRPUSDT",
"trade_currency": "USDT",
"entry_hedge_rate": "1",
"exit_hedge_rate": "1"
},
{
"id": "01a0f1cb-13b6-7911-9738-ab6303110be6",
"position_id": "01a0f1ca-8e83-7c9f-b3e6-d51b34cba2e3",
"order_id": "01a0f1cb-12a7-7f30-9c86-d36db7775dfe",
"position_type": "SHORT",
"status": "CLOSED",
"leverage": "5",
"entry_price": "1.5093",
"closed_price": "1.5092",
"quantity": "4",
"pnl": "0.0004",
"created_at": "2026-09-30T10:09:39Z",
"updated_at": "2026-09-30T10:10:13Z",
"asset_uuid": "01903bcc-8452-78e1-b276-3e897dda2908",
"symbol": "XRPUSDT",
"trade_currency": "USDT",
"entry_hedge_rate": "1",
"exit_hedge_rate": "1"
}
]
}INR — liquidation (?trade_currency=INR):
{
"success": true,
"data": [
{
"id": "019c0555-aa2e-73e5-86cf-3a2167c62cfc",
"position_id": "019c0554-37ac-7d08-acc1-3d5e97ff460d",
"order_id": "019c0555-6ff2-76f0-8203-a41ee05653a7",
"position_type": "LONG",
"status": "LIQUIDATED",
"leverage": "50",
"entry_price": "0.31169",
"closed_price": "0.30546",
"quantity": "240",
"pnl": "-143.53",
"created_at": "2026-01-28T15:58:51Z",
"updated_at": "2026-01-28T16:00:01Z",
"asset_uuid": "019913c2-9b01-7d79-9c9d-7766751435d5",
"symbol": "SOMIUSDT",
"trade_currency": "INR",
"entry_hedge_rate": "96",
"exit_hedge_rate": "96"
}
]
}Response fields
| Field | Description |
|---|---|
id | History row UUID. Not the position UUID. |
position_id | Position UUID. Same value as position_id on orders and Open Positions. |
order_id | UUID of the order that closed this quantity (partial close, square off, reverse, stop-loss, or liquidation). |
position_type | Position type: LONG or SHORT. |
status | Close event: PARTIAL, CLOSED, or LIQUIDATED. |
leverage | Leverage used for the position. |
entry_price | Price at which the position was opened (USDT). |
closed_price | Price at which the position was closed (USDT). |
quantity | Quantity closed by this event (base asset). |
pnl | Realised PnL for this close event, in trade_currency. |
symbol | Trading symbol (e.g. "SOMIUSDT"). |
asset_uuid | Asset UUID. |
created_at | Time the position opened (ISO-8601, UTC). Same on every row for the position. |
updated_at | Time of this close event (ISO-8601, UTC). |
trade_currency | USDT or INR. |
entry_hedge_rate | INR/USDT rate at entry (1 for USDT). |
exit_hedge_rate | INR/USDT rate at exit (1 for USDT). |
Notes
- A partial close followed by a full close returns a
PARTIALrow and aCLOSEDrow with the sameposition_id.pnlon each row is the realised PnL for that row's quantity. - A reverse returns a
CLOSEDrow for the closed side; the position stays open on the other side with the sameposition_id. Oneposition_idcan therefore have more than oneCLOSEDrow. - Rows are sorted by
created_at(position open time), newest first. Sort byupdated_atto order close events by time. - Without
limit, the response returns the 20 newest rows.pageandper_pageare not supported. offsetis a time cursor (epoch ms), not a row or page index. Rows withcreated_atequal tooffsetare excluded. Rows of one position sharecreated_at, so to page through history:- Call with a chosen
limit(andtrade_currency). - Read
created_atof the last row and convert it to epoch milliseconds. - Call again with the same
limitandoffset=<that epoch ms + 1>. - Drop rows whose
idwas already received. Stop when a page returns no newid.
- Call with a chosen
- For the realised PnL of a Partial Close, use the
PARTIALrow whoseorder_idmatches the partial closeorder_id. - See Order and position IDs.
Updated about 1 month ago
Did this page help you?
