For the complete documentation index, see llms.txt. This page is also available as Markdown.

API

Specifications to interact with Fynd server

GET /v1/health - Health check endpoint.

get

Returns the current health status of the service.

Responses
200

Service healthy

application/json

Health check response.

derived_data_readybooleanOptional

Whether derived data has been computed at least once.

This indicates overall readiness, not per-block freshness. Some algorithms require fresh derived data for each block — they are ready to receive orders but will wait for recomputation before solving.

Example: true
gas_price_age_msinteger · nullableOptional

Time since last gas price update in milliseconds, if available.

Example: 12000
healthybooleanRequired

Whether the service is healthy.

Example: true
last_update_msinteger · int64Required

Time since last market update in milliseconds.

Example: 1250
num_solver_poolsintegerRequired

Number of solver pools configured at startup.

This is the configured/registered count, not a live count of healthy worker threads — it does not decrease if individual workers stop or panic.

Example: 2
get/v1/health
GET /v1/health HTTP/1.1
Accept: */*
{
  "derived_data_ready": true,
  "gas_price_age_ms": 12000,
  "healthy": true,
  "last_update_ms": 1250,
  "num_solver_pools": 2
}

POST /v1/quote - Request a quote.

post

Accepts a QuoteRequest and returns a Quote with the best routes found, or an error if the request could not be filled.

Errors

  • 400 Bad Request: Invalid request format

  • 422 Unprocessable Entity: No routes found

  • 503 Service Unavailable: Queue full or service overloaded

  • 503 Service Unavailable: Queue full, service overloaded, or quote timeout

Body

Request to solve one or more swap orders.

Responses
200

Quote completed

application/json

Complete solution for a [QuoteRequest].

Contains a solution for each order in the request, along with aggregate gas estimates and timing information.

solve_time_msinteger · int64Required

Time taken to compute this solution, in milliseconds.

Example: 12
total_gas_estimatestringRequired

Total estimated gas for executing all swaps (as decimal string).

Example: 150000
post/v1/quote
POST /v1/quote HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 396

{
  "options": {
    "encoding_options": null,
    "max_gas": "500000",
    "min_responses": null,
    "route_filter": null,
    "timeout_ms": 2000
  },
  "orders": [
    {
      "amount": "1000000000000000000",
      "receiver": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "sender": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "side": "sell",
      "token_in": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
      "token_out": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
    }
  ]
}
{
  "orders": [
    {
      "algorithm": "bellman_ford",
      "amount_in": "1000000000000000000",
      "amount_out": "3500000000",
      "amount_out_net_gas": "3498000000",
      "block": {
        "hash": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd",
        "number": 21000000,
        "timestamp": 1730000000
      },
      "fee_breakdown": null,
      "gas_estimate": "150000",
      "gas_price": "20000000000",
      "order_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "price_impact_bps": null,
      "route": null,
      "simulation_result": null,
      "status": "success",
      "transaction": null
    }
  ],
  "solve_time_ms": 12,
  "total_gas_estimate": "150000"
}

GET /v1/info - Return static metadata about this Fynd instance.

get
Responses
200

Instance info

application/json

Static metadata about this Fynd instance, returned by GET /v1/info.

chain_idinteger · int64Required

EIP-155 chain ID (e.g. 1 for Ethereum mainnet).

Example: 1
permit2_addressstringRequired

Address of the canonical Permit2 contract (same on all EVM chains).

Example: 0x000000000022D473030F116dDEE9F6B43aC78BA3
router_addressstring · nullableOptional

Address of the Tycho Router contract on this chain; null on a quote-only chain.

Example: 0xfD0b31d2E955fA55e3fa641Fe90e08b677188d35
versionstringOptional

Fynd binary version (Cargo package version, e.g. "0.89.1").

Defaults to empty when absent so newer clients tolerate older servers that predate it.

Example: 0.89.1
get/v1/info
GET /v1/info HTTP/1.1
Accept: */*
200

Instance info

{
  "chain_id": 1,
  "permit2_address": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
  "router_address": "0xfD0b31d2E955fA55e3fa641Fe90e08b677188d35",
  "version": "0.89.1"
}

Last updated