{
  "x402Version": 2,
  "id": 39961,
  "slug": "39961",
  "resource": "https://www.oracleinsight.xyz/api/v1/safety/pre-trade",
  "description": "Pre-trade safety check: oracle-immune-system verdict for one trade, with verifiable EIP-712 attestation support. BLOCK verdicts are complete checks and are charged.",
  "type": "http",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x5FBbbCbF2Ade44F5c604E5E55f11945E1ADdD231",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "20000",
      "amountUsd": 0.02,
      "maxTimeoutSeconds": 60
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "method": "GET",
          "queryParams": {
            "action": "swap",
            "asset": "ETH",
            "chainId": 1,
            "tradeAmountUsd": 1000
          },
          "type": "http"
        },
        "output": {
          "example": {
            "consensusPrice": 3124.5,
            "crossProviderAgreement": 0.998,
            "manipulationRiskScore": 0.08,
            "maxDeviationPct": 0.42,
            "participantCount": 5,
            "recommendedMaxPositionUsd": 95000,
            "staleDataRisk": false,
            "verdict": "PASS"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "method": {
                "enum": [
                  "GET"
                ],
                "type": "string"
              },
              "queryParams": {
                "properties": {
                  "action": {
                    "description": "Type of DeFi operation",
                    "enum": [
                      "swap",
                      "borrow",
                      "lend",
                      "liquidate",
                      "repay"
                    ],
                    "type": "string"
                  },
                  "asset": {
                    "description": "Asset symbol, e.g. ETH, BTC, USDC",
                    "type": "string"
                  },
                  "chainId": {
                    "description": "Chain ID, e.g. 1=Ethereum, 0=chain-agnostic",
                    "type": "number"
                  },
                  "destinationAsset": {
                    "description": "Optional destination asset symbol (v2 binds it as destinationAssetId)",
                    "type": "string"
                  },
                  "protocolId": {
                    "description": "Optional lending protocol id to evaluate against (e.g. aave-v3-ethereum)",
                    "type": "string"
                  },
                  "schemaVersion": {
                    "description": "Attestation schema version: 1 (default, 11-field), 2 (26-field, CAIP-19 + quorum gate), or 3 (27-field: v2 + the signed independence threshold, so the gate is self-verifying)",
                    "enum": [
                      1,
                      2,
                      3
                    ],
                    "type": "number"
                  },
                  "targetProviders": {
                    "description": "Comma-separated list of oracle providers to restrict the check to",
                    "type": "string"
                  },
                  "tradeAmountUsd": {
                    "description": "Trade size in USD",
                    "type": "number"
                  }
                },
                "required": [
                  "asset",
                  "chainId",
                  "action",
                  "tradeAmountUsd"
                ],
                "type": "object"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "bazaar"
  ],
  "sourceHost": "www.oracleinsight.xyz",
  "lastUpdated": "2026-10-13T10:30:58.066Z",
  "quality": {
    "calls30d": 27,
    "uniquePayers30d": 3,
    "lastCalledAt": "2026-10-13T10:31:01.443Z"
  },
  "metadata": {
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "method": "GET",
            "queryParams": {
              "action": "swap",
              "asset": "ETH",
              "chainId": 1,
              "tradeAmountUsd": 1000
            },
            "type": "http"
          },
          "output": {
            "example": {
              "consensusPrice": 3124.5,
              "crossProviderAgreement": 0.998,
              "manipulationRiskScore": 0.08,
              "maxDeviationPct": 0.42,
              "participantCount": 5,
              "recommendedMaxPositionUsd": 95000,
              "staleDataRisk": false,
              "verdict": "PASS"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "method": {
                  "enum": [
                    "GET"
                  ],
                  "type": "string"
                },
                "queryParams": {
                  "properties": {
                    "action": {
                      "description": "Type of DeFi operation",
                      "enum": [
                        "swap",
                        "borrow",
                        "lend",
                        "liquidate",
                        "repay"
                      ],
                      "type": "string"
                    },
                    "asset": {
                      "description": "Asset symbol, e.g. ETH, BTC, USDC",
                      "type": "string"
                    },
                    "chainId": {
                      "description": "Chain ID, e.g. 1=Ethereum, 0=chain-agnostic",
                      "type": "number"
                    },
                    "destinationAsset": {
                      "description": "Optional destination asset symbol (v2 binds it as destinationAssetId)",
                      "type": "string"
                    },
                    "protocolId": {
                      "description": "Optional lending protocol id to evaluate against (e.g. aave-v3-ethereum)",
                      "type": "string"
                    },
                    "schemaVersion": {
                      "description": "Attestation schema version: 1 (default, 11-field), 2 (26-field, CAIP-19 + quorum gate), or 3 (27-field: v2 + the signed independence threshold, so the gate is self-verifying)",
                      "enum": [
                        1,
                        2,
                        3
                      ],
                      "type": "number"
                    },
                    "targetProviders": {
                      "description": "Comma-separated list of oracle providers to restrict the check to",
                      "type": "string"
                    },
                    "tradeAmountUsd": {
                      "description": "Trade size in USD",
                      "type": "number"
                    }
                  },
                  "required": [
                    "asset",
                    "chainId",
                    "action",
                    "tradeAmountUsd"
                  ],
                  "type": "object"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "www.oracleinsight.xyz",
    "manifest_name": "www.oracleinsight.xyz",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-13T15:56:53.641Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}