Trades

Executed volume for the current book update, split by aggressor side. The script re-runs on every book update while running.

trades.buy / trades.sell

Two arrays of executed volume by price for this tick only, highest price first.

  • price is a real price. size is executed quantity at that level for the current update.
  • This-tick delta only, not accumulated. Both arrays are empty on book-only updates (ticks with no trade).
API
trades.buy  // BookLevel[] - buy-aggressor volume this update
trades.sell // BookLevel[] - sell-aggressor volume this update

interface BookLevel { price: number; size: number }