Expand description
Bitfinex Connector and StreamSelector implementations.
§Notes
§SubscripionId
- Successful Bitfinex subscription responses contain a numeric
CHANNEL_IDthat must be used to identify future messages relating to that subscription (not persistent across connections). - To identify the initial subscription response containing the
CHANNEL_ID, the “channel” & “market” identifiers can be used for theSubscriptionId(channel|market)(eg/ SubscriptionId(“trades|tBTCUSD”)). - Once the subscription has been validated and the
CHANNEL_IDdetermined, eachSubscriptionIdin theSubscriptionIdsHashMapis mutated to becomeSubscriptionId(CHANNEL_ID). eg/ SubscriptionId(“trades|tBTCUSD”) -> SubscriptionId(69)
§Connection Limits
- The user is allowed up to 20 connections per minute on the public API.
- Each connection can be used to connect up to 25 different channels.
§Trade Variants
- Bitfinex trades subscriptions results in receiving tag=“te” & tag=“tu” trades.
- Both appear to be identical payloads, but “te” arriving marginally faster.
- Therefore, tag=“tu” trades are filtered out and considered only as additional Heartbeats.
Modules§
- channel
- Defines the type that translates a Barter
Subscriptioninto an exchangeConnectorspecific channel used for generatingConnector::requests. - market
- Defines the type that translates a Barter
Subscriptioninto an exchangeConnectorspecific market used for generatingConnector::requests. - message
BitfinexMessagetype forBitfinex.- subscription
Subscriptionresponse types and responseValidatorforBitfinex.- trade
- Public trade types for
Bitfinex. - validator
- Custom
SubscriptionValidatorimplementation forBitfinex.
Structs§
Constants§
- BASE_
URL_ BITFINEX Bitfinexserver base url.
Type Aliases§
- Bitfinex
WsStream - Convenient type alias for a Bitfinex
ExchangeWsStreamusingWebSocketSerdeParser.