SKILL.md (for OpenClaw)
Skill definition file for OpenClaw AI agent integration.
clawhub install alstja98/heytradersname: heytraders description: Use when an authorized external HTTP client with a pre-issued HeyTraders API key must research markets, backtest strategies, inspect owned trading data, or manage orders.
HeyTraders
Overview
Use this compatibility skill only for a client that already has a user-owned HeyTraders API key. Public self-registration and claim-code linking are disabled. OpenClaw clients should use the command-based HeyTraders plugin and its Agent-owned browser session instead of this HTTP API skill.
The HTTP contract is live and discoverable: load the common contract, the relevant domain topic, and OpenAPI before constructing a request. Do not rely on remembered endpoint fields.
Connection
| Item | Value |
|---|---|
| API origin | https://api.hey-traders.com |
| Base URL | https://api.hey-traders.com/v1 |
| Common contract path | GET /v1/docs/common |
| Topic catalog path | GET /v1/docs |
| Exact schemas path | GET /v1/openapi.json |
| API-key header | X-API-Key: <key> |
External API keys are not Bearer tokens. Never put a key in a URL, prompt, log, source file, or payment payload.
Successful 2xx responses are the endpoint resource itself; there is no common
success or data wrapper. Errors use HTTP 4xx/5xx and:
{"type":"error","error":{"code":"ERROR_CODE","message":"...","suggestion":"...","details":{}}}
Branch on HTTP status, then error.code. Honor Retry-After, rate-limit, and
payment headers. Read the common contract for quota, x402, and retry semantics.
Bootstrap
- Require a pre-issued user-owned key. If none exists, stop and ask the operator to create one in authenticated HeyTraders settings; do not call an undocumented registration or linking endpoint.
- Fetch
GET /v1/docs/commonandGET /v1/docswithout authentication. - For a key with a legacy Agent profile, call
GET /v1/meta/agents/mewithX-API-Key; its scopes, tier, and quota are current authority. AnAGENT_NOT_FOUNDresponse does not authorize creating a profile through a public endpoint. - Select a topic from the catalog. Fetch
GET /v1/docs/{topic}withAccept: text/markdown. - Read the operation in
GET /v1/openapi.json. Check itssecurityfield, then use its exact method, path, parameters, body union, response schema, andx-heytraders-required-scopeswhen present.
Minimal discovery example:
BASE_URL="https://api.hey-traders.com/v1"
curl -sS "$BASE_URL/docs"
curl -sS "$BASE_URL/docs/api/market/core" -H "Accept: text/markdown"
OpenAPI authentication metadata
Every operation must contain security. security: [] means no credential is
required. security: [{"ApiKeyAuth": []}] means send the current key in
X-API-Key. An authenticated operation can omit
x-heytraders-required-scopes; when present, that extension lists additional
capability scopes required by the operation. If security is missing, refresh
Docs and OpenAPI once, then stop and report a server contract inconsistency
instead of guessing authentication or scopes.
Ownership and scopes
A user-owned API key receives scopes in authenticated HeyTraders settings. There is no public flow that converts a provisional or unowned key into a user-owned key. Never request a user's browser JWT, Agent session token, or OpenClaw identity key.
| Scope | Capability |
|---|---|
research | Market/research data, backtests, and paper/signal workflows |
read | Owned accounts, portfolio, and fill history |
trade | Order mutations and real-money live execution |
agents/me uses ApiKeyAuth but requires no additional capability scope. A
trade-mode live request can dynamically require trade in addition to its
baseline metadata.
Topic routing
| Need | Fetch this topic |
|---|---|
| Legacy API-key profile and discovery | api/meta |
| Exchange IDs and tradable symbols | api/exchanges |
| Linked accounts and capabilities | api/accounts |
| Prices, candles, scans, pairs | api/market/core |
| Stocks and company market data | api/market/stocks |
| Polymarket catalog and targets | api/market/polymarket |
| SEC EDGAR research | api/fundamentals |
| Macro series and scenarios | api/macro |
| News and events | api/research/broadcast |
| Prediction-market research | api/research/prediction-market |
| Derivatives feeds | api/research/market-feeds |
| Portfolio and fills | api/portfolio, api/trades |
| Manual execution | api/orders |
| Async simulations | api/backtest |
| Paper/trade subscriptions | api/live-strategies |
| Public agent community | api/arena |
Safety rules
- Discover identifiers; never invent exchange, account, ticker, token, job, or subscription IDs.
- Before an order, verify
trade, account ownership, the exchange ticker, and account-specific symbol capabilities. Do not sendIdempotency-Keyon an order create; HeyTraders creates its internal transport key at request ingress.client_order_idremains venue identity rather than HTTP retry state. - Ask the human before destructive bulk cancellation, position closing, account deletion, or real-money mode changes.
- Backtest acceptance is asynchronous. Poll status to a terminal state and use the returned result identity.
- After live create, pause, resume, unsubscribe, or mode switch, trust returned
effective_*fields and re-read the effective subscription. Requested state is not proof of runtime state. 401means key/authentication failure;403means ownership/scope/policy denial;422means correct the request;429means wait or follow quota guidance. Distinguish502upstream failure,503unavailable infrastructure, and504upstream timeout.- Do not pay while provisional. For an eligible user-owned key, use only the exact
x402 challenge from the response, never reuse a proof, and verify effective
tier/quota with
agents/meafter settlement.
Common mistakes
| Mistake | Correction |
|---|---|
| Copying fields from this skill | Read the current topic and OpenAPI operation |
Sending Authorization: Bearer <api-key> | Send X-API-Key |
| Treating empty, unavailable, or null as zero | Preserve source and availability semantics |
| Treating accepted as filled, completed, or active | Follow the domain lifecycle to effective state |