Summary
The vestige_get_v4_swap_data_transactions tool sends args.swap_data as the POST body to /swap/v4/transactions, but the Vestige API requires additional top-level fields (asset_in_price, asset_out_price, asset_images) that are present in the quote response but not forwarded.
Steps to Reproduce
- Call
vestige_get_best_v4_swap_data for any pair (e.g., FINITE->aVOI)
- Pass the result to
vestige_get_v4_swap_data_transactions
- Tool returns 422 Unprocessable Entity
Root Cause
In swaps.ts, the handler sends only args.swap_data as the POST body. The Vestige API validates that asset_in_price, asset_out_price, and asset_images are present at the top level. These fields exist in the quote response but the tool expects the caller to include them in swap_data.
Additional Note
Even when calling the API directly with all required fields, the /swap/v4/transactions endpoint returns null (HTTP 200) for all swap pairs tested (including simple ALGO->USDC). This may be a Vestige API-side issue.
Suggested Fix
Pass the full quote response object (including prices and asset_images) as the POST body, or merge sender/slippage into the swap data before posting.
Summary
The
vestige_get_v4_swap_data_transactionstool sendsargs.swap_dataas the POST body to/swap/v4/transactions, but the Vestige API requires additional top-level fields (asset_in_price,asset_out_price,asset_images) that are present in the quote response but not forwarded.Steps to Reproduce
vestige_get_best_v4_swap_datafor any pair (e.g., FINITE->aVOI)vestige_get_v4_swap_data_transactionsRoot Cause
In
swaps.ts, the handler sends onlyargs.swap_dataas the POST body. The Vestige API validates thatasset_in_price,asset_out_price, andasset_imagesare present at the top level. These fields exist in the quote response but the tool expects the caller to include them inswap_data.Additional Note
Even when calling the API directly with all required fields, the
/swap/v4/transactionsendpoint returnsnull(HTTP 200) for all swap pairs tested (including simple ALGO->USDC). This may be a Vestige API-side issue.Suggested Fix
Pass the full quote response object (including prices and asset_images) as the POST body, or merge
sender/slippageinto the swap data before posting.