Bridge
...
Cache
...
Positions
...
Last Poll
...
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /v1/positions | API KEY | Full position + PnL snapshot |
| GET | /health | OPEN | Cache status, age, key count |
| GET | /metrics | OPEN | Prometheus metrics |
Pass your key in the X-API-Key header
# Fetch current positions curl -H "X-API-Key: your_key_here" \ https://positions.mphinance.com/v1/positions
# Python import requests r = requests.get( "https://positions.mphinance.com/v1/positions", headers={"X-API-Key": "your_key_here"} ) data = r.json() print(data["positions"]) # list of positions print(data["pnl"]) # {dailyPnL, unrealizedPnL, realizedPnL}
GET /v1/positions
| Field | Type | Description |
|---|---|---|
| positions | array | List of open position objects (see below) |
| count | integer | Number of open positions |
| pnl.dailyPnL | float | Today's realized + unrealized PnL (USD) |
| pnl.unrealizedPnL | float | Unrealized PnL across all positions |
| pnl.realizedPnL | float | Realized PnL today |
| as_of | ISO 8601 | Timestamp of last successful poll |
| data_age_seconds | integer | Seconds since last poll |
| stale | boolean | true if data older than 2 minutes |
Position object
| Field | Type | Description |
|---|---|---|
| account | string | Obfuscated account ID (e.g. U234***12) |
| symbol | string | Ticker symbol |
| secType | string | STK, OPT, FUT, etc. |
| currency | string | USD |
| quantity | float | Shares/contracts (negative = short) |
| avgCost | float | Average cost basis per share/contract |
| strike | float|null | Options only |
| right | string|null | C or P — options only |
| expiry | string|null | YYYYMMDD — options only |
| multiplier | string|null | Contract multiplier — options only |
# Example response { "positions": [ { "account": "U234***12", "symbol": "AAPL", "secType": "STK", "currency": "USD", "quantity": 10, "avgCost": 172.34, "strike": null, "right": null, "expiry": null, "multiplier": null }, { "account": "U234***12", "symbol": "SPY", "secType": "OPT", "currency": "USD", "quantity": -2, "avgCost": 3.45, "strike": 580.0, "right": "P", "expiry": "20260515", "multiplier": "100" } ], "count": 2, "pnl": { "dailyPnL": 124.50, "unrealizedPnL": 340.20, "realizedPnL": 0.0 }, "as_of": "2026-05-12T01:00:00+00:00", "data_age_seconds": 12, "stale": false }
| Limit | Window | Response |
|---|---|---|
| 60 requests | per minute per IP | 429 Too Many Requests |
REQUEST ACCESS
API keys are issued manually. Drop a line with your use case and I'll send one over.
REQUEST A KEYFuture: Substack subscriber auth. For now, email works.