{"openapi":"3.1.0","info":{"title":"VektorScan x402 API","version":"1.0.0","summary":"Live multi-chain token risk intelligence & x402 USDC pay-per-request security audit API.","description":"Real-time token security audit and market liquidity intelligence for Solana, Base, and Ethereum powered by live DexScreener, GoPlus Security, and RugCheck telemetry. Supports free snapshots and HTTP 402 (x402 v2) $0.02 USDC micropayments on Base and Solana.","x-organization":"VektorZero Labs"},"servers":[{"url":"https://vektorscan-x402.vektorscan-x402.workers.dev","description":"VektorScan x402 API server"}],"tags":[{"name":"Token Intelligence","description":"Free and x402-monetized live token analysis endpoints"},{"name":"Ecosy Spend","description":"Free Edge-cached FX integer micros and recurring bill catalog endpoints for Ecosy Spend (pro.ecosy.spend)"},{"name":"Discovery","description":"Agent discovery, OpenAPI, x402 Bazaar, and documentation endpoints"},{"name":"System","description":"Service health and metadata"}],"paths":{"/api/free/token-summary":{"get":{"tags":["Token Intelligence"],"operationId":"getFreeTokenSummary","summary":"Free live token market & quick security snapshot","description":"Fetches real-time market liquidity, price, volume, holder count, and quick security hints from DexScreener, GoPlus, and RugCheck (Solana) with zero authentication.","parameters":[{"$ref":"#/components/parameters/ChainParam"},{"$ref":"#/components/parameters/AddressParam"}],"responses":{"200":{"description":"Live token summary returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreeTokenSummaryResponse"}}}},"400":{"description":"Invalid chain or malformed token address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/x402/token-audit":{"get":{"tags":["Token Intelligence"],"operationId":"getPaidTokenAudit","summary":"Full live token security audit ($0.02 USDC via x402)","description":"Returns composite 0-100 safety score, risk level, itemized risk flags, and deep contract/authority signals. Requires $0.02 USDC (20000 atomic units) settled via x402 v2 on Base (eip155:8453) or Solana (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp).","x-x402":{"version":2,"scheme":"exact","priceUsd":"$0.02","amountAtomic":"20000","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]},"parameters":[{"$ref":"#/components/parameters/ChainParam"},{"$ref":"#/components/parameters/AddressParam"},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"Base64-encoded JSON x402 v2 signed payment payload for Base or Solana USDC.","schema":{"type":"string"}},{"name":"X-PAYMENT","in":"header","required":false,"description":"Legacy x402 v1 Base64-encoded JSON payment header (accepted for backwards compatibility).","schema":{"type":"string"}}],"responses":{"200":{"description":"Payment verified and settled; full live token security audit returned.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded JSON x402 v2 settlement receipt","schema":{"type":"string"}},"X-PAYMENT-RESPONSE":{"description":"Base64-encoded JSON x402 v1 compatibility settlement receipt","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaidTokenAuditResponse"}}}},"400":{"description":"Invalid chain or malformed token address (validated before facilitator verify/settle so callers are not charged for typos).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required — returns x402 v2 payment options (Base & Solana USDC) and Bazaar discovery metadata.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded JSON copy of the x402 v2 PaymentRequired payload","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402PaymentRequiredPayload"},"example":{"x402Version":2,"error":"Payment Required: send $0.02 USDC on Base (eip155:8453) or Solana (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp) via x402 PAYMENT-SIGNATURE / X-PAYMENT header.","resource":{"url":"https://vektorscan-x402.vektorscan-x402.workers.dev/api/x402/token-audit","description":"Live multi-chain token risk intelligence & security audit (Solana, Base, Ethereum) combining DexScreener liquidity, GoPlus contract/mint security, RugCheck Solana telemetry, and 0-100 safety score.","mimeType":"application/json"},"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"20000","maxAmountRequired":"20000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x532fEE07f5c304822F62879f98f52b31d88b9200","resource":"https://vektorscan-x402.vektorscan-x402.workers.dev/api/x402/token-audit","description":"VektorScan Full Live Token Security Audit (DexScreener + GoPlus + RugCheck + Risk Score 0-100)","mimeType":"application/json","maxTimeoutSeconds":60,"extra":{"name":"USD Coin","version":"2","chainLabel":"Base Mainnet","priceUsd":"$0.02"}},{"scheme":"exact","network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","amount":"20000","maxAmountRequired":"20000","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","payTo":"FSBUruvMdWc4fHmZjTZC7B1DG9c1YWYX1PnuGq9uh2Xa","resource":"https://vektorscan-x402.vektorscan-x402.workers.dev/api/x402/token-audit","description":"VektorScan Full Live Token Security Audit (DexScreener + GoPlus + RugCheck + Risk Score 0-100)","mimeType":"application/json","maxTimeoutSeconds":60,"extra":{"name":"USD Coin","version":"1","chainLabel":"Solana Mainnet","priceUsd":"$0.02","feePayer":"CjNFTjvBhbJJd2B5ePPMHRLx1ELZpa8dwQgGL727eKww"}}],"extensions":{"bazaar":{"info":{"input":{"type":"http","method":"GET","queryParams":{"chain":"base","address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},"output":{"type":"json","example":{"service":"VektorScan x402 API","tier":"paid_x402_audit","chain":"base","address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assessment":{"safetyScore":94,"riskLevel":"LOW","flags":[]}}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"queryParams":{"type":"object","properties":{"chain":{"type":"string","enum":["solana","base","ethereum"],"description":"Target blockchain network"},"address":{"type":"string","description":"EVM 0x contract address or Solana SPL mint address"}},"required":["chain","address"]}},"required":["queryParams"]},"output":{"type":"object","properties":{"assessment":{"type":"object","properties":{"safetyScore":{"type":"number","minimum":0,"maximum":100},"riskLevel":{"type":"string","enum":["LOW","MODERATE","HIGH","CRITICAL"]},"verdict":{"type":"string"},"flags":{"type":"array"}},"required":["safetyScore","riskLevel","verdict","flags"]}}}}}}}}}}}}}},"/v1/spend/fx":{"get":{"tags":["Ecosy Spend"],"operationId":"getSpendFxRates","summary":"Live USD-based multi-currency FX rates in integer micros (Edge cached)","description":"Returns live exchange rates for 9 currencies (USD, VND, EUR, GBP, JPY, KRW, SGD, AUD, CAD) scaled as exact integer ratesMicrosPerUsd (rate * 1_000_000) with Cloudflare Edge caching (max-age=3600) and safe degraded fallback.","responses":{"200":{"description":"FX rates returned successfully (live or degraded fallback)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendFxResponse"}}}}}}},"/v1/spend/catalog":{"get":{"tags":["Ecosy Spend"],"operationId":"getSpendBillCatalog","summary":"Curated 20-service VN & International recurring bill/subscription catalog","description":"Returns 20 popular Vietnam and International recurring subscriptions and utility bills with integer minor-unit VND/USD defaults, synced with Ecosy Spend BillCatalog.","responses":{"200":{"description":"Recurring bill catalog returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendCatalogResponse"}}}}}}},"/health":{"get":{"tags":["System"],"operationId":"getHealth","summary":"Service health check","responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/":{"get":{"tags":["Discovery"],"operationId":"getServiceOverview","summary":"Service overview JSON with x402 treasury wallets and endpoint directory","responses":{"200":{"description":"Service metadata JSON","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/.well-known/x402.json":{"get":{"tags":["Discovery"],"operationId":"getBazaarManifest","summary":"x402 v2 & Bazaar discovery manifest","responses":{"200":{"description":"x402 Bazaar discovery JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402PaymentRequiredPayload"}}}}}}},"/llms.txt":{"get":{"tags":["Discovery"],"operationId":"getLlmsTxt","summary":"AI-readable API guide following the llms.txt convention","responses":{"200":{"description":"Plain-text Markdown instructions for LLMs and autonomous agents","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/openapi.json":{"get":{"tags":["Discovery"],"operationId":"getOpenApiSpec","summary":"OpenAPI 3.1 machine-readable specification","responses":{"200":{"description":"OpenAPI 3.1 JSON document","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/docs":{"get":{"tags":["Discovery"],"operationId":"getHtmlDocs","summary":"Lightweight HTML documentation page for developers and agent builders","responses":{"200":{"description":"Self-contained HTML documentation page","content":{"text/html":{"schema":{"type":"string"}}}}}}}},"components":{"parameters":{"ChainParam":{"name":"chain","in":"query","required":true,"description":"Target blockchain network","schema":{"type":"string","enum":["solana","base","ethereum"]},"example":"base"},"AddressParam":{"name":"address","in":"query","required":true,"description":"Token contract address (0x + 40 hex chars for Base/Ethereum, or Base58 SPL mint for Solana)","schema":{"type":"string","minLength":32,"maxLength":64},"example":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},"schemas":{"HealthResponse":{"type":"object","required":["status","service","version","organization","timestamp","supportedChains","x402Version"],"properties":{"status":{"type":"string","const":"ok"},"service":{"type":"string"},"version":{"type":"string"},"organization":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"supportedChains":{"type":"array","items":{"type":"string","enum":["solana","base","ethereum"]}},"x402Version":{"type":"integer","const":2},"spendEndpoints":{"type":"array","items":{"type":"string"}}}},"SpendFxResponse":{"type":"object","required":["service","base","source","updatedAt","fetchedAt","cached","degraded","currencies","ratesMicrosPerUsd","rates"],"properties":{"service":{"type":"string","const":"ecosy-spend-fx"},"base":{"type":"string","const":"USD"},"source":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"fetchedAt":{"type":"string","format":"date-time"},"cached":{"type":"boolean"},"degraded":{"type":"boolean"},"currencies":{"type":"array","items":{"type":"string"}},"ratesMicrosPerUsd":{"type":"object","additionalProperties":{"type":"integer"}},"rates":{"type":"object","additionalProperties":{"type":"number"}},"warning":{"type":"string"}}},"SpendCatalogItem":{"type":"object","required":["id","nameVi","nameEn","iconKey","categoryId","defaultVndMinor","defaultUsdMinor","cycle","commonFreeTrial","featuredOnboarding"],"properties":{"id":{"type":"string"},"nameVi":{"type":"string"},"nameEn":{"type":"string"},"iconKey":{"type":"string"},"categoryId":{"type":"string"},"defaultVndMinor":{"type":"integer"},"defaultUsdMinor":{"type":"integer"},"cycle":{"type":"string","enum":["monthly","yearly","weekly"]},"commonFreeTrial":{"type":"boolean"},"featuredOnboarding":{"type":"boolean"}}},"SpendCatalogResponse":{"type":"object","required":["service","version","updatedAt","count","currencies","items"],"properties":{"service":{"type":"string","const":"ecosy-spend-catalog"},"version":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"count":{"type":"integer"},"currencies":{"type":"array","items":{"type":"string"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/SpendCatalogItem"}}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"allowedChains":{"type":"array","items":{"type":"string"}},"address":{"type":"string"},"example":{"type":"string"}}},"ProviderFetchStatus":{"type":"object","required":["dexscreener","goplus","rugcheck"],"properties":{"dexscreener":{"type":"string","enum":["ok","empty","error"]},"goplus":{"type":"string","enum":["ok","empty","error"]},"rugcheck":{"type":"string","enum":["ok","empty","error","not_applicable"]}}},"FreeTokenSummaryResponse":{"type":"object","required":["service","tier","chain","address","fetchedAt","sources","token","market","quickSecurityHint","upgrade"],"properties":{"service":{"type":"string"},"tier":{"type":"string","const":"free_summary"},"chain":{"type":"string","enum":["solana","base","ethereum"]},"address":{"type":"string"},"fetchedAt":{"type":"string","format":"date-time"},"sources":{"$ref":"#/components/schemas/ProviderFetchStatus"},"token":{"type":"object","properties":{"name":{"type":["string","null"]},"symbol":{"type":["string","null"]},"holderCount":{"type":["integer","null"]}}},"market":{"type":"object","properties":{"priceUsd":{"type":["number","null"]},"priceChange24hPct":{"type":["number","null"]},"totalLiquidityUsd":{"type":"number"},"volume24hUsd":{"type":"number"},"fdvUsd":{"type":["number","null"]},"pairCount":{"type":"integer"},"primaryDex":{"type":["string","null"]},"dexScreenerUrl":{"type":["string","null"]}}},"quickSecurityHint":{"type":"object","additionalProperties":true},"upgrade":{"type":"object","properties":{"endpoint":{"type":"string","format":"uri"},"priceUsd":{"type":"string"},"protocol":{"type":"string"},"includes":{"type":"array","items":{"type":"string"}}}},"upstreamWarnings":{"type":"array","items":{"type":"string"}}}},"RiskFlag":{"type":"object","required":["code","severity","source","title","detail","scoreImpact"],"properties":{"code":{"type":"string"},"severity":{"type":"string","enum":["info","low","medium","high","critical"]},"source":{"type":"string","enum":["dexscreener","goplus","rugcheck"]},"title":{"type":"string"},"detail":{"type":"string"},"scoreImpact":{"type":"number"}}},"SecurityAssessment":{"type":"object","required":["safetyScore","riskLevel","verdict","flags","securitySignals"],"properties":{"safetyScore":{"type":"number","minimum":0,"maximum":100},"riskLevel":{"type":"string","enum":["LOW","MODERATE","HIGH","CRITICAL"]},"verdict":{"type":"string"},"flags":{"type":"array","items":{"$ref":"#/components/schemas/RiskFlag"}},"securitySignals":{"type":"object","additionalProperties":true}}},"PaymentReceipt":{"type":"object","required":["success","transaction","network","payer","payTo","asset","amount"],"properties":{"success":{"type":"boolean"},"transaction":{"type":["string","null"]},"network":{"type":"string"},"payer":{"type":["string","null"]},"payTo":{"type":"string"},"asset":{"type":"string"},"amount":{"type":"string"}}},"PaidTokenAuditResponse":{"type":"object","required":["service","version","tier","chain","address","fetchedAt","payment","token","assessment","market","sources"],"properties":{"service":{"type":"string"},"version":{"type":"string"},"tier":{"type":"string","const":"paid_x402_audit"},"chain":{"type":"string","enum":["solana","base","ethereum"]},"address":{"type":"string"},"fetchedAt":{"type":"string","format":"date-time"},"payment":{"$ref":"#/components/schemas/PaymentReceipt"},"token":{"type":"object","properties":{"name":{"type":["string","null"]},"symbol":{"type":["string","null"]},"totalSupply":{"type":["string","null"]}}},"assessment":{"$ref":"#/components/schemas/SecurityAssessment"},"market":{"type":"object","additionalProperties":true},"sources":{"$ref":"#/components/schemas/ProviderFetchStatus"},"upstreamWarnings":{"type":"array","items":{"type":"string"}}}},"X402PaymentRequirement":{"type":"object","required":["scheme","network","amount","maxAmountRequired","asset","payTo","resource","description","mimeType","maxTimeoutSeconds"],"properties":{"scheme":{"type":"string","const":"exact"},"network":{"type":"string"},"amount":{"type":"string"},"maxAmountRequired":{"type":"string"},"asset":{"type":"string"},"payTo":{"type":"string"},"resource":{"type":"string","format":"uri"},"description":{"type":"string"},"mimeType":{"type":"string"},"maxTimeoutSeconds":{"type":"integer"},"extra":{"type":"object","additionalProperties":true}}},"X402PaymentRequiredPayload":{"type":"object","required":["x402Version","error","resource","accepts","extensions"],"properties":{"x402Version":{"type":"integer","const":2},"error":{"type":"string"},"resource":{"type":"object","required":["url","description","mimeType"],"properties":{"url":{"type":"string","format":"uri"},"description":{"type":"string"},"mimeType":{"type":"string"}}},"accepts":{"type":"array","items":{"$ref":"#/components/schemas/X402PaymentRequirement"}},"extensions":{"type":"object","properties":{"bazaar":{"type":"object","additionalProperties":true}}}}}}}}