API Reference

Create API tokens and access Hedge Layer programmatically via REST endpoints.

The Settings page lets you manage your account and create API tokens for programmatic access.

API tokens

Create personal access tokens for CLI tools and AI agents. Tokens can be used to access Hedge Layer's API endpoints programmatically:

curl -H "Authorization: Bearer <api-token>" \
  https://hedgelayer.ai/api/assessments?list=true

Available endpoints

CategoryEndpointMethodDescription
Chats/api/assessments?list=trueGETList saved chats
Chats/api/assessments?list=true&status=completedGETFilter chats by status
Chats/api/assessmentsGETGet the most recent chat
Chats/api/assessmentsPOSTCreate a new chat
Chats/api/assessments/:idGETGet a specific chat
Chats/api/assessments/:idPATCHUpdate messages, status, metadata, or Market Brief
Chats/api/assessments/:idDELETEDelete a chat
AI & Intelligence/api/chatPOSTRun a streaming AI market research chat
AI & Intelligence/api/briefPOSTGenerate a Market Brief from a topic
AI & Intelligence/api/feed/discoverPOSTRun feed-agent topic-driven market discovery
AI & Intelligence/api/signal/analyzePOSTRun signal-agent probability-gap analysis
Markets/api/searchGETSearch Polymarket markets
Markets/api/orderbookGETGet orderbook data
Markets/api/feedGETRank active markets with deterministic feed screens
Markets/api/bookmarksGET, POSTList or save bookmarked markets
Markets/api/bookmarks/:marketIdDELETERemove a bookmarked market
Allocator/api/lp/allocatorPOSTRun allocator recommendations from explicit market data
Account/api/profileGET, PATCHRead or update your handle
Account/api/usageGETGet current activity usage
Account/api/tokensGET, POSTList or create API tokens
Account/api/tokens/:idDELETERevoke an API token

Feed discovery

POST /api/feed/discover calls the Hedge Layer feed agent to discover and curate open Polymarket markets for a topic. The endpoint requires authentication, accepts topic plus optional limit and previous_discovery_context, and returns ranked markets with interest tiers and rationale. It does not estimate probabilities or place trades.

curl -X POST https://hedgelayer.ai/api/feed/discover \
  -H "Authorization: Bearer <api-token>" \
  -H "Content-Type: application/json" \
  -d '{"topic": "US interest rate cuts in 2026", "limit": 10}'

Signal analysis

POST /api/signal/analyze calls the Hedge Layer signal agent to estimate true YES probability and compare it with the current market price. The endpoint requires authentication, accepts a Polymarket url or inline market payload, and returns probability gap, signal strength, confidence, and research findings. It does not size or place trades.

curl -X POST https://hedgelayer.ai/api/signal/analyze \
  -H "Authorization: Bearer <api-token>" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://polymarket.com/event/example-market"}'

Command-line tool

Hedge Layer also has an official CLI for terminal-based workflows and scripting. See the CLI Tool guide for installation, authentication, commands, and JSON output examples.

Allocator Recommendations

POST /api/lp/allocator runs allocator recommendations from explicit candidate market data. The endpoint requires authentication, accepts up to 25 markets, and forces strategies to dry_run or paused. It returns allocator decisions, safety checks, target capital, and quote regimes without placing trades.

curl -X POST https://hedgelayer.ai/api/lp/allocator \
  -H "Authorization: Bearer <api-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "strategy": {"capital_limit": 500, "per_market_limit": 100},
    "markets": [{"slug": "example-market"}]
  }'