com um clique
polyhub-account
View portfolio stats on Polyhub using an API key.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
View portfolio stats on Polyhub using an API key.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
View Polyhub portfolio stats, fee history, and place manual orders with explicit confirmation and field validation.
Query Polyhub public discover APIs for tags, trader rankings, trader detail by address, and market tag lookup by condition IDs.
Explore public discover data on Polyhub without API key auth, including tags, trader rankings, trader detail stats, and market tag lookup.
Manage Polyhub copy-trading tasks, positions, trades, signals, sell flows, batch operations, and TPSL rules with an API key.
Manage copy-trading tasks, view signals, positions and trades on Polyhub using an API key.
| name | polyhub_account |
| description | View portfolio stats on Polyhub using an API key. |
Version: v0.3.8
Use this skill when the user asks about:
POLYHUB_API_BASE_URL is fixed to https://polyhub.skill-test.bedev.hubble-rpc.xyz.POLYHUB_API_KEY — API key (must start with phub_)curl must be available in the runtime environment.jq is strongly recommended for building JSON payloads safely.If POLYHUB_API_KEY is missing, guide the user to register and apply for one first at https://polyhub.hubble.xyz/.
Recommended guidance:
https://polyhub.hubble.xyz/Skills API Key.申请 API Key.POLYHUB_API_BASE_URL and POLYHUB_API_KEY.Suggested wording:
API key is not configured yet, so I can't check your account details for now.
Please register first on PolyHub:
https://polyhub.hubble.xyz/
After registration, click your avatar in the top-right corner and open `Skills API Key` to apply.
Send me the generated key and I'll continue right away.
POLYHUB_API_KEY in the output.jq -n instead of interpolating raw shell strings.POST /api/v1/positions/sell), repeat the token ID and confirm with the user before calling the API.Use the bash tool to call the API with curl.
For common intents, map user requests like this:
GET /api/v1/portfolio/statsPOST /api/v1/positions/sellBASE="https://polyhub.skill-test.bedev.hubble-rpc.xyz"
AUTH=(-H "Authorization: Bearer $POLYHUB_API_KEY" -H "Content-Type: application/json")
GET /api/v1/portfolio/statsReturns aggregated portfolio statistics for the authenticated user.
Current field semantics:
positionsValue: official Polymarket positions valueavailableBalance: official USDC balance minus unsettledFeestotalPnL: official Polymarket total PnLunsettledFees: unsettled Polyhub fees in USDCinvestedCapital: Polyhub-calculated invested capital for copy-task historyCurrent UI alignment in poly_copy:
USDC Balance uses availableBalanceAccount Value uses availableBalance + positionsValuecurl -sS --fail-with-body "${AUTH[@]}" "$BASE/api/v1/portfolio/stats"
POST /api/v1/positions/sellRequired field: TokenId (the Polymarket token ID of the position to sell)
Before calling: repeat the token ID to the user and confirm. This action is irreversible.
Minimum fields to ask:
TokenIdPAYLOAD="$(jq -n \
--arg TokenId "..." \
'{TokenId: $TokenId}')"
curl -sS --fail-with-body "${AUTH[@]}" -X POST "$BASE/api/v1/positions/sell" \
-d "$PAYLOAD"
Response contains:
success: whether the sell completedtotalAmount: total USDC amount receivedsoldPositions: array of sold positions, each with:
marketTitle, outcome: which market and side was soldamount: shares soldprice: execution pricecurrentPrice: market price at time of salepnl, realizedPnl, unrealizedPnl, totalPnl: PnL breakdownvalue: USDC value of the sold positionmarketUrl: link to the market on PolymarketskippedPositions: array of positions that could not be sold, each with:
marketTitle, outcome, amount: what was skippedreason: why it was skippedPresent results clearly:
✅ 卖出成功
总金额: ${totalAmount} USDC
已卖出:
- {marketTitle} ({outcome}): {amount} shares @ {price}, PnL ${totalPnl}
跳过:
- {marketTitle} ({outcome}): {reason}
POST /api/v1/positions/sell | POST /api/v1/copy-tasks/{taskId}/sell | |
|---|---|---|
| Scope | Account-level, by token ID | Task-level, by task + market |
| Partial sell | No (sells all) | Yes (amount field) |
| Required params | TokenId | taskId + marketId or conditionId |
| PnL in response | Yes (detailed breakdown) | No |
| When to use | User wants to sell a specific position directly | User wants to manage positions within a copy task |
Guidance:
/positions/sell./copy-tasks/{taskId}/sell./copy-tasks/{taskId}/sell-all.401: API key missing/invalid/expired/disabled. Ask user to check or regenerate key.400: Invalid request payload. Check required fields.404: Delegated access not registered for the given organizationId.405: Wrong HTTP method.5xx: Server error. Retry once with backoff; if still failing, report response body.