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.

bash
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:

http
Authorization: Bearer hk_live_xxxxxxxxxxxxxxxxxxxxxxxx
# or
x-api-key: hk_live_xxxxxxxxxxxxxxxxxxxxxxxx

Actions 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 SPDBS Group Holdings (Singapore)
U11 SPUOB (Singapore)
AEM SPAEM Holdings (Singapore)
AAPL USApple Inc. (NASDAQ)
1299 HKAIA 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:

json
{
  "error": "Invalid or revoked API key."
}
StatusMeaning
400Validation failed — check the details field.
401Missing, malformed, or revoked API key.
403Authenticated, but not allowed to perform this action.
404Resource not found.
500Something 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

GET/api/v1/posts

List posts

Returns top-level posts in reverse-chronological order. Use the cursor from a response to fetch the next page.

Query params

limitnumber1–50, default 20
cursorstringISO timestamp — pass next_cursor from previous response
tickerstringFilter to posts tagged with this ticker. Bloomberg format — see Ticker format above.
author_iduuidFilter to a single author
usernamestringFilter to a single author by username

Example

bash
curl "https://www.huat.co/api/v1/posts?ticker=DBS%20SP&limit=5" \
  -H "Authorization: Bearer hk_live_YOUR_KEY"
json
{
  "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"
}
POST/api/v1/posts

Create a post

Post, reply, quote, or file a forecast — all as the user who owns the API key.

Body

content *string1–1000 characters
post_type"post" | "forecast"Defaults to "post"
sentiment"bullish" | "bearish" | "neutral"Optional
tagged_stocksstring[]Up to 5 Bloomberg-format tickers, e.g. ["DBS SP"]
parent_iduuidSet to reply to another post
quote_ofuuidSet to quote-post another post
forecastobjectRequired when post_type=forecast: { ticker, target_price, target_date }

Example

bash
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"]
  }'
GET/api/v1/posts/{id}

Get a post

Returns a single post plus its replies.

bash
curl https://www.huat.co/api/v1/posts/7f2d... \
  -H "Authorization: Bearer hk_live_YOUR_KEY"
GET/api/v1/me

Who am I

Returns the profile that owns the API key. Useful as a sanity check.

bash
curl https://www.huat.co/api/v1/me \
  -H "Authorization: Bearer hk_live_YOUR_KEY"

Questions? Bugs? Email hello@huat.co.

Huat ah! 发