> 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/margin.md).

# Margin and Execution Fee

Sidepit uses shared Bitcoin margin across the account. The active contract publishes initial and maintenance requirements per contract, while the account view publishes current balance, available margin, restriction state, and per-contract margin data.

## Use live values

Do not use a remembered minimum deposit or margin amount. Read the current [Contract Specifications](/use-sidepit/beta/trading/contract-specifications.md), query `ACTIVE_PRODUCT` for live contract requirements, and query `POSITIONS` for current account state.

* **Initial margin** is the contract's published requirement for adding exposure.
* **Maintenance margin** is the published lower threshold used in ongoing risk checks.
* **Working orders** reserve margin while they remain open.
* **Available margin** is the amount currently available for orders or an owner unlock, subject to the server's final checks.
* **Restricted accounts** may reduce risk but cannot add it.

## Intraday and overnight margin

Sidepit does not liquidate positions while the market is open. During the open session, existing positions are supported by maintenance margin. If available margin falls below zero, the account can trade only toward a smaller position. The trader chooses and submits the exit order.

At daily settlement, open positions are marked to the settlement price and P\&L is folded into the account balance. New exposure carried into the next session must meet the higher initial-margin requirement. A position that has enough margin at 2:00 PM may therefore be short of margin at settlement.

If the account does not meet initial margin at settlement, it becomes restricted. The interval before the next pre-open check is the opportunity to add margin: receive Bitcoin at the Sidepit ID, then LOCK it. Sidepit checks the account again before the next session. If margin passes, the restriction clears. Otherwise, the account remains restricted and may reduce its position when trading resumes.

Unless carrying the position is deliberate, the normal day-trading posture is flat at the close.

## Execution fee

The production constant is:

`execution_fee_sats_per_contract_per_side = 125`

That is **125 sats per contract per side per execution**.

* Buy or sell one contract in one execution: 125 sats.
* Open one contract and later close it: 250 sats for that trader.
* Both counterparties together: 250 sats per matched contract.
* At $100,000/BTC: approximately $0.125 per side and $0.25 for a trader's round turn.

The engine deducts the execution fee on each fill. `PositionMargin.realized_fees` is populated in account state at both account and ticker scope. Execution fees reduce the balance available to support margin.

## Before an order

Review current position, working orders, available margin, maximum possible market-order fill, and execution fee. The server is always the final margin check, so a client estimate does not guarantee acceptance.

To increase the amount available for an unlock, cancel unwanted working orders and reduce exposure deliberately. Once an unlock reaches `RESERVED`, that reservation is irrevocable.


---

# 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/margin.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.
