Crate barter_integration_copy

Crate barter_integration_copy 

Source
Expand description

§Barter-Integration

High-performance, low-level framework for composing flexible web integrations.

Utilised by other Barter trading ecosystem crates to build robust financial exchange integrations, primarily for public data collection & trade execution. It is:

  • Low-Level: Translates raw data streams communicated over the web into any desired data model using arbitrary data transformations.
  • Flexible: Compatible with any protocol (WebSocket, FIX, Http, etc.), any input/output model, and any user defined transformations.

§Core abstractions:

  • RestClient providing configurable signed Http communication between client & server.
  • ExchangeStream providing configurable communication over any asynchronous stream protocols (WebSocket, FIX, etc.).

Both core abstractions provide the robust glue you need to conveniently translate between server & client data models.

Modules§

channel
Defines a trait Tx abstraction over different channel kinds, as well as other channel utilities.
de
Utilities to assist deserialisation.
error
All Errors generated in Barter-Integration.
metric
Contains the flexible Metric type used for representing real-time metrics generically.
protocol
Contains StreamParser implementations for transforming communication protocol specific messages into a generic output data structure.
subscription
Defines a SubscriptionId new type representing a unique SmolStr identifier for a data stream (market data, account data) that has been subscribed to.

Structs§

ExchangeStream
An ExchangeStream is a communication protocol agnostic Stream. It polls protocol messages from the inner Stream, and transforms them into the desired output data structure.

Enums§

Side
Side of a trade or position - Buy or Sell.

Traits§

Transformer
Transformers are capable of transforming any Input into an iterator of Result<Self::Output, Self::Error>s.
Validator
Validators are capable of determining if their internal state is satisfactory to fulfill some use case defined by the implementor.