Module models

Source
Expand description

Data models for Coinbase Advanced Trading API responses.

This module contains the data structures used to deserialize responses from the Coinbase Advanced Trading API WebSocket and REST endpoints. These models are designed for high-performance parsing with minimal allocations.

§Key Model Types

§Performance Considerations

All models use String types for decimal values to maintain precision and avoid floating-point errors. In performance-critical paths, consider using SmartString or rust_decimal::Decimal for better memory efficiency.

§Data Sources

These models correspond to the following Coinbase WebSocket channels:

  • level2 - L2 order book data
  • matches - Trade execution data

Structs§

L2Snapshot
Level 2 (L2) order book snapshot from Coinbase Advanced Trading API.
L2Update
Level 2 (L2) order book update from Coinbase Advanced Trading API.
TradeMatch
Trade match event from Coinbase Advanced Trading API.