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=trueAvailable endpoints
| Category | Endpoint | Method | Description |
|---|---|---|---|
| Chats | /api/assessments?list=true | GET | List saved chats |
| Chats | /api/assessments?list=true&status=completed | GET | Filter chats by status |
| Chats | /api/assessments | GET | Get the most recent chat |
| Chats | /api/assessments | POST | Create a new chat |
| Chats | /api/assessments/:id | GET | Get a specific chat |
| Chats | /api/assessments/:id | PATCH | Update messages, status, metadata, or Market Brief |
| Chats | /api/assessments/:id | DELETE | Delete a chat |
| AI & Intelligence | /api/chat | POST | Run a streaming AI market research chat |
| AI & Intelligence | /api/brief | POST | Generate a Market Brief from a topic |
| AI & Intelligence | /api/feed/discover | POST | Run feed-agent topic-driven market discovery |
| AI & Intelligence | /api/signal/analyze | POST | Run signal-agent probability-gap analysis |
| Markets | /api/search | GET | Search Polymarket markets |
| Markets | /api/orderbook | GET | Get orderbook data |
| Markets | /api/feed | GET | Rank active markets with deterministic feed screens |
| Markets | /api/bookmarks | GET, POST | List or save bookmarked markets |
| Markets | /api/bookmarks/:marketId | DELETE | Remove a bookmarked market |
| Allocator | /api/lp/allocator | POST | Run allocator recommendations from explicit market data |
| Account | /api/profile | GET, PATCH | Read or update your handle |
| Account | /api/usage | GET | Get current activity usage |
| Account | /api/tokens | GET, POST | List or create API tokens |
| Account | /api/tokens/:id | DELETE | Revoke 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"}]
}'