Stock Buy Tx
by Otto AI in Onchain & crypto
Unsigned transactions that buy a tokenized stock on Base (Coinbase B20) with USDC, for your own wallet: the USDC approval when it is needed, then the LI.FI swap. Otto checks the route's worst fill against the stock token's own Chainlink price (at most 1.75% over it) and caps slippage at 1%. The quote includes LI.FI's fee and Otto's 0.1% fee. Nothing is signed or sent. buy=TICKER:amountUsdc:wallet, optional :slippageBps. $0.01 per call.
https://x402.ottoai.services/stock-buy-tx- Price
- $0.01
- per call in USDC
- Uptime
- 97.6%
- last 30 days
- Response time
- 359 ms
- 581 ms slowest 5%
- Last check
- Passed
- 2 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
GET https://x402.ottoai.services/stock-buy-tx
Each call costs $0.01 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.
GET https://x402.ottoai.services/stock-buy-tx?buy=TSLA%3A25%3A0x1111111111111111111111111111111111111111Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
buy | string | Yes | TICKER:amountUsdc:wallet, optional :slippageBps. Ticker: AAPL, AMZN, GOOGL, META, MSTR, NVDA, SPCX or TSLA. Amount: 1 to 1000 USDC, up to 6 decimals. Wallet: the Base address that signs and receives. Slippage: 1 to 100 bps, default 50. |
Example response
The provider's example. We can't check it without paying.
Example response, 73 lines
{
"data": {
"allowance": {
"approvalIncluded": true,
"currentAtomic": "0",
"spender": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE"
},
"balance": {
"sufficient": true,
"usdcAtomic": "40000000"
},
"buy": {
"amountAtomic": "25000000",
"amountUsdc": "25",
"chain": "base",
"chainId": 8453,
"slippageBps": 50,
"symbol": "TSLAc",
"ticker": "TSLA",
"token": "0xb2000000000000000000001e800a7f5189430cD0",
"tokenDecimals": 8,
"venue": "coinbase-b20",
"wallet": "0x1111111111111111111111111111111111111111"
},
"checks": [
"lifi_integrator_exact"
],
"expiresAt": "2026-11-13T15:01:00.000Z",
"generatedAt": "2026-11-13T15:00:00.000Z",
"notice": "Unsigned transactions for the wallet named below, on Base. Send the steps in order from that wallet, before expiresAt. Otto signed and sent nothing, and did not simulate the swap. If the price moves p...",
"parity": {
"checked": true,
"markAgeSec": 95,
"markUsd": 408.12,
"premiumBps": 89,
"toleranceBps": 175
},
"quote": {
"effectivePriceUsd": 409.701737,
"expectedTokens": "0.06102",
"expectedTokensAtomic": "6102000",
"gasUsd": "0.0087",
"minTokens": "0.0607149",
"minTokensAtomic": "6071490",
"ottoFeeUsdc": "0.025",
"quotedFees": [
{
"amountUsd": "0.0625",
"name": "LIFI Fixed Fee"
}
],
"routeTool": "sushiswap",
"worstPriceUsd": 411.760622
},
"simulated": false,
"steps": [
{
"chainId": 8453,
"data": "0x095ea7b3",
"kind": "approve",
"to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"value": "0"
}
]
},
"meta": {
"degraded": false,
"generatedAt": "",
"stalenessSec": 0,
"validUntil": ""
},
"status": "success"
}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.01.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i 'https://x402.ottoai.services/stock-buy-tx?buy=TSLA%3A25%3A0x1111111111111111111111111111111111111111'
# 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 - 'https://x402.ottoai.services/stock-buy-tx?buy=TSLA%3A25%3A0x1111111111111111111111111111111111111111' \
| 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.01 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.01" });
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.01 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402.ottoai.services%2Fstock-buy-tx
const res = await pay("https://x402.ottoai.services/stock-buy-tx?buy=TSLA%3A25%3A0x1111111111111111111111111111111111111111");
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.01 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.01"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.get("https://x402.ottoai.services/stock-buy-tx?buy=TSLA%3A25%3A0x1111111111111111111111111111111111111111")
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 |
|---|---|---|---|---|
| 2 h ago | Passed | 402 | 347 ms | $0.01 |
| 11 h ago | Passed | 402 | 393 ms | $0.01 |
| 22 h ago | Passed | 402 | 302 ms | $0.01 |
| 33 h ago | Passed | 402 | 538 ms | $0.01 |
| 45 h ago | Passed | 402 | 50 ms | $0.01 |
Show 10 older checks
| 3 days ago | Timed out | - | - | - |
| 5 days ago | Passed | 402 | 545 ms | $0.01 |
| 6 days ago | Passed | 402 | 211 ms | $0.01 |
| 6 days ago | Passed | 402 | 215 ms | $0.01 |
| 6 days ago | Passed | 402 | 359 ms | $0.01 |
| 7 days ago | Passed | 402 | 55 ms | $0.01 |
| 7 days ago | Passed | 402 | 232 ms | $0.01 |
| 8 days ago | Passed | 402 | 422 ms | $0.01 |
| 8 days ago | Passed | 402 | 209 ms | $0.01 |
| 8 days ago | Passed | 402 | 209 ms | $0.01 |