> For the complete documentation index, see [llms.txt](https://docs.sidepit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sidepit.com/use-sidepit/beta/trading/position-settlement.md).

# Positions and Settlement

The account view is the source for current positions, average prices, realized P\&L, execution fees, working-order margin, and available margin. Clients should not reconstruct money state from fills alone.

## During the session

Orders and fills update position and margin state. Execution fees are deducted on every fill and accumulate in `realized_fees`. Open P\&L changes with the current mark.

The point-in-time account response includes:

* `accountstate` for balances, delegates, unlock reservations, and contract margins;
* `orderfills` for recent order outcomes;
* `trader_margin_state` for current available margin and risk position; and
* `accountops` for delegation and unlock receipts and records.

Bots should also consume the continuous order feed and use the server-published margin state rather than a locally recomputed substitute.

<figure><img src="https://954013533-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0IyfR8sDr4geAO23BULo%2Fuploads%2Fgit-blob-ccdff2d7aac8246cbc63a84d22e44d4db4e8c64e%2Fplaceholder-account-state.svg?alt=media" alt="Placeholder for the production account, position, execution fee, and order views"><figcaption><p>Screenshot slot: show available margin, position, execution fees, open orders, and recent outcomes in one account view.</p></figcaption></figure>

## Daily settlement

At daily settlement, open P\&L folds into the Bitcoin balance and the carried position's average price resets to the settlement mark. The position can continue into the next session subject to the current contract and margin rules.

While the market is open, the account view keeps four numbers distinct: opening balance, realized P\&L, unrealized P\&L at the latest mark, and current marked equity. At the close, unrealized P\&L becomes realized, the balance moves by the full session result, and unrealized P\&L returns to zero. The closing view keeps the session P\&L beside the new balance so the trader can see both the result and what the account has now.

Use the session schedule returned by the exchange. Feeds are quiet while closed; that is not, by itself, evidence of lost connectivity.

## Expiry and roll

USDBTC products are dated. Always read the active ticker and expiry in the current [Contract Specifications](/use-sidepit/beta/trading/contract-specifications.md). Do not submit a stale ticker, and do not assume a position will be automatically unlocked at expiry.

If you intend to exit, flatten exposure and cancel working orders before requesting an owner-signed unlock. Unlock progress is separate from position settlement and has no promised completion time.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sidepit.com/use-sidepit/beta/trading/position-settlement.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
