AGENT SKILL

polyhub_discover

Explore public discover data on Polyhub without API key auth, including tags, trader rankings, trader detail stats, and market tag lookup.

License 许可
AGPL-3.0
最近更新
2026-11-15
Stars
★ 81
Forks
17

01 前言 Front Matter

name
polyhub_discover
description
Explore public discover data on Polyhub without API key auth, including tags, trader rankings, trader detail stats, and market tag lookup.

02 资源文件 2

03 SKILL.md 正文

Polyhub Discover Skill

Version: v0.3.3

When to use

Use this skill when the user asks about:

  • Discover page tag list
  • Trader rankings on the discover page
  • Cross-tag discover queries
  • Filtering and sorting discover traders
  • Looking up a trader by address
  • Looking up market tags by condition IDs

Requirements

  • POLYHUB_API_BASE_URL — Polyhub API server base URL
  • curl must be available in the runtime environment

This skill does not require POLYHUB_API_KEY.

Safety rules

  • These are public read-only endpoints. No confirmation step is required.
  • Do not invent filter values. Only pass filters the user requested.
  • Prefer building query strings from explicit user intent.
  • When querying by address, trim whitespace and keep the original checksum/casing if provided.

Tools

Use the bash tool to call the API with curl.

Fast Path

For common intents, map user requests like this:

  • “discover 页有哪些标签” -> GET /api/v1/markets/tags
  • “看某个 tag 的 trader 排行” -> GET /api/v1/traders-v2/?tag=...
  • “跨 tag 找高手” -> GET /api/v1/traders-v2/?tag=CROSS-TAG
  • “看某个地址在各标签下的数据” -> GET /api/v1/traders/by-address?user_id=...
  • “查 condition id 对应什么标签” -> GET /api/v1/markets/by-condition-ids?ids=...

Curl base setup

BASE="${POLYHUB_API_BASE_URL%/}"

Tags

Action: List discover tags

  • GET /api/v1/markets/tags
  • Auth: public
curl -sS --fail-with-body "$BASE/api/v1/markets/tags"

Use this when the user wants the discover page tag list or wants to browse available niches first.


Trader Rankings

Action: List traders for discover

  • GET /api/v1/traders-v2/
  • Auth: public

Core query params:

  • tag — required
  • time_range — required: all or 30d
  • limit — optional, default 10, max 100
  • offset — optional, default 0
  • filterBots — optional: 0 or 1
  • sort_by — optional: volume, pnl, roi, avg_adt, trade_count_30, ev_per_bought, timing_score
  • sort_direction — optional: asc or desc

Range filter params:

  • pnl_min, pnl_max
  • volume_min, volume_max
  • roi_min, roi_max
  • avg_adt_min, avg_adt_max
  • trade_count_30_min, trade_count_30_max
  • ev_per_bought_min, ev_per_bought_max
  • timing_score_min, timing_score_max

Validation:

  • tag is required
  • time_range must be all or 30d
  • limit should be between 1 and 100
  • offset should be 0 or greater
  • filterBots should be 0 or 1

Example: standard discover query

curl -sS --fail-with-body \
  "$BASE/api/v1/traders-v2/?tag=Politics&time_range=all&limit=10&offset=0"

Example: cross-tag query

curl -sS --fail-with-body \
  "$BASE/api/v1/traders-v2/?tag=CROSS-TAG&time_range=30d&limit=20&offset=0"

Example: filtered and sorted query

curl -sS --fail-with-body \
  "$BASE/api/v1/traders-v2/?tag=Sports&time_range=30d&filterBots=1&pnl_min=1000&trade_count_30_min=30&sort_by=ev_per_bought&sort_direction=desc"

Guidance:

  • Use tag=CROSS-TAG when the user wants discover results across all tags.
  • Use time_range=30d when the user asks for recent performance.
  • Use filterBots=1 when the user explicitly wants bot filtering.
  • Prefer sort_direction=desc unless the user explicitly wants ascending order.

Trader Detail

Action: Get trader stats by address

  • GET /api/v1/traders/by-address
  • Auth: public

Required query params:

  • user_id — trader wallet address

Optional query params:

  • time_range — if supported by caller flow
curl -sS --fail-with-body \
  "$BASE/api/v1/traders/by-address?user_id=0x1234..."

Use this when the user clicks into a trader from discover and wants stats across tags.


Market Tag Lookup

Action: Get market tags by condition IDs

  • GET /api/v1/markets/by-condition-ids
  • Auth: public

Required query params:

  • ids — comma-separated condition ID list

Validation:

  • ids must not be empty
  • The backend supports up to 200 IDs per request
curl -sS --fail-with-body \
  "$BASE/api/v1/markets/by-condition-ids?ids=0xabc,0xdef"

Use this when the user wants to map market condition IDs back to discover tags.


Error handling

  • 400: Invalid query parameters such as missing tag, invalid time_range, or empty ids
  • 500: Backend query failed or service unavailable

04 同仓库更多 Skills

jiayaoqijia
jiayaoqijia/cryptoskill

troves

Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

trade

Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

staking

Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

send

Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

portfolio

View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

multi-swap

Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.

★ 81