{"uid":"cap_603Ha2A-k8uRvThgIfIhU","slug":"agent-quant-percent-change-calculator-cd867acb","name":"Agent Quant – Percent Change Calculator","description":"Pure quant math for AI trading agents: percent change, position sizing, rough liquidation price, DCA schedule, APR/APY. No market data feeds, no API keys. Pay-per-request USDC via x402 on Base and Solana.","url":"https://agent-quant.annushka1190.workers.dev/v1/pct-change","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"body":{"type":"object"},"type":{"const":"http"},"method":{"enum":["POST"]},"bodyType":{"const":"json"}}}}},"responseSchema":{"type":"json","example":{"ok":true}},"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_SDn_hVn_rddYllI2GRqGG","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":"Computes the percentage change between two numeric values for use in trading and portfolio analysis workflows.","exampleAgentPrompt":"What's the percent change from $42,500 to $47,800?","exampleUseCases":[{"title":"Trade return calculation","prompt":"My entry price was $1.82 and my exit price is $2.31 — what's the percentage gain on that trade?"},{"title":"Portfolio drawdown measurement","prompt":"My portfolio was worth $85,000 at the start of the month and it's now at $76,200 — what's the percent drawdown?"},{"title":"Crypto price move tracking","prompt":"ETH was at $3,200 yesterday and it's at $2,950 today — what percent did it drop?"}],"resultDescription":"Returns a JSON object with ok: true and the computed percentage change value, representing how much the new value differs from the old value as a percentage (positive for gains, negative for losses).","failureModes":["Missing required body fields (old/new values) — returns validation error","Division by zero if old value is zero — may return error or undefined result","Non-numeric input values — schema validation rejection","Network timeout on the Cloudflare Workers edge — transient 5xx","x402 payment not completed or USDC insufficient — payment-required error before computation"],"whenToPreferThis":"Choose this endpoint when you need lightweight, serverless percent change math with no API key setup, no market data dependency, and pay-per-request USDC micropayment billing. Ideal for AI trading agents that need pure arithmetic on values they already have, without subscribing to a full quant data service.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:39:37.652Z","isFirstParty":false}