Skip to content

Feed.quotes

Python

Iterate a live feed's updates as they arrive, starting with each selected security's current quote. A slow consumer slows the feed rather than losing updates.

Parameters

codes list[str] | str | None optional

Only these securities.

raw bool optional = False

BRiSK's own fields.

timeout float | None optional

Seconds to wait for each update.

Returns

Iterator[dict]

An iterator of quotes.

API method
feed.quotes(
    codes: list[str] | str | None = None,
    raw: bool = False,
    timeout: float | None = None,
) -> Iterator[dict]
Example usage
1
2
3
4
5
6
7
import briskapi
from itertools import islice

feed = briskapi.connect(site="demo", codes=["7203"], upload=False)
for quote in islice(feed.quotes("7203"), 3):
    print(quote["time"], quote["indicative_price"], quote["volume"])
feed.close()
Example responseCaptured from the demo
2021-09-27 08:59:59.993551+09:00 10150.0 0
2021-09-27 09:00:00.008850+09:00 10150.0 0
2021-09-27 09:00:00.019149+09:00 10155.0 0