pub struct TradeHTTP { /* private fields */ }Trait Implementations§
Source§impl Trade for TradeHTTP
impl Trade for TradeHTTP
Source§fn new(http_manager: Arc<HttpManager>) -> Self
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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§
impl Freeze for TradeHTTP
impl !RefUnwindSafe for TradeHTTP
impl Send for TradeHTTP
impl Sync for TradeHTTP
impl Unpin for TradeHTTP
impl UnsafeUnpin for TradeHTTP
impl !UnwindSafe for TradeHTTP
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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