{"uid":"cap_2-zwMMNaYLHefWBS-9JOZ","slug":"halowerk-trade-export-csv-json-pnl-calculator-0351cece","name":"HALOWERK Trade Export — CSV/JSON PnL Calculator","description":"Trade-Protokoll in einheitliches CSV und JSON. Quantity ist die reale Stückzahl, alle Preise/Kosten in derselben Währung. Netto-PnL = Richtung × (Ausgang − Einstieg) × Stückzahl − Gebühren; keine Datenablage. Alle Zahlen, Kurse und Vorgaben liefert der Aufrufer. Keine eigenen Kursdaten, kein Brokerzugriff, keine Ausführung. Rechenwerkzeug, keine Anlageberatung, keine Empfehlung.","url":"https://handel.halowerk.com/v1/rechner/trade-export?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"trades":{"type":"array","items":{"type":"object","required":["time_utc","symbol","direction","quantity","entry","exit","fees_cash"],"properties":{"exit":{"type":"number","maximum":1000000000000,"minimum":1e-12},"entry":{"type":"number","maximum":1000000000000,"minimum":1e-12},"symbol":{"type":"string","maxLength":64,"minLength":1},"quantity":{"type":"number","maximum":1000000000000,"minimum":1e-12},"time_utc":{"type":"string","maxLength":64,"minLength":1},"direction":{"enum":[-1,1],"type":"integer"},"fees_cash":{"type":"number","maximum":1000000000000,"minimum":0}},"additionalProperties":false},"maxItems":1000,"minItems":1},"currency":{"type":"string","maxLength":64,"minLength":1}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_xoi0Qain_sBiDCppK5dZT","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a list of trades into standardized CSV and JSON with computed net PnL per trade, given caller-supplied entry/exit prices, quantities, and fees.","exampleAgentPrompt":"Can you calculate the net PnL for these three EUR trades and export them as CSV and JSON? Trade 1: BUY 100 shares of AAPL on 2024-06-01T10:00:00Z, entry 180.50, exit 185.00, fees 2.50. Trade 2: SELL 50 TSLA on 2024-06-02T14:30:00Z, entry 250.00, exit 240.00, fees 1.75. Trade 3: BUY 200 ETH/USD on 2024-06-03T09:00:00Z, entry 3200.00, exit 3350.00, fees 5.00. Currency is USD.","exampleUseCases":[{"title":"Algo trading daily reconciliation","prompt":"Here are today's 20 completed futures trades in USD — each with symbol, direction, entry, exit, quantity, and fees. Can you compute the net PnL for each and give me the results as both CSV and JSON so I can load them into my reconciliation sheet?"},{"title":"Multi-broker trade statement merge","prompt":"I pulled trades from two different brokers and need a unified export. Here's the list of 15 stock trades in EUR with timestamps, directions, quantities, entry/exit prices, and fees per trade — please turn this into a standardized CSV and JSON with net PnL calculated for each."},{"title":"Crypto portfolio PnL snapshot","prompt":"Can you take these 8 crypto spot trades in USDC — BTC, ETH, and SOL pairs — with their UTC timestamps, long/short direction, entry and exit prices, quantities, and cash fees, and calculate the net PnL for each, then export everything as clean CSV and JSON?"}],"resultDescription":"Returns a structured response containing the trades in both CSV and JSON formats, with each record including the original fields plus computed net PnL (direction × (exit − entry) × quantity − fees_cash) in the specified currency. No data is stored server-side.","failureModes":["Missing required fields (time_utc, symbol, direction, quantity, entry, exit, fees_cash) returns a validation error","direction value not in {-1, 1} causes rejection","Prices or quantities outside allowed range (1e-12 to 1e12) return a schema error","Empty or oversized trade array (>1000 items) is rejected","Currency field missing or too long causes a bad request error","Network/payment failure (x402 micropayment not processed) blocks the call"],"whenToPreferThis":"Choose this endpoint when you have complete trade data already in hand (prices, quantities, fees, timestamps) and need deterministic PnL computation with clean CSV/JSON output — no broker connection, no live market data, and no data retention. Ideal for reconciliation pipelines, reporting agents, and portfolio dashboards that own their own data and just need a reliable formatting and calculation layer.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T06:46:40.554Z","isFirstParty":false,"canonicalSlug":"halowerk-trade-export-csv-json-pnl-calculator-0351cece"}