trade_guard
Use it for every pre-execution trust decision: one oracle price, price analytics, oracle health, oracle registry search, a venue market quote, or the pre-trade safety gate including prepare_swap and prepare_perp_order. Each call selects the branch with "op". Do not use it to prove execution after the fact (use trade_proof), to poll a prepaid monitoring window (use oracle_watch_window), or to manage a position bundle (use position_lifecycle). Returns the op payload: price and analytics rows for read ops, a venue quote for market_quote, a PASS/CAUTION/DANGER/BLOCK verdict with reasons for check_safety, and an unsigned prepared transaction, Solana message, venue order or instruction for prepare_* ops. Absorbs the deprecated names get_oracle_price, get_price_analytics, get_oracle_health, search_oracle_registry, get_market_quote, check_trade_safety, prepare_swap and prepare_perp_order. Metering: oracle_price, market_quote and search_registry are 2 credits ($0.002); price_analytics and oracle_health are 4 credits ($0.004); check_safety, prepare_swap and prepare_perp_order are 40 credits ($0.040), which is both the per-call price and the product ceiling. Deprecated alias spellings are callable at the same price until 2027-01-06.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| to | No | End date YYYY-MM-DD | |
| date | No | Report date YYYY-MM-DD | |
| days | No | Lookback days for rankings/trends | |
| from | No | Start date YYYY-MM-DD | |
| kind | No | Registry/evidence family to search | |
| mode | No | ||
| side | No | Perp side | |
| asset | No | Asset symbol, e.g. BTC, ETH | |
| chain | No | Optional blockchain filter, e.g. base | |
| guard | No | Exact-call guard input for family-specific exact tools | |
| limit | No | ||
| order | No | Exact Hyperliquid order envelope | |
| query | No | Search or lookup term (symbol, protocol, slug) | |
| scope | No | Which health surface to read | ecosystem |
| vault | No | ||
| venue | No | ||
| action | No | Trade action being considered | |
| assets | No | Assets to analyse; consensus/risk/history use the first asset | |
| market | No | Hyperliquid perp market | |
| method | No | Consensus aggregation method | |
| metric | No | ||
| offset | No | Pagination offset | |
| period | No | Period in hours or days | |
| policy | No | ||
| venues | No | Base venue ids to inspect | |
| wallet | No | ||
| borrows | No | ||
| subject | No | Feed UUID, provider, protocol, or asset symbol depending on scope | |
| category | No | Feed category filter | |
| chain_id | No | ||
| interval | No | Deviation interval, default 24h | |
| position | No | Position payload for action=check_position | |
| provider | No | Oracle provider, e.g. chainlink, redstone, api3 | |
| amount_in | No | Exact input amount as a decimal string | |
| direction | No | ||
| is_active | No | Feed active-state filter, default true | |
| market_id | No | Isolated lending market id when required | |
| providers | No | ||
| recipient | No | ||
| amount_usd | No | Trade size in USD | |
| asset_mint | No | ||
| base_chain | No | Base chain name for metric=spreads | |
| input_mint | No | Solana base58 mint sold; required for venue=solana_jupiter | |
| profile_id | No | Reviewed pool/profile id. PancakeSwap V3: base-pancakeswap-v3-usdc-usdt-100, bnb-pancakeswap-v3-usdt-usdc-100, bnb-pancakeswap-v3-usdt-wbnb-100 | |
| collaterals | No | ||
| loan_symbol | No | ||
| output_mint | No | Solana base58 mint bought; required for venue=solana_jupiter | |
| protocol_id | No | Lending/protocol id | |
| transaction | No | Exact unsigned transaction for exact-call guards | |
| margin_asset | No | ||
| min_severity | No | ||
| period_hours | No | Risk/history hours | |
| borrow_amount | No | ||
| borrow_symbol | No | ||
| force_refresh | No | Bypass cache and re-read upstream | |
| min_lp_amount | No | ||
| token_address | No | ||
| debt_value_usd | No | ||
| decision_input | No | Caller decision/quote evidence (old camelCase shape) | |
| verify_onchain | No | For RWA lookups, cross-check on chain | |
| margin_value_usd | No | ||
| max_slippage_bps | No | ||
| principal_amount | No | ||
| collateral_amount | No | ||
| collateral_symbol | No | ||
| destination_asset | No | Destination asset for swaps | |
| reputation_opt_in | No | ||
| reputation_agent_id | No | ||
| collateral_value_usd | No | ||
| deadline_unix_seconds | No | ||
| source_decision_price_usd | No | ||
| destination_decision_price_usd | No |