{
  "openapi": "3.0.0",
  "info": {
    "title": "BaseGuard Token Safety Oracle",
    "version": "1.0.0",
    "description": "Deterministic on-chain token safety verdicts for Base, Ethereum, Arbitrum, and Solana. No LLM \u2014 pure on-chain data.",
    "x-guidance": "BaseGuard returns token safety verdicts by analyzing on-chain data. POST to /verdict with a contractAddress and chainId to receive a riskScore (0-100), recommendation (SAFE/CAUTION/AVOID), deployer wallet age, LP lock status, and holder concentration. Use /verdict/lite for a faster, cheaper check covering only deployer age and LP lock. Supported chains: base, ethereum, arbitrum, solana. EVM addresses use 0x format, Solana addresses use base58."
  },
  "servers": [
    {
      "url": "https://baseguard.scoopflashman.tech"
    }
  ],
  "paths": {
    "/verdict": {
      "post": {
        "summary": "Full token safety verdict",
        "description": "Analyzes deployer wallet age, LP lock status, and holder concentration. Returns riskScore 0-100 and SAFE/CAUTION/AVOID recommendation.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.20"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "extensions": {
            "bazaar": {
              "schema": {
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "required": [
                          "contractAddress",
                          "chainId"
                        ],
                        "properties": {
                          "contractAddress": {
                            "type": "string"
                          },
                          "chainId": {
                            "type": "string",
                            "enum": [
                              "base",
                              "ethereum",
                              "arbitrum",
                              "solana"
                            ]
                          }
                        }
                      }
                    }
                  },
                  "output": {
                    "type": "object",
                    "properties": {
                      "example": {
                        "riskScore": 45,
                        "recommendation": "CAUTION",
                        "confidence": "HIGH",
                        "checks": {
                          "deployer": {
                            "walletAgeDays": 12,
                            "flag": "YOUNG"
                          },
                          "liquidity": {
                            "lpLocked": true,
                            "liquidityUsd": 85000
                          },
                          "holders": {
                            "top10Concentration": 38.5,
                            "flag": "DISTRIBUTED"
                          }
                        },
                        "token": {
                          "name": "ExampleToken",
                          "symbol": "EXT"
                        },
                        "processingMs": 4200
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "contractAddress",
                  "chainId"
                ],
                "properties": {
                  "contractAddress": {
                    "type": "string",
                    "description": "Token contract address. Use 0x format for EVM chains, base58 for Solana.",
                    "example": "0x4ed4e862860bed51a9570b96d89af5e1b0efefed"
                  },
                  "chainId": {
                    "type": "string",
                    "enum": [
                      "base",
                      "ethereum",
                      "arbitrum",
                      "solana"
                    ],
                    "description": "Chain to analyze the token on.",
                    "example": "base"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Token safety verdict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "riskScore": {
                      "type": "number",
                      "description": "Risk score 0-100. Lower is safer."
                    },
                    "recommendation": {
                      "type": "string",
                      "enum": [
                        "SAFE",
                        "CAUTION",
                        "AVOID"
                      ]
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "LOW",
                        "MEDIUM",
                        "HIGH"
                      ]
                    },
                    "checks": {
                      "type": "object",
                      "properties": {
                        "deployer": {
                          "type": "object",
                          "properties": {
                            "walletAgeDays": {
                              "type": "number"
                            },
                            "flag": {
                              "type": "string",
                              "enum": [
                                "CLEAN",
                                "YOUNG",
                                "NEW_WALLET",
                                "NO_HISTORY"
                              ]
                            }
                          }
                        },
                        "liquidity": {
                          "type": "object",
                          "properties": {
                            "lpLocked": {
                              "type": "boolean"
                            },
                            "lockerAddress": {
                              "type": "string",
                              "nullable": true
                            },
                            "liquidityUsd": {
                              "type": "number",
                              "nullable": true
                            },
                            "flag": {
                              "type": "string",
                              "enum": [
                                "LOCKED",
                                "UNLOCKED"
                              ]
                            }
                          }
                        },
                        "holders": {
                          "type": "object",
                          "properties": {
                            "top10Concentration": {
                              "type": "number",
                              "nullable": true
                            },
                            "flag": {
                              "type": "string",
                              "enum": [
                                "DISTRIBUTED",
                                "CONCENTRATED",
                                "UNKNOWN"
                              ]
                            }
                          }
                        }
                      }
                    },
                    "token": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "nullable": true
                        },
                        "symbol": {
                          "type": "string",
                          "nullable": true
                        },
                        "deployerAddress": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    },
                    "processingMs": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required \u2014 include PAYMENT-SIGNATURE header with valid x402 payment"
          }
        }
      }
    },
    "/verdict/lite": {
      "post": {
        "summary": "Lite token safety verdict",
        "description": "Fast pre-trade check covering deployer age and LP lock only. Sub-3s response.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "extensions": {
            "bazaar": {
              "schema": {
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "required": [
                          "contractAddress",
                          "chainId"
                        ],
                        "properties": {
                          "contractAddress": {
                            "type": "string"
                          },
                          "chainId": {
                            "type": "string",
                            "enum": [
                              "base",
                              "ethereum",
                              "arbitrum",
                              "solana"
                            ]
                          }
                        }
                      }
                    }
                  },
                  "output": {
                    "type": "object",
                    "properties": {
                      "example": {
                        "riskScore": 45,
                        "recommendation": "CAUTION",
                        "checks": {
                          "deployer": {
                            "walletAgeDays": 12,
                            "flag": "YOUNG"
                          },
                          "liquidity": {
                            "lpLocked": true,
                            "flag": "UNLOCKED"
                          }
                        },
                        "processingMs": 1800
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "contractAddress",
                  "chainId"
                ],
                "properties": {
                  "contractAddress": {
                    "type": "string",
                    "description": "Token contract address. Use 0x format for EVM chains, base58 for Solana.",
                    "example": "0x4ed4e862860bed51a9570b96d89af5e1b0efefed"
                  },
                  "chainId": {
                    "type": "string",
                    "enum": [
                      "base",
                      "ethereum",
                      "arbitrum",
                      "solana"
                    ],
                    "description": "Chain to analyze the token on.",
                    "example": "base"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Lite token safety verdict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "riskScore": {
                      "type": "number"
                    },
                    "recommendation": {
                      "type": "string",
                      "enum": [
                        "SAFE",
                        "CAUTION",
                        "AVOID"
                      ]
                    },
                    "checks": {
                      "type": "object",
                      "properties": {
                        "deployer": {
                          "type": "object",
                          "properties": {
                            "walletAgeDays": {
                              "type": "number",
                              "nullable": true
                            },
                            "flag": {
                              "type": "string"
                            }
                          }
                        },
                        "liquidity": {
                          "type": "object",
                          "properties": {
                            "lpLocked": {
                              "type": "boolean"
                            },
                            "flag": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "processingMs": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required \u2014 include PAYMENT-SIGNATURE header with valid x402 payment"
          }
        }
      }
    }
  }
}