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
ListSubscriptionsMessage
Response to a list_subscriptions client request.
MarkPriceMessage
Binance-compatible markPrice message
MethodResult
Generic success envelope returned for subscribe, unsubscribe, etc. Wraps a result: "success" value plus the request id (echoed back from the client message) and the server-side event time.
OrderParams
Parameters for a transaction submission.
OrderResultMessage
Result message for an order-submission RPC (SUBMIT, or the deprecated order.* methods). Correlate to the originating request via [id].
OrderResultPayload
Inner results payload for a successful order RPC ack.
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
SubscribeOk
Response to a subscribe client request.
TradeFillData
Order data for TRADE fills.
UnsubscribeOk
Response to an unsubscribe client request.
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
TxStatus
Transaction status returned by the sequencer in an order RPC ack. See https://tradingapi.bullet.xyz/docs/ws/index.html#request-response.

Type Aliases§

ClientOrderId
client order id (u64 wrapper for type safety)