VeTrade now publishes one-shot transfer planning at /v2/transfer-plans and the hosted MCP tools transfer, swap_transfer_exact_in, and swap_transfer_exact_out.
These tools stay prepare-only:
- the hosted surface resolves tokens and
.vetrecipients - the hosted surface builds the canonical
executionPackage - signing and broadcast still happen locally
Signer and recipient
address is the wallet that signs and spends. It must be a VeChain hex address. recipient is the final receiver and may be another hex address or a .vet name. Only the recipient supports name resolution. Recheck the resolved address before local signing.
amount is a human decimal string here: "1" means 1 selected token, unlike raw-unit amountIn in the swap-plan HTTP API.
First transfer plan
Prerequisite: curl. This self-contained example uses two placeholder-format addresses; replace both with your intended signer and recipient to get a meaningful readiness result. It prepares a plan only.
curl -fsS https://vetrade.vet/v2/transfer-plans \
-H 'Content-Type: application/json' \
--data-binary @- <<'JSON'
{
"action": "transfer",
"token": "VET",
"amount": "1",
"address": "0x1111111111111111111111111111111111111111",
"recipient": "0x2222222222222222222222222222222222222222"
}
JSON
Expected: recipient resolution metadata, normalizedRequest.amountBaseUnits, the prepared bundle, validation, readiness and executionInput. Readiness can report insufficient balance for the example signer. None of these fields proves a transfer occurred.
If address is a .vet name, replace it with the signer hex address. If recipient lookup fails, correct the name or use an independently verified address. See error recovery.
Actions
transferswap_transfer_exact_inswap_transfer_exact_out
Recipient rules
recipientaccepts either:
- a VeChain hex address
- a .vet name
- signer-bound
addressstays hex-only .vetresolution is recipient-only in this rollout
Every response now includes recipient resolution metadata:
{
"recipient": {
"input": "friend.vet",
"resolvedAddress": "0x1111111111111111111111111111111111111111",
"inputType": "vet_domain",
"reversePrimaryName": "friend.vet",
"resolutionSource": "resolve_utils"
}
}
Endpoint
POST /v2/transfer-plans
GET /v2/transfer-plans
Smallest useful calls
Direct transfer:
{
"action": "transfer",
"token": "VET",
"amount": "1",
"address": "0xYourSignerAddress",
"recipient": "friend.vet"
}
Exact-input swap-transfer:
{
"action": "swap_transfer_exact_in",
"inputToken": "VTHO",
"outputToken": "VET",
"amount": "10",
"address": "0xYourSignerAddress",
"recipient": "friend.vet",
"slippageBps": 100
}
Exact-output swap-transfer:
{
"action": "swap_transfer_exact_out",
"inputToken": "VTHO",
"outputToken": "VET",
"amount": "1",
"address": "0xYourSignerAddress",
"recipient": "friend.vet",
"slippageBps": 100
}
Tool notes
transferbuilds:
- a native VET value transfer when token resolves to VET
- an ERC-20 transfer(recipient, amount) clause for supported tokens
swap_transfer_exact_insends a fixed input amount and settles output directly to the resolved recipientswap_transfer_exact_outplans the requested final output amount for the resolved recipient and returns the maximum input bound used for readiness checks and local execution. Settlement is established only by successful execution and receipt verification; planning can fail and the quote can expireswap_transfer_exact_outcurrently uses the legacy exact-output aggregator path, somaxHopsandmaxSplitsare accepted but ignored
Local execution
The published helper now supports:
node ~/.codex/skills/vetrade-ai/scripts/localExecution.mjs transfer transfer.json
node ~/.codex/skills/vetrade-ai/scripts/localExecution.mjs swap-transfer-exact-in swap-transfer-in.json
node ~/.codex/skills/vetrade-ai/scripts/localExecution.mjs swap-transfer-exact-out swap-transfer-out.json
The OpenAI SDK also exposes:
execute_transferexecute_swap_transfer_exact_inexecute_swap_transfer_exact_out
Use executionPolicy.recipientMode: 'recipient_optional' when those local execution tools must submit to a recipient that differs from the signer.
Verify settlement
For exact input, review minimum received. For exact output, review the requested output and maximum input. Check gas, permissions and quote expiry before signing locally, then verify the final recipient and amount in the receipt. A prepared or simulated package is not a settled payment.