Advertise on ForxZen — put your brand in front of a global forex & CFD trading audience.Get in touch →

REST API vs streaming API

Platforms & Tools

Asking each time versus a connection that pushes: the floor polling cannot get under, and the failure that looks exactly like a quiet market.

These are two shapes of programming interface. A request-and-response interface answers one question each time it is asked and says nothing in between; a streaming interface holds a connection open and sends updates as they happen. Brokers commonly offer both, and they are used for different things rather than as alternatives. The difference decides how stale a reader's picture is. Asking repeatedly for a price gives a view no fresher than the interval between requests, and asking faster runs into the limits the broker places on request frequency, so polling has a floor it cannot get under. A stream has no such floor but brings its own work: connections drop and have to be re-established, updates missed while disconnected have to be recovered from somewhere, and the difficult failure is a connection that is still open but has stopped delivering — which looks exactly like a quiet market until something checks.

Related terms

More in Platforms & Tools