Cabinhub News API v1.0.0

Docs / FXStreet compatibility

FXStreet compatibility

Drop-in compatibility with FXStreet's news API: their paths, enums, paging, cultures and field names over our published, compliance-gated items. Every divergence is recorded here rather than glossed over.

Migration workbook

News content

Send GET /v4/culture/all to your staging host, then replay a saved post request. Compare the Values envelope, GUIDs and PascalCase fields on the root v4 mount.

Economic calendar

Replay /{culture}/api/v1/eventDates/{from}/{to} with the same dates. Compare the array shape and check that your renderer accepts null consensus fields.

Story images

Resolve each returned Image.Url_* value on the new host. Check the size, content type and a story with a null image.

Token exchange

Point your staging client at POST /v2/token, using the CabinHub credentials issued to your account. Confirm that a fresh token opens your regular news request.

Push connection

Exercise a classic SignalR 2.x negotiation and connect on /signalr. Verify the transport your client uses and the events it consumes.

Webhook receiver

List registrations with GET /v4/Webhooks using your own key. On a staging registration, POST /v4/Webhooks/{id}/test queues a marked event. Acknowledge with HTTP 200 or 204, then inspect GET /v4/Webhooks/{id}/deliveries. Calendar webhook management is a separate interface.

Rollback. Keep the original hosts and credential configuration. Run both clients against a saved request in staging. Restore the original configuration if a required field or event differs.

A presentation layer, not a second API

Same base host plus /fxs, then FXStreet's path verbatim. Same bearer key, same quota, same compliance gate: only compliance_status = 'clean' rows are reachable, by list, by tag, by page and by id.

Recorded divergences

Every place this surface differs from FXStreet, parsed from the taxonomy the document keeps. Nothing here is summarised away: the full text is in the section below.

#DivergenceDetail
1The list envelope beyond Values is not documentedFXStreet's widget reads only
2Push hub and news webhook registrationFXStreet pushes post_created /
3CLOSED for the pull feed, open for v3/{format}/news.aspx?c=&i= is served —
4Paging is boundedtake ≤ 200 (the store's MAX_LIST_LIMIT) and
5CLOSED — auth is now FXStreet's own shape as well as oursPOST /v2/token
6Tags are our taxonomy, not FXStreet'sTheirs are per-instrument GUIDs from their
7filter vs filterfullFXStreet documents three filter depths; we treat
8CLOSED on the root mount, still opt-in on /fxs/v4/... serves GUIDs in
9The byline is fixed and not FXStreet'sFXStreet's Author names their editorial staff;
10The calendar family is served, with the truth rules intact/{culture}/api/v1/...
11One trailing-slash redirect still differs from upstream: /v2/token/It answers a
12/v3, webSockets and the calendar /webhooks management paths are not servedAll

Parsed from docs/FXSTREET_COMPAT.md §4 on every build; 12 recorded today.

What is confirmed and what is inferred

Evidence statusRows in §1
OTHER32

Counted from the table in docs/FXSTREET_COMPAT.md §1.

Paths, enums and the field mapping

Source: docs/FXSTREET_COMPAT.md §2 and §3.

Paths (S1, all under https://subscriptions.fxstreet.com):

Text
GET /v4/culture/all
GET /v4/{culture}/post/{id}
GET /v4/{culture}/post/{id}/{bodyType}
GET /v4/{culture}/post/{filterType}/{productFeature}                       ?page&take&bodyType
GET /v4/{culture}/post/{filterType}/{productFeature}/{tagIds}              ?page&take&bodyType
GET /v4/{culture}/post/{filterType}/{productFeature}/{page}/{take}
GET /v4/{culture}/post/{filterType}/{productFeature}/{page}/{take}/{bodyType}
GET /v4/{culture}/post/{filterType}/{productFeature}/{tagIds}/{page}/{take}
GET /v4/{culture}/post/{filterType}/{productFeature}/{tagIds}/{page}/{take}/{bodyType}
GET /v4/{culture}/tag
GET /v4/{culture}/tag/filter/{tagIds}
GET|POST /v4/Webhooks, GET|PUT|DELETE /v4/Webhooks/{id}
POST /v4/{culture}/Webhooks/{productFeature}

Enums (S1): filtermini (free), filter (default), filterfull (full body) · BasicHtml, PlainText, FullHtml, Empty, JustifiedText · GeneralFeed, CryptoNewsFeed.

NewsFeed is a fourth accepted name, measured on the live wire 2026-11-12 (anonymous, with the first-party Origin/Referer the API gates on): filter/NewsFeed/0/2 and filter/GeneralFeed/0/2 return byte-identical bodies (same two ids), so it is an alias of the one general feed, not a separate one; filter/AnalysisFeed answers 400, so the list is closed. Both mounts resolve NewsFeed -> GeneralFeed (FEATURE_ALIASES), which is why the body, the ETag and the cache tag are literally GeneralFeed's. docs/fxs/web-trace.md records the same measurement with the page and member-set findings.

Item (PostFullResponse, S1, plus the widget-confirmed names in S8/S9):

JSON
{
  "Id": "guid",                       // OpenAPI: id (uuid)
  "Title": "…",                       // title
  "Summary": "…",                     // summary
  "HTML": "<p>…</p>",                 // HTML (body per bodyType; null for Empty/filtermini)
  "Url": "/news/…",                   // url
  "FullUrl": "https://…",             // fullUrl (widget + SignalR model)
  "PublicationDate": "2026-11-05T08:00:00Z",   // publicationDate
  "VersionDate": "2026-11-05T08:05:00Z",       // versionDate — the widget sorts/pushes on it
  "Author":  {"Id": "guid", "Name": "…"},
  "Company": {"Id": "guid", "Name": "…"},
  "Image":   {"Url_XtraLarge": null, "Url_Large": null, "Url_Medium": null, "Url_Small": null,
              "Url_XtraSmall": null, "Url_Nano": null, "Caption": null, "Copyright": null,
              "Title": null},
  "Tags":    [{"Id": "guid", "Name": "EUR/USD"}]
}

List envelope: {"Values": [ …items… ]} (S8). Tags: {"Tags": [{"Id","Name"}…]} (S8/S9). Cultures: an array of {"Name": "en-US"} (S5/S12 snippet).

Two mounts of one implementation, plus the surfaces that only have one spelling. The code is backend/app/api/fxs_compat.py::build_router, called twice — once with prefix="/fxs" (profile COMPAT, the legacy mount, byte-compared by clients/openapi.json) and once with prefix="" (profile STRICT, backend/app/api/fxs_root.py). A migrating client uses the root mount, because the strict profile is the one that carries FXStreet's own defaults without being asked.

MountDefault id formEnvelope401 body
/v4/... (root, fxs_root.py)GUID, 8-4-4-4-12exactly {"Values": […]}empty, WWW-Authenticate: Bearer
/fxs/v4/... (fxs_compat.router)32-hex, ?ids=guid for the GUIDValues + Page/Take/Count/HasMore{"detail": …}

The /fxs prefix, then FXStreet's path verbatim. A client that today calls https://subscriptions.fxstreet.com/v4/en-US/post/filterfull/GeneralFeed?page=1&take=20 calls either https://vg.tempproject.online/v4/en-US/post/filterfull/GeneralFeed?page=1&take=20 (root mount, no other edit) or https://vg.tempproject.online/fxs/v4/en-US/post/filterfull/GeneralFeed?page=1&take=20 (legacy mount). The table below is written against /fxs; delete the two characters /fxs and every row is the root mount's path as well.

MethodPath (ours)FXStreet counterpartNotes
GET/fxs/v4/culture/allsame{"Values":[{"Name":"en-US"},{"Name":"zh-CN"}]} from the compliance policy's locale list (the root mount wraps them; the bare-array reading is recorded in §5 of docs/fxs/fxs-root.md)
GET/fxs/v4/{culture}/post/{id}sameone post; 404 for unknown or withheld
GET/fxs/v4/{culture}/post/{id}/{bodyType}sameEmpty → HTML: null
GET/fxs/v4/{culture}/post/{filterType}/{productFeature}samepage/take/bodyType query, same defaults as FXStreet where known (page=1); take defaults to 20
GET/fxs/v4/{culture}/post/{filterType}/{productFeature}/{tagIds}sametag = one of our categories (by GUID or name); unknown tags are ignored
GET/fxs/v4/{culture}/post/{filterType}/{productFeature}/{page}/{take}same
GET/fxs/v4/{culture}/post/{filterType}/{productFeature}/{page}/{take}/{bodyType}same
GET/fxs/v4/{culture}/post/{filterType}/{productFeature}/{tagIds}/{page}/{take}same
GET/fxs/v4/{culture}/post/{filterType}/{productFeature}/{tagIds}/{page}/{take}/{bodyType}same
GET/fxs/v4/{culture}/tagsameour taxonomy as tags: the categories from /v1/meta
GET/fxs/v4/{culture}/tag/filter/{tagIds}samethe requested tags that exist here

The other FXStreet surfaces, each served at FXStreet's own path on our host. None of them needs the /fxs prefix, and each has its own document under docs/fxs/:

MethodPath (ours)FXStreet's hostDocument
GET, POST/v4/... (the eleven paths above, without /fxs)subscriptions.fxstreet.comdocs/fxs/fxs-root.md
POST/v2/tokenauthorization.fxstreet.comdocs/fxs/fxs-token.md
GET/v2/token/info (ours, new path)—docs/fxs/fxs-token.md
GET/.well-known/oauth-authorization-server (ours, RFC 8414)—docs/fxs/fxs-token.md
GET/{json,xml,rss}/news.aspx?c=&i= (/json/, /xml/, /rss/ answer their 404)subscriptions.fxstreet.comdocs/fxs/fxs-legacy.md
GET/{culture}/api/v1/eventDates/{from}/{to}, /events, /events/{id}, /categoriescalendar-api.fxstreet.comdocs/fxs/fxs-calendar.md
GET, POST, PUT, OPTIONS/signalr and /signalr/* (negotiate, connect, start, send, poll, abort, ping, hubs)httppush.fxstreet.comdocs/fxs/fxs-push.md
GET/v1/stream?locale= (ours, plain server-sent events)—docs/fxs/fxs-push.md
GET, HEAD/fxs/v1/images/{slot}/{key} (the six Image.Url_* slots)their CDNdocs/fxs/fxs-images.md

docs/fxs/MIGRATION.md is the guide a migrating developer reads; it names every path in the tables above and is checked against them on every build (backend/tests/test_fxs_migration_guide.py).

Additive, ours-only (never required by an FXStreet client):

News webhook registration is served at POST /v4/Webhooks and POST /fxs/v4/Webhooks. The calendar management interface is separate.

Field-by-field mapping (ours → FXStreet)

FXStreetOursRule
Idid32-hex string on /fxs/v4 by default; a GUID (8-4-4-4-12) on the root /v4 mount, and on /fxs/v4 with ?ids=guid — see "Item ids"
Titletitleunchanged
Summarysummaryunchanged
HTMLbody, rendered per bodyTypeEmpty→null; PlainText→verbatim; BasicHtml/FullHtml→escaped <p> paragraphs (single newline→<br/>); JustifiedText→same with style="text-align:justify"; filtermini→null
Urlderived/#/item/{id} on the legacy /fxs/v4 mount (published, byte-compared). The STRICT /v4 mount serves the wire's ABSOLUTE form on OUR host: {NEWS_PUBLIC_BASE_URL}/share/{id} — the crawlable per-story page (app/api/seo.py::story_url), never fxstreet.com
FullUrlderived{NEWS_PUBLIC_BASE_URL}/#/item/{id} (default https://vg.tempproject.online)
PublicationDatepublished_atverbatim RFC3339 UTC
VersionDateupdated_at (else published_at)verbatim; the widget sorts on it, and it is our revision stamp
CreationDate / ModificationDatepublished_at / updated_atFXStreet's SignalR names; additive
Author.Id / .Nameauthordeterministic GUID + the item's own byline, which is models.AUTHOR_BY_LOCALE: "By Ember" (en) / "Ember 撰稿" (zh-Hans). A legacy row with no stored byline is served the same value by store.attach_disclosure
Company.Id / .Namesource.nameinferred mapping: FXStreet's Company is the broker/company; our closest stable organisation is the news source (e.g. "Federal Reserve")
Image.* (six sizes, caption, copyright, title)assets.title_image_url when a generated image existssix DIFFERENT pictures at FXStreet's measured widths (docs/fxs/fxs-images.md); all six null when we have no image; {NEWS_PUBLIC_BASE_URL}/fxs/v1/images/{slot}/{key}
Tags[]category + entities.instrumentsGUID = UUIDv5 of the name, so ids are stable across restarts and identical for an en/zh twin; names are the category (markets, fx, …) and the instruments (USD, EUR/USD)
Languagederived{"Id": UUIDv5(culture), "Name": culture}
Culturederivedthe canonical culture for the served locale
FeedIdconstantUUIDv5 of generalfeed
ContentTypeIdconstant 0FXStreet's type discriminator; we have one type
AiGenerated, AiLabelai_generated, ai_labelours, additive; the machine-readable half of the AI disclosure — true and "AI-generated content" ("人工智能生成内容" for zh*). Filled for legacy rows by store.attach_disclosure, never omitted
Category, Importance, Sourceoursadditive

Culture mapping. en → en-US, zh-Hans → zh-CN, zh-Hant → zh-CHT (we have no zh-Hant rows today, so zh-CHT answers an empty page rather than an error). Accepted inbound spellings: any FXStreet culture that maps to a locale we serve, plus our own locale tags (en, zh-Hans) verbatim. An unknown culture is a 404 naming the cultures we do serve (FXStreet has 20; we serve the two the compliance policy publishes — a third locale is a policy change, not a compat change).

On the STRICT /v4 mount it is 403 with a 0-byte body, which is what the wire answers (re-measured 2026-11-12 on post-api.fxstreet.com: /v4/xx-ZZ/post/filter/GeneralFeed/0/2 and /v4/xx-ZZ/tag → 403, size_download 0, no content-type). The named 404 above stays the legacy /fxs/v4 contract, which docs/API.md publishes and tests/test_live_contract_check.py byte-compares.

Auth, metering, limits, compliance — all inherited:

Item ids

Our ids are hashlib.sha256(source + url + published_at + locale).hexdigest()[:32]: 32 lowercase hex characters, not a GUID. FXStreet's Id is a GUID, and a client that validates the syntax (Guid.Parse, uuid.UUID, a [Guid] model binding) refuses ours before it ever asks us for anything.

?ids=guid on any list route or on /post/{id} serves the same 32 hex formatted 8-4-4-4-12 (lowercase). It is a presentation of the identical value: no new field is stored, nothing is rewritten, and stripping the hyphens recovers the stored id exactly. The root /v4 mount (FXStreet's own paths, docs/fxs/fxs-root.md) makes the GUID the DEFAULT, because that is the shape a client written against FXStreet binds; the legacy /fxs/v4 mount keeps the stored 32 hex so an existing client of ours sees no change. ?ids=plain asks for the stored form on either mount.

/fxs/v4/{culture}/post/{id} accepts both forms: the path id is looked up as sent, and if that finds nothing and the id is a syntactically valid GUID whose hyphens-stripped form is 32 hex, the stripped form is tried too. A client may therefore mix forms — list with ?ids=guid, then build the detail URL from the plain id, or the reverse.

Url and FullUrl always carry the stored id, because they point at our own newsroom route (/#/item/{id}), which takes the stored form; only Id changes under ?ids=guid. A withheld item is 404 under either form.

The PascalCase / camelCase ambiguity

Two confirmed sources disagree on spelling:

The widget wins for "what a client written against the live API sees", so the default here is PascalCase. A client generated from the OpenAPI document instead can ask for that spelling with ?casing=camel, which renames the same values to the OpenAPI names (including the nested author/company/image/tags keys). The rename table is in fxs_compat.py (_CAMEL_TOP, _CAMEL_NESTED); flipping the default is one constant, not a rewrite.

How to verify this surface

Offline, on a compute box (nothing runs on the Mac; tools/vps_test.sh ships the tree and runs it there):

Text
CBN_BOXES="tx-nj1 tx-nj2 tx-nj3 tx-nj4 tx-nj5" \
  bash tools/vps_test.sh auto -m "not network" -q -p no:cacheprovider \
  tests/test_fxs_compat.py tests/test_fxs_root.py tests/test_caddy_routes.py \
  tests/test_fxs_migration_guide.py

Live, read-only, without a credential — the guide's own probe, which the suite exercises in both directions before it is trusted:

Text
./tools/fxs_migration_probe.sh https://vg.tempproject.online

The guide itself (docs/fxs/MIGRATION.md and its Chinese twin) is covered by backend/tests/test_fxs_migration_guide.py: every path it names must be routed to the app by deploy/vg-news.caddy AND mounted by create_production_app(), both guides must name the same path set, and the probe must PASS a stub that answers correctly and FAIL one that does not.

The suite pins the documented property set against a served response (FXSTREET_POST_KEYS/FXSTREET_IMAGE_KEYS in backend/tests/test_fxs_compat.py), the Values/Tags envelopes, page/take behaviour including past-the-end and the window guard, culture selection (including zh-CHT empty and unknown 404), category via tag path, query and CryptoNewsFeed, 401 with WWW-Authenticate: Bearer under a configured key table, the same routes staying open in dev mode, and that a withheld item is reachable by neither list nor id.

Added 2026-11-05, all in the same file:

The reference is a real capture, not a transcription. FXStreet's own artefacts are saved under backend/tests/fixtures/fxstreet/ (source URL and fetch date in PROVENANCE.json, whose hashes are checked against the saved bytes on every run):

FileSourceUsed for
news.jsstaticcontent.fxsstatic.com/widgets/news/js/news.jsthe endpoint template and FilterEndpointMap; every data.*, news.*/post.* and tag.* path the widget reads
news_items.html.../widgets/news/mustache/news_items.htmlthe template variables, and a render of the real template against our response
swagger_v4.jsonsubscriptions.fxstreet.com/swagger/v4/swagger.jsonPostFullResponse/AuthorResponse/CompanyResponse/ImageResponse/TagResponse property names, parsed (never hand-copied) and asserted against ?casing=camel

The tests derive the property list from those files at run time. The template is rendered by a small mustache-subset renderer inside the test (no template engine is installed in the test venv): it implements sections, inverted sections, dotted names, escaped and raw variables, and mustache's parent-context lookup. A null is legal only where the template itself guards the value ({{#Image.Url_XtraSmall}}…{{/Image.Url_XtraSmall}}); every other read must be present and non-empty, and the rendered HTML may not contain an empty data-item-id, href or src.

What no fixture can settle is which FXStreet version and id casing the VG app actually sends: the artefacts prove what their widget and schema say, not what VG's code calls. ?casing= and ?ids= cover both plausible answers; the default is the widget's spelling, because the widget is the only party observed reading a live response. A real VG capture (one response and the URL that produced it) would settle it in one step; until then this surface answers both.