best-execution

What would make this transfer cheaper?

Every router answers "what does this cost?". None answers "what should I change?". An agent handed a price can only pay it or give up — yet the price is usually a consequence of choices it did not know it was making: the destination chain (payout gas varies by more than 1000x), the size (a fixed cost is ruinous on a small transfer and trivial on a large one), whether the instant float lane applied, and whether the rails that would have competed were even available. Every suggestion carries the REAL saving in base units, computed from the same cost table the router charges from. CRITICAL: suggestions flagged changesOutcome: true move WHERE THE MONEY LANDS. Do not apply them as pure cost savings — telling someone to send to a different chain is not a cost tip if that is not where the funds were needed. If nothing can be improved, it says so instead of inventing filler.

post/api/route/improve

Request

  • Base URL: https://api.anygas.xyz/svc
  • URL: https://api.anygas.xyz/svc/api/route/improve
  • Auth: none declared

Request body

amountstring required

Source-token smallest units.

fromTokenstring

Symbol or address; omit for native.

toTokenstring

Symbol or address; omit for native.

toAddressstring

Recipient; defaults to fromAddress.

fromAddressstring

Quote origin; anonymous default used if omitted.

slippagenumber

Fraction, e.g. 0.005.

tokenstring

Shorthand: sets BOTH fromToken and toToken (e.g. "USDC"). Accepted on POST bodies and as a GET query parameter. Explicit fromToken/toToken win when present.

Example request

{
  "amount": "50000000",
  "fromToken": "USDC",
  "toToken": "BTC",
  "token": "USDC"
}

Response

Quantified suggestions, each declaring changesOutcome

object required

Changes

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