pre_trade_safety_check
Pre-trade oracle safety checkpoint for AI agents. Call this BEFORE executing any on-chain swap/borrow/lend/liquidation/repay to assess oracle risk. Aggregates cross-oracle consensus prices, per-provider deviation, data freshness, stablecoin peg status, and reputation into a single verdict: PASS / CAUTION / DANGER / BLOCK. AI agents MUST NOT execute trades when the verdict is DANGER or BLOCK. Also returns a recommended maximum position size. A PASS is not principal authorization or a guarantee of price correctness or economic safety.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | Yes | Asset symbol being traded, e.g. BTC, ETH, USDC | |
| action | Yes | ||
| chainId | Yes | Chain ID where the trade executes, e.g. 1=Ethereum, 42161=Arbitrum, 8453=Base. Use 0 for chain-agnostic. | |
| tradeAmountUsd | Yes | Trade size in USD | |
| targetProviders | No | Optional: restrict the check to specific oracle providers |