Guides
Guides

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

ParameterTypeRequiredDescription
trade_currencystringNoUSDT or INR. Defaults to USDT. One currency per call.
limitnumberNoMaximum number of records to return (default: 20).
offsetnumberNoTime 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

FieldDescription
idHistory row UUID. Not the position UUID.
position_idPosition UUID. Same value as position_id on orders and Open Positions.
order_idUUID of the order that closed this quantity (partial close, square off, reverse, stop-loss, or liquidation).
position_typePosition type: LONG or SHORT.
statusClose event: PARTIAL, CLOSED, or LIQUIDATED.
leverageLeverage used for the position.
entry_pricePrice at which the position was opened (USDT).
closed_pricePrice at which the position was closed (USDT).
quantityQuantity closed by this event (base asset).
pnlRealised PnL for this close event, in trade_currency.
symbolTrading symbol (e.g. "SOMIUSDT").
asset_uuidAsset UUID.
created_atTime the position opened (ISO-8601, UTC). Same on every row for the position.
updated_atTime of this close event (ISO-8601, UTC).
trade_currencyUSDT or INR.
entry_hedge_rateINR/USDT rate at entry (1 for USDT).
exit_hedge_rateINR/USDT rate at exit (1 for USDT).

Notes

  • A partial close followed by a full close returns a PARTIAL row and a CLOSED row with the same position_id. pnl on each row is the realised PnL for that row's quantity.
  • A reverse returns a CLOSED row for the closed side; the position stays open on the other side with the same position_id. One position_id can therefore have more than one CLOSED row.
  • Rows are sorted by created_at (position open time), newest first. Sort by updated_at to order close events by time.
  • Without limit, the response returns the 20 newest rows. page and per_page are not supported.
  • offset is a time cursor (epoch ms), not a row or page index. Rows with created_at equal to offset are excluded. Rows of one position share created_at, so to page through history:
    1. Call with a chosen limit (and trade_currency).
    2. Read created_at of the last row and convert it to epoch milliseconds.
    3. Call again with the same limit and offset=<that epoch ms + 1>.
    4. Drop rows whose id was already received. Stop when a page returns no new id.
  • For the realised PnL of a Partial Close, use the PARTIAL row whose order_id matches the partial close order_id.
  • See Order and position IDs.

Did this page help you?