# HALOWERK Trade Export — CSV/JSON PnL Calculator

> HALOWERK Trade Export — CSV/JSON PnL Calculator is a paid API for AI agents from handel.halowerk.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-17).

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.

## Facts

- Endpoint: POST https://handel.halowerk.com/v1/rechner/trade-export?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/halowerk-trade-export-csv-json-pnl-calculator-0351cece
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2-zwMMNaYLHefWBS-9JOZ

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 halowerk-trade-export-csv-json-pnl-calculator-0351cece -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/halowerk-trade-export-csv-json-pnl-calculator-0351cece/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from handel.halowerk.com](https://www.zero.xyz/host/handel.halowerk.com/llms.txt)
