Insight Logo
Insight
Oracle evidence
Price Query
VerifyPricing

Insight — Reference index

Evidence before execution.

Insight LogoInsight

Oracle transparency and risk infrastructure for DeFi. 15-minute price verification, cross-oracle comparison, position safety checks, and programmatic data access across 10+ providers and 40+ blockchain networks.

Platform

  • Home
  • Price Query
  • Price Insight
  • Oracle Directory
  • Daily Reports
  • API
  • Pricing
  • AI Agents
  • Guard SDK

Safety

  • Safety Check
  • Pre-Trade Safety Check
  • Oracle Watch
  • Stablecoin Depeg
  • Wrapped Asset Peg

Resources

  • Documentation
  • API Reference
  • AI / MCP Docs
  • Guard SDK Docs
  • GitHub

© 2026 Insight. All rights reserved.

Privacy PolicyTerms of ServiceRefund PolicyContact

10 — Guard

Insight Guard SDK · The execution workflow for DeFi agents

View quickstartSDK documentation

Make risk signals change the transaction.

One server-side TypeScript workflow for two-sided pre-trade gates, Oracle Watch halts, and signed execution receipts. It orchestrates Insight’s API; the risk engine, attestation keys, and credit meter remain on Insight.

  • 01Gate before submit
  • 02Halt between trades
  • 03Verified execution proof

01 — One guarded workflow

The API remains composable. The SDK makes the safe path default.

Use individual REST or MCP calls when you need them. Use Guard when an agent should check, decide, execute, and retain proof as one explicit workflow.

01

Gate before submitting

Run source and destination Pre-Trade checks. DANGER and BLOCK stop the workflow before your transaction function is called.

02

Watch while running

Poll Oracle Watch at a bounded cadence and bind its halt signal to the strategy pause operation.

03

Prove what settled

Pair the two signed pre-trade proofs with the transaction hash to issue a VERIFIED execution receipt.

02 — Quickstart

Integrate the workflow, not three disconnected calls.

Install the package in a trusted agent runtime. Never expose an Insight API key in a browser bundle.

Use v3 pre-trade attestations by default.
Pass both sides of a swap to receive a VERIFIED receipt.
Bind Oracle Watch onHalt to your strategy pause operation.
Install
npm install oracle-insight-guard
Guarded swap
import { InsightGuard } from 'oracle-insight-guard';

const guard = new InsightGuard({ apiKey: process.env.INSIGHT_API_KEY! });

const result = await guard.executeSwap({
  source: {
    asset: 'ETH', destinationAsset: 'USDC', chainId: 1,
    action: 'swap', tradeAmountUsd: 100_000,
  },
  destination: {
    asset: 'USDC', destinationAsset: 'ETH', chainId: 1,
    action: 'swap', tradeAmountUsd: 100_000,
  },
  watchTarget: { symbol: 'ETH', chain: 'ethereum' },
  receipt: { settlementChainId: 1, maxSlippageBps: 50 },
  submitTransaction: async () => ({ txHash: await submitSwap() }),
});

if (result.status === 'blocked') return; // no transaction was submitted
console.log(result.receipt.executionStatus);

03 — Between trades

Treat a halt signal as an operational event.

Guard defaults to a 15-minute Watch cadence. A halt is remembered for that target; pass the same target to executeSwap to prevent a new submission while the halt is active.

Oracle Watch
const watch = guard.watch(
  { symbol: 'ETH', chain: 'ethereum' },
  {
    onHalt: async (signal) => strategy.pause(signal.reason),
    onError: (error) => logger.error(error),
  }
);

Keep your existing API access. Add the guarded path on top.

Guard uses the same API key and the existing C3/C4 credit meter: pre-trade and Watch calls are C3; execution receipt issuance is C4. A successful two-sided guarded swap uses 20 credits at current prices (two C3 gates plus one C4 receipt), excluding Watch polling. There is no second billing model.

Create an API keyRead integration docs