FarmDash Agent Hub Swap API

Token swap quotes, execution, and confirmation

Operations 4

GET /agents/quote Get a token swap quote #
POST /v1/simulate Simulate a wallet-bound swap intent #
POST /agents/swap Execute a signed token swap #
POST /agents/confirm Confirm swap execution with on-chain tx hash #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/farmdash-swap-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

farmdash-swap-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: FarmDash Agent Swap API
  version: 2.0.0
  description: 'WARNING: Running trade executions and cancellations places real perpetual futures trades and alters active market exposure, carrying significant risk of financial loss.'
  contact:
    name: FarmDash Engineering
    url: https://www.farmdash.one/agents
  license:
    name: MIT
servers:
- url: https://www.farmdash.one/api
  description: Production
tags:
- name: Swap
  description: Token swap quotes, execution, and confirmation
paths:
  /agents/quote:
    get:
      operationId: getSwapQuote
      summary: Get a token swap quote
      description: 'Returns an unsigned preview quote showing expected output, fee breakdown,

        protocol selection, and FarmDash execution guardrails. No authentication required.

        When wallet and risk inputs are supplied, the response also includes

        allowance checks, depeg/health warnings, quote-decay diagnostics, and

        positive-net-edge guidance.

        Include `walletAddress` to receive a wallet-bound `intent_id` for the

        mandatory `/v1/simulate` preflight.

        Compatible live providers are compared by route, output, gas, and risk.

        Callers may force Li.Fi, 0x, or x402; automatic selection may also choose OKX.

        `mock=true` is not supported and returns a typed 400 without contacting a provider.'
      tags:
      - Swap
      parameters:
      - $ref: '#/components/parameters/FromChainId'
      - $ref: '#/components/parameters/ToChainId'
      - $ref: '#/components/parameters/FromToken'
      - $ref: '#/components/parameters/ToToken'
      - $ref: '#/components/parameters/FromAmount'
      - name: protocol
        in: query
        schema:
          type: string
          enum:
          - lifi
          - zerox
          - x402
        description: Force a specific routing protocol (auto-selected if omitted)
      - name: mock
        in: query
        schema:
          type: string
          enum:
          - 'true'
        description: Unsupported for quotes. Returns HTTP 400 mock_not_supported and never contacts a live quote provider.
      - name: walletAddress
        in: query
        schema:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
        description: Optional wallet used for approval and allowance checks
      - name: toAddress
        in: query
        schema:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
        description: Optional destination wallet override for previewing the signed route
      - name: slippage
        in: query
        schema:
          type: number
          minimum: 0.01
          maximum: 5
        description: Optional slippage tolerance in percent
      - name: expectedUpsideUsd
        in: query
        schema:
          type: number
        description: Optional upside estimate used to enforce positive net edge
      - name: riskBufferUsd
        in: query
        schema:
          type: number
        description: Optional execution-risk haircut added to total route cost
      - name: healthFactor
        in: query
        schema:
          type: number
        description: Optional health factor used for halt checks
      - name: liquidationBufferPct
        in: query
        schema:
          type: number
        description: Optional liquidation buffer percentage used for halt checks
      - name: safetyMode
        in: query
        schema:
          $ref: '#/components/schemas/SwapSafetyMode'
        description: '`strict` halts on severe quote decay, `balanced` downgrades that condition to a warning'
      responses:
        '200':
          description: Swap quote
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '502':
          description: Typed live quote provider degradation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/simulate:
    post:
      operationId: simulateSwapExecution
      summary: Simulate a wallet-bound swap intent
      description: 'Mandatory pre-execution simulation gate for Signal Architect. The caller

        submits the `intent_id` returned by `/agents/quote` plus the signing wallet.

        FarmDash simulates the quote intent, caches the result for 60 seconds, and

        returns a `simulation_id` that `/agents/swap` requires.'
      tags:
      - Swap
      security:
      - bearerAuth: []
      - {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapSimulationRequest'
      responses:
        '200':
          description: Simulation report
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapSimulationResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '409':
          description: Intent and wallet mismatch
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
  /agents/swap:
    post:
      operationId: executeSwap
      summary: Execute a signed token swap
      description: 'Main swap router. Requires a fresh successful `simulationId`, authenticates

        the agent via EIP-191 signature, reuses the simulated quote intent, applies

        Execution Alpha route selection, and enforces Risk Sentinel guardrails before

        returning ready-to-broadcast transaction calldata.


        FarmDash NEVER touches funds. The protocol (Li.Fi / 0x / x402)

        executes the swap. Treasury receives the fee haircut directly.


        **Fee schedule**: 45 bps default, ≥$10k → 35 bps, ≥$100k → 25 bps.'
      tags:
      - Swap
      security:
      - bearerAuth: []
      - {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapRequest'
      responses:
        '200':
          description: Executable swap with transaction calldata
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          description: Invalid signature or expired nonce
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Swap halted by Risk Sentinel guardrails
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapHaltResponse'
        '428':
          description: Missing, expired, failed, or mismatched preflight simulation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
  /agents/confirm:
    post:
      operationId: confirmSwap
      summary: Confirm swap execution with on-chain tx hash
      description: 'After broadcasting the swap transaction, confirm it here with the tx hash.

        FarmDash verifies the transaction on-chain (10s timeout with LRU cache)

        and marks the fee event as settled. Idempotent — safe to retry.'
      tags:
      - Swap
      security:
      - bearerAuth: []
      - {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfirmRequest'
      responses:
        '200':
          description: Confirmation result
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfirmResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/PaymentRequired'
components:
  schemas:
    ConfirmResponse:
      type: object
      properties:
        ok:
          type: boolean
        feeEventId:
          type: string
          format: uuid
        settlementStatus:
          type: string
          enum:
          - confirmed
          - pending
          - expired
        idempotent:
          type: boolean
          description: True if this was a duplicate confirmation (safe to retry)
    PaymentRequiredError:
      type: object
      properties:
        ok:
          type: boolean
          example: false
        error:
          type: string
          example: payment_required
        code:
          type: string
          example: payment_required
        message:
          type: string
        retryable:
          type: boolean
        direct_upgrade_url:
          type: string
          format: uri
        rate_limit:
          type: object
          additionalProperties: true
        developer_sandbox:
          type: object
          additionalProperties: true
        payment_required:
          type: object
          properties:
            amount:
              type: string
              example: 0.01 USDC
            chain:
              type: string
              example: Base
            destination:
              type: string
              example: '0xb0Ed0d7bca24BBaD635B977C2efbE06742e33377'
            token:
              type: string
            chainId:
              type: integer
              example: 8453
    RouteCandidate:
      type: object
      properties:
        protocol:
          $ref: '#/components/schemas/SupportedProtocol'
        estimatedOutput:
          type: string
        feeAmountUsd:
          type: number
        gasEstimateUsd:
          type: number
          nullable: true
        bridgeFeeUsd:
          type: number
          nullable: true
        routeRiskScore:
          type: number
        selected:
          type: boolean
    SwapRiskReport:
      type: object
      properties:
        flags:
          type: array
          items:
            $ref: '#/components/schemas/RiskFlag'
        approval:
          allOf:
          - $ref: '#/components/schemas/AllowanceStatus'
          nullable: true
        pegChecks:
          type: array
          items:
            $ref: '#/components/schemas/PegCheck'
        health:
          allOf:
          - $ref: '#/components/schemas/HealthCheck'
          nullable: true
        shouldHalt:
          type: boolean
        haltReasons:
          type: array
          items:
            type: string
    RiskFlag:
      type: object
      required:
      - code
      - category
      - severity
      - title
      - message
      properties:
        code:
          type: string
        category:
          type: string
          enum:
          - approval
          - bridge
          - contract
          - token
          - health
          - execution
        severity:
          $ref: '#/components/schemas/RiskSeverity'
        title:
          type: string
        message:
          type: string
        metadata:
          type: object
          additionalProperties: true
    NetEdgeAnalysis:
      type: object
      properties:
        expectedUpsideUsd:
          type: number
          nullable: true
        protocolFeeUsd:
          type: number
        gasUsd:
          type: number
        bridgeFeeUsd:
          type: number
        riskBufferUsd:
          type: number
        totalCostUsd:
          type: number
        netEdgeUsd:
          type: number
          nullable: true
        positive:
          type: boolean
          nullable: true
        enforced:
          type: boolean
    SwapTxData:
      type: object
      required:
      - to
      - data
      - value
      - chainId
      properties:
        to:
          type: string
          description: Protocol contract address (NOT FarmDash)
        data:
          type: string
          description: Encoded calldata
        value:
          type: string
          description: Native token value in wei
        chainId:
          type: integer
    SwapSafetyMode:
      type: string
      enum:
      - strict
      - balanced
    SupportedProtocol:
      type: string
      enum:
      - lifi
      - zerox
      - x402
      - okx
    QuoteResponse:
      type: object
      required:
      - protocol
      - estimatedOutput
      - feeBps
      - feeAmountUSD
      - gasEstimate
      - txData
      - expiresAt
      properties:
        protocol:
          $ref: '#/components/schemas/SupportedProtocol'
        estimatedOutput:
          type: string
          description: Expected output in wei
        feeBps:
          type: integer
          description: Fee in basis points (45 = 0.45% default; configured volume discounts may apply)
        mode:
          type: string
          const: live
        unsigned:
          type: boolean
          const: true
        broadcast_by_farmdash:
          type: boolean
          const: false
        feeAmountUSD:
          type: string
        gasEstimate:
          type: string
        txData:
          $ref: '#/components/schemas/SwapTxData'
        expiresAt:
          type: integer
          description: Unix timestamp — quotes valid 30s
        simulation_required:
          type: boolean
          description: True when execute_swap requires a simulation for this route
        simulation_available:
          type: boolean
          description: True when the quote was wallet-bound and returned an intent_id
        intent_id:
          type: string
          nullable: true
          description: Pass this to POST /v1/simulate before execution
        intent_expires_at:
          type: string
          nullable: true
          format: date-time
        simulate_url:
          type: string
          example: /api/v1/simulate
        allowanceTarget:
          type: string
          nullable: true
        gasEstimateUsd:
          type: number
          nullable: true
        bridgeFeeUsd:
          type: number
          nullable: true
        executionAlpha:
          $ref: '#/components/schemas/ExecutionAlphaReport'
        riskReport:
          $ref: '#/components/schemas/SwapRiskReport'
        note:
          type: string
    SwapSimulationResponse:
      type: object
      required:
      - ok
      - simulation_id
      - intent_id
      - success
      - gas_used
      - gas_cost_usd
      - output_amount
      - mev_risk
      - valid_until
      - wallet_address
      - selected_protocol
      - required_for_execution
      properties:
        ok:
          type: boolean
          example: true
        simulation_id:
          type: string
          example: sim_9b2e
        intent_id:
          type: string
        success:
          type: boolean
        gas_used:
          type: number
        gas_cost_usd:
          type: number
        output_amount:
          type: string
        price_impact_pct:
          type: number
          nullable: true
        mev_risk:
          type: string
          enum:
          - low
          - medium
          - high
        revert_reason:
          type: string
          nullable: true
        valid_until:
          type: string
          format: date-time
        wallet_address:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
        selected_protocol:
          $ref: '#/components/schemas/SupportedProtocol'
        tx_fingerprint:
          type: string
        request_fingerprint:
          type: string
        provider:
          type: string
        cached:
          type: boolean
        required_for_execution:
          type: boolean
          const: true
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        ok:
          type: boolean
          example: false
        error:
          type: string
        code:
          type: string
        message:
          type: string
        retryable:
          type: boolean
        request_id:
          type: string
        details:
          type: object
          additionalProperties: true
    SwapResult:
      type: object
      required:
      - protocol
      - estimatedOutput
      - feeBps
      - feeAmountUSD
      - gasEstimate
      - txData
      - expiresAt
      properties:
        protocol:
          $ref: '#/components/schemas/SupportedProtocol'
        estimatedOutput:
          type: string
        feeBps:
          type: integer
        feeAmountUSD:
          type: string
        feeEventId:
          type: string
          format: uuid
          description: Use with /agents/confirm to confirm settlement
        gasEstimate:
          type: string
        txData:
          $ref: '#/components/schemas/SwapTxData'
        expiresAt:
          type: integer
        allowanceTarget:
          type: string
          nullable: true
        gasEstimateUsd:
          type: number
          nullable: true
        bridgeFeeUsd:
          type: number
          nullable: true
        simulation:
          type: object
          additionalProperties: true
        executionAlpha:
          $ref: '#/components/schemas/ExecutionAlphaReport'
        riskReport:
          $ref: '#/components/schemas/SwapRiskReport'
        confirmUrl:
          type: string
          example: /api/agents/confirm
    QuoteDecayMetrics:
      type: object
      properties:
        previousObservedAt:
          type: integer
          nullable: true
        quoteAgeMs:
          type: integer
          nullable: true
        outputDecayBps:
          type: number
        gasIncreaseBps:
          type: number
        severity:
          $ref: '#/components/schemas/QuoteDecaySeverity'
    HealthCheck:
      type: object
      properties:
        healthFactor:
          type: number
          nullable: true
        liquidationBufferPct:
          type: number
          nullable: true
        alertLevel:
          type: string
          enum:
          - none
          - warning
          - critical
        shouldHalt:
          type: boolean
    SwapRequest:
      type: object
      required:
      - fromChainId
      - toChainId
      - fromToken
      - toToken
      - fromAmount
      - agentAddress
      - toAddress
      - simulationId
      - nonce
      - signature
      properties:
        fromChainId:
          type: integer
          enum:
          - 1
          - 10
          - 137
          - 8453
          - 42161
          - 59144
        toChainId:
          type: integer
          enum:
          - 1
          - 10
          - 137
          - 8453
          - 42161
          - 59144
        fromToken:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
        toToken:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
        fromAmount:
          type: string
          pattern: ^\d+$
          description: Amount in wei
        agentAddress:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Agent wallet address (signer)
        toAddress:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Destination wallet for swapped tokens
        slippage:
          type: number
          minimum: 0.01
          maximum: 5
          default: 0.5
          description: Slippage tolerance in percent (capped at 5%)
        protocol:
          type: string
          enum:
          - lifi
          - zerox
          - x402
        volumeHintUSD:
          type: number
          description: USD volume estimate - unlocks fee discounts (>= $10k -> 35bps, >= $100k -> 25bps)
        expectedUpsideUsd:
          type: number
          description: Optional upside estimate in USD for positive-net-edge checks
        riskBufferUsd:
          type: number
          description: Optional extra execution-risk buffer in USD
        healthFactor:
          type: number
          description: Optional lending health factor supplied by the caller
        liquidationBufferPct:
          type: number
          description: Optional liquidation-buffer percentage supplied by the caller
        walletAddress:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Optional wallet address used for on-chain approval checks
        safetyMode:
          $ref: '#/components/schemas/SwapSafetyMode'
          description: USD volume estimate — unlocks fee discounts (≥$10k → 35bps, ≥$100k → 25bps)
        simulationId:
          type: string
          description: Fresh successful simulation_id from POST /v1/simulate
        intentId:
          type: string
          description: Optional quote intent ID; must match the simulation when supplied
        nonce:
          type: string
          description: Current timestamp in milliseconds (60s window)
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]{130}$
          description: EIP-191 personal_sign of the v1 versioned payload
    ConfirmRequest:
      type: object
      required:
      - feeEventId
      - txHash
      - agentAddress
      properties:
        feeEventId:
          type: string
          format: uuid
        txHash:
          type: string
          pattern: ^0x[a-fA-F0-9]{64}$
        agentAddress:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
    QuoteDecaySeverity:
      type: string
      enum:
      - none
      - low
      - medium
      - high
    AllowanceStatus:
      type: object
      properties:
        spender:
          type: string
          nullable: true
        allowance:
          type: string
          nullable: true
        requiredAmount:
          type: string
        approvalNeeded:
          type: boolean
        overApproved:
          type: boolean
        source:
          type: string
          enum:
          - onchain
          - quote_fallback
          - unavailable
    SwapSimulationRequest:
      type: object
      required:
      - intent_id
      - wallet_address
      properties:
        intent_id:
          type: string
          description: Wallet-bound quote intent returned by /agents/quote
          example: fd_intent_7f3a
        wallet_address:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Signing wallet for the simulated execution
    ExecutionAlphaReport:
      type: object
      properties:
        selectedProtocol:
          $ref: '#/components/schemas/SupportedProtocol'
        routeReason:
          type: string
        mevProtection:
          type: object
          properties:
            safetyMode:
              $ref: '#/components/schemas/SwapSafetyMode'
            actualSlippageBps:
              type: integer
            maxRecommendedSlippageBps:
              type: integer
        candidates:
          type: array
          items:
            $ref: '#/components/schemas/RouteCandidate'
        quoteDecay:
          $ref: '#/components/schemas/QuoteDecayMetrics'
        netEdge:
          $ref: '#/components/schemas/NetEdgeAnalysis'
    PegCheck:
      type: object
      properties:
        tokenAddress:
          type: string
        symbol:
          type: string
        reference:
          type: string
          enum:
          - USD
          - ETH
        priceUsd:
          type: number
          nullable: true
        referencePriceUsd:
          type: number
          nullable: true
        deviationPct:
          type: number
          nullable: true
        alert:
          type: boolean
    SwapHaltResponse:
      type: object
      properties:
        error:
          type: string
          example: swap_halted
        code:
          type: string
          example: swap_halted
        selectedProtocol:
          $ref: '#/components/schemas/SupportedProtocol'
        executionAlpha:
          $ref: '#/components/schemas/ExecutionAlphaReport'
        riskReport:
          $ref: '#/components/schemas/SwapRiskReport'
    RiskSeverity:
      type: string
      enum:
      - low
      - medium
      - high
      - critical
  headers:
    X-RateLimit-Reset:
      description: UTC epoch seconds when the rate limit window resets
      schema:
        type: string
    X-RateLimit-Limit:
      description: Maximum requests allowed in the current window
      schema:
        type: string
    X-Request-ID:
      description: Unique request trace ID for debugging and support
      schema:
        type: string
        format: uuid
    X-RateLimit-Remaining:
      description: Remaining requests in the current window
      schema:
        type: string
  parameters:
    FromAmount:
      name: fromAmount
      in: query
      required: true
      schema:
        type: string
        pattern: ^\d+$
      description: Amount in wei (no leading zeros)
    ToToken:
      name: toToken
      in: query
      required: true
      schema:
        type: string
        pattern: ^0x[a-fA-F0-9]{40}$
      description: Destination token contract address
    FromChainId:
      name: fromChainId
      in: query
      required: true
      schema:
        type: integer
        enum:
        - 1
        - 10
        - 137
        - 8453
        - 42161
        - 59144
      description: 'Source chain: 1=Ethereum, 10=Optimism, 137=Polygon, 8453=Base, 42161=Arbitrum, 59144=Linea'
    ToChainId:
      name: toChainId
      in: query
      required: true
      schema:
        type: integer
        enum:
        - 1
        - 10
        - 137
        - 8453
        - 42161
        - 59144
      description: Destination chain ID
    FromToken:
      name: fromToken
      in: query
      required: true
      schema:
        type: string
        pattern: ^0x[a-fA-F0-9]{40}$
      description: Source token contract address
  responses:
    PaymentRequired:
      description: Free-tier limit exceeded — x402 payment required
      headers:
        X-Payment-Required:
          schema:
            type: string
        X-Payment-Address:
          schema:
            type: string
          description: Treasury wallet (USDC on Base)
        X-Payment-Token:
          schema:
            type: string
          description: USDC contract on Base
        X-Payment-Amount:
          schema:
            type: string
          description: Amount in token decimals (990000 = 0.99 USDC)
        X-Payment-Chain-Id:
          schema:
            type: string
          description: 8453 (Base)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PaymentRequiredError'
    BadRequest:
      description: Invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimitExceeded:
      description: Rate limit exceeded
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds until rate limit resets
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Pioneer or Syndicate API key
x-agent-use-cases:
- id: bounded-autopilot
  name: Bounded Autopilot
  tier: Syndicate
  cadence: Every 5 minutes
  purpose: Run an always-on loop inside explicit budgets, allowlists, cooldowns, quote freshness, and local-signing requirements.
  primaryTools:
  - agent_onboard
  - create_session
  - configure_autopilot
  - autopilot_cycle
  - session_heartbeat
  stopConditions:
  - Budget, allowlist, cooldown, quote freshness, or risk bound is violated.
  - Required local EIP-191 or EIP-712 signature is missing.
  - Realized performance degrades enough to require analysis_only mode.
- id: airdrop-rotation
  name: Airdrop Rotation Desk
  tier: Pioneer
  cadence: Daily or event-driven
  purpose: Watch Trail Heat, snapshots, multiplier changes, wallet health, and costs before entering, waiting, rotating, or exiting.
  primaryTools:
  - get_trail_heat
  - get_historical_trailheat
  - get_agent_events
  - simulate_points
  - get_swap_quote
  - simulate_swap_execution
  stopConditions:
  - Expected point edge is unclear or negative after fees and gas.
  - Sybil risk exceeds the configured threshold.
  - User constraints do not allow the target chain or protocol.
- id: cross-chain-roi
  name: Cross-Chain ROI Gate
  tier: Pioneer
  cadence: Before any bridge
  purpose: Bridge only when net expected edge remains positive after bridge fee, gas, slippage, and execution risk buffer.
  primaryTools:
  - get_chain_breakdown
  - get_wallet_balances
  - get_token_prices
  - get_swap_quote
  - simulate_swap_execution
  - optimize_portfolio
  stopConditions:
  - netEdgeUsd is not positive.
  - Quote age exceeds the configured freshness limit.
  - Target chain is not allowlisted.
- id: perps-hedge
  name: Perps Hedge Co-Pilot
  tier: Syndicate
  cadence: Before exposure changes
  purpose: Evaluate whether a farming position needs a Hyperliquid hedge, with no_trade as a valid outcome.
  primaryTools:
  - scan_funding_rates
  - scan_market_conditions
  - get_futures_account
  - analyze_futures_strategy
  - calculate_position_size
  stopConditions:
  - Research gate expires.
  - Strategy confidence, liquidity, jurisdiction, or guardrails do not support execution.
  - Daily loss or drawdown limit is reached.