Skip to content

Ticker.quote

Python

A security's quote at a time: the latest update at or before it, from the loaded recording or live feed.

Parameters

at str | datetime | None optional

A JST time ("09:00:00") or datetime. Default: the latest.

raw bool optional = False

BRiSK's own fields (tenths of a yen, microseconds) instead of yen and datetimes.

Returns

dict

A dict of the quote's fields (see Data format).

API method
briskapi.Ticker(code).quote(
    at: str | datetime | None = None,
    raw: bool = False,
) -> dict
Example usage
1
2
3
4
5
6
7
import briskapi

briskapi.load("recordings/demo")   # or briskapi.connect() for live
quote = briskapi.Ticker("7203").quote(at="09:00:00")
for key in ("time", "indicative_price", "indicative_volume",
            "last_price", "bid_price", "ask_price", "volume"):
    print(key, quote[key])
Example responseCaptured from the demo
time 2021-09-27 08:59:59.993551+09:00
indicative_price 10150.0
indicative_volume 304700
last_price None
bid_price 10145.0
ask_price 10150.0
volume 0