{"uid":"cap_8yn6Klb7y-u3n9w9EG5A3","slug":"finmath-perpetual-funding-payment-calculator-9c80752d","name":"finmath Perpetual Funding Payment Calculator","description":"Deterministic finance and crypto math for AI agents: TradFi (NPV, IRR, XIRR, Black-Scholes + Greeks, bonds, VaR, Sharpe) and DeFi (impermanent loss, perp liquidation, funding, Uniswap v3, health factor, cost basis). Exact, model-free arithmetic that LLMs get wrong — priced per call in USDC.","url":"https://finmath.qzqh5rrbkz.workers.dev/v1/funding_payment","method":"POST","headers":{},"bodySchema":{"type":"object","required":["side","funding_rate","position_notional"],"properties":{"side":{"type":"string","description":"side"},"funding_rate":{"type":"number","description":"funding_rate"},"position_notional":{"type":"number","description":"position_notional"}}},"responseSchema":{"type":"object","required":["result","meta"],"properties":{"meta":{"type":"object"},"result":{}}},"example":{"request":{"side":"long","funding_rate":0.0001,"position_notional":10000},"response":{"meta":{"tool":"funding_payment","disclaimer":"Deterministic calculation utility. Not financial, investment, or trading advice.","deterministic":true},"result":{"amount":-1,"direction":"pay","per_interval_rate":0.0001}}},"exampleRequest":{"side":"long","funding_rate":0.0001,"position_notional":10000},"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_E6soPa-yRwHVEvO0C2ZoN","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates the funding payment for a perpetual futures position given the side, funding rate, and position notional value","exampleAgentPrompt":"I'm long on a BTC perpetual with a notional value of $50,000 and the current funding rate is 0.01% — how much do I pay or receive in funding this period?","exampleUseCases":null,"resultDescription":"Returns a computed funding payment amount indicating whether the trader pays or receives funding, plus metadata about the calculation. For long positions at positive funding rates, this is a payment out; for short positions, it is received.","failureModes":["Missing required fields (side, funding_rate, position_notional) return 400 validation error","Invalid side value (not 'long' or 'short') causes rejection","Non-numeric funding_rate or position_notional causes schema validation failure","Payment not included or invalid USDC payment returns 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need exact, deterministic arithmetic for perpetual futures funding payments — especially when LLM-native math would be unreliable. Prefer this over manual calculation when position sizes are large, funding rates are small decimals, or you need auditable results for DeFi position management.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:53:15.264Z","isFirstParty":false}