Struct CoinApiDataClient Copy item path Source pub struct CoinApiDataClient { }Expand description CoinAPI data client streaming order books, quotes, trades, and OHLCV bars for configured
native instruments.
Connecting loads the configured instruments, emits them, and retains the CoinAPI symbol_id
of each one for subscriptions and historical requests. Every subscription shares one WebSocket
connection, which replays its scope after a transport reconnect. Instrument refreshes update
precision and REST symbol IDs; subscriptions retain their connect-time symbol IDs until the
data client disconnects and connects again.
Book deltas stream from the full book channel for L2 books and from book_l3 for L3 books,
with sequence gap detection and recovery. Depth snapshots stream from the cheapest of book5,
book20, and book50 that lists the requested depth, ten levels by default. CoinAPI allows one
book channel per connection, so every book subscription must use the same channel.
Creates a client without connecting.
§ Errors
Returns an error if no valid API key resolves from the config or COINAPI_API_KEY, when an
instrument selection is empty, repeats an instrument, or names an instrument that does not
map to its exchange, or when the REST or WebSocket configuration is invalid.
§ Panics
Panics if the data event sender is not initialized on this thread.
Returns the unique identifier for this data client.
Returns the optional venue this client is associated with.
Resets the data client to its initial state.
Read more Disposes of client resources and cleans up.
Read more Returns true if the client is currently connected.
Returns true if the client is currently disconnected.
Connects the client to the data provider.
Read more Disconnects the client from the data provider.
Read more Subscribes to order book delta updates for the specified instruments.
Read more Subscribes to order book depth snapshot updates for the specified instruments.
Read more Subscribes to quote updates for the specified instruments.
Read more Subscribes to trade updates for the specified instruments.
Read more Subscribes to bar updates of the specified full bar types.
Read more Unsubscribes from order book delta updates for the specified instruments.
Read more Unsubscribes from order book depth snapshot updates for the specified instruments.
Read more Unsubscribes from quote updates for the specified instruments.
Read more Unsubscribes from trade updates for the specified instruments.
Read more Unsubscribes from bar updates of the specified full bar types.
Read more Requests a list of instruments from the provider for a given venue.
Read more Requests detailed data for a single instrument.
Read more Requests a snapshot of the order book for a specified instrument.
Read more Requests historical or streaming quote data for a specified instrument.
Read more Requests historical or streaming trade data for a specified instrument.
Read more Requests historical or streaming bar data for a specified instrument and bar type.
Read more Subscribes to custom data types according to the command.
Read more Subscribes to instruments list for the specified venue.
Read more Subscribes to definitions for the specified instruments.
Read more Subscribes to mark price updates for the specified instruments.
Read more Subscribes to index price updates for the specified instruments.
Read more Subscribes to funding rate updates for the specified instruments.
Read more Subscribes to status updates for the specified instruments.
Read more Subscribes to instrument close events for the specified instruments.
Read more Subscribes to exchange-provided option greeks for the specified instruments.
Read more Unsubscribes from custom data types according to the command.
Read more Unsubscribes from instruments list for the specified venue.
Read more Unsubscribes from data for the specified instruments.
Read more Unsubscribes from mark price updates for the specified instruments.
Read more Unsubscribes from index price updates for the specified instruments.
Read more Unsubscribes from funding rate updates for the specified instruments.
Read more Unsubscribes from instrument status updates for the specified instruments.
Read more Unsubscribes from instrument close events for the specified instruments.
Read more Unsubscribes from exchange-provided option greeks for the specified instruments.
Read more Sends a custom data request to the provider.
Read more Requests historical or streaming funding rate data for a specified instrument.
Read more Requests a reference price for an option-chain bootstrap.
Read more Requests historical order book depth data for a specified instrument.
Read more Requests historical order book delta data for a specified instrument.
Read more Formats the value using the given formatter.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more Returns the argument unchanged.
Instruments this type with the provided
Span, returning an
Instrumented wrapper.
Read more Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.