Skip to main content

Crate bullet_ws_interface

Crate bullet_ws_interface 

Source
Expand description

Shared types for the Trading API WebSocket protocol.

This crate contains the message types used for WebSocket communication between clients and the trading API server.

Structs§

AggTradeMessage
AggTrade message with DEX-specific fields
BookTickerMessage
Binance-compatible bookTicker (BBO) message
CancelOrderData
Order data for CANCELED orders
DataMessage
DepthUpdate
Binance-compatible depth update message
ErrorMessage
Error message from the server
ForceOrderDetails
Order details within a forceOrder message
ForceOrderMessage
Binance-compatible forceOrder message for liquidation trades
MarkPriceMessage
Binance-compatible markPrice message
OrderParams
Parameters for order operations
OrderUpdateCommon
Common fields for all order update events
OrderUpdateMessage
User order update message (Binance ORDER_TRADE_UPDATE style)
PlaceOrderData
Order data for NEW order placement
PongMessage
PriceLevel
Price level as [price, quantity]
RequestId
Request ID for matching responses to requests (Binance uses integers)
StatusMessage
Status message for connection lifecycle events
TradeFillData
Order data for TRADE fills
WSError
WebSocket error for both internal handling and client responses. Serializes as {"param": "...", "code": N, "msg": "..."} for JSON responses.

Enums§

ClientMessage
Messages sent from client to server (Binance-style)
ErrorCode
Error codes aligned with Binance API
MessageType
OrderUpdateData
Untagged enum - serializes directly as the variant’s fields

Type Aliases§

ClientOrderId
client order id (u64 wrapper for type safety)