Crate betfair_stream_api

Crate betfair_stream_api 

Source
Expand description

Betfair Stream API client implementation.

This crate provides an asynchronous client for interacting with Betfair’s Streaming API. It manages connection setup, handshake, framing, heartbeats, and automatic reconnections. Users can customize how incoming messages are handled by implementing the MessageProcessor trait or using the built-in Cache processor for maintaining market and order caches.

Re-exports§

pub use betfair_stream_types as types;

Modules§

cache
Contains all the types that are necessary to properly build a local cache representation of the market

Structs§

BetfairStreamBuilder
A Betfair Stream API client that handles connection, handshake, incoming/outgoing messages, heartbeat and automatic reconnects. Builder for creating a Betfair Streaming API client.
BetfairStreamClient
Handle to a running Betfair Streaming API client.
Cache
Default MessageProcessor implementation that maintains market and order caches.
Forwarder
MessageProcessor that forwards raw ResponseMessage objects without transformation.
StreamAPIClientCodec
Defines the encoding and decoding of Betfair stream api data structures using tokio

Enums§

CachedMessage
Variants of messages produced by the cache-based processor.

Traits§

MessageProcessor
Trait for processing incoming Betfair streaming ResponseMessage objects into user-defined outputs.