base_swap_validity
A swap that lands only when your conditions hold (Cobalt validity tx) — The base-swap 0x trade as a Cobalt validity transaction: Base includes your signed tx only while your conditions hold — a conditional order with no limit-order contract and nobody holding the trade. We never hold funds or keys; you sign and submit. Every request carries the deadline Base requires (at most 60 s out; set for you if omitted). Optional conditions: fromBlock, flashblockIndex (1-10), minNativeBalanceWei, or a caller-supplied storage predicate for price. Required inputs: sell, buy, amount, taker. Priced $0.02 per call over x402 on Base; send a prepaid x-credit-token header for unlimited calls, or get 1 free call/day per tool. No API key required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buy | Yes | Token you buy | |
| sell | Yes | Token you sell | |
| taker | Yes | Your wallet (signs the swap) | |
| amount | Yes | Amount you sell | |
| slippage | No | Slippage in bps (optional, default 100) | |
| fromBlock | No | Earliest block (optional) | |
| storageOp | No | Advanced: operator (< <= = != > >=) | |
| beforeBlock | No | Deadline block (optional; at most 60 s out, set for you if omitted) | |
| storageMask | No | Advanced: mask (hex, optional) | |
| storageSlot | No | Advanced: storage slot (hex) | |
| storageValue | No | Advanced: compare value (hex) | |
| storageAddress | No | Advanced: pool/token for a storage condition | |
| flashblockIndex | No | Flashblock index 1-10 (optional) | |
| minNativeBalanceWei | No | Min taker ETH balance in wei (optional) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | The result payload. Shape is service-specific; every field is documented in the tool description. | |
| service | No | The service id that answered. | |
| checkedAt | No | ISO-8601 timestamp of when the underlying reads were taken. |