Skip to main content
GET
TypeScript

Authorizations

Authorization
string
header
required

The Trading API key (trdrs_sk_…), for market data, orders and account state on the accounts its owner holds. Use it server-to-server, and keep it on your server. Its scope is named trading in the API.

Response

An open event stream with one event, news_item: one headline as it arrives. Skip a headline whose id you already have. Calendar changes come on /api/calendar/stream. A dropped connection carries no event, and EventSource reconnects on its own.

The stream may end with a reconnect event, { code, afterMs }: the engine serving it is restarting for a release, or the trader it serves moved to another engine, and the stream closes right after the event. code is engine_draining. Open the stream again after afterMs milliseconds, which is never more than 1,000: another engine serves it, and it opens as any connection does. It is not an error, so keep what you show until the new stream's first events arrive. The event sets the stream's retry: to afterMs too, so an EventSource that reconnects on its own follows it.

The response is of type string.