Skip to content

Ticker.trades

Python

Every trade of a security, oldest first: price, shares and the initiating side (buy, sell, or None for most opening prints). Reads the loaded recording or live feed (with history=True, back to the day's start as far as BRiSK's snapshot restores them).

Parameters

start str | datetime | None optional

From this JST time.

end str | datetime | None optional

Until this JST time.

raw bool optional = False

BRiSK's own fields.

Returns

Table

A Table of {code, issue_id, time, price, quantity, side, frame}.

API method
briskapi.Ticker(code).trades(
    start: str | datetime | None = None,
    end: str | datetime | None = None,
    raw: bool = False,
) -> Table
Example usage
1
2
3
4
5
import briskapi

briskapi.load("recordings/demo")   # or briskapi.connect() for live
trades = briskapi.Ticker("7203").trades(end="09:00:01")
print(trades.to_pandas()[["time", "price", "quantity", "side"]])
Example responseCaptured from the demo
                              time    price  quantity  side
0 2021-09-27 09:00:00.072765+09:00  10155.0    305500  sell
1 2021-09-27 09:00:00.327866+09:00  10155.0       400  sell
2 2021-09-27 09:00:00.801729+09:00  10155.0       700  sell
3 2021-09-27 09:00:00.803944+09:00  10160.0       100   buy
4 2021-09-27 09:00:00.817904+09:00  10150.0       100  sell
5 2021-09-27 09:00:00.876274+09:00  10160.0       100   buy