{"uid":"cap_No1ragE_cxZM_DyrOI5ey","slug":"rafid-trading-portfolio-exposure-check-e93c9ffe","name":"Rafid Trading Portfolio Exposure Check","description":"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.","url":"https://api.rafidsystem.com/api/v1/x402/trading/portfolio-exposure-check?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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},"correlation":{"type":"number","maximum":1,"minimum":-1}},"additionalProperties":false},"maxItems":100000},"proposedPosition":{"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}}},"responseSchema":{"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}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.25","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.25/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dEVJufOpPCHrsECk1mtfL","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.25","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes a trading portfolio's current positions and a proposed new position to compute gross/net exposure, margin usage, concentration, and risk flags.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Pre-trade exposure check for crypto bot","prompt":"I'm about to go long 0.1 ETH at $3,200 on my account with $5,000 equity and $800 margin already used. Can you run a portfolio exposure check and tell me if I'm overexposed or if any risk limits would be breached?"},{"title":"Daily portfolio risk review for algo trader","prompt":"Give me a full exposure breakdown for my current portfolio: I have $50,000 equity, two open positions — long EURUSD 100,000 units at 1.08 and short GBPUSD 50,000 units at 1.26 — and I want to see gross exposure, net exposure, concentration percentages, and any risk flags."},{"title":"Correlation-adjusted risk assessment","prompt":"Check my portfolio risk with correlation adjustments — I'm long BTCUSD and long ETHUSD with a correlation of 0.85 between them, $10,000 equity, and I want to see if the correlated exposure pushes me above safe limits before I add another long position."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:41:33.248Z","isFirstParty":false,"canonicalSlug":"rafid-trading-portfolio-exposure-check-e93c9ffe"}