base_swap_validity
A swap that lands only when your conditions hold (Cobalt validity tx) — The base-swap 0x trade wrapped in a Cobalt validity transaction: Base holds your signed tx dormant until your conditions hold, then includes it — a good-till-block/conditional order, no limit-order contract, nobody holding the trade. We never hold funds or keys; you sign and submit to Base's sequencer. Conditions: beforeBlock (a deadline), fromBlock, flashblockIndex, minNativeBalanceWei, or a caller-supplied storage predicate for price. At least one required. 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 wallet or 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: before this block (recommended) | |
| 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 (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. |