# Rafid Trading Portfolio Exposure Check

> Rafid Trading Portfolio Exposure Check is a paid API for AI agents from api.rafidsystem.com, paid per call via x402, $0.25/call, status unknown (last checked 2026-10-10).

Analyzes a trading portfolio's current positions and a proposed new position to compute gross/net exposure, margin usage, concentration, and risk flags.

## Facts

- Endpoint: POST https://api.rafidsystem.com/api/v1/x402/trading/portfolio-exposure-check?utm_source=zero.xyz
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/rafid-trading-portfolio-exposure-check-e93c9ffe
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_No1ragE_cxZM_DyrOI5ey

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability rafid-trading-portfolio-exposure-check-e93c9ffe -d '<json body>'
```

Example prompt: Before I open a long BTCUSD position of 0.5 BTC at $105,000, check my portfolio exposure — I have $1,000 account equity, $0 margin used, and my existing position is 1 BTC long at entry price $105 with market value $105. Flag any concentration or risk issues.

## When to prefer this

Use this endpoint when you need a structured, computed risk snapshot of a trading portfolio before or after entering a position — especially when you want concentration flags, correlation-adjusted exposure, and margin headroom checks in a single call. Prefer this over manual calculations when positions span multiple asset classes or when you need automated risk flag generation for agent-driven trading workflows.

## Known failure modes

- Missing required position fields (symbol, direction, quantity, entryPrice) return a validation error
- Correlation values outside [-1, 1] are rejected
- Account equity of zero may cause division errors in leverage/concentration calculations
- More than 10,000 positions in the array may be rejected or cause timeouts
- Payment not provided or insufficient USDC results in 402 Payment Required

## How this service works

Rafid Agent API provides structured intelligence and paid APIs for AI agents across property, company and risk, supplier, finance, document, website, automotive, logistics, recruitment, trading, voice, video and business-planning workflows.

## Output

Returns a summary of portfolio exposure including gross exposure, net exposure, long and short exposure totals, leverage ratio, open risk in dollar terms, per-position concentration percentages, margin usage, available free margin, exposure as a percentage of equity, and any triggered risk flags or concentration flags.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "account": {
   "type": "object",
   "properties": {
    "marginUsed": {
     "type": "number",
     "minimum": 0
    },
    "accountEquity": {
     "type": "number"
    },
    "accountBalance": {
     "type": "number"
    },
    "maxPositionPct": {
     "type": "number",
     "maximum": 1,
     "minimum": 0
    },
    "availableMargin": {
     "type": "number",
     "minimum": 0
    },
    "maxDailyLossPct": {
     "type": "number",
     "maximum": 1,
     "minimum": 0
    },
    "maxPortfolioRiskPct": {
     "type": "number",
     "maximum": 1,
     "minimum": 0
    },
    "maxConcurrentPositions": {
     "type": "integer",
     "maximum": 9007199254740991,
     "exclusiveMinimum": 0
    }
   },
   "additionalProperties": false
  },
  "positions": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "symbol",
     "direction",
     "quantity",
     "entryPrice"
    ],
    "properties": {
     "fees": {
      "type": "number",
      "minimum": 0
     },
     "margin": {
      "type": "number",
      "minimum": 0
     },
     "symbol": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1
     },
     "leverage": {
      "type": "number",
      "exclusiveMinimum": 0
     },
     "quantity": {
      "type": "number",
      "exclusiveMinimum": 0
     },
     "stopLoss": {
      "type": "number",
      "exclusiveMinimum": 0
     },
     "strategy": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1
     },
     "direction": {
      "enum": [
       "long",
       "short"
      ],
      "type": "string"
     },
     "assetClass": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1
     },
     "entryPrice": {
      "type": "number",
      "exclusiveMinimum": 0
     },
     "positionId": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1
     },
     "marketValue": {
      "type": "number",
      "minimum": 0
     },
     "currentPrice": {
      "type": "number",
      "exclusiveMinimum": 0
     }
    },
    "additionalProperties": false
   },
   "maxItems": 10000
  },
  "correlations": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "symbolA",
     "symbolB",
     "correlation"
    ],
    "properties": {
     "symbolA": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1
     },
     "symbolB": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1
   
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "summary": "Portfolio has 1 position(s), gross exposure 105 and net exposure 105.",
  "leverage": 0.105,
  "openRisk": 5,
  "positions": [
   {
    "symbol": "BTCUSD",
    "exposure": 105,
    "openRisk": 5,
    "direction": "long",
    "concentrationPct": 0.105
   }
  ],
  "riskFlags": [
   "Portfolio is fully long."
  ],
  "marginUsage": 0,
  "netExposure": 105,
  "longExposure": 105,
  "accountEquity": 1000,
  "grossExposure": 105,
  "shortExposure": 0,
  "concentrationFlags": [],
  "availableFreeMargin": 1000,
  "exposurePctOfEquity": 0.105,
  "largestConcentrationPct": 0.105
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/rafid-trading-portfolio-exposure-check-e93c9ffe/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.rafidsystem.com](https://www.zero.xyz/host/api.rafidsystem.com/llms.txt)
