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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 2 3 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 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
21.8k 57 14 21

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 512.0 KiB each and 1.0 MiB total.

Upvotes
21.8k 57 14 21

@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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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