Expand description
Bybit connectors and the Bybit wire client.
Re-exports§
pub use brokapi_bybit_protocol as protocol;
Modules§
- cid
- The client order id codec: Bybit keeps a client order id (
orderLinkId) of up to 36 characters on every order, and a full hyphenated UUID is exactly 36. - config
- Configuration of the two connectors: the Bybit client settings plus the choices of the connector itself (source label, reconnect pauses, buffer size).
- core
- The sans-io cores of the Bybit connectors.
- error
- Mapping of the errors of the protocol layer to the broker-independent [
Error]. - limits
- Loads
limits.toml(section[bybit]) throughBrokerLimits::from_toml_section. - map
- Mapping of the wire models of the exchange to the broker-independent types.
- md
- The market data connector: order books, trades, quotes, candles and the directory of instruments.
- pump
- The task that feeds frames of the stream to a core and the events of the core to the emitter.
- raw
- Direct access to any Bybit API method (the “back door”): same key pair, same endpoint, same [
BrokerLimiter] as the connector it came from. - subs
- The subscription records a connector keeps, and the generators of subscription ids and request ids.
- ud
- The user data connector: orders, stop orders, fills and the portfolio of one Bybit account.
- util
- Small helpers: instrument ids, intervals, times.
Structs§
- Bybit
CidCodec - The cid is written into the
orderLinkIdof the order as a hyphenated UUID (lossless, 128-bit, 36 characters of digits, letters and dashes, which the exchange allows). The exchange returns it in the order list, in the order stream and in the fills, which is how a cid comes back. The exchange refuses a second order with the same id while the first one is working, which is what makes a repeated place visible. - Bybit
Raw - A handle to the whole API with the quota of the connector it came from.
- Market
Data Config - Settings of
MarketDataConnector. - Market
Data Connector - The market data connector of Bybit: implements [
OrderBookSource], [MarketDataSource] and [InstrumentSource]. - MdCore
- The sans-io core of the market data connector.
- UdCore
- The sans-io core of the user data connector.
- User
Data Config - Settings of
UserDataConnector. - User
Data Connector - The user data connector of Bybit for one account: implements [
OrderExecutor], [StopOrderExecutor], [ExecutionSource] and [PortfolioSource].