Loading...
Loading...
Compare original and translation side by side
https://backend.cesto.cohttps://app.cesto.cohttps://backend.cesto.cohttps://app.cesto.coscripts/fetch_baskets.pyscripts/fetch_baskets.pyscripts/fetch_basket_detail.py <slug-or-name>https://app.cesto.co/baskets/<slug>scripts/fetch_basket_detail.py <slug-or-name>https://app.cesto.co/baskets/<slug>scripts/fetch_basket_detail.py <slug-or-name> --include=detail,tokensscripts/fetch_basket_detail.py <slug-or-name> --include=detail,tokensscripts/fetch_basket_detail.py <slug-or-name> --include=detail,graphscripts/fetch_basket_detail.py <slug-or-name> --include=detail,graphscripts/fetch_baskets.pyscripts/fetch_baskets.pyscripts/analyze_investment.pyscripts/analyze_investment.pyscripts/2>/dev/nullscripts/2>/dev/nullpython3 <skill-path>/scripts/session_status.py 2>/dev/null"valid""refreshed""expired"python3 <skill-path>/scripts/session_status.py 2>/dev/null"valid""refreshed""expired"python3 <skill-path>/scripts/api_request.py <METHOD> <URL> [JSON_BODY] 2>/dev/nullpython3 <skill-path>/scripts/api_request.py GET https://backend.cesto.co/tokens
python3 <skill-path>/scripts/api_request.py POST https://backend.cesto.co/cesto-labs/posts '{"title":"My Basket",...}'python3 <skill-path>/scripts/api_request.py <METHOD> <URL> [JSON_BODY] 2>/dev/nullpython3 <skill-path>/scripts/api_request.py GET https://backend.cesto.co/tokens
python3 <skill-path>/scripts/api_request.py POST https://backend.cesto.co/cesto-labs/posts '{"title":"My Basket",...}'python3 <skill-path>/scripts/start_login.py 2>/dev/null"status": "waiting""message""loginUrl"loginUrl"authenticated""timeout""expired"python3 <skill-path>/scripts/start_login.py 2>/dev/null"status": "waiting""message""loginUrl"loginUrl"authenticated""timeout""expired"| Status | Meaning | Action |
|---|---|---|
| 401 on any API call | Session expired/invalid | Try silent refresh via |
| 状态 | 含义 | 操作 |
|---|---|---|
| 任何API调用返回401 | 会话过期/无效 | 尝试通过 |
fetch_baskets.pyfetch_baskets.pypython3 <skill-path>/scripts/fetch_baskets.py [--sort=24h|7d|30d|1y] 2>/dev/nullpython3 <skill-path>/scripts/fetch_baskets.py [--sort=24h|7d|30d|1y] 2>/dev/nullfetch_basket_detail.pyfetch_basket_detail.pypython3 <skill-path>/scripts/fetch_basket_detail.py <slug-or-name> [--include=detail,tokens,graph] 2>/dev/nulldefense-mode"defense"--includepython3 <skill-path>/scripts/fetch_basket_detail.py <slug-or-name> [--include=detail,tokens,graph] 2>/dev/nulldefense-mode"defense"--includeanalyze_investment.pyanalyze_investment.pypython3 <skill-path>/scripts/analyze_investment.py [--top=5] [--sort=24h|7d|30d|1y] 2>/dev/nullpython3 <skill-path>/scripts/analyze_investment.py [--top=5] [--sort=24h|7d|30d|1y] 2>/dev/null| User's intent | Example ways they might ask | Script | Flags |
|---|---|---|---|
| See what's available | "show me all baskets", "what's on cesto?", "list everything", "what do you have?" | | (default) |
| Find top performers | "what's hot right now?", "best performing baskets", "which ones are up?", "top gainers today" | | |
| Long-term winners | "best baskets over the past year", "which basket has the highest returns?", "long term performance" | | |
| Learn about one basket | "tell me about [name]", "what's in the defense basket?", "break down [name] for me", "details on [name]" | | |
| Check specific tokens | "how are the tokens doing in [basket]?", "what coins are in [basket]?", "token breakdown for [name]" | | |
| See historical performance | "how has [basket] performed?", "show me the chart for [name]", "graph for [basket]", "performance history" | | |
| Investment decision | "which basket should I invest in?", "where should I put my money?", "what's the best investment?", "help me pick a basket", "i have $100 what should I do?", "recommend something", "what would you invest in?", "safest option?", "highest returns?" | | |
| Compare everything | "compare all baskets", "rank them all", "show me a full breakdown", "which is better, X or Y?" | | |
| General curiosity | "what's happening on cesto?", "any interesting baskets?", "what's trending?", "market overview" | | |
| 用户意图 | 示例提问 | 脚本 | 参数 |
|---|---|---|---|
| 查看可用内容 | "显示所有Basket"、"Cesto上有什么?"、"列出所有内容"、"你们有什么?" | | (默认) |
| 查找表现最佳的Basket | "现在热门的是什么?"、"表现最好的Basket"、"哪些在上涨?"、"今日涨幅最高的" | | |
| 长期表现最佳的Basket | "过去一年表现最好的Basket"、"哪个Basket回报率最高?"、"长期表现" | | |
| 了解某个Basket | "告诉我[name]的情况"、"defense Basket里有什么?"、"帮我分解[name]"、"[name]的详情" | | |
| 查看特定代币情况 | "[basket]里的代币表现如何?"、"[basket]里有哪些代币?"、"[name]的代币构成" | | |
| 查看历史表现 | "[basket]的表现如何?"、"显示[name]的图表"、"[basket]的表现图表"、"历史表现" | | |
| 投资决策建议 | "我应该投资哪个Basket?"、"我的钱应该投哪里?"、"最好的投资选择是什么?"、"帮我选一个Basket"、"我有100美元该怎么投?"、"推荐一个选项"、"你会投什么?"、"最安全的选项?"、"最高回报率?" | | |
| 对比所有Basket | "对比所有Basket"、"给它们排名"、"显示完整分解"、"X和Y哪个更好?" | | |
| 一般好奇心 | "Cesto上最近有什么动态?"、"有没有有趣的Basket?"、"现在流行什么?"、"市场概览" | | |
| # | Endpoint | Method | Auth | Description |
|---|---|---|---|---|
| 1 | | GET | No | List all supported tokens |
| 2 | | GET | No | List all baskets |
| 3 | | GET | No | Basket detail with strategy and performance |
| 4 | | GET | No | Per-token market data for a basket |
| 5 | | GET | No | Historical time series (portfolio vs S&P 500) |
| 6 | | GET | No | Cross-basket analytics summary |
| 7 | | POST | Yes | Create a Cesto Labs basket |
| 8 | | POST | Yes | Simulate portfolio historical performance |
| 序号 | 端点 | 请求方法 | 是否需要认证 | 描述 |
|---|---|---|---|---|
| 1 | | GET | 否 | 列出所有受支持的代币 |
| 2 | | GET | 否 | 列出所有Basket |
| 3 | | GET | 否 | 包含策略与表现的Basket详情 |
| 4 | | GET | 否 | 某个Basket的单一代币市场数据 |
| 5 | | GET | 否 | 历史时间序列数据(投资组合与标普500对比) |
| 6 | | GET | 否 | 跨Basket分析汇总 |
| 7 | | POST | 是 | 创建Cesto Labs Basket |
| 8 | | POST | 是 | 模拟投资组合历史表现 |
/tokens[
{
"mint": "So11111111111111111111111111111111111111112",
"symbol": "SOL",
"name": "Solana",
"logoUrl": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/So11111111111111111111111111111111111111112/logo.png"
}
]| Field | Type | Description |
|---|---|---|
| string | Solana mint address (unique identifier) |
| string | Token ticker (e.g. "SOL", "BONK") |
| string | Full token name (e.g. "Solana", "Bonk") |
| string | URL to the token's logo image |
/tokens[
{
"mint": "So11111111111111111111111111111111111111112",
"symbol": "SOL",
"name": "Solana",
"logoUrl": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/So11111111111111111111111111111111111111112/logo.png"
}
]| 字段 | 类型 | 描述 |
|---|---|---|
| 字符串 | Solana铸币地址(唯一标识符) |
| 字符串 | 代币代码(例如"SOL"、"BONK") |
| 字符串 | 代币全名(例如"Solana"、"Bonk") |
| 字符串 | 代币Logo的URL |
/cesto-labs/postsscripts/api_request.py/cesto-labs/postsscripts/api_request.py| Field | Type | Required | Rules |
|---|---|---|---|
| string | Yes | 1–100 characters |
| string | Yes | 1–1000 characters |
| boolean | Yes | Always set to |
| array | Yes | At least 1 allocation. All |
| Field | Type | Required | Rules |
|---|---|---|---|
| string | Yes | Must match a |
| string | Yes | Must match a |
| string | Yes | Must match a |
| number | Yes | 1–100, max 2 decimal places |
| string | No | From the |
| string | No | Max 200 characters |
| 字段 | 类型 | 是否必填 | 规则 |
|---|---|---|---|
| 字符串 | 是 | 1-100个字符 |
| 字符串 | 是 | 1-1000个字符 |
| 布尔值 | 是 | 必须设为 |
| 数组 | 是 | 至少包含一项分配。所有 |
| 字段 | 类型 | 是否必填 | 规则 |
|---|---|---|---|
| 字符串 | 是 | 必须与 |
| 字符串 | 是 | 必须与 |
| 字符串 | 是 | 必须与 |
| 数字 | 是 | 1-100,最多保留2位小数 |
| 字符串 | 否 | 来自 |
| 字符串 | 否 | 最多200个字符 |
{
"title": "Low Risk DeFi Powerhouse",
"description": "A conservative DeFi basket focused on established Solana protocols.",
"aiGenerateThumbnail": true,
"allocations": [
{
"mint": "So11111111111111111111111111111111111111112",
"symbol": "SOL",
"name": "Solana",
"percentage": 40,
"logoUrl": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/So11111111111111111111111111111111111111112/logo.png",
"description": "Foundation layer — most liquid and battle-tested"
}
]
}{
"title": "低风险DeFi蓝筹组合",
"description": "专注于成熟Solana协议的保守型DeFi Basket。",
"aiGenerateThumbnail": true,
"allocations": [
{
"mint": "So11111111111111111111111111111111111111112",
"symbol": "SOL",
"name": "Solana",
"percentage": 40,
"logoUrl": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/So11111111111111111111111111111111111111112/logo.png",
"description": "基础层——流动性最强且经过实战检验"
}
]
}| Field | Description |
|---|---|
| URL-friendly identifier for the basket |
| The basket title |
| The basket description as submitted |
| The token allocations as submitted |
https://app.cesto.co/labs/<slug>**[Basket Title]**
[Basket Description — the full description text the user provided]
| Token | Allocation | Rationale |
|-------|-----------|-----------|
| SOL | 40% | ... |
View your basket: https://app.cesto.co/labs/<slug>| 字段 | 描述 |
|---|---|
| Basket的URL友好标识符 |
| Basket标题 |
| 用户提交的Basket描述 |
| 用户提交的代币分配 |
https://app.cesto.co/labs/<slug>**[Basket标题]**
[用户提供的完整Basket描述]
| 代币 | 分配比例 | 投资逻辑 |
|-------|-----------|-----------|
| SOL | 40% | ... |
查看你的Basket:https://app.cesto.co/labs/<slug>/agent/simulate-graphscripts/api_request.py/agent/simulate-graphscripts/api_request.py| Field | Type | Required | Description |
|---|---|---|---|
| array | Yes | Token allocations (min 1 item) |
| string | Yes | Token symbol (e.g. "SOL", "USDC") |
| string | Yes | Solana mint address |
| number | Yes | Allocation weight/percentage |
| string | Yes | Portfolio name |
| 字段 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
| 数组 | 是 | 代币分配(至少一项) |
| 字符串 | 是 | 代币代码(例如"SOL"、"USDC") |
| 字符串 | 是 | Solana铸币地址 |
| 数字 | 是 | 分配权重/比例 |
| 字符串 | 是 | 投资组合名称 |
{
"allocations": [
{ "token": "SOL", "mint": "So11111111111111111111111111111111111111112", "weight": 50 },
{ "token": "USDC", "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "weight": 50 }
],
"name": "My Portfolio"
}{
"allocations": [
{ "token": "SOL", "mint": "So11111111111111111111111111111111111111112", "weight": 50 },
{ "token": "USDC", "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "weight": 50 }
],
"name": "我的投资组合"
}| Field | Type | Description |
|---|---|---|
| string | Always |
| string | Portfolio name from request |
| array | Daily historical simulation data |
| array | Token allocations from request |
timeSeries[]| Field | Type | Description |
|---|---|---|
| string (ISO 8601) | Date |
| number | Simulated portfolio value (starts at 1000) |
| number | S&P 500 benchmark value (starts at 1000) |
| boolean | Whether portfolio was liquidated |
| 字段 | 类型 | 描述 |
|---|---|---|
| 字符串 | 固定为 |
| 字符串 | 请求中的投资组合名称 |
| 数组 | 每日历史模拟数据 |
| 数组 | 请求中的代币分配 |
timeSeries[]| 字段 | 类型 | 描述 |
|---|---|---|
| 字符串(ISO 8601格式) | 日期 |
| 数字 | 模拟的投资组合价值(初始为1000) |
| 数字 | 标普500基准价值(初始为1000) |
| 布尔值 | 投资组合是否被清算 |
scripts/session_status.pyscripts/api_request.pyscripts/session_status.pyscripts/api_request.py| Status | Meaning | Action |
|---|---|---|
| 400 | Validation failed | Surface the API error message to the user |
| 401 | Session expired/invalid | Try silent refresh via |
| 403 | Forbidden / invalid session | User lacks permission or auth missing |
| 404 | Not found | Double-check the slug or ID |
| 状态码 | 含义 | 操作 |
|---|---|---|
| 400 | 验证失败 | 将API错误信息展示给用户 |
| 401 | 会话过期/无效 | 尝试通过 |
| 403 | 禁止访问/会话无效 | 用户无权限或缺少认证 |
| 404 | 未找到 | 再次检查slug或ID是否正确 |