Skip to main content

TradeHTTP

Struct TradeHTTP 

Source
pub struct TradeHTTP { /* private fields */ }

Trait Implementations§

Source§

impl Trade for TradeHTTP

Source§

fn new(http_manager: Arc<HttpManager>) -> Self

Source§

fn place_order<'life0, 'async_trait>( &'life0 self, query: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

This method supports to create the order for spot, spot margin, linear perpetual, inverse futures and options. Required args: category (string): Product type Unified account: spot, linear, optionNormal account: linear, inverse. Please note that category is not involved with business logic symbol (string): Symbol name side (string): Buy, Sell orderType (string): Market, Limit qty (string): Order quantity Returns: Request results as JSON data. Additional information: https://bybit-exchange.github.io/docs/v5/order/create-order

Source§

fn amend_order<'life0, 'async_trait>( &'life0 self, query: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Unified account covers: Linear contract / Options Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures Required args: category (string): Product type Unified account: spot, linear, optionNormal account: linear, inverse. Please note that category is not involved with business logic symbol (string): Symbol name Returns: Request results as JSON data. Additional information:

Source§

fn cancel_order<'life0, 'async_trait>( &'life0 self, query: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Unified account covers: Spot / Linear contract / Options Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures Required args: category (string): Product type Unified account: spot, linear, optionNormal account: linear, inverse. Please note that category is not involved with business logic symbol (string): Symbol name orderId (string): Order ID. Either orderId or orderLinkId is required orderLinkId (string): User customised order ID. Either orderId or orderLinkId is required Returns: Request results as JSON data. Additional information: https://bybit-exchange.github.io/docs/v5/order/cancel-order

Source§

fn get_open_orders<'life0, 'async_trait>( &'life0 self, query: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Query unfilled or partially filled orders in real-time. To query older order records, please use the order history interface. Required args: category (string): Product type Unified account: spot, linear, optionNormal account: linear, inverse. Please note that category is not involved with business logic Returns: Request results as JSON data. Additional information: https://bybit-exchange.github.io/docs/v5/order/open-order

Source§

fn cancel_all_orders<'life0, 'async_trait>( &'life0 self, query: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cancel all open orders Required args: category (string): Product type Unified account: spot, linear, option Normal account: linear, inverse. Please note that category is not involved with business logic. If cancel all by baseCoin, it will cancel all linear & inverse orders Returns: Request results as JSON data. Additional information: https://bybit-exchange.github.io/docs/v5/order/cancel-all

Source§

fn get_order_history<'life0, 'async_trait>( &'life0 self, query: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Query order history. As order creation/cancellation is asynchronous, the data returned from this endpoint may delay. If you want to get real-time order information, you could query this endpoint or rely on the websocket stream (recommended). Required args: category (string): Product type Unified account: spot, linear, option Normal account: linear, inverse. Please note that category is not involved with business logic Returns: Request results as JSON data. Additional information: https://bybit-exchange.github.io/docs/v5/order/order-list

Source§

fn amend_batch_order<'life0, 'async_trait>( &'life0 self, query: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Covers: Option (Unified Account) Required args: category (string): Product type. option request (array): Object > symbol (string): Symbol name > side (string): Buy, Sell > orderType (string): Market, Limit > qty (string): Order quantity Returns: Request results as JSON data. Additional information: https://bybit-exchange.github.io/docs/v5/order/batch-place

Source§

fn cancel_batch_order<'life0, 'async_trait>( &'life0 self, query: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

This endpoint allows you to cancel more than one open order in a single request. Required args: category (string): Product type. option request (array): Object > symbol (string): Symbol name Returns: Request results as JSON data. Additional information: https://bybit-exchange.github.io/docs/v5/order/batch-cancel

Source§

fn get_borrow_quota<'life0, 'async_trait>( &'life0 self, query: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Query the qty and amount of borrowable coins in spot account. Required args: category (string): Product type. spot symbol (string): Symbol name side (string): Transaction side. Buy,Sell Returns: Request results as JSON data. Additional information: https://bybit-exchange.github.io/docs/v5/order/spot-borrow-quota

Source§

fn set_dcp<'life0, 'async_trait>( &'life0 self, query: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Covers: Option (Unified Account) Required args: timeWindow (integer): Disconnection timing window time. [10, 300], unit: second Returns: Request results as JSON data. Additional information: https://bybit-exchange.github.io/docs/v5/order/dcp

Auto Trait Implementations§

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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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