# `Bourse.WS.Semantics.Trades`
[🔗](https://github.com/ZenHive/bourse/blob/main/lib/bourse/ws/semantics/trades.ex#L1)

Trades cache driven by `websocket.trades_semantics`.

# `t`

```elixir
@type t() :: %Bourse.WS.Semantics.Trades{
  cache_type: String.t() | nil,
  caches: %{required(String.t()) =&gt; [map()]},
  dedup_key: String.t() | nil,
  update_model: String.t()
}
```

# `apply`

```elixir
@spec apply(t(), String.t(), term()) :: {t(), [map()]}
```

Applies a routed trades payload and returns updated state + emitted trades.

# `new`

```elixir
@spec new(Bourse.Exchange.t()) :: t()
```

Builds state from exchange spec semantics.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
