pub struct Ftx {
pub ids: SubscriptionIds,
}Expand description
Ftx Subscriber & ExchangeTransformer implementor for the collection
of Spot & Futures data.
Fields
ids: SubscriptionIdsTrait Implementations
sourceimpl<'de> Deserialize<'de> for Ftx
impl<'de> Deserialize<'de> for Ftx
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl ExchangeTransformer for Ftx
impl ExchangeTransformer for Ftx
sourceconst EXCHANGE: ExchangeId = ExchangeId::Ftx
const EXCHANGE: ExchangeId = ExchangeId::Ftx
Unique identifier for an ExchangeTransformer.
sourcefn new(_: UnboundedSender<WsMessage>, ids: SubscriptionIds) -> Self
fn new(_: UnboundedSender<WsMessage>, ids: SubscriptionIds) -> Self
Constructs a new ExchangeTransformer using a transmitter to the WsSink and the
SubscriptionIds HashMap. Read more
sourceimpl PartialEq<Ftx> for Ftx
impl PartialEq<Ftx> for Ftx
sourceimpl Subscriber for Ftx
impl Subscriber for Ftx
type SubResponse = FtxSubResponse
type SubResponse = FtxSubResponse
Deserialisable type that this Subscriber expects to receive from the exchange in
response to Subscription requests. Implements Validator in order to determine
if the SubResponse communicates a successful outcome. Read more
sourcefn base_url() -> &'static str
fn base_url() -> &'static str
Returns the Base URL of the exchange to establish a connection with.
sourcefn build_subscription_meta(
subscriptions: &[Subscription]
) -> Result<SubscriptionMeta, SocketError>
fn build_subscription_meta(
subscriptions: &[Subscription]
) -> Result<SubscriptionMeta, SocketError>
Uses the provided Barter Subscriptions to build exchange specific subscription
payloads. Generates a SubscriptionIds Hashmap that is used by an ExchangeTransformer
to identify the Barter Subscriptions associated with received messages. Read more
sourcefn subscribe<'life0, 'async_trait>(
subscriptions: &'life0 [Subscription]
) -> Pin<Box<dyn Future<Output = Result<(WebSocket, SubscriptionIds), SocketError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Send + 'async_trait,
fn subscribe<'life0, 'async_trait>(
subscriptions: &'life0 [Subscription]
) -> Pin<Box<dyn Future<Output = Result<(WebSocket, SubscriptionIds), SocketError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Send + 'async_trait,
Initialises a WebSocket connection, actions the provided collection of Barter
Subscriptions, and validates that the Subscription were accepted by the exchange. Read more
sourcefn validate<'life0, 'async_trait>(
websocket: &'life0 mut WebSocket,
expected_responses: usize
) -> Pin<Box<dyn Future<Output = Result<(), SocketError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Send + 'async_trait,
fn validate<'life0, 'async_trait>(
websocket: &'life0 mut WebSocket,
expected_responses: usize
) -> Pin<Box<dyn Future<Output = Result<(), SocketError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Send + 'async_trait,
Uses the provided WebSocket connection to consume Subscription responses and
validate their outcomes. Read more
sourcefn subscription_timeout() -> Duration
fn subscription_timeout() -> Duration
Return the expected Duration in which the exchange will respond to all actioned
WebSocket Subscription requests. Read more
sourceimpl Transformer<MarketEvent> for Ftx
impl Transformer<MarketEvent> for Ftx
type Input = FtxMessage
type OutputIter = Vec<Result<MarketEvent, SocketError>, Global>
fn transform(&mut self, input: Self::Input) -> Self::OutputIter
impl Eq for Ftx
impl StructuralEq for Ftx
impl StructuralPartialEq for Ftx
Auto Trait Implementations
impl RefUnwindSafe for Ftx
impl Send for Ftx
impl Sync for Ftx
impl Unpin for Ftx
impl UnwindSafe for Ftx
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more