Check the order. Keep control of what happens next.
Built-in broker and exchange connections, automatic market prices, pre-trade risk checks and operator review of orders over a limit. Operate accounts and order flow from a local panel, REST API or MCP tools.
See brokers and price feedsOpen source · Apache-2.0
What is Pit Officer?
- Built-in trading connections
- Interactive Brokers · Binance · Alpaca · eToro · Coinbase · OKX · Bybit · OpenAlgo
- Send approved orders and receive executions through the connections you enable. Try orders on the built-in Execution Simulator with no keys.
- Automatic market prices
- Subscribe to instruments. Officer receives prices from connected sources and supplies them to the risk engine.
- Operator review
- An order over a limit can wait for your decision instead of being rejected. Confirm, force or cancel it in the panel.
Connections
Connect your broker. Receive prices automatically.
Choose the connections you need in the panel. Trading connections send orders; price feeds keep the risk checks supplied with market prices.
- Interactive Brokers
- Binance
- Alpaca
- eToro
- Coinbase
- OKX
- Bybit
- OpenAlgo
Execution Simulator
A built-in paper venue that needs no keys and sends nothing to an external venue. It fills orders by the policy you choose: at the order or market price, in parts, rejected, or resting in the book. Use it to forward-test a strategy or an AI agent.
Send approved orders and receive execution updates through the connection you enable.
Use your own broker account and credentials. OpenAlgo connects Indian brokers through one connector. Available instruments and test/live modes depend on the provider and connection settings.
- Interactive Brokers
- Binance
- Kraken
- Coinbase
- Alpaca
- OKX
- Bybit
- OANDA
- Finnhub
Select a source and subscribe to instruments. Officer receives prices automatically for risk checks. You can also connect a custom feed.
Provider credentials, market-data permissions and subscriptions determine which prices are available. A price feed alone does not enable trading.
Use cases
Start with the job you need to do.
For the people building order flow, operating risk and writing trading automation. Each path starts with the controls you own and the integration you need.
- Prop desks · risk teams
Keep account limits outside the strategy
Operate accounts, groups and risk policies from one panel. Block an account or group to stop new risk approvals without changing the strategy's code.
- Review positions, policy decisions and account changes through the same control plane.
- Send an order over a limit to an operator for review instead of rejecting it, with its funds held until the decision. Alerts in the panel and the browser show what needs attention.
- Blocking is a risk gate. It does not mean cancel-all, liquidation or reversal of trades already executed.
- Broker · exchange engineers
Add a risk decision to your order flow
Use REST to evaluate orders and report executions. In an approval-only integration, your execution component must verify a signed acceptance bound to the exact order before sending it.
- Keep fills and account state current with execution reports; post-trade reporting alone cannot prevent a trade.
- Use the built-in trading connections, or keep your existing executor and integrate the risk API.
- In observation mode, Officer limits nothing: it tracks positions, P&L and executions reported from your own system.
-
Give an agent only the tools it needs
Connect over MCP with read-only tools enabled by default. An operator chooses which mutating tools to enable. The permissions you grant remain part of your risk boundary.
- Account block and unblock are not MCP tools. An agent can read the review status of an order but cannot confirm, force or cancel it.
- Checking is separate from sending. Trading through an enabled connection requires the trading path; a standalone agent with its own broker credentials can bypass an external gate.
-
Evaluate a strategy against explicit risk rules
Connect a price source and subscribe to your instruments from the panel. Officer receives market prices automatically. Configure risk policies, inspect candidate-order decisions, forward-test on the built-in Execution Simulator and add a trading connection when you need execution.
- OpenPit computes realized P&L from reported executions and unrealized and total P&L from current prices; configured FX data converts them to the account currency.
- Realized P&L can reset on a schedule, for example daily. A reset keeps positions, history and any active block.
- P&L barriers act on the state and data supplied to the engine. They are controls, not a guarantee against trading losses.
How it works
One engine. Three ways to use it.
The panel, REST and MCP share Officer's control plane. Order evaluation, execution and reporting are distinct operations.
- 01 Evaluates
OpenPit engine
Evaluates an order against configured policies, account state and the market data it needs. Returns acceptance, rejection with a reason, or a request for operator review.
Determinism means the same complete inputs and state, including positions, reservations and market data.
- 02 Coordinates
Pit Officer control plane
Stores accounts, groups, policies, orders and audit records in your local database. Restores the engine's state on startup.
Built-in trading connections send approved orders and bring executions back into Officer. Market-data subscriptions supply the engine with prices automatically.
- 03 Operates
Operator panel
Review accounts, positions and orders, decide on orders waiting for review, manage policies and MCP permissions, configure data sources and inspect audit history.
Use the same control plane from REST or MCP. Endpoint access and the tools you enable are part of your deployment boundary.
From an order request to a risk decision
A limit in a review mode sends an order over it to an operator instead of rejecting it. An approval-only integration returns the decision to your executor. With signing enabled, verify a signed acceptance and its exact order parameters before execution. Sending uses an enabled connection to the selected venue. Officer sends data to the trading and market-data destinations you configured.
Market data and trading connections
Inside the panel
The controls, in one place.
Use the local panel to inspect and operate the same state exposed through the API. Start with the page that answers your next question.
- Dashboard
- Entity counts, open alerts, the agent's enabled command surface, market-data health, and recent activity from the audit log.
- Policies
- Order size, order rate, position and P&L limits applied by the engine per account and asset. A limit rejects an order or sends it to an operator for review. All policies and review modes
- Accounts
- Accounts and groups in one place. Block an account or group to prevent new risk approvals, then unblock when appropriate.
- Orders
- Report an execution against your own external order id. Confirm, retry, force or cancel an order waiting for review.
- Audit
- Inspect recorded actions and their source. The audit API does not edit individual records; backup restoration and data reset are separate operations.
- MCP access
- Choose which commands an AI agent may call, then connect it over MCP. Protected commands need an explicit opt-in.
- Signing keys
- Configure approval signing. An external executor must verify a signed acceptance and its bound order parameters before sending the order.
Open source
Inspect the controls you depend on.
The source, configuration and API contract are available for your own evaluation.
-
Apache-2.0
Officer and OpenPit are open source. Inspect the implementation, build your own copy and verify the behavior against your integration requirements.
-
Audit history
Control-plane actions append audit records. The ordinary audit API does not edit individual records. Backup restoration and service data reset can replace or remove stored history; this is not immutable external archival.
-
Your process and database
Run Officer on infrastructure you control. Market-data sources and enabled trading connections contact the destinations you configure. Checking an order does not send it to a venue.
Inspect the engine
OpenPit evaluates the order using policies, account state, positions, reservations and market data. Reproducing a decision requires those complete inputs, not only an order and a limit value.
Quickstart
Start Officer with one command.
Install Docker once. Then paste one command and open Officer in your browser. No programming skills are needed.
Start Officer
Start Docker Desktop. Open PowerShell on Windows or Terminal on macOS/Linux, paste this command and press Enter.
docker run -d --name pit-officer --restart unless-stopped -p 127.0.0.1:8787:8787 -v pit-officer-data:/data ghcr.io/openpitkit/officer
Docker downloads Officer and runs it in the background. Your data stays on your computer when the container restarts.
Open the panel. Come back to the same address.
Wait for the first startup, then open the link below. Bookmark it to return to your accounts and settings.
Commands to open the panel or restart Officer
- Windows · PowerShell
-
Start-Process http://127.0.0.1:8787
- macOS
-
open http://127.0.0.1:8787
- Linux
-
xdg-open http://127.0.0.1:8787
If you stopped Officer, start the existing container with the command below. Do not repeat the first-install command or delete your data.
docker start pit-officer
In the panel, add an account, an instrument, a price source and risk limits. Try orders on the built-in Execution Simulator, generate or import a signing key for decisions, then add a trading connection when you are ready to send orders.
Blog
Engineering notes and release posts.
Articles on pre-trade risk, trading bots, order controls and market data, and what each Officer and OpenPit release changes.
-
API order rejected for insufficient balance but you have enough
What a bot can spend is derived, not read: the free amount of the asset the order debits, in the wallet it debits, after venue holds and fees, from a snapshot that reflects the last balance change the bot knows of. When a field is missing or the snapshot may be older, the answer is unknown, not a number.
-
Stop loss not covering your position after a partial fill
After a partial entry, a canceled remainder, a rejected child or a partial exit, the position can have no working stop, or one too large, and no venue message says so. After every event, compare armed stop quantity with the open position, and check separately that no exit can open the opposite position.
-
Pit Officer 0.2.1 and 0.3.0: live IBKR, Binance and eToro, open P&L limits
Pit Officer 0.2.1 adds Interactive Brokers, Binance and eToro trading connections, live trading on every venue, a mode for trading from zero, and P&L bounds that count open positions; 0.3.0 adds live-account steps per venue. A breached bound rejects the next order and blocks new orders, exits included.
Get started
Make the first decision visible.
Run Officer locally, configure a policy and inspect an accepted or rejected order with its audit record. Then choose how your execution system will use that decision.
Apache-2.0 · self-hosted · source available
FAQ
Know the boundaries before integrating.
Execution, permissions, market data and deployment are part of the integration contract.