For Agents
AI Agent integration
Fly Trade EVM Swap API β Agent Reference
Overview
Decision Tree for Agent Use
Want to swap tokens?
β
ββ Standard swap (user pays gas in native token)
β ββ Need gas estimate? β Step 1 (quote) + Step 2 (transaction, estimateGas=true) + Step 3
β ββ No gas estimate needed? β Combined /quote/transaction + Step 3
β
ββ Calling from a smart contract?
ββ GET /quote/transaction (estimateGas=false, fromAddress=CONTRACT) β forward data as calldataSupported Networks
These 5 endpoints cover most agent use cases:
Step 1 β Get Quote
Required Parameters
Parameter
Type
Description
Optional Parameters
Parameter
Type
Description
Example Request
Response Schema (Standard Swap)
Critical Constraints
Step 2 β Get Transaction Payload
Required Parameters
Parameter
Type
Description
Optional Parameters
Parameter
Type
Default
Description
Example Request
Response Schema
Alternative: Combined Quote + Transaction (Single Request)
Example Request
Response Schema
Step 3 β Execute the Transaction
ERC-20 Token Approval
Smart Contract Integration
Last updated