Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Commit

Permalink
fix(streaming): fix bid and ask price
Browse files Browse the repository at this point in the history
Use closeout price only if there is not liquidity price.
  • Loading branch information
albertosantini committed Apr 21, 2017
1 parent 9fe89d0 commit 86e75ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions build/app.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -1707,8 +1707,10 @@ class StreamingService {
tick = {
time: data.time,
instrument: data.instrument,
ask: data.closeoutAsk,
bid: data.closeoutBid
ask: data.asks[0] && data.asks[0].price ||
data.closeoutAsk,
bid: data.bids[0] && data.bids[0].price ||
data.closeoutBid
};

this.QuotesService.updateTick(tick);
Expand Down
6 changes: 4 additions & 2 deletions src/client/app/components/streaming/streaming.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ export class StreamingService {
tick = {
time: data.time,
instrument: data.instrument,
ask: data.closeoutAsk,
bid: data.closeoutBid
ask: data.asks[0] && data.asks[0].price ||
data.closeoutAsk,
bid: data.bids[0] && data.bids[0].price ||
data.closeoutBid
};

this.QuotesService.updateTick(tick);
Expand Down

0 comments on commit 86e75ae

Please sign in to comment.