Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.forevex.trade/llms.txt

Use this file to discover all available pages before exploring further.

前置条件

  • Rust stable
  • (可选)Docker + Docker Compose,用于 Postgres + 常驻 API
  • (可选)PostgreSQL,用于报告缓存、raw/canonical、榜单

1. 进入项目目录

本 monorepo 中后端 crate 位于 polymarket-account-analyzer/
cd polymarket-account-analyzer
若单独克隆官方仓库,根目录即为 Polymarket-Analyzer/(与 Cargo.toml 同级)。

2. 编译

cargo build --release
可执行文件:target/release/polymarket-account-analyzer

3. 分析钱包(CLI)

# 打印到终端
cargo run --release -- analyze 0x你的钱包地址

# 写入 JSON
cargo run --release -- analyze 0x你的钱包地址 --out report.json

# 跳过 Postgres 报告缓存
cargo run --release -- analyze 0x你的钱包地址 --no-cache
使用配置文件时,必须显式传入 --config(程序不会自动读取当前目录的 config.toml):
cp config.example.toml config.toml
# 编辑后:
cargo run --release -- --config config.toml analyze 0x你的钱包地址 --out report.json

4. 启动 HTTP API

cargo run --release -- serve --bind 127.0.0.1:3000
curl -s "http://127.0.0.1:3000/analyze/0x你的钱包地址" | jq .
浏览器跨域访问需在配置中设置 cors_allowed_origins 或环境变量 PAA_CORS_ORIGINS

5. Docker Compose(可选)

docker compose up --build -d
curl -s "http://127.0.0.1:3000/analyze/0x你的钱包地址" | jq .
详细环境变量、挂载 config.docker.toml 与一次性 analyze 容器示例见仓库根目录 README

接下来

架构说明

配置与 PAA_ 变量

API 参考