eu90h / mockfighter

Mockfighter is a Stockfighter clone
MIT License
15 stars 1 forks source link

if there is no bid or no ask, the quote price should not be 0 #6

Closed rooklift closed 8 years ago

rooklift commented 8 years ago

This is undefined in the official documentation, but if there are zero bids or asks, price should not be returned as zero in the quote. Official SF doesn't return the field ("bid" or "ask") at all in that case.

e.g. this is the official behaviour:

{
  "ok": true,
  "symbol": "FOOBAR",
  "venue": "TESTEX",
  "bidSize": 0,
  "askSize": 0,
  "bidDepth": 0,
  "askDepth": 0,
  "last": 3900,
  "lastSize": 100,
  "lastTrade": "2015-12-26T17:37:23.797734858Z",
  "quoteTime": "2015-12-26T17:37:23.808081484Z"
}
eu90h commented 8 years ago

Good catch, thank you.