Enum SpotApi

Source
pub enum SpotApi {
Show 38 variants TestConnectivity, CheckServerTime, ExchangeInformation, OrderBook, RecentTrades, HistoricalTrades, AggregatedTrades, KLines, UiKLines, AveragePrice, Ticker24hr, Ticker24hrMultiple, PriceTicker, PriceTickerMultiple, OrderBookTicker, OrderBookTickerMultiple, RollingWindowTicker, RollingWindowTickerMultiple, TestNewOrder, NewOrder, GetOrder, CancelOrder, CancelReplaceOrder, GetOpenOrders, GetOpenOrdersAllSymbols, CancelOpenOrders, GetAllOrders, NewOco, GetOco, CancelOco, GetAllOco, GetOpenOco, AccountInformation, AccountTrades, OrderCountUsage, StartUserDataStream, KeepAliveUserDataStream, CloseUserDataStream,
}
Expand description

Set of possible HTTP methods. Every variant corresponds to a single API call (combination of path and HTTP verb).

Variants§

§

TestConnectivity

Test connectivity to the Rest API.

§

CheckServerTime

Test connectivity to the Rest API and get the current server time.

§

ExchangeInformation

Current exchange trading rules and symbol information.

§

OrderBook

Get the order book.

§

RecentTrades

Get recent trades list.

§

HistoricalTrades

Get older market trades.

§

AggregatedTrades

Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated.

§

KLines

Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.

§

UiKLines

The request is similar to KLines having the same parameters and response. Returns modified kline data, optimized for presentation of candlestick charts.

§

AveragePrice

Current average price for a symbol.

§

Ticker24hr

24 hour rolling window price change statistics for a single symbol.

§

Ticker24hrMultiple

24 hour rolling window price change statistics for multiple symbols. Careful when accessing this with no symbol.

§

PriceTicker

Latest price for a single symbol.

§

PriceTickerMultiple

Latest price for multiple symbols.

§

OrderBookTicker

Best price/qty on the order book for a single symbol.

§

OrderBookTickerMultiple

Best price/qty on the order book for multiple symbols.

§

RollingWindowTicker

Rolling window price change statistics.

Note: This endpoint is different from the 24 hour ticker endpoint. The window used to compute statistics will be no more than 59999ms from the requested windowSize. openTime always starts on a minute, while the closeTime is the current time of the request. As such, the effective window will be up to 59999ms wider than windowSize.

E.g. If the closeTime is 1641287867099 (January 04, 2022 09:17:47:099 UTC), and the windowSize is 1d then the openTime will be: 1641201420000 (January 3, 2022, 09:17:00 UTC)

§

RollingWindowTickerMultiple

Rolling window price change statistics for multiple symbols.

§

TestNewOrder

Test new order creation and signature/recvWindow long. Creates and validates a new order but does not send it into the matching engine.

§

NewOrder

Send in a new order.

See detailed documentation at https://binance-docs.github.io/apidocs/spot/en/#new-order-trade

§

GetOrder

Check an order’s status.

§

CancelOrder

Cancel an active order.

§

CancelReplaceOrder

Cancels an existing order and places a new order on the same symbol.

Filters and Order Count are evaluated before the processing of the cancellation and order placement occurs.

A new order that was not attempted (i.e. when newOrderResult: NOT_ATTEMPTED), will still increase the order count by 1.

Similar to NewOrder, additional mandatory parameters are determined by type. Response format varies depending on whether the processing of the message succeeded, partially succeeded, or failed.

§

GetOpenOrders

Get all open orders on a single symbol.

§

GetOpenOrdersAllSymbols

Get all open orders for multiple symbols. Careful when accessing this as it has too much weight.

§

CancelOpenOrders

Cancels all active orders on a symbol.

§

GetAllOrders

Get all account orders; active, canceled, or filled.

§

NewOco

Send in a new OCO (One-Cancels-the-Other) order.

§

GetOco

Retrieves a specific OCO based on provided optional parameters.

§

CancelOco

Cancel an entire Order List.

§

GetAllOco

Retrieves all OCO based on provided optional parameters.

§

GetOpenOco

Query Open OCO.

§

AccountInformation

Get current account information.

§

AccountTrades

Get trades for a specific account and symbol.

§

OrderCountUsage

Displays the user’s current order count usage for all intervals.

§

StartUserDataStream

Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active listenKey, that listenKey will be returned and its validity will be extended for 60 minutes.

§

KeepAliveUserDataStream

Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It’s recommended to send a ping about every 30 minutes.

§

CloseUserDataStream

Close out a user data stream.

Trait Implementations§

Source§

impl Clone for Api

Source§

fn clone(&self) -> Api

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Api

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Api

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Endpoint for Api

Source§

fn as_endpoint(&self) -> String

The HTTP path for the given request.
Source§

fn http_verb(&self) -> HttpVerb

HTTP method (verb) used to access the endpoint. The most common are: Read more
Source§

fn ip_weight(&self) -> Option<u16>

The API weight regarding IP limits for the given request. Read more
Source§

fn order_weight(&self) -> Option<u16>

The API weight regarding UID (account) limits for the given request. Read more
Source§

fn security_type(&self) -> SecurityType

Determines access to the endpoint.
Source§

impl Copy for Api

Auto Trait Implementations§

§

impl Freeze for Api

§

impl RefUnwindSafe for Api

§

impl Send for Api

§

impl Sync for Api

§

impl Unpin for Api

§

impl UnwindSafe for Api

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,