For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 2 2 4

null prices (refresh and update)

Hi

The websocket API sends conflated prices (fields BID, ASK) every 300ms, and will set these to null if there wasn't a price during the last 300ms. This is problematic for us, especially since we don't get a price at application start until there is a tick.

Is there any way to configure (or subscribe to market) so that for any conflated prices messages we always get the last BID/ASK price instead of null?

treprdp-apiwebsocketsrrtocloud
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
13k 32 12 18

Also clarifying your statement - the Websocket protocol will not set BID/ASK fields to null, if there is no activity. The application simply won't receive any update message if the fields haven't changed.

Only time these fields might be null or 0 is way before the trading day has started. The exact value - null or 0 or last price depends on the exchange/venue that is quoting that instrument.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
13k 32 12 18

@stefanos The conflation only happens in the update messages. Upon login and sending a new subscription request, the application will receive a "Type": "Refresh" message - which is immediate and not conflated and contains all the fields that the instrument supports - unless application requests a subset of fields.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea