position_pnl
PnL in currency and percent for a long or short, including fees and leverage, and the return on margin. 0.001 USDC per call via x402.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exit | Yes | Exit price | |
| side | Yes | long or short | |
| size | Yes | Position size in base units or notional | |
| entry | Yes | Entry price | |
| feePct | No | Round-trip fee percent | |
| leverage | No | Leverage | |
| paymentProof | No | Payment proof: USDC tx hash on Polygon or Base (0x...) or Solana tx signature. Omit on the first call to receive the 402 payment instructions, pay, then call again with the proof. |