Polyhub Discover
Version: v0.3.8
Use this skill when the user wants public discover data from Polyhub.
Requirements
curlis available.POLYHUB_API_KEYis not required.
POLYHUB_API_BASE_URL is fixed to https://polyhub.skill-test.bedev.hubble-rpc.xyz.
Workflow
- Use the terminal to call Polyhub public APIs with
curl. - Only pass filters the user explicitly requested.
- Summarize results clearly instead of dumping raw JSON when the response is large.
- The API returns
ALL-HUBBLEas an internal tag name. Always display it as All Markets (or 全部市场) to the user.
Base Setup
BASE="https://polyhub.skill-test.bedev.hubble-rpc.xyz"
Intent Mapping
- List discover tags:
GET /api/v1/markets/tags - List traders by tag:
GET /api/v1/traders-v2/ - Look up trader stats by address:
GET /api/v1/traders/by-address - Look up market tags by condition IDs:
GET /api/v1/markets/by-condition-ids
Common Calls
List tags
curl -sS --fail-with-body "$BASE/api/v1/markets/tags"
List traders for a tag
Required params:
tagtime_range:allor30d
Optional params:
limitoffsetfilterBotssort_bysort_direction- numeric range filters such as
pnl_min,roi_min,trade_count_30_min
curl -sS --fail-with-body \
"$BASE/api/v1/traders-v2/?tag=Politics&time_range=all&limit=10&offset=0"
Guidance:
- Use
tag=CROSS-TAGwhen the user wants cross-tag discover results. - Use
time_range=30dfor recent performance. - Prefer descending sort unless the user asked otherwise.
Trader detail by address
curl -sS --fail-with-body \
"$BASE/api/v1/traders/by-address?user_id=0x1234..."
Market tag lookup by condition IDs
Validation:
idsmust be non-empty.- Limit to
200IDs per request.
curl -sS --fail-with-body \
"$BASE/api/v1/markets/by-condition-ids?ids=0xabc,0xdef"
Error Handling
400: invalid params500: backend query failed or unavailable