# SperaxOS Flash Loan Profit Estimator

> SperaxOS Flash Loan Profit Estimator is a paid API for AI agents from chat.sperax.io, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-20).

Estimates the expected profit of a flash loan arbitrage opportunity given a loan amount, opportunity ID, and preferred lending provider

## Facts

- Endpoint: POST https://chat.sperax.io/api/x402/tools/flash-loan-scanner/estimateFlashLoanProfit?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/speraxos-flash-loan-profit-estimator-8a2d5161
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Eptnkp7ifyKAtHCrKF634

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 speraxos-flash-loan-profit-estimator-8a2d5161 -d '<json body>'
```

Example prompt: Estimate the flash loan profit for opportunity ID 'arb-0x123abc' using Aave as the provider, with a loan amount of $75,000 — I want to know if it's worth executing before I pull the trigger.

## When to prefer this

Use this endpoint when you have already identified a flash loan arbitrage opportunity (via a scanner) and need a precise profit estimate before executing — particularly when you want to compare provider costs (Aave, dydx, Balancer) or validate whether an opportunity clears your minimum profit threshold. Prefer this over generic DeFi analytics tools when you need provider-specific fee modeling tied to a concrete opportunity ID.

## Known failure modes

- Invalid or expired opportunity ID returns an error or zero-profit estimate
- Unsupported flash loan provider name causes a validation error
- Loan amount outside provider limits (too low or too high) may return an infeasible result
- Network or pricing data staleness may cause inaccurate profit estimates
- Payment failure via x402 (insufficient USDC balance) blocks the request entirely

## How this service works

AI-powered DeFi intelligence APIs payable via the x402 HTTP payment protocol. No API key required — pay per request with USDC on Base. Identity-only (SIWX) endpoints are free for wallets with an agentcash identity.

## Output

Returns an estimated profit figure for the specified flash loan opportunity, factoring in loan fees, provider-specific costs, and the arbitrage spread — giving the agent a clear net-return number before committing to an on-chain transaction.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "loanAmountUsd": {
   "type": "number",
   "description": "Flash loan amount in USD."
  },
  "opportunityId": {
   "type": "string",
   "description": "Opportunity ID from scan results."
  },
  "preferredProvider": {
   "type": "string",
   "description": "Preferred flash loan provider (aave, dydx, balancer, etc.)."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/speraxos-flash-loan-profit-estimator-8a2d5161/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chat.sperax.io](https://www.zero.xyz/host/chat.sperax.io/llms.txt)
