ALPHIODeveloper console

Docs

Full API reference for the Alphio open platform.

Chat integration guide →

Getting started

Quick start
  1. 1.Create an API key in API Key. Copy it once — we hash it before storage.
  2. 2.Onboard your end users: UpsertVirtualUser CreateChatSession /openchat-steam/completions
  3. 3.Wire your SSE reader to handle submitted delta* → done events.
curl https://api.alphio.ai/v1/openapi/users \
  -H "Authorization: Bearer pk_live_••••••••••••••••••••••••••••" \
  -H "Content-Type: application/json" \
  -d '{"partner_user_ref": "u_998877"}'
Base URL & envelope
Base URL
https://api.alphio.ai
Response envelope
{ ret, msg, data }
HTTP status
Always 200 (for non-SSE). Inspect ret for the business result.
SSE
Chat completions stream as text/event-stream.

Authentication

Every request carries a Bearer API key. End-user-scoped endpoints additionally need an X-Partner-User header.

HeaderValueWhen
AuthorizationBearer pk_live_…Every request
Content-Typeapplication/jsonEvery request
X-Partner-Useryour_user_idOnly for end-user-scoped endpoints: /openchat-steam/completions + whales/following/ranking
Accepttext/event-streamSSE chat only

The value of X-Partner-User is your own user ID. The platform maps it to a stable internal_user_id like op_{partner_code}_{nanoid}. The user must first be registered via UpsertVirtualUser or chat returns ret=10404.

Errors & limits

Error codes
HTTP is always 200; check ret
retMeaningTypical cause
0OKSuccess
10400Bad requestMissing required field / type mismatch / empty message
10401UnauthenticatedMissing / wrong / expired / revoked Bearer
10403ForbiddenUser disabled / cross-user access
10404Not foundUser not registered (call UpsertVirtualUser) / bad session_id
10429Rate limitedRPM quota exceeded
10500Server errorContact support with occurred_at / chat_id
10501Insufficient balanceTop up to resume chat
Rate limits & billing

Default ceilings: 600 partner RPM · 60 per-user RPM · 8 concurrent chat streams. Negotiated on a per-plan basis.

Billing: one chat round (submit → done) deducts one billable unit. Interrupted / disconnected sessions still bill (anti-spam). failed events do not bill. Analysis, Whales, and Data endpoints are free of charge.

Virtual users

Manage end-user identities under your partner account. Virtual users are created lazily; the same partner_user_ref always maps to the same internal_user_id.

POST/v1/openapi/users
UpsertVirtualUser

Register or fetch a virtual user. Idempotent — calling repeatedly with the same partner_user_ref is safe.

Request parameters
FieldTypeRequiredDescription
partner_user_refstringyesYour own user ID for this end user.
display_namestringnoOptional, for audit/debugging.
metadatastringnoOpaque JSON string, not parsed by the platform.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataVirtualUserResponse payload.
internal_user_idstringPlatform-assigned ID. Format: "op_{partner_code}_{nanoid12}".
partner_user_refstringEchoed back.
display_namestringEchoed back.
metadatastringEchoed back (JSON string).
statusstring"active" / "disabled".
is_newbooltrue only on first creation.
created_atstringISO8601 UTC.
last_active_atstringISO8601 UTC. Empty if never used.
Example request
curl -X POST https://api.alphio.ai/v1/openapi/users \
  -H "Authorization: Bearer pk_live_••••••••••••••••••••••••••••" \
  -H "Content-Type: application/json" \
  -d '{
    "partner_user_ref": "u_998877",
    "display_name": "Alice"
  }'
Example response
{
  "ret": 0,
  "msg": "ok",
  "data": {
    "internal_user_id": "op_intellectia_qUk8CyDetjsK",
    "partner_user_ref": "u_998877",
    "display_name": "Alice",
    "metadata": "",
    "status": "active",
    "is_new": true,
    "created_at": "2026-06-09T08:02:14Z",
    "last_active_at": ""
  }
}
POST/v1/openapi/users/get
GetVirtualUser

Look up a virtual user by partner_user_ref. Response shape matches UpsertVirtualUser except is_new is always false.

Request parameters
FieldTypeRequiredDescription
partner_user_refstringyes
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataVirtualUserResponse payload.
internal_user_idstringPlatform-assigned ID. Format: "op_{partner_code}_{nanoid12}".
partner_user_refstringEchoed back.
display_namestringEchoed back.
metadatastringEchoed back (JSON string).
statusstring"active" / "disabled".
is_newbooltrue only on first creation.
created_atstringISO8601 UTC.
last_active_atstringISO8601 UTC. Empty if never used.
POST/v1/openapi/users/disable
DisableVirtualUser

Disable a virtual user. Their chat requests will return ret=10403 until re-enabled via UpsertVirtualUser.

Request parameters
FieldTypeRequiredDescription
partner_user_refstringyes
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataDisableVirtualUserDataResponse payload.
statusstringAlways "disabled".
POST/v1/openapi/users/list
ListVirtualUsers

Paginated list of your virtual users.

Request parameters
FieldTypeRequiredDescription
filterVirtualUserListFilternoOptional filters.
statusstringno"active" / "disabled" / "" (all).
created_afterstringnoISO8601 UTC.
created_beforestringnoISO8601 UTC.
pageint32no1-indexed. Default 1.
sizeint32noDefault 20, max 200.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataListVirtualUsersDataResponse payload.
itemsVirtualUser[]
internal_user_idstringPlatform-assigned ID. Format: "op_{partner_code}_{nanoid12}".
partner_user_refstringEchoed back.
display_namestringEchoed back.
metadatastringEchoed back (JSON string).
statusstring"active" / "disabled".
is_newbooltrue only on first creation.
created_atstringISO8601 UTC.
last_active_atstringISO8601 UTC. Empty if never used.
paginationPagination
pageint321-indexed.
sizeint32Items per page.
totalint64Total rows matching the filter.
has_moreboolWhether more pages exist.

Chat (SSE streaming)

Multi-turn AI chat with built-in skills (technical analysis, market data, news). Response is text/event-stream — every event is emitted as `event: NAME\ndata: JSON\n\n`. Unlike all other endpoints, the SSE stream is NOT wrapped in `{ret, msg, data}`.

POST/openchat-steam/completionsX-Partner-User required
ChatCompletions

Start a chat turn. Returns an SSE stream until done or failed.

Each delta.content is incremental — append to a client buffer. The final done event carries the full content as a sanity check.
Failed events do not bill. Submitted → done is one billable round.
Request parameters
FieldTypeRequiredDescription
chat_idstringyesYour generated unique ID for this turn, e.g. chat-{uuid}. Used for idempotency and tracing.
messagestringyesThe user's question.
metadataChatMetadatayes
session_idstringyesFrom CreateChatSession. Wrong/missing → ret=10404.
timezonestringnoIANA timezone, e.g. "Asia/Shanghai". Affects "today/yesterday" interpretation.
languagestringno"zh" / "en" / etc. Default: adaptive to user language.
Response fields
FieldTypeDescription
event: submittedSSEAcknowledgement that the request was accepted.
chat_idstringEchoed back.
statusstring"RUNNING".
user_idstringinternal_user_id resolved from X-Partner-User.
session_idstringEchoed back.
occurred_atstringISO8601 UTC.
event: statusSSEIntermediate progress.
stagestringagent_round_start / tool_call_start / model_call_start / etc.
messagestringHuman-readable status.
progressfloat0.0 – 1.0.
event: deltaSSEStreaming answer chunk.
contentstringIncremental fragment — append to a client buffer.
statusstring"RUNNING".
event: doneSSEStream complete.
contentstringFull final answer (sanity check against the joined deltas).
statusstring"SUCCESS".
progressfloat1.0.
token_usageobjectToken counters for billing visibility.
event: failedSSETerminal failure (insufficient balance, backend error, etc).
messagestringError description.
statusstring"FAILED".
Example request
curl -N -X POST https://api.alphio.ai/openchat-steam/completions \
  -H "Authorization: Bearer pk_live_••••••••••••••••••••••••••••" \
  -H "X-Partner-User: u_998877" \
  -H "Accept: text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{
    "chat_id": "chat-998877-1719283400",
    "message": "What is AAPL'\''s current RSI?",
    "metadata": {
      "session_id": "sess_ifm92XaV7gqx",
      "timezone": "America/New_York",
      "language": "en"
    }
  }'
Example response
event: submitted
data: {"chat_id":"chat-998877-1719283400","status":"RUNNING",
       "user_id":"op_intellectia_qUk8CyDetjsK","session_id":"sess_ifm92XaV7gqx",
       "occurred_at":"2026-06-09T08:18:24.77Z"}

event: status
data: {"chat_id":"...","stage":"agent_round_start",
       "status":"PROCESSING","progress":0.15,"message":"Understanding question"}

event: status
data: {"chat_id":"...","stage":"tool_call_start",
       "status":"PROCESSING","progress":0.50,"message":"Fetching technical indicators"}

event: delta
data: {"chat_id":"...","status":"RUNNING","content":"AAPL's current RSI(14) is 68,"}

event: delta
data: {"chat_id":"...","status":"RUNNING","content":" approaching the overbought zone (70)..."}

event: done
data: {"chat_id":"...","status":"SUCCESS","progress":1.0,
       "stage":"task_completed","content":"AAPL's current RSI(14) is 68, approaching..."}

Chat sessions & messages

A session groups related chat turns. History within a session is automatically injected as context.

POST/v1/openapi/chat/sessions/create
CreateChatSession
Request parameters
FieldTypeRequiredDescription
internal_user_idstringyesFrom UpsertVirtualUser.
titlestringnoDisplay title for your UI.
metadatastringnoOpaque JSON string.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataChatSessionResponse payload.
session_idstringFormat: "sess_{nanoid}".
internal_user_idstringOwner.
titlestring
metadatastringJSON string.
statusstring"active" / "deleted".
last_message_atstringISO8601 UTC. Empty for a freshly created session.
created_atstringISO8601 UTC.
updated_atstringISO8601 UTC.
POST/v1/openapi/chat/sessions/list
ListChatSessions
Request parameters
FieldTypeRequiredDescription
internal_user_idstringnoEmpty = list across all your virtual users.
statusstringno"active" / "deleted" / "" (all). Default "active".
pageint32noDefault 1.
sizeint32noDefault 20, max 200.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataListChatSessionsDataResponse payload.
itemsChatSession[]
session_idstringFormat: "sess_{nanoid}".
internal_user_idstringOwner.
titlestring
metadatastringJSON string.
statusstring"active" / "deleted".
last_message_atstringISO8601 UTC. Empty for a freshly created session.
created_atstringISO8601 UTC.
updated_atstringISO8601 UTC.
pageint321-indexed.
sizeint32Items per page.
totalint64Total rows matching the filter.
has_moreboolWhether more pages exist.
POST/v1/openapi/chat/sessions/get
GetChatSession
Request parameters
FieldTypeRequiredDescription
session_idstringyes
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataChatSessionResponse payload.
session_idstringFormat: "sess_{nanoid}".
internal_user_idstringOwner.
titlestring
metadatastringJSON string.
statusstring"active" / "deleted".
last_message_atstringISO8601 UTC. Empty for a freshly created session.
created_atstringISO8601 UTC.
updated_atstringISO8601 UTC.
POST/v1/openapi/chat/sessions/update
UpdateChatSession

Edit the title or metadata of an existing session.

Request parameters
FieldTypeRequiredDescription
session_idstringyes
titlestringnoEmpty = unchanged.
metadatastringnoEmpty = unchanged.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataChatSessionResponse payload.
session_idstringFormat: "sess_{nanoid}".
internal_user_idstringOwner.
titlestring
metadatastringJSON string.
statusstring"active" / "deleted".
last_message_atstringISO8601 UTC. Empty for a freshly created session.
created_atstringISO8601 UTC.
updated_atstringISO8601 UTC.
POST/v1/openapi/chat/sessions/delete
DeleteChatSession

Soft-delete by default. Message history remains queryable.

Request parameters
FieldTypeRequiredDescription
session_idstringyes
soft_deleteboolnoDefault true. Set false for permanent deletion.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataDeleteChatSessionDataResponse payload.
statusstring"deleted" / "hard_deleted".
POST/v1/openapi/chat/sessions/messages
ListSessionMessages

Cursor-paginated history. Order is by created_at DESC.

Request parameters
FieldTypeRequiredDescription
session_idstringyes
before_message_idstringnoCursor — pass the message_id of your current oldest message to fetch older ones.
sizeint32noDefault 50, max 200.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataListSessionMessagesDataResponse payload.
itemsChatMessage[]
message_idstringFormat: "msg_{nanoid}".
chat_idstringMatches the SSE chat_id. One chat_id usually produces 2 messages (user + assistant).
session_idstringMay be empty for session-less chat.
internal_user_idstring
rolestring"user" / "assistant".
contentstringRaw Markdown stream. May contain ```json card fences.
attachmentsChatAttachment[]
urlstringPre-signed URL. May expire.
mimestring
namestring
tool_callsChatToolCall[]
step_idstring
kindstring"round" / "tool_call".
roundint32
tool_namestring
args_jsonstringStringified tool arguments.
result_summarystring
statusstring"ok" / "error" / "running".
started_at_msint64Unix milliseconds.
ended_at_msint64Unix milliseconds.
sourcesChatSource[]
titlestring
urlstring
snippetstring
error_codestringNon-empty on terminal failure.
error_messagestring
doc_idstringChatbot's assistant doc_id.
created_atstringISO8601 UTC.
has_morebool
POST/v1/openapi/chat/messages/get
GetChatMessage
Request parameters
FieldTypeRequiredDescription
message_idstringyes
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataChatMessageResponse payload.
message_idstringFormat: "msg_{nanoid}".
chat_idstringMatches the SSE chat_id. One chat_id usually produces 2 messages (user + assistant).
session_idstringMay be empty for session-less chat.
internal_user_idstring
rolestring"user" / "assistant".
contentstringRaw Markdown stream. May contain ```json card fences.
attachmentsChatAttachment[]
urlstringPre-signed URL. May expire.
mimestring
namestring
tool_callsChatToolCall[]
step_idstring
kindstring"round" / "tool_call".
roundint32
tool_namestring
args_jsonstringStringified tool arguments.
result_summarystring
statusstring"ok" / "error" / "running".
started_at_msint64Unix milliseconds.
ended_at_msint64Unix milliseconds.
sourcesChatSource[]
titlestring
urlstring
snippetstring
error_codestringNon-empty on terminal failure.
error_messagestring
doc_idstringChatbot's assistant doc_id.
created_atstringISO8601 UTC.
POST/v1/openapi/chat/messages/rate
RateChatMessage

Up/down vote an assistant reply. Only valid for role=assistant messages.

Request parameters
FieldTypeRequiredDescription
message_idstringyes
ratingstringyes"up" or "down".
notestringnoOptional user note.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataRateChatMessageDataResponse payload.
message_idstringEchoed back.
ratingstringEchoed back.
created_atstringISO8601 UTC.
POST/v1/openapi/chat/recommend-questions
ChatRecommendQuestions

Suggested starter questions for your chat entry screen, regenerated daily from a digest of recent market news. Served from cache — this endpoint never invokes an LLM and is not billed. Each call returns a fresh random subset, so repeated calls give your UI variety.

Not billed and no X-Partner-User required.
An empty questions array with ret=0 means the daily batch is not available yet (or expired) — hide the suggestions UI rather than treating it as an error.
Request parameters
FieldTypeRequiredDescription
langstringnoLanguage tag: "en" / "en-us", "zh" / "zh-cn" / "zh-hans", "zh-tw" / "zh-hant" / "zh-hk". Case-insensitive. Empty or unrecognized falls back to "en".
countint32noMax questions to return. Default 10, max 50.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataChatRecommendQuestionsDataResponse payload.
questionsstring[]Randomly ordered subset of the day's batch.
langstringLanguage actually served after normalization/fallback: "en" / "zh-cn" / "zh-tw".
generated_atint64Unix seconds when the batch was generated.
Example request
curl -X POST https://api.alphio.ai/v1/openapi/chat/recommend-questions \
  -H "Authorization: Bearer pk_live_••••••••••••••••••••••••••••" \
  -H "Content-Type: application/json" \
  -d '{
    "lang": "en",
    "count": 3
  }'
Example response
{
  "ret": 0,
  "msg": "ok",
  "data": {
    "questions": [
      "How could the latest Fed commentary affect rate-cut expectations this summer?",
      "Is NVDA's pullback after earnings a buying opportunity?",
      "What is driving the rally in gold prices this week?"
    ],
    "lang": "en",
    "generated_at": 1781136000
  }
}

Pivot point

Pivot point / support-resistance signals.

POST/v1/openapi/analysis/pivot-point/info
PivotPointInfo

Returns every 神奇九转 + RSI(6) pivot signal (DIP / ALERT) the algorithm fired within the look-back window (default: trailing 1 year of daily bars; override with from/to). Computed server-side from datafabric kline (US / HK / crypto all supported); cached for 5 minutes. Empty `data.list` with `ret=0` means no signal in the window — distinct from a real error.

Request parameters
FieldTypeRequiredDescription
codestringyesTicker, e.g. "AAPL", "00700", "BTC". Case-insensitive; uppercased server-side.
asset_typeint32yes0=stock, 1=etf, 2=crypto.
localestringnoMarket the ticker belongs to: "US", "HK", "FOREX", "METAL". Case-insensitive; uppercased server-side. Empty defaults to "US". Crypto (asset_type=2) keeps the field for shape consistency but it's inert.
fromstringnoWindow start, YYYY-MM-DD (UTC, inclusive). Must be set together with to. The algorithm runs on exactly the [from, to] bars with no warmup preload — the signal math is window-sensitive (RSI warmup, TD-9 counts, FILTER suppression), so to reproduce the App chart's markers pass exactly the bar range the chart has loaded. Both empty = trailing 1 year.
tostringnoWindow end, YYYY-MM-DD (UTC, inclusive). Must be set together with from. Max span 5 years. Windows shorter than 30 bars return "insufficient kline history".
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataAnalysisPivotPointInfoDataResponse payload.
listAnalysisPivotAlertInfo[]Filtered signals in CHRONOLOGICAL ASCENDING order. Empty when no signal fired in the look-back window. For the latest signal, take list[list.length-1].
datestringSignal date, YYYY-MM-DD (UTC).
codestringEchoed ticker, uppercased.
signstring"DIP" (bullish reversal) or "ALERT" (bearish reversal).
markstring"Buy Signal" / "Sell Signal" — human-readable label.
pricestringDisplay price with 4-decimal precision. DIP = low × 0.98 (paint below the bar); ALERT = high × 1.03 (paint above).
tsint64Signal timestamp, unix seconds.
Example request
POST https://api.alphio.ai/v1/openapi/analysis/pivot-point/info
{ "code": "AAPL", "asset_type": 0, "locale": "US", "from": "2026-01-01", "to": "2026-07-28" }
Example response
{
  "ret": 0, "msg": "ok",
  "data": {
    "list": [
      {
        "date": "2026-02-09", "code": "AAPL",
        "sign": "ALERT", "mark": "Sell Signal",
        "price": "286.5460", "ts": 1770613200
      },
      {
        "date": "2026-06-09", "code": "AAPL",
        "sign": "DIP", "mark": "Buy Signal",
        "price": "291.7340", "ts": 1781007137
      }
    ]
  }
}
POST/v1/openapi/analysis/pivot-point/signals
PivotPointSignals

Bulk scan / signal screener.

Request parameters
FieldTypeRequiredDescription
signal_typeint32yes0=all, 1=bottom (dip / bottom-reversal), 2=alert (top warning).
pageint32no1-indexed.
page_sizeint32noItems per page.
asset_typestringnoNumeric string: "0"=stock, "1"=etf, "2"=crypto. Empty = all.
periodint32no0=all, 1=15min, 2=30min, 3=1h, 4=2h, 5=4h.
sort_fieldint32no0=timestamp, 2=volume (1=market_cap is deprecated).
orderstringno"asc" (default) / "desc".
first_idstringnoForward cursor.
last_idstringnoBackward cursor.
refreshboolnoForce-bust cache.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataAnalysisPivotPointSignalsDataResponse payload.
signalsAnalysisDayTradingSignal[]
symbolstring
codestring
namestringCompany name.
logostring
pricestring
change_ratiostring
timestampint64Unix seconds.
signal_typesint32[]Active signal labels.
periodint32
klinesAnalysisKlinePoint[]OHLCV + technicals.
opendouble
highdouble
lowdouble
closedouble
volumedouble
timestampint64Unix seconds.
ma5double
ma20double
rsi6double
macddouble
macd_signaldouble
macd_histdouble
asset_typeint32
volumestring
idstringStable row ID for cursor pagination.
prev_closestring
totalint64Total rows matching the filter.
new_addint64Rows newly added since last query.

Swingmax

Swing-trade signals.

POST/v1/openapi/analysis/swingmax/signals
SwingmaxSignals

Query open swingmax signals for the given tickers. Returns the SAME rich item shape as /swingmax/stocks (AnalysisSwingmaxStock — with kline, company name/logo, the r1/r2/r3 target ladder, stop loss). Ladder field names match the App swing-max/list payload one-to-one.

The status field is localized. A "lang" BODY PARAM takes priority when set; otherwise the "lang" REQUEST HEADER is used: omit both for English, "zh" / "zh-cn" for Simplified Chinese, "zh-tw" for Traditional Chinese. Every other field (prices, timestamps) is language-independent.
Request parameters
FieldTypeRequiredDescription
tickersAnalysisAsset[]yesTickers to query.
asset_typeint32no0=stock, 1=etf, 2=crypto.
symbolstringnoLegacy field.
tickerstringnoPreferred field.
localestringno"US" / "HK".
langstringnoLocalizes the status text. When set it takes PRIORITY over the "lang" request header: "zh" / "zh-cn" = Simplified Chinese, "zh-tw" = Traditional Chinese. Omit/empty to fall back to the header (English by default).
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataAnalysisSwingmaxSignalsDataResponse payload.
signalsAnalysisSwingmaxStock[]Same item shape as /swingmax/stocks — one entry per matched open ticker.
symbolstring
codestring
company_namestring
logostring
returndoubleRealized return since entry, percent. Weighted over the ladder: 40% sold at Target 2 + 30% sold at Target 3 + the remaining 30% at final exit (unsold parts marked to the latest close).
entry_pricedouble
exit_pricedoubleFinal-exit fill price for the remaining position. 0 while the position is open.
entry_timestringEntry date string from upstream, e.g. "2026-06-02".
exit_timestringExit date string; empty while the position is open.
change_ratiodouble
klineAnalysisKlinePointV2[]Snapshot bars with full OHLC + volume — enough to draw candlesticks.
closedouble
timestampint64Unix seconds.
opendouble
highdouble
lowdouble
volumedouble
entry_time_tsint64Unix seconds.
exit_time_tsint64Unix seconds; 0 while open.
target_pricestringLegacy alias of r2_price (Target 2), kept for backward compatibility — prefer the r1/r2/r3_price ladder.
stop_lossstringStop-loss price. The whole remaining position exits if it is hit.
intervalint32Signal timeframe: 0=1d, 1=15min, 2=30min, 3=1h, 4=2h, 5=4h.
sideint320=long, 1=short.
market_capstring
current_pricestring
r1_pricestringTarget 1 price — the first (lowest) pivot level above entry. A price milestone only: no partial sell is executed at R1.
r1_signal_tsint64Reserved for shape parity with the App swing-max/list; always 0 on this stock feed (only the crypto pipeline fills R1 triggers).
r2_pricestringTarget 2 price. When first reached, the strategy sells 40% of the position. Same value as the legacy target_price.
r2_signal_tsint64Unix seconds when the price first reached Target 2 (40% partial exit executed); 0 if not reached yet.
r2_sell_pricestringFill price of the 40% partial exit at Target 2; empty if not reached yet.
r3_pricestringTarget 3 price — the highest ladder level. When first reached, the strategy sells another 30% of the position.
r3_signal_tsint64Unix seconds when the price first reached Target 3 (30% partial exit executed); 0 if not reached yet.
r3_sell_pricestringFill price of the 30% partial exit at Target 3; empty if not reached yet.
statusstringServer-rendered progress narrative (entry → 40% partial exit at Target 2 → 30% at Target 3 → final close) — same text the App shows on swing-max/list. Localized by the "lang" body param (priority) or "lang" request header: omit both for English, "zh" / "zh-cn" = Simplified Chinese, "zh-tw" = Traditional Chinese. Empty on the closed list (stype≠1).
Example request
POST https://api.alphio.ai/v1/openapi/analysis/swingmax/signals
Authorization: Bearer pk_live_••••••••••••••••••••••••••••
{
  "tickers":[
    {"asset_type":0,"ticker":"AAPL","locale":"US"},
    {"asset_type":0,"ticker":"NVDA","locale":"US"}
  ],
  "lang":"zh-tw"
}
Example response
{
  "ret": 0,
  "msg": "ok",
  "data": {
    "signals":[
      {"symbol":"AAPL","code":"AAPL.O","company_name":"Apple Inc","logo":"https://...",
       "return":3.21,"entry_price":187.2,"exit_price":0,"entry_time":"2026-06-02","exit_time":"",
       "change_ratio":3.21,
       "kline":[{"close":190.5,"timestamp":1717286400,"open":188.9,"high":191.2,"low":188.1,"volume":51234567}],
       "entry_time_ts":1717286400,"exit_time_ts":0,"target_price":"210.5","stop_loss":"177.84",
       "interval":0,"side":0,"market_cap":"2.9T","current_price":"193.1",
       "r1_price":"198.6","r1_signal_ts":0,
       "r2_price":"210.5","r2_signal_ts":1719878400,"r2_sell_price":"211.02",
       "r3_price":"224.9","r3_signal_ts":0,"r3_sell_price":"",
       "status":"Booked partial profits @211.02 on 2026-07-01 09:35 ET and riding runners"}
    ]
  }
}
POST/v1/openapi/analysis/swingmax/stocks
SwingmaxStocks

Browse the supported universe. NOTE: only stype=1 returns the OPEN positions pool; any other value returns the removed/closed list. The r1/r2/r3 ladder fields are only filled for stype=1 — the closed list comes from an older store without ladder data, so they are empty/0 there.

The status field is localized. A "lang" BODY PARAM takes priority when set; otherwise the "lang" REQUEST HEADER is used: omit both for English, "zh" / "zh-cn" for Simplified Chinese, "zh-tw" for Traditional Chinese. Every other field (prices, timestamps) is language-independent.
Request parameters
FieldTypeRequiredDescription
stypeint32yesGetSwingMaxStocksType. 1=open pool, 2=removed(closed), 3=today, 4=today-open, 5=today-update. Only stype=1 = open pool.
sort_typeint32no1=latest, 2=oldest, 3=highest return, 4=lowest return, 5=latest exit, 6=oldest exit, 7=latest entry, 8=oldest entry, 9=highest market cap, 10=lowest market cap, 11=highest potential.
pageint64no1-indexed.
sizeint32noItems per page.
keywordstringnoKeyword search.
sideint32no0=long, 1=short.
trade_statusint32no0=not traded, 1=traded, 2=all.
langstringnoLocalizes the status text. When set it takes PRIORITY over the "lang" request header: "zh" / "zh-cn" = Simplified Chinese, "zh-tw" = Traditional Chinese. Omit/empty to fall back to the header (English by default).
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataAnalysisSwingmaxStocksDataResponse payload.
stocksAnalysisSwingmaxStock[]
symbolstring
codestring
company_namestring
logostring
returndoubleRealized return since entry, percent. Weighted over the ladder: 40% sold at Target 2 + 30% sold at Target 3 + the remaining 30% at final exit (unsold parts marked to the latest close).
entry_pricedouble
exit_pricedoubleFinal-exit fill price for the remaining position. 0 while the position is open.
entry_timestringEntry date string from upstream, e.g. "2026-06-02".
exit_timestringExit date string; empty while the position is open.
change_ratiodouble
klineAnalysisKlinePointV2[]Snapshot bars with full OHLC + volume — enough to draw candlesticks.
closedouble
timestampint64Unix seconds.
opendouble
highdouble
lowdouble
volumedouble
entry_time_tsint64Unix seconds.
exit_time_tsint64Unix seconds; 0 while open.
target_pricestringLegacy alias of r2_price (Target 2), kept for backward compatibility — prefer the r1/r2/r3_price ladder.
stop_lossstringStop-loss price. The whole remaining position exits if it is hit.
intervalint32Signal timeframe: 0=1d, 1=15min, 2=30min, 3=1h, 4=2h, 5=4h.
sideint320=long, 1=short.
market_capstring
current_pricestring
r1_pricestringTarget 1 price — the first (lowest) pivot level above entry. A price milestone only: no partial sell is executed at R1.
r1_signal_tsint64Reserved for shape parity with the App swing-max/list; always 0 on this stock feed (only the crypto pipeline fills R1 triggers).
r2_pricestringTarget 2 price. When first reached, the strategy sells 40% of the position. Same value as the legacy target_price.
r2_signal_tsint64Unix seconds when the price first reached Target 2 (40% partial exit executed); 0 if not reached yet.
r2_sell_pricestringFill price of the 40% partial exit at Target 2; empty if not reached yet.
r3_pricestringTarget 3 price — the highest ladder level. When first reached, the strategy sells another 30% of the position.
r3_signal_tsint64Unix seconds when the price first reached Target 3 (30% partial exit executed); 0 if not reached yet.
r3_sell_pricestringFill price of the 30% partial exit at Target 3; empty if not reached yet.
statusstringServer-rendered progress narrative (entry → 40% partial exit at Target 2 → 30% at Target 3 → final close) — same text the App shows on swing-max/list. Localized by the "lang" body param (priority) or "lang" request header: omit both for English, "zh" / "zh-cn" = Simplified Chinese, "zh-tw" = Traditional Chinese. Empty on the closed list (stype≠1).
totalint32
POST/v1/openapi/analysis/swingmax/open
SwingmaxOpen

Return ALL currently-open positions in a single call (no pagination). Static signals only — no kline, no realtime return, no company name/logo. Cheap, cached ~1 minute.

Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataAnalysisSwingmaxOpenDataResponse payload.
positionsAnalysisSwingmaxOpenPosition[]Every currently-open position.
symbolstring
codestring
buy_pricestringEntry / Buy Target.
stop_lossstring
target1stringSell Target 1 (r2).
target2stringSell Target 2 (r3).
potential_gaindoubleStatic: (r3/buy - 1) * 100, percent.
signal_timeint64Entry time, unix seconds.
last_exit_tsint64Exit time, unix seconds; 0 when open.
totalint32
Example request
POST https://api.alphio.ai/v1/openapi/analysis/swingmax/open
{}
Example response
{
  "ret": 0,
  "msg": "ok",
  "data": {
    "positions":[
      {"symbol":"GME","code":"GME.N","buy_price":"21.715","stop_loss":"20.629",
       "target1":"24.252","target2":"28.152","potential_gain":29.6,
       "signal_time":1647388800,"last_exit_ts":0}
    ],
    "total": 1
  }
}

Whales tracker

Endpoints tracking institutional (13F) and Congressional holdings. entity_type: 1=institution, 2=congress member. seo_name is the stable partner-facing identifier. All return/chart values are decimal fractions (0.012 = +1.2%). Rankings are cached ~10s server-side.

POST/v1/openapi/whales/top-returns
TopReturns

Institutions ranked by the chosen period's return, descending. Institutions only — for congress members use Ranking with entity_type=2.

Request parameters
FieldTypeRequiredDescription
periodstringyes"1d" / "1w" / "1m" / "3m" / "1y".
limitint32yes1 – 50.
includestringnoComma-separated: "chart" (equity curve) / "holdings" (top_holdings ≤2 tickers + holding_count) / "performance" (sharpe_ratio + mdd) / "returns" (return_1d / return_1w / return_1m / return_1y). Empty = base fields only.
keywordstringnoFuzzy entity-name filter (matches names containing the keyword). Empty = no filtering.
sortstringno"<field>:<asc|desc>", one field at a time. Fields: total_return (the requested period's return), sharpe_ratio, return_1d, return_1w, return_1m, return_1y, mdd. Empty = period return, descending. Sorting works regardless of include — include only controls which fields are returned.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataWhalesTopReturnsDataResponse payload.
entitiesWhalesEntity[]Ranked by return_value descending by default; sort overrides the order.
namestringEntity display name.
actionstringCurrently always "Holding" on ranking endpoints; empty on FollowingRanking.
return_valuedoubleReturn for the requested period, decimal fraction (0.618 = +61.8%). TopReturnsByAsset always uses the 3m return.
top_holdingsWhalesHolding[]Largest positions, tickers only. Only populated when include contains holdings (capped at 2-3 tickers).
tickerstringTicker symbol.
holding_countint32Number of positions in the latest filing. 0 unless include contains holdings.
chartWhalesChartPoint[]Equity-curve points. Only populated when include contains chart.
datestringYYYY-MM-DD.
valuedoubleCumulative return since tracking began, decimal fraction (0.618 = +61.8%).
avatarstringCDN avatar URL.
entity_typeint321=institution, 2=congress.
seo_namestringStable slug — the partner-facing identifier, feed it to DetailsBySeoName.
sharpe_ratiodoubleSharpe ratio of the tracked portfolio. Only populated when include contains performance.
mdddoubleMaximum drawdown, computed from the equity curve. Positive decimal fraction (0.2 = 20% drawdown). Only populated when include contains performance.
return_1ddouble1-day return, decimal fraction (0.012 = +1.2%). Only populated when include contains returns.
return_1wdouble1-week return, decimal fraction. Only populated when include contains returns.
return_1mdouble1-month return, decimal fraction. Only populated when include contains returns.
return_1ydouble1-year return, decimal fraction. Only populated when include contains returns.
POST/v1/openapi/whales/ranking
Ranking

Ranking filtered by entity_type. Query one period (period → data.entities) or up to 4 at once (periods → data.period_groups).

top_holdings is always empty on this endpoint for partner API calls.
Sending both period and periods returns an InvalidArgument error.
Request parameters
FieldTypeRequiredDescription
periodstringnoSingle-period query: "1d" / "1w" / "1m" / "3m" / "1y". Exactly one of period / periods must be set.
periodsstring[]noMulti-period query: up to 4 unique values from the same set. Response returns one period_groups entry per requested period, in request order.
limitint32yes1 – 50 (applies to each period's list).
includestringnoComma-separated: "chart" (mini equity curve per entity) / "performance" (sharpe_ratio + mdd) / "returns" (return_1d / return_1w / return_1m / return_1y).
entity_typeWhalesEntityTypeyesINSTITUTION (1) / CONGRESS (2).
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataWhalesRankingDataResponse payload.
entitiesWhalesEntity[]Populated for single-period requests.
namestringEntity display name.
actionstringCurrently always "Holding" on ranking endpoints; empty on FollowingRanking.
return_valuedoubleReturn for the requested period, decimal fraction (0.618 = +61.8%). TopReturnsByAsset always uses the 3m return.
top_holdingsWhalesHolding[]Largest positions, tickers only. Only populated when include contains holdings (capped at 2-3 tickers).
tickerstringTicker symbol.
holding_countint32Number of positions in the latest filing. 0 unless include contains holdings.
chartWhalesChartPoint[]Equity-curve points. Only populated when include contains chart.
datestringYYYY-MM-DD.
valuedoubleCumulative return since tracking began, decimal fraction (0.618 = +61.8%).
avatarstringCDN avatar URL.
entity_typeint321=institution, 2=congress.
seo_namestringStable slug — the partner-facing identifier, feed it to DetailsBySeoName.
sharpe_ratiodoubleSharpe ratio of the tracked portfolio. Only populated when include contains performance.
mdddoubleMaximum drawdown, computed from the equity curve. Positive decimal fraction (0.2 = 20% drawdown). Only populated when include contains performance.
return_1ddouble1-day return, decimal fraction (0.012 = +1.2%). Only populated when include contains returns.
return_1wdouble1-week return, decimal fraction. Only populated when include contains returns.
return_1mdouble1-month return, decimal fraction. Only populated when include contains returns.
return_1ydouble1-year return, decimal fraction. Only populated when include contains returns.
period_groupsWhalesRankingPeriodGroup[]Populated for multi-period requests, in the same order as req.periods.
periodstringThe requested period this group belongs to.
entitiesWhalesEntity[]Ranking list for this period.
namestringEntity display name.
actionstringCurrently always "Holding" on ranking endpoints; empty on FollowingRanking.
return_valuedoubleReturn for the requested period, decimal fraction (0.618 = +61.8%). TopReturnsByAsset always uses the 3m return.
top_holdingsWhalesHolding[]Largest positions, tickers only. Only populated when include contains holdings (capped at 2-3 tickers).
tickerstringTicker symbol.
holding_countint32Number of positions in the latest filing. 0 unless include contains holdings.
chartWhalesChartPoint[]Equity-curve points. Only populated when include contains chart.
datestringYYYY-MM-DD.
valuedoubleCumulative return since tracking began, decimal fraction (0.618 = +61.8%).
avatarstringCDN avatar URL.
entity_typeint321=institution, 2=congress.
seo_namestringStable slug — the partner-facing identifier, feed it to DetailsBySeoName.
sharpe_ratiodoubleSharpe ratio of the tracked portfolio. Only populated when include contains performance.
mdddoubleMaximum drawdown, computed from the equity curve. Positive decimal fraction (0.2 = 20% drawdown). Only populated when include contains performance.
return_1ddouble1-day return, decimal fraction (0.012 = +1.2%). Only populated when include contains returns.
return_1wdouble1-week return, decimal fraction. Only populated when include contains returns.
return_1mdouble1-month return, decimal fraction. Only populated when include contains returns.
return_1ydouble1-year return, decimal fraction. Only populated when include contains returns.
POST/v1/openapi/whales/top-returns-by-asset
TopReturnsByAsset

Reverse-lookup: institutions currently holding a specific ticker, ranked by their 3-month return (descending). return_value is always the 3m return.

Request parameters
FieldTypeRequiredDescription
assetWhalesAssetyesThe ticker to look up.
asset_typeint32no0=stock, 1=etf.
tickerstringyesTicker symbol, e.g. "AAPL".
localestringno"US" (default) / "HK".
includestringnoComma-separated: "chart" / "holdings" / "performance" / "returns". With holdings, the queried ticker is guaranteed to appear in top_holdings.
limitint32noDefaults to 6 when omitted.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataWhalesTopReturnsDataResponse payload.
entitiesWhalesEntity[]Ranked by 3m return, descending.
namestringEntity display name.
actionstringCurrently always "Holding" on ranking endpoints; empty on FollowingRanking.
return_valuedoubleReturn for the requested period, decimal fraction (0.618 = +61.8%). TopReturnsByAsset always uses the 3m return.
top_holdingsWhalesHolding[]Largest positions, tickers only. Only populated when include contains holdings (capped at 2-3 tickers).
tickerstringTicker symbol.
holding_countint32Number of positions in the latest filing. 0 unless include contains holdings.
chartWhalesChartPoint[]Equity-curve points. Only populated when include contains chart.
datestringYYYY-MM-DD.
valuedoubleCumulative return since tracking began, decimal fraction (0.618 = +61.8%).
avatarstringCDN avatar URL.
entity_typeint321=institution, 2=congress.
seo_namestringStable slug — the partner-facing identifier, feed it to DetailsBySeoName.
sharpe_ratiodoubleSharpe ratio of the tracked portfolio. Only populated when include contains performance.
mdddoubleMaximum drawdown, computed from the equity curve. Positive decimal fraction (0.2 = 20% drawdown). Only populated when include contains performance.
return_1ddouble1-day return, decimal fraction (0.012 = +1.2%). Only populated when include contains returns.
return_1wdouble1-week return, decimal fraction. Only populated when include contains returns.
return_1mdouble1-month return, decimal fraction. Only populated when include contains returns.
return_1ydouble1-year return, decimal fraction. Only populated when include contains returns.
POST/v1/openapi/whales/following/rankingX-Partner-User required
FollowingRanking

Ranks the entities the calling user follows (their watchlist) by the chosen period's return, descending. Requires X-Partner-User, like the watchlist endpoints.

A user's first-ever call auto-seeds their watchlist with the featured entities from Home.
Request parameters
FieldTypeRequiredDescription
periodstringyes"1d" / "1w" / "1m" / "3m" / "1y".
limitint32yes1 – 50. Truncates the sorted list.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataWhalesFollowingRankingDataResponse payload.
entitiesWhalesEntity[]Only name, return_value, avatar, entity_type and seo_name are populated here — no action / top_holdings / holding_count / chart / performance metrics.
namestringEntity display name.
actionstringCurrently always "Holding" on ranking endpoints; empty on FollowingRanking.
return_valuedoubleReturn for the requested period, decimal fraction (0.618 = +61.8%). TopReturnsByAsset always uses the 3m return.
top_holdingsWhalesHolding[]Largest positions, tickers only. Only populated when include contains holdings (capped at 2-3 tickers).
tickerstringTicker symbol.
holding_countint32Number of positions in the latest filing. 0 unless include contains holdings.
chartWhalesChartPoint[]Equity-curve points. Only populated when include contains chart.
datestringYYYY-MM-DD.
valuedoubleCumulative return since tracking began, decimal fraction (0.618 = +61.8%).
avatarstringCDN avatar URL.
entity_typeint321=institution, 2=congress.
seo_namestringStable slug — the partner-facing identifier, feed it to DetailsBySeoName.
sharpe_ratiodoubleSharpe ratio of the tracked portfolio. Only populated when include contains performance.
mdddoubleMaximum drawdown, computed from the equity curve. Positive decimal fraction (0.2 = 20% drawdown). Only populated when include contains performance.
return_1ddouble1-day return, decimal fraction (0.012 = +1.2%). Only populated when include contains returns.
return_1wdouble1-week return, decimal fraction. Only populated when include contains returns.
return_1mdouble1-month return, decimal fraction. Only populated when include contains returns.
return_1ydouble1-year return, decimal fraction. Only populated when include contains returns.
POST/v1/openapi/whales/details
Details

Full entity detail by id (from any ranking response).

Request parameters
FieldTypeRequiredDescription
idint32yes≥ 1.
includestringnoComma-separated: "chart" (equity curves), "trade_update" (recent trades + last_updated), "current_holdings" (sector distribution). Base fields and positions are always returned.
entity_typeWhalesEntityTypeyesINSTITUTION (1) / CONGRESS (2).
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataWhalesEntityDetailsResponse payload.
namestringEntity display name.
is_watchedboolWhether the requesting user watches this entity. Always false on partner API calls — no user context is forwarded on this endpoint.
top20_holding_mvint64Aggregate market value (USD) of the entity's 20 largest positions, per the latest filing.
last_updatedstringDate (YYYY-MM-DD) of the most recent reported portfolio change. Only populated when include contains trade_update.
holding_countint32Number of positions currently held.
descriptionstringShort text description of the entity.
performanceWhalesPerformanceTracked-portfolio performance stats. Returns are decimal fractions (0.012 = +1.2%).
return_1ddoubleLatest 1-day return, decimal fraction.
sharpe_ratiodoubleSharpe ratio of the tracked portfolio.
total_returndoubleCumulative return since tracking began, decimal fraction.
annualized_returndoubleAnnualized return, decimal fraction.
chartsWhalesChartsEquity curves. Only populated when include contains chart.
strategyWhalesChartPoint[]Entity portfolio equity curve.
datestringYYYY-MM-DD.
valuedoubleCumulative return since tracking began, decimal fraction (0.618 = +61.8%).
sp500WhalesChartPoint[]S&P 500 benchmark over the same window.
datestringYYYY-MM-DD.
valuedoubleCumulative return since tracking began, decimal fraction (0.618 = +61.8%).
trade_updatesWhalesTradeUpdate[]Portfolio changes from the most recent rebalance/filing. Only populated when include contains trade_update.
datestringRebalance date, YYYY-MM-DD.
actionstring"buy" / "sell" / "hold" — derived from the weight change (rounded to 2 decimals).
tickerstringTicker symbol, e.g. "NVDA".
codestringExchange-qualified code, e.g. "NVDA.O".
namestringSecurity display name.
asset_typeint320=stock, 1=etf.
localestring"US" / "HK".
old_percentdoublePortfolio weight (%) before the change.
new_percentdoublePortfolio weight (%) after the change.
fill_pricedoublePrice at the rebalance date.
current_holdingsWhalesCurrentHoldingsCurrent portfolio. positions is always returned; sector_distribution requires include=current_holdings.
sector_distributionWhalesSectorWeight[]Sector weights of the current portfolio. Only populated when include contains current_holdings.
sectorstringSector name; "other" when unclassified.
weightdoubleWeight of the sector, in %.
positionsWhalesPosition[]All current positions.
tickerstringTicker symbol, e.g. "NVDA".
codestringExchange-qualified code, e.g. "NVDA.O".
namestringSecurity display name.
asset_typeint320=stock, 1=etf.
localestring"US" / "HK".
cost_pricedoubleAverage cost per share.
current_percentdoubleCurrent portfolio weight (%).
total_returndoubleCumulative return of the position since entry.
sector_distribution_descstringServer-generated text summary of the sector mix.
entity_typeint321=institution, 2=congress.
institution_profileWhalesInstitutionProfileOnly set for institutions (entity_type=1).
person_namestringFund manager / key person name.
avatarstringCDN avatar URL.
profilestringManager / institution bio.
investing_philosophystringInvesting-philosophy blurb.
congress_member_infoWhalesCongressMemberInfoOnly set for congress members (entity_type=2).
avatarstringAvatar URL.
partystringPolitical party, e.g. "Republican" / "Democrat".
organizationstringChamber, e.g. "Senate" / "House".
faqWhalesFAQInfo[]Server-generated FAQ entries derived from the stats above (holding count, returns, AUM).
questionstring
answerstring
POST/v1/openapi/whales/details-by-seo-name
DetailsBySeoName

Same as Details but keyed by stable seo_name (from any ranking / search / home response). Preferred when you cached an entity earlier.

Request parameters
FieldTypeRequiredDescription
seo_namestringyesStable entity slug, min_len 1.
includestringnoComma-separated: "chart" (equity curves), "trade_update" (recent trades + last_updated), "current_holdings" (sector distribution). Base fields and positions are always returned.
entity_typeWhalesEntityTypeyesINSTITUTION (1) / CONGRESS (2).
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataWhalesEntityDetailsResponse payload.
namestringEntity display name.
is_watchedboolWhether the requesting user watches this entity. Always false on partner API calls — no user context is forwarded on this endpoint.
top20_holding_mvint64Aggregate market value (USD) of the entity's 20 largest positions, per the latest filing.
last_updatedstringDate (YYYY-MM-DD) of the most recent reported portfolio change. Only populated when include contains trade_update.
holding_countint32Number of positions currently held.
descriptionstringShort text description of the entity.
performanceWhalesPerformanceTracked-portfolio performance stats. Returns are decimal fractions (0.012 = +1.2%).
return_1ddoubleLatest 1-day return, decimal fraction.
sharpe_ratiodoubleSharpe ratio of the tracked portfolio.
total_returndoubleCumulative return since tracking began, decimal fraction.
annualized_returndoubleAnnualized return, decimal fraction.
chartsWhalesChartsEquity curves. Only populated when include contains chart.
strategyWhalesChartPoint[]Entity portfolio equity curve.
datestringYYYY-MM-DD.
valuedoubleCumulative return since tracking began, decimal fraction (0.618 = +61.8%).
sp500WhalesChartPoint[]S&P 500 benchmark over the same window.
datestringYYYY-MM-DD.
valuedoubleCumulative return since tracking began, decimal fraction (0.618 = +61.8%).
trade_updatesWhalesTradeUpdate[]Portfolio changes from the most recent rebalance/filing. Only populated when include contains trade_update.
datestringRebalance date, YYYY-MM-DD.
actionstring"buy" / "sell" / "hold" — derived from the weight change (rounded to 2 decimals).
tickerstringTicker symbol, e.g. "NVDA".
codestringExchange-qualified code, e.g. "NVDA.O".
namestringSecurity display name.
asset_typeint320=stock, 1=etf.
localestring"US" / "HK".
old_percentdoublePortfolio weight (%) before the change.
new_percentdoublePortfolio weight (%) after the change.
fill_pricedoublePrice at the rebalance date.
current_holdingsWhalesCurrentHoldingsCurrent portfolio. positions is always returned; sector_distribution requires include=current_holdings.
sector_distributionWhalesSectorWeight[]Sector weights of the current portfolio. Only populated when include contains current_holdings.
sectorstringSector name; "other" when unclassified.
weightdoubleWeight of the sector, in %.
positionsWhalesPosition[]All current positions.
tickerstringTicker symbol, e.g. "NVDA".
codestringExchange-qualified code, e.g. "NVDA.O".
namestringSecurity display name.
asset_typeint320=stock, 1=etf.
localestring"US" / "HK".
cost_pricedoubleAverage cost per share.
current_percentdoubleCurrent portfolio weight (%).
total_returndoubleCumulative return of the position since entry.
sector_distribution_descstringServer-generated text summary of the sector mix.
entity_typeint321=institution, 2=congress.
institution_profileWhalesInstitutionProfileOnly set for institutions (entity_type=1).
person_namestringFund manager / key person name.
avatarstringCDN avatar URL.
profilestringManager / institution bio.
investing_philosophystringInvesting-philosophy blurb.
congress_member_infoWhalesCongressMemberInfoOnly set for congress members (entity_type=2).
avatarstringAvatar URL.
partystringPolitical party, e.g. "Republican" / "Democrat".
organizationstringChamber, e.g. "Senate" / "House".
faqWhalesFAQInfo[]Server-generated FAQ entries derived from the stats above (holding count, returns, AUM).
questionstring
answerstring
POST/v1/openapi/whales/home
Home

Static editorial list of featured entities (ARK, Nancy Pelosi, Berkshire Hathaway, Soros, Renaissance, Pershing Square). Empty body.

Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataWhalesHomeDataResponse payload.
itemsWhalesHomeInfo[]Curated, fixed order — not a ranking.
namestringEntity display name.
coverstringCDN cover-image URL for the home card.
labelstringEditorial tag; currently always "Featured".
entity_typeint321=institution, 2=congress.
seo_namestringFeed to DetailsBySeoName.
POST/v1/openapi/whales/faq
FAQ

Static product-level FAQ about the Whales tracker, localized via Accept-Language (English default, Chinese supported). Not entity-specific — per-entity FAQ comes in Details.faq. Empty body.

Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataWhalesFAQDataResponse payload.
itemsWhalesFAQInfo[]Fixed question/answer list.
questionstring
answerstring
POST/v1/openapi/whales/watchlist/listX-Partner-User required
WatchlistList

List entities the user follows, with their returns across all periods. Requires X-Partner-User.

A user's first-ever call auto-seeds their watchlist with the featured entities from Home. If they later unfollow everything, the list stays empty.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataWhalesWatchlistListDataResponse payload.
itemsWhalesWatchlistItem[]One row per followed entity.
namestringEntity display name.
entity_typeint321=institution, 2=congress.
return_1ddouble1-day return, decimal fraction (0.012 = +1.2%).
return_7ddouble7-day return, decimal fraction.
return_1mdouble1-month return, decimal fraction.
return_3mdouble3-month return, decimal fraction.
return_1ydouble1-year return, decimal fraction.
avatarstringCDN avatar URL.
seo_namestringStable slug for DetailsBySeoName.
POST/v1/openapi/whales/watchlist/createX-Partner-User required
WatchlistCreate

Add an entity to the calling user's watchlist. Requires X-Partner-User.

Request parameters
FieldTypeRequiredDescription
idint32yesInternal numeric entity id, ≥ 1.
entity_typeWhalesEntityTypeyesINSTITUTION (1) / CONGRESS (2).
Response fields
FieldTypeDescription
retint32Business return code. 0 = success.
msgstringStatus / error message.
POST/v1/openapi/whales/watchlist/deleteX-Partner-User required
WatchlistDelete

Remove an entity from the calling user's watchlist. Requires X-Partner-User.

Request parameters
FieldTypeRequiredDescription
idint32yesInternal numeric entity id, ≥ 1.
entity_typeWhalesEntityTypeyesINSTITUTION (1) / CONGRESS (2).
Response fields
FieldTypeDescription
retint32Business return code. 0 = success.
msgstringStatus / error message.

Market data

Raw market data endpoints powering Chat card details. Keyed by symbol; partner UIs typically fetch these on-demand when expanding a card.

POST/v1/openapi/data/valuation
DataValuation

Historical valuation time-series.

Request parameters
FieldTypeRequiredDescription
tickerstringyese.g. "AAPL".
valuation_typeint32yesEValuationType. 0=PE / 1=PB / 2=PS / 3=Price-to-FCF / 4=EV-EBITDA / 5=Price-to-OCF / 6=FCF-Yield / 7=EV-EBIT.
is_forwardboolnotrue=forward, false=trailing (default).
fromstringnoYYYY-MM-DD. Default last 1Y.
tostringnoYYYY-MM-DD. Default today.
localestringno"US" / "HK".
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataDataValuationDataResponse payload.
valuationDataValuationItem[]Time series.
tstringDate (YYYY-MM-DD).
vstringValuation value.
variance_infoDataVarianceInfoFive reference bands.
meanstring
variancestring
overvaluedstringmean + 1σ.
undervaluedstringmean − 1σ.
strongly_overvaluedstringmean + 2σ.
strongly_undervaluedstringmean − 2σ.
Example request
POST https://api.alphio.ai/v1/openapi/data/valuation
{ "ticker":"AAPL", "valuation_type":0, "from":"2025-06-01", "to":"2026-06-01", "locale":"US" }
Example response
{
  "ret": 0, "msg": "ok",
  "data": {
    "valuation":[{"t":"2025-06-01","v":"28.5"},{"t":"2025-06-02","v":"28.7"}, ...],
    "variance_info":{
      "mean":"30.2","variance":"3.1",
      "overvalued":"33.3","undervalued":"27.1",
      "strongly_overvalued":"36.4","strongly_undervalued":"24.0"
    }
  }
}
POST/v1/openapi/data/rating
DataRating

Analyst ratings.

Request parameters
FieldTypeRequiredDescription
tickerstringyese.g. "AAPL".
fromstringnoYYYY-MM-DD.
tostringnoYYYY-MM-DD.
pageint32no1-indexed.
sizeint32no1 – 100, default 20.
localestringno"US" / "HK".
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataDataRatingDataResponse payload.
resultsDataStockAnalysis
tickerstring
codestring
analysesDataAnalysisItem[]
rating_analyststring
rating_datestring
rating_actionstring"upgrade" / "downgrade" / "maintain" / "initiate".
rating_analyst_starsdouble
rating_analyst_firmstring
rating_price_targetstring
ratingstringe.g. "buy" / "hold".
rating_upsidedouble
analysis_summaryDataAnalysisSummaryAggregate snapshot.
codestring
symbolstring
average_price_targetstring
buyint32Count of buy ratings.
contentstring[]Highlight bullets.
highest_price_targetstring
holdint32Count of hold ratings.
lowest_price_targetstring
paginationDataPagination
current_pageint32
total_pagesint32
total_itemsint32
POST/v1/openapi/data/snapshot
DataSnapshot

Financial-metric snapshot (per-quarter or annual).

Request parameters
FieldTypeRequiredDescription
codestringyes
typeint32yesEFinancialIndicatorsType. 1=EPS / 2=Revenue / 3=ROE / 4=Gross Margin / 5=Net Margin / 6=Current Ratio / 7=Debt to Equity / 8=Operating Margin.
report_typeint32yesFinanceReportType. 1=annual / 2=quarterly.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataDataSnapshotDataResponse payload.
columnsDataSnapshotColumn[]Each column = one metric series.
namestring
valuesDataSnapshotValue[]One cell per period.
titlestringe.g. "Q1 2026".
valuedouble
cur_typestringCurrency / unit.
validboolfalse → missing data; render as "—".
POST/v1/openapi/data/kline
DataKline

OHLCV bars.

Request parameters
FieldTypeRequiredDescription
tickersWhalesAsset[]yesMax 20 per request.
asset_typeint32noSymbolType: 0=stock, 1=etf, 2=crypto, 3=commodity, 4=forex, 5=perp.
tickerstringnoe.g. "TSLA".
localestringno"US" / "HK".
fromstringnoYYYY-MM-DD (US-Eastern) or unix seconds.
tostringnoYYYY-MM-DD (US-Eastern) or unix seconds.
multiplierint32noe.g. 1, 5, 15.
timespanint32noTimespanOpt. 2=minute, 3=hour, 4=day, 5=week, 6=month, 7=quarter, 8=year. Values outside 2–8 are rejected.
limitint32noMax 1000. Default 500.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataDataKlineDataResponse payload.
seriesDataKlineSeries[]One series per requested ticker.
tickerstring
asset_typeint32
pointsDataKlinePoint[]OHLCV bars. Numbers are strings to avoid precision loss.
openstring
highstring
lowstring
closestring
volumestringTraded value (turnover) for the bar — per proto this is 成交额, not share count.
timestampint64Unix seconds.
Example request
POST https://api.alphio.ai/v1/openapi/data/kline
{
  "tickers":[ { "asset_type":0, "ticker":"TSLA", "locale":"US" } ],
  "from":"2026-06-09", "to":"2026-07-09",
  "multiplier":1, "timespan":4, "limit":30
}
Example response
{
  "ret": 0,
  "msg": "ok",
  "data": {
    "series": [
      {
        "ticker": "TSLA",
        "asset_type": 0,
        "points": [
          {"open":"391.09","high":"396.14","low":"388.42","close":"394.26",
           "volume":"58231290","timestamp":"1783486800"}
        ]
      }
    ]
  }
}
POST/v1/openapi/data/price-prediction
DataPricePrediction

Historical OHLC bars backing the price-prediction card — no forecast fields in the payload itself. Request is a discriminated union by ticker_type; response has matching stock_data / crypto_data.

Request parameters
FieldTypeRequiredDescription
ticker_typestringyes"stock" / "etf" / "" → stock branch; "crypto" → crypto branch.
stockDataPricePredictionStockReqnoRequired when ticker_type is stock / etf / empty.
codestringnoTicker, e.g. "AAPL".
multiplierint32noTime multiplier.
timespanint32noTimespanOpt. 2=minute, 3=hour, 4=day, 5=week, 6=month, 7=quarter, 8=year.
timestampint64noAnchor end-time (unix seconds). Empty = now.
countint32noBars to return. Max 5000, recommended 800.
localestringno"US" / "HK".
cryptoDataPricePredictionCryptoReqnoRequired when ticker_type = "crypto".
typeint32noQueryType. 1=crypto spot, 2=etf, 3=crypto derivative (HL perps).
symbolstringno
multiplierint32no
timespanint32noTimespanOpt. 2=minute, 3=hour, 4=day, 5=week, 6=month, 7=quarter, 8=year.
limitint32no
start_timeint64noUnix seconds.
end_timeint64noUnix seconds.
symbol_liststring[]noBatch query — per-symbol series come back in crypto_data.infos.
localestringnoSource platform for multi-source assets, e.g. "HYPERLIQUID". Empty = default source.
Response fields
FieldTypeDescription
retint32Business return code. 0 = success, non-zero = error code (see Errors).
msgstringHuman-readable status / error message. "ok" on success.
dataDataPricePredictionDataResponse payload.
ticker_typestringEchoed back.
stock_dataDataPricePredictionStockDataPresent on the stock branch.
pointsDataPricePredictionStockPoint[]Historical bars, oldest first.
codestring
closedouble
highdouble
lowdouble
transactionsint64Share volume (per proto: 交易量).
opendouble
timestampint64Unix seconds.
volumedoubleTraded value / turnover (per proto: 成交额), not share count.
vwapdoubleVolume-weighted average price.
otcbool
pre_closedoublePrevious-period values (pre_* mirror the base fields).
pre_highdouble
pre_lowdouble
pre_transactionsint64
pre_opendouble
pre_timestampint64
pre_volumedouble
pre_vwapdouble
symbolstring
last_timeint64Unix seconds.
crypto_dataDataPricePredictionCryptoDataPresent on the crypto branch.
pointsDataPricePredictionCryptoPoint[]Bars for the primary symbol.
highdouble
opendouble
lowdouble
closedouble
timestampint64Unix seconds.
volumeint64Legacy integer volume — kept for old clients only.
volume_decimaldoublePreferred: float volume (needed for fractional assets like HL perps).
infosmap<string, DataPricePredictionCryptoSeries>Per-symbol series when symbol_list was provided.
Example request
POST https://api.alphio.ai/v1/openapi/data/price-prediction
{
  "ticker_type":"stock",
  "stock":{ "code":"AAPL", "multiplier":1, "timespan":4, "count":800, "locale":"US" }
}
Example response
{
  "ret": 0,
  "msg": "ok",
  "data": {
    "ticker_type": "stock",
    "stock_data": {
      "points": [
        {"code":"AAPL","close":195.5,"open":194.2,"high":196.1,"low":193.8,
         "timestamp":1717286400,"volume":48230000.0,"vwap":195.1,"otc":false}
      ],
      "last_time": 1717286400
    }
  }
}
POST/v1/openapi/data/screener/stock
DataScreenerStock

Stock screener. Request / response follow the upstream datafabric schema (chatfinbot.datafabric.v1.SelectStocksReq / SelectStocksRsp). Contact us for the full schema, or reuse a screenId returned by a Chat card.

POST/v1/openapi/data/screener/etf
DataScreenerETF

ETF screener. Uses chatfinbot.datafabric.v1.SelectEtfsReq / SelectEtfsRsp upstream.

POST/v1/openapi/data/screener/crypto
DataScreenerCrypto

Crypto screener. Uses chatfinbot.datafabric.v1.SelectCryptosReq / SelectCryptosRsp upstream.