best-execution

Goal-based source picker (JSON body)

State a goal, a destination and 1–10 candidate funding sources; the solver reads /compare once per source and ranks them, returning a plan with ready-to-POST execute params. It NEVER executes. Rate limit 20/min.

post/api/intent/solve

Request

  • Base URL: https://api.anygas.xyz/svc
  • URL: https://api.anygas.xyz/svc/api/intent/solve
  • Auth: none declared

Request body

toTokenstring required
goal'max-output' | 'cheapest' | 'fastest'
amountstring

Shared amount if sources omit their own.

toAddressstring

Recipient, echoed into plan.execute.

Example request

{
  "toToken": "USDC",
  "from": [
    {
      "chain": 42161,
      "token": "USDC",
      "amount": "5000000"
    },
    {
      "chain": 10,
      "token": "USDC",
      "amount": "5000000"
    }
  ]
}

Response

Ranked plan

goalstring
alternativesobject[]
skippedobject[]
sourcesConsideredinteger
notestring

Example response

{
  "goal": "max-output",
  "sourcesConsidered": 2
}

Changes

No recorded changes to this operation across all 1 revision of this API.