[−][src]Trait trade::api::ApiClient
A trait implemented by clients of various exchanges API.
Associated Types
type Stream: Stream<Item = Notification, Error = ()> + Send + 'static
Type returned by the stream
implementor, used for continuously receiving
notifications.
Required Methods
fn find_symbol(&self, symbol: &str) -> Option<Symbol>
Find a symbol by name.
fn stream_with_flags(
&self,
symbol: Symbol,
flags: NotificationFlags
) -> Self::Stream
&self,
symbol: Symbol,
flags: NotificationFlags
) -> Self::Stream
Start streaming notifications, only forward those indicated by flags
.
fn order(
&self,
order: WithSymbol<&Order>
) -> Box<dyn Future<Item = Timestamped<OrderAck>, Error = OrderError> + Send + 'static>
&self,
order: WithSymbol<&Order>
) -> Box<dyn Future<Item = Timestamped<OrderAck>, Error = OrderError> + Send + 'static>
Send an order to the exchange.
fn cancel(
&self,
cancel: WithSymbol<&Cancel>
) -> Box<dyn Future<Item = Timestamped<CancelAck>, Error = CancelError> + Send + 'static>
&self,
cancel: WithSymbol<&Cancel>
) -> Box<dyn Future<Item = Timestamped<CancelAck>, Error = CancelError> + Send + 'static>
Send a cancel order to the exchange.
Note
Do no try to cancel an order if said order has not yet been confirmed by the exchange.
fn ping(
&self
) -> Box<dyn Future<Item = Timestamped<()>, Error = Error> + Send + 'static>
&self
) -> Box<dyn Future<Item = Timestamped<()>, Error = Error> + Send + 'static>
Send a ping to the exchange. This can be used to measure the whole roundtrip time, including authentication and passage through the various software layers. For binance, the exchange must be pinged regularly in order to keep the listen key alive.
Note
Only work for binance right now.
fn balances(
&self
) -> Box<dyn Future<Item = Balances, Error = Error> + Send + 'static>
&self
) -> Box<dyn Future<Item = Balances, Error = Error> + Send + 'static>
Retrieve balances for this account.
Provided Methods
Implementors
impl ApiClient for trade::api::binance::Client
[src]
impl ApiClient for trade::api::binance::Client
type Stream = UnboundedReceiver<Notification>
fn find_symbol(&self, symbol: &str) -> Option<Symbol>
[src]
fn find_symbol(&self, symbol: &str) -> Option<Symbol>
fn stream_with_flags(
&self,
symbol: Symbol,
flags: NotificationFlags
) -> Self::Stream
[src]
fn stream_with_flags(
&self,
symbol: Symbol,
flags: NotificationFlags
) -> Self::Stream
fn order(
&self,
order: WithSymbol<&Order>
) -> Box<dyn Future<Item = Timestamped<OrderAck>, Error = OrderError> + Send + 'static>
[src]
fn order(
&self,
order: WithSymbol<&Order>
) -> Box<dyn Future<Item = Timestamped<OrderAck>, Error = OrderError> + Send + 'static>
fn cancel(
&self,
cancel: WithSymbol<&Cancel>
) -> Box<dyn Future<Item = Timestamped<CancelAck>, Error = CancelError> + Send + 'static>
[src]
fn cancel(
&self,
cancel: WithSymbol<&Cancel>
) -> Box<dyn Future<Item = Timestamped<CancelAck>, Error = CancelError> + Send + 'static>
fn ping(
&self
) -> Box<dyn Future<Item = Timestamped<()>, Error = Error> + Send + 'static>
[src]
fn ping(
&self
) -> Box<dyn Future<Item = Timestamped<()>, Error = Error> + Send + 'static>
fn balances(
&self
) -> Box<dyn Future<Item = Balances, Error = Error> + Send + 'static>
[src]
fn balances(
&self
) -> Box<dyn Future<Item = Balances, Error = Error> + Send + 'static>
fn stream(&self, symbol: Symbol) -> Self::Stream
[src]
fn stream(&self, symbol: Symbol) -> Self::Stream
impl ApiClient for trade::api::gdax::Client
[src]
impl ApiClient for trade::api::gdax::Client
type Stream = UnboundedReceiver<Notification>
fn find_symbol(&self, symbol: &str) -> Option<Symbol>
[src]
fn find_symbol(&self, symbol: &str) -> Option<Symbol>
fn stream_with_flags(
&self,
symbol: Symbol,
flags: NotificationFlags
) -> Self::Stream
[src]
fn stream_with_flags(
&self,
symbol: Symbol,
flags: NotificationFlags
) -> Self::Stream
fn order(
&self,
order: WithSymbol<&Order>
) -> Box<dyn Future<Item = Timestamped<OrderAck>, Error = OrderError> + Send + 'static>
[src]
fn order(
&self,
order: WithSymbol<&Order>
) -> Box<dyn Future<Item = Timestamped<OrderAck>, Error = OrderError> + Send + 'static>
fn cancel(
&self,
cancel: WithSymbol<&Cancel>
) -> Box<dyn Future<Item = Timestamped<CancelAck>, Error = CancelError> + Send + 'static>
[src]
fn cancel(
&self,
cancel: WithSymbol<&Cancel>
) -> Box<dyn Future<Item = Timestamped<CancelAck>, Error = CancelError> + Send + 'static>
fn ping(
&self
) -> Box<dyn Future<Item = Timestamped<()>, Error = Error> + Send + 'static>
[src]
fn ping(
&self
) -> Box<dyn Future<Item = Timestamped<()>, Error = Error> + Send + 'static>
fn balances(
&self
) -> Box<dyn Future<Item = Balances, Error = Error> + Send + 'static>
[src]
fn balances(
&self
) -> Box<dyn Future<Item = Balances, Error = Error> + Send + 'static>
fn stream(&self, symbol: Symbol) -> Self::Stream
[src]
fn stream(&self, symbol: Symbol) -> Self::Stream
impl ApiClient for trade::api::hitbtc::Client
[src]
impl ApiClient for trade::api::hitbtc::Client
type Stream = UnboundedReceiver<Notification>
fn find_symbol(&self, symbol: &str) -> Option<Symbol>
[src]
fn find_symbol(&self, symbol: &str) -> Option<Symbol>
fn stream_with_flags(
&self,
symbol: Symbol,
flags: NotificationFlags
) -> Self::Stream
[src]
fn stream_with_flags(
&self,
symbol: Symbol,
flags: NotificationFlags
) -> Self::Stream
fn order(
&self,
order: WithSymbol<&Order>
) -> Box<dyn Future<Item = Timestamped<OrderAck>, Error = OrderError> + Send + 'static>
[src]
fn order(
&self,
order: WithSymbol<&Order>
) -> Box<dyn Future<Item = Timestamped<OrderAck>, Error = OrderError> + Send + 'static>
fn cancel(
&self,
cancel: WithSymbol<&Cancel>
) -> Box<dyn Future<Item = Timestamped<CancelAck>, Error = CancelError> + Send + 'static>
[src]
fn cancel(
&self,
cancel: WithSymbol<&Cancel>
) -> Box<dyn Future<Item = Timestamped<CancelAck>, Error = CancelError> + Send + 'static>
fn ping(
&self
) -> Box<dyn Future<Item = Timestamped<()>, Error = Error> + Send + 'static>
[src]
fn ping(
&self
) -> Box<dyn Future<Item = Timestamped<()>, Error = Error> + Send + 'static>
fn balances(
&self
) -> Box<dyn Future<Item = Balances, Error = Error> + Send + 'static>
[src]
fn balances(
&self
) -> Box<dyn Future<Item = Balances, Error = Error> + Send + 'static>
fn stream(&self, symbol: Symbol) -> Self::Stream
[src]
fn stream(&self, symbol: Symbol) -> Self::Stream