[−][src]Struct trade::api::hitbtc::Client
An HitBTC API client.
Methods
impl Client
[src]
impl Client
pub fn new(params: Params, key_pair: Option<KeyPair>) -> Result<Self, Error>
[src]
pub fn new(params: Params, key_pair: Option<KeyPair>) -> Result<Self, Error>
Create a new HitBTC API client with given params
. If key_pair
is not
None
, this will enable performing requests to the REST API and will forward
the user data stream.
Note
This method will block, fetching the available symbols from HitBTC.
Trait Implementations
impl GenerateOrderId for Client
[src]
impl GenerateOrderId for Client
fn new_order_id(hint: &str) -> String
[src]
fn new_order_id(hint: &str) -> String
Use hint
for generating an order id. Except for GDAX, this should just be == to_owned
. Read more
impl ApiClient for Client
[src]
impl ApiClient for Client
type Stream = UnboundedReceiver<Notification>
Type returned by the stream
implementor, used for continuously receiving notifications. Read more
fn find_symbol(&self, symbol: &str) -> Option<Symbol>
[src]
fn find_symbol(&self, symbol: &str) -> Option<Symbol>
Find a symbol by name.
fn stream_with_flags(
&self,
symbol: Symbol,
flags: NotificationFlags
) -> Self::Stream
[src]
fn stream_with_flags(
&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>
[src]
fn order(
&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>
[src]
fn cancel(
&self,
cancel: WithSymbol<&Cancel>
) -> Box<dyn Future<Item = Timestamped<CancelAck>, Error = CancelError> + Send + 'static>
Send a cancel order to the exchange. Read more
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>
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. Read more
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>
Retrieve balances for this account.
fn stream(&self, symbol: Symbol) -> Self::Stream
[src]
fn stream(&self, symbol: Symbol) -> Self::Stream
Start streaming notifications.
Auto Trait Implementations
Blanket Implementations
impl<T> IntoTimestamped for T
[src]
impl<T> IntoTimestamped for T
fn timestamped(self) -> Timestamped<Self>
[src]
fn timestamped(self) -> Timestamped<Self>
Add the current timestamp to self
.
fn with_timestamp(self, timestamp: Timestamp) -> Timestamped<Self>
[src]
fn with_timestamp(self, timestamp: Timestamp) -> Timestamped<Self>
Add the given timestamp
to self
.
impl<T> IntoWithSymbol for T
[src]
impl<T> IntoWithSymbol for T
fn with_symbol(&self, symbol: Symbol) -> WithSymbol<&Self>
[src]
fn with_symbol(&self, symbol: Symbol) -> WithSymbol<&Self>
Add the given symbol
to a borrowed &self
.
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<T> Erased for T
impl<T> Erased for T
impl<T> Erased for T
impl<T> Erased for T