Loading...
Loading...
Compare original and translation side by side
surfnpx surf--sort-by--token-addresssurfnpx surf--sort-by--token-addresssurf install # Upgrade to latest version (if surf is already installed)
curl -fsSL https://agent.asksurf.ai/cli/releases/install.sh | sh # First-time install
export SURF_API_KEY=<your-api-key>surf installsurf install # 如果已安装surf,升级到最新版本
curl -fsSL https://agent.asksurf.ai/cli/releases/install.sh | sh # 首次安装
export SURF_API_KEY=<your-api-key>surf installsurf sync # Refresh API spec cache — always run first
surf list-operations # All available commands with params
surf list-operations | grep <domain> # Filter by domain
surf <command> --help # Full params, enums, defaults, response schemasurf sync--helpsurf sync # 刷新API规范缓存——请始终优先运行该命令
surf list-operations # 查看所有可用命令及对应参数
surf list-operations | grep <domain> # 按领域过滤命令
surf <command> --help # 查看完整参数、枚举值、默认值、返回结构surf sync--helpsurf market-price --symbol BTC -o json -f body.data
surf wallet-detail --address 0x... -o json -f body.data
surf social-user --handle vitalikbuterin -o json -f body.data-o json-f body.data-f body.data[0]-f body.data -r-f body.metasurf market-price --symbol BTC -o json -f body.data
surf wallet-detail --address 0x... -o json -f body.data
surf social-user --handle vitalikbuterin -o json -f body.data-o json-f body.data-f body.data[0]-f body.data -r-f body.meta| Need | Grep for |
|---|---|
| Prices, market cap, rankings, fear & greed | |
| Futures, options, liquidations | |
| Technical indicators (RSI, MACD, Bollinger) | |
| On-chain indicators (NUPL, SOPR) | |
| Wallet portfolio, balances, transfers | |
| DeFi positions (Aave, Compound, etc.) | |
| Twitter/X profiles, posts, followers | |
| Mindshare, sentiment, smart followers | |
| Token holders, DEX trades, unlocks | |
| Project info, DeFi TVL, protocol metrics | |
| Order books, candlesticks, funding rates | |
| VC funds, portfolios, rankings | |
| Transaction lookup, gas prices, SQL | |
| Kalshi binary markets | |
| Polymarket prediction markets | |
| Cross-platform prediction metrics | |
| News feed and articles | |
| Cross-domain entity search | |
| Fetch/parse any URL | |
| 需求 | 过滤关键词 |
|---|---|
| 价格、市值、排名、恐惧贪婪指数 | |
| 期货、期权、清算 | |
| 技术指标(RSI、MACD、布林带) | |
| 链上指标(NUPL、SOPR) | |
| 钱包资产组合、余额、转账记录 | |
| DeFi持仓(Aave、Compound等) | |
| Twitter/X个人资料、帖子、粉丝 | |
| 舆论关注度、情绪指数、聪明钱包关注者 | |
| 代币持仓地址、DEX交易、解锁计划 | |
| 项目信息、DeFi TVL、协议指标 | |
| 订单簿、K线、资金费率 | |
| VC基金、投资组合、排名 | |
| 交易查询、Gas价格、SQL查询 | |
| Kalshi二元预测市场 | |
| Polymarket预测市场 | |
| 跨平台预测市场指标 | |
| 新闻动态和文章 | |
| 跨领域实体搜索 | |
| 抓取/解析任意URL | |
--help--sort-by--from--token-address--sort_by--time-range--from--tosurf <cmd> --help--indicator rsiRSI--help-q-q--q--qethethereumsolsolanamaticpolygonavaxavalanchearbarbitrumopoptimismftmfantombnbbsconchain-sqlonchain-structured-queryecho '{"sql":"SELECT ..."}' | surf onchain-sql--rsh-*--help--help--sort-by--from--token-address--sort_by--time-range--from--tosurf <cmd> --help--indicator rsiRSI--help-q-q--q--qethethereumsolsolanamaticpolygonavaxavalanchearbarbitrumopoptimismftmfantombnbbsconchain-sqlonchain-structured-queryecho '{"sql":"SELECT ..."}' | surf onchain-sql--help--rsh-*onchain-sqlsurf catalog search "dex trades" # Find relevant tables
surf catalog show ethereum_dex_trades # Full schema, partition key, tips, sample SQL
surf catalog practices # ClickHouse query rules + entity linkingagent.agent.ethereum_dex_tradesethereum_dex_tradesSELECTWITHblock_dateonchain-sqlsurf catalog search "dex trades" # 查找相关表
surf catalog show ethereum_dex_trades # 查看完整结构、分区键、使用提示、SQL示例
surf catalog practices # ClickHouse查询规则+实体关联说明agent.agent.ethereum_dex_tradesethereum_dex_tradesSELECTWITHblock_datesurf syncsurf list-operations--sort_by--sort-byexpected value to be one of "rsi, macd, ..."--help--helperror.codesurf syncsurf list-operations--sort_by--sort-byexpected value to be one of "rsi, macd, ..."--help--helperror.codesurferror.code | | Scenario | Action |
|---|---|---|---|
| | Bad or missing key | Show no-key message (below) |
| | Free daily credits (30/day) exhausted | Show credit-exhausted message (below) |
| (no "anonymous") | Paid balance is zero | Show top-up message (below) |
| — | RPM exceeded | Briefly inform the user you're retrying, wait a few seconds, then retry once |
surferror.code | | 场景 | 处理方式 |
|---|---|---|---|
| | 密钥错误或未配置 | 展示下方的无密钥提示 |
| | 免费每日额度(30次/天)已用完 | 展示下方的免费额度耗尽提示 |
| (不含“anonymous”) | 付费额度已用完 | 展示下方的充值提示 |
| — | 超过每分钟请求频率限制 | 简要告知用户正在重试,等待几秒后重试一次 |
UNAUTHORIZEDYou don't have a Surf API key configured. Sign up and top up at https://enterprise-landing.asksurf.ai to get your API key.In the meantime, you can try a few queries on us (30 free credits/day).
SURF_API_KEYINSUFFICIENT_CREDITYou've used all your free credits for today (30/day). Sign up and top up to unlock full access:
- Go to https://enterprise-landing.asksurf.ai
- Create an account and add credits
- Copy your API key from the Dashboard
- Run:
surf auth --api-key <your-key>Let me know once you're set up and I'll pick up where we left off.
INSUFFICIENT_CREDITYour API credits have run out. Top up to continue: → https://enterprise-landing.asksurf.aiLet me know once done and I'll continue.
surf authsurf auth --api-key sk-xxx # Save API key to system keychain
surf auth # Show current auth status
surf auth --clear # Clear saved API keySURF_API_KEYAPI key saved and configured. You're all set.
UNAUTHORIZED你还没有配置Surf API密钥。可以访问https://enterprise-landing.asksurf.ai注册并充值获取API密钥。同时你可以先试用我们提供的免费额度(每天30次免费查询)。
SURF_API_KEYINSUFFICIENT_CREDIT你已经用完了今日的免费额度(每天30次)。注册并充值即可解锁全部权限:
- 访问https://enterprise-landing.asksurf.ai
- 创建账号并充值
- 从控制台复制你的API密钥
- 运行:
surf auth --api-key <your-key>配置完成后告诉我,我会继续之前的操作。
INSUFFICIENT_CREDIT你的API额度已用完,充值后即可继续使用: → https://enterprise-landing.asksurf.ai充值完成后告诉我,我会继续操作。
surf authsurf auth --api-key sk-xxx # 将API密钥保存到系统钥匙串
surf auth # 查看当前认证状态
surf auth --clear # 清除已保存的API密钥SURF_API_KEYAPI密钥已保存并配置完成,现在可以正常使用了。
Base URL: https://api.asksurf.ai/gateway/v1
Auth: Authorization: Bearer $SURF_API_KEYmarket-price → GET /market/price
social-user-posts → GET /social/user-posts
onchain-sql → POST /onchain/sqlmarketwalletsocialtokenprojectfundonchainnewsexchangesearchwebkalshipolymarketprediction-marketBase URL: https://api.asksurf.ai/gateway/v1
Auth: Authorization: Bearer $SURF_API_KEYmarket-price → GET /market/price
social-user-posts → GET /social/user-posts
onchain-sql → POST /onchain/sqlmarketwalletsocialtokenprojectfundonchainnewsexchangesearchwebkalshipolymarketprediction-market{ "data": [...items], "meta": { "credits_used": 1, "cached": false } }datametatotallimitoffsetmetahas_morenext_cursor{ "data": [...items], "meta": { "credits_used": 1, "cached": false } }datametatotallimitoffsetmetahas_morenext_cursor--help--help| Schema notation | Meaning |
|---|---|
| string |
| integer |
| float |
| boolean |
| required |
| optional |
| constrained values |
| default value |
| range constraint |
| 结构符号 | 含义 |
|---|---|
| 字符串类型 |
| 整数类型 |
| 浮点数类型 |
| 布尔类型 |
| 必填参数 |
| 可选参数 |
| 取值只能是枚举中的值 |
| 默认值 |
| 取值范围约束 |
--help--help--cursorhas_morenext_cursor--limit--offsettotal--cursorhas_morenext_cursor--limit--offsettotalmkdir -p ~/.surf/api-feedback~/.surf/api-feedback/<YYYY-MM-DD>-<slug>.mdundefinedmkdir -p ~/.surf/api-feedback~/.surf/api-feedback/<YYYY-MM-DD>-<slug>.mdundefinedsurf <command> --flagssurf <command> --flagsundefined