Build Transaction
by Vextorium in Onchain & crypto
Build an EVM transaction ready to sign (never signed or sent): native transfer, ERC-20 transfer or ERC-20 approve, with to, data, value, nonce, chainId, estimated gas and current EIP-1559 fees, plus a simulation that warns if it would revert and the estimated cost.
https://api.vextorium.com/v1/build-transaction- Price
- $0.004
- per call in USDC
- Uptime
- 0.0%
- last 30 days
- Response time
- -
- no timed checks yet
- Last check
- Failed
- 35 min ago, next in 23 min
Reliability
Latest check failed 35 min ago: Amount "0.004" is not in atomic token units
How to call it
POST https://api.vextorium.com/v1/build-transaction
Each call costs $0.004 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://api.vextorium.com/v1/build-transaction
content-type: application/json
{
"action": "token_transfer",
"amount": 1,
"for": "0x9b9B3F22BEBD1e3E528C2759a2ca34cD2e0184A1",
"network": "base",
"since": "0xd8dA6BF26964aF9D7eed9e03E53415D37aA96045",
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | One of: native_transfer, token_transfer, approve_token. |
amount | number | Yes | |
for | string | Yes | |
network | string | No | |
since | string | Yes | |
token | string | No |
Example response
The provider's example. We can't check it without paying.
{
"action": "token_transfer",
"decimals": 6,
"estimated_cost_usd": 0.001013,
"estimated_gas": 62989,
"estimated_native_cost": 3.779e-7,
"network": "base",
"note": "Unsigned transaction: sign it with your wallet. Vextorium never sees private keys. Check recipient and amount before signing.",
"simulation": "ok",
"token": "USDC",
"transaction": {
"chainId": "0x2105",
"data": "0xa9059cbb0000000000000000000000009b9b3f22bebd1e3e528c2759a2ca34cd2e0184a100000000000000000000000000000000000000000000000000000000000f4240",
"from": "0xd8dA6BF26964aF9D7eed9e03E53415D37aA96045",
"gas": "0x12742",
"maxFeePerGas": "0xa7d8c0",
"maxPriorityFeePerGas": "0xf4240",
"nonce": "0x46",
"to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"type": "0x2",
"value": "0x0"
}
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.004.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://api.vextorium.com/v1/build-transaction' \
-H 'content-type: application/json' \
--data-raw '{"action":"token_transfer","amount":1,"for":"0x9b9B3F22BEBD1e3E528C2759a2ca34cD2e0184A1","network":"base","since":"0xd8dA6BF26964aF9D7eed9e03E53415D37aA96045","token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://api.vextorium.com/v1/build-transaction' \
-H 'content-type: application/json' \
--data-raw '{"action":"token_transfer","amount":1,"for":"0x9b9B3F22BEBD1e3E528C2759a2ca34cD2e0184A1","network":"base","since":"0xd8dA6BF26964aF9D7eed9e03E53415D37aA96045","token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.004 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.004" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.004 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.vextorium.com%2Fv1%2Fbuild-transaction&method=POST
const res = await pay("https://api.vextorium.com/v1/build-transaction", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"action": "token_transfer",
"amount": 1,
"for": "0x9b9B3F22BEBD1e3E528C2759a2ca34cD2e0184A1",
"network": "base",
"since": "0xd8dA6BF26964aF9D7eed9e03E53415D37aA96045",
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.004 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.004"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://api.vextorium.com/v1/build-transaction",
json={
"action": "token_transfer",
"amount": 1,
"for": "0x9b9B3F22BEBD1e3E528C2759a2ca34cD2e0184A1",
"network": "base",
"since": "0xd8dA6BF26964aF9D7eed9e03E53415D37aA96045",
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
},
)
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 35 min ago | Amount "0.004" is not in atomic token units | 402 | 231 ms | $0.004 |
| 5 h ago | Amount "0.004" is not in atomic token units | 402 | 112 ms | $0.004 |
| 10 h ago | Amount "0.004" is not in atomic token units | 402 | 87 ms | $0.004 |
| 15 h ago | Amount "0.004" is not in atomic token units | 402 | 80 ms | $0.004 |
| 20 h ago | Amount "0.004" is not in atomic token units | 402 | 251 ms | $0.004 |
Show 10 older checks
| 24 h ago | Amount "0.004" is not in atomic token units | 402 | 90 ms | $0.004 |
| 29 h ago | Amount "0.004" is not in atomic token units | 402 | 109 ms | $0.004 |
| 34 h ago | Amount "0.004" is not in atomic token units | 402 | 375 ms | $0.004 |
| 38 h ago | Amount "0.004" is not in atomic token units | 402 | 84 ms | $0.004 |
| 43 h ago | Amount "0.004" is not in atomic token units | 402 | 81 ms | $0.004 |
| 47 h ago | Amount "0.004" is not in atomic token units | 402 | 82 ms | $0.004 |
| 2 days ago | Amount "0.004" is not in atomic token units | 402 | 115 ms | $0.004 |
| 2 days ago | Amount "0.004" is not in atomic token units | 402 | 83 ms | $0.004 |
| 2 days ago | Amount "0.004" is not in atomic token units | 402 | 87 ms | $0.004 |
| 3 days ago | Amount "0.004" is not in atomic token units | 402 | 83 ms | $0.004 |