Huat API · v1
Build on Huat.
Huat is API-first. Every post, forecast, and profile you see in the app is also available over HTTP. Bring your trading bot, your portfolio dashboard, your research pipeline — and plug it straight into Singapore's retail-investor community.
Quickstart
The API lives at https://www.huat.co/api/v1. All responses are JSON. All request bodies are JSON.
curl https://www.huat.co/api/v1/me \
-H "Authorization: Bearer hk_live_YOUR_KEY"Authentication
Generate a key at /settings/api. Keys start with hk_live_ and are shown only once— copy it when it's issued. Revoke anytime; revocation takes effect immediately.
Send the key on every request as either:
Authorization: Bearer hk_live_xxxxxxxxxxxxxxxxxxxxxxxx
# or
x-api-key: hk_live_xxxxxxxxxxxxxxxxxxxxxxxxActions taken with a key are attributed to the user who created it. Keep them secret — treat them like passwords.
Ticker format
Tickers are stored and filtered in Bloomberg format — ticker + space + exchange code. Examples:
| DBS SP | DBS Group Holdings (Singapore) |
| U11 SP | UOB (Singapore) |
| AEM SP | AEM Holdings (Singapore) |
| AAPL US | Apple Inc. (NASDAQ) |
| 1299 HK | AIA Group (Hong Kong) |
Yahoo-style tickers (D05.SI) and other formats are notaccepted — they'll save but won't match any posts or render a stock card. When filtering via query string, remember to URL-encode the space (DBS%20SP).
Errors
Non-2xx responses include a JSON body:
{
"error": "Invalid or revoked API key."
}| Status | Meaning |
|---|---|
| 400 | Validation failed — check the details field. |
| 401 | Missing, malformed, or revoked API key. |
| 403 | Authenticated, but not allowed to perform this action. |
| 404 | Resource not found. |
| 500 | Something went wrong on our side. |
Rate limits
Be a good citizen. Current guidance: target ~60 requests/minute per key. Hard limits may be enforced later — if you have a use case that needs more, email hello@huat.co.
Endpoints
/api/v1/postsList posts
Returns top-level posts in reverse-chronological order. Use the cursor from a response to fetch the next page.
Query params
| limit | number | 1–50, default 20 |
| cursor | string | ISO timestamp — pass next_cursor from previous response |
| ticker | string | Filter to posts tagged with this ticker. Bloomberg format — see Ticker format above. |
| author_id | uuid | Filter to a single author |
| username | string | Filter to a single author by username |
Example
curl "https://www.huat.co/api/v1/posts?ticker=DBS%20SP&limit=5" \
-H "Authorization: Bearer hk_live_YOUR_KEY"{
"posts": [
{
"id": "7f2d...",
"author_id": "a1b2...",
"content": "DBS is looking strong going into earnings.",
"post_type": "post",
"sentiment": "bullish",
"tagged_stocks": ["DBS SP"],
"created_at": "2026-04-23T14:12:00.000Z",
"author": {
"username": "raghav",
"display_name": "Raghav K.",
"avatar_url": null,
"is_verified": false
}
}
],
"next_cursor": "2026-04-23T14:12:00.000Z"
}/api/v1/postsCreate a post
Post, reply, quote, or file a forecast — all as the user who owns the API key.
Body
| content * | string | 1–1000 characters |
| post_type | "post" | "forecast" | Defaults to "post" |
| sentiment | "bullish" | "bearish" | "neutral" | Optional |
| tagged_stocks | string[] | Up to 5 Bloomberg-format tickers, e.g. ["DBS SP"] |
| parent_id | uuid | Set to reply to another post |
| quote_of | uuid | Set to quote-post another post |
| forecast | object | Required when post_type=forecast: { ticker, target_price, target_date } |
Example
curl -X POST https://www.huat.co/api/v1/posts \
-H "Authorization: Bearer hk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Taking a bullish position on DBS ahead of Q2.",
"sentiment": "bullish",
"tagged_stocks": ["DBS SP"]
}'/api/v1/posts/{id}Get a post
Returns a single post plus its replies.
curl https://www.huat.co/api/v1/posts/7f2d... \
-H "Authorization: Bearer hk_live_YOUR_KEY"/api/v1/meWho am I
Returns the profile that owns the API key. Useful as a sanity check.
curl https://www.huat.co/api/v1/me \
-H "Authorization: Bearer hk_live_YOUR_KEY"Questions? Bugs? Email hello@huat.co.
Huat ah! 发