> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Kalshi Get Settlements

Get settlement history from your Kalshi portfolio with accurate P&L. Returns per-market settlement data including cost basis, revenue, fees, and net P&L in dollars. Ideal for: trade performance analysis, P&L reporting, win/loss tracking, portfolio review.

![Kalshi Get Settlements logo](https://cdn.b3.fun/kalshi-logo.png)
Catalog action Utility kalshi

Get settlement history from your Kalshi portfolio with accurate P&amp;L. Returns per-market settlement data including cost basis, revenue, fees, and net P&amp;L in dollars. Ideal for: trade performance analysis, P&amp;L reporting, win/loss tracking, portfolio review.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `kalshi-get-settlements` |
| Category | Utility |
| Connector | `kalshi` |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `kalshi`, `prediction-market`, `settlements`, `pnl`, `portfolio`, `read` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ticker` | `string` | No | Filter by market ticker |
| `eventTicker` | `string` | No | Filter by event ticker |
| `limit` | `number` | No | Maximum number of settlements to return \(default: 100, max: 1000\) |
| `cursor` | `string` | No | Cursor for pagination |
| `subaccount` | `number` | No | Subaccount number \(0 = primary, 1-32 = subaccounts\) |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `settlements` | `array` | Yes | List of settled market positions with P&amp;L data |
| `cursor` | `string` | No | Cursor for fetching the next page |
| `totalPnlDollars` | `number` | No | Sum of all settlement P&amp;L in USD |
| `totalFeeDollars` | `number` | No | Sum of all fees paid in USD |
| `totalRevenueDollars` | `number` | No | Sum of all revenue received in USD |
| `totalCostDollars` | `number` | No | Sum of all cost basis in USD |

## Examples

**Workflow node**

```json
{
  "type": "kalshi-get-settlements",
  "payload": {
    "ticker": "example-ticker",
    "eventTicker": "example-eventTicker",
    "limit": 100,
    "cursor": "example-cursor",
    "subaccount": 1
  },
  "children": [],
  "connector": {
    "type": "kalshi",
    "id": "conn_kalshi"
  }
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/kalshi-get-settlements/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "ticker": "example-ticker",
    "eventTicker": "example-eventTicker",
    "limit": 100,
    "cursor": "example-cursor",
    "subaccount": 1
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.