pub trait RequestResponseApi {
type Error;
Show 22 methods
// Required methods
fn get_all_symbols<'life0, 'async_trait>(
&'life0 mut self,
request: GetAllSymbolsRequest,
) -> Pin<Box<dyn Future<Output = Result<GetAllSymbolsResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_calendar<'life0, 'async_trait>(
&'life0 mut self,
request: GetCalendarRequest,
) -> Pin<Box<dyn Future<Output = Result<GetCalendarResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_chart_last_request<'life0, 'async_trait>(
&'life0 mut self,
request: GetChartLastRequestRequest,
) -> Pin<Box<dyn Future<Output = Result<GetChartLastRequestResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_chart_range_request<'life0, 'async_trait>(
&'life0 mut self,
request: GetChartRangeRequestRequest,
) -> Pin<Box<dyn Future<Output = Result<GetChartRangeRequestResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_commission_def<'life0, 'async_trait>(
&'life0 mut self,
request: GetCommissionDefRequest,
) -> Pin<Box<dyn Future<Output = Result<GetCommissionDefResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_current_user_data<'life0, 'async_trait>(
&'life0 mut self,
request: GetCurrentUserDataRequest,
) -> Pin<Box<dyn Future<Output = Result<GetCurrentUserDataResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_ibs_history<'life0, 'async_trait>(
&'life0 mut self,
request: GetIbsHistoryRequest,
) -> Pin<Box<dyn Future<Output = Result<GetIbsHistoryResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_margin_level<'life0, 'async_trait>(
&'life0 mut self,
request: GetMarginLevelRequest,
) -> Pin<Box<dyn Future<Output = Result<GetMarginLevelResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_margin_trade<'life0, 'async_trait>(
&'life0 mut self,
request: GetMarginTradeRequest,
) -> Pin<Box<dyn Future<Output = Result<GetMarginTradeResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_news<'life0, 'async_trait>(
&'life0 mut self,
request: GetNewsRequest,
) -> Pin<Box<dyn Future<Output = Result<GetNewsResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_profit_calculation<'life0, 'async_trait>(
&'life0 mut self,
request: GetProfitCalculationRequest,
) -> Pin<Box<dyn Future<Output = Result<GetProfitCalculationResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_server_time<'life0, 'async_trait>(
&'life0 mut self,
request: GetServerTimeRequest,
) -> Pin<Box<dyn Future<Output = Result<GetServerTimeResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_step_rules<'life0, 'async_trait>(
&'life0 mut self,
request: GetStepRulesRequest,
) -> Pin<Box<dyn Future<Output = Result<GetStepRulesResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_symbol<'life0, 'async_trait>(
&'life0 mut self,
request: GetSymbolRequest,
) -> Pin<Box<dyn Future<Output = Result<GetSymbolResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_tick_prices<'life0, 'async_trait>(
&'life0 mut self,
request: GetTickPricesRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTickPricesResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_trade_records<'life0, 'async_trait>(
&'life0 mut self,
request: GetTradeRecordsRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTradeRecordsResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_trades<'life0, 'async_trait>(
&'life0 mut self,
request: GetTradesRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTradesResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_trades_history<'life0, 'async_trait>(
&'life0 mut self,
request: GetTradesHistoryRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTradesHistoryResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_trading_hours<'life0, 'async_trait>(
&'life0 mut self,
request: GetTradingHoursRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTradingHoursResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_version<'life0, 'async_trait>(
&'life0 mut self,
request: GetVersionRequest,
) -> Pin<Box<dyn Future<Output = Result<GetVersionResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn trade_transaction<'life0, 'async_trait>(
&'life0 mut self,
request: TradeTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<TradeTransactionResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn trade_transaction_status<'life0, 'async_trait>(
&'life0 mut self,
request: TradeTransactionStatusRequest,
) -> Pin<Box<dyn Future<Output = Result<TradeTransactionStatusResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Declaration of the Request/response API interface.
Required Associated Types§
Required Methods§
Sourcefn get_all_symbols<'life0, 'async_trait>(
&'life0 mut self,
request: GetAllSymbolsRequest,
) -> Pin<Box<dyn Future<Output = Result<GetAllSymbolsResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_symbols<'life0, 'async_trait>(
&'life0 mut self,
request: GetAllSymbolsRequest,
) -> Pin<Box<dyn Future<Output = Result<GetAllSymbolsResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns array of all symbols available for the user.
Sourcefn get_calendar<'life0, 'async_trait>(
&'life0 mut self,
request: GetCalendarRequest,
) -> Pin<Box<dyn Future<Output = Result<GetCalendarResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_calendar<'life0, 'async_trait>(
&'life0 mut self,
request: GetCalendarRequest,
) -> Pin<Box<dyn Future<Output = Result<GetCalendarResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns calendar with market events.
Sourcefn get_chart_last_request<'life0, 'async_trait>(
&'life0 mut self,
request: GetChartLastRequestRequest,
) -> Pin<Box<dyn Future<Output = Result<GetChartLastRequestResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_chart_last_request<'life0, 'async_trait>(
&'life0 mut self,
request: GetChartLastRequestRequest,
) -> Pin<Box<dyn Future<Output = Result<GetChartLastRequestResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Please note that this function can be usually replaced by its streaming equivalent getCandles which is the preferred way of retrieving current candle data. Returns chart info, from start date to the current time. If the chosen period of CHART_LAST_INFO_RECORD is greater than 1 minute, the last candle returned by the API can change until the end of the period (the candle is being automatically updated every minute).
Limitations: there are limitations in charts data availability. Detailed ranges for charts data, what can be accessed with specific period, are as follows:
- PERIOD_M1 — <0-1) month, i.e. one-month time
- PERIOD_M30 — <1-7) month, six months time
- PERIOD_H4 — <7-13) month, six months time
- PERIOD_D1 — 13 month, and earlier on
Note, that specific PERIOD_ is the lowest (i.e. the most detailed) period, accessible in listed range. For instance, in months range <1-7) you can access periods: PERIOD_M30, PERIOD_H1, PERIOD_H4, PERIOD_D1, PERIOD_W1, PERIOD_MN1. Specific data ranges availability is guaranteed, however those ranges may be wider, e.g.: PERIOD_M1 may be accessible for 1.5 months back from now, where 1.0 months is guaranteed.
Example scenario:
- request charts of 5 minutes period, for 3 months time span, back from now;
- response: you are guaranteed to get 1 month of 5 minutes charts; because, 5 minutes period charts are not accessible 2 months and 3 months back from now.
Sourcefn get_chart_range_request<'life0, 'async_trait>(
&'life0 mut self,
request: GetChartRangeRequestRequest,
) -> Pin<Box<dyn Future<Output = Result<GetChartRangeRequestResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_chart_range_request<'life0, 'async_trait>(
&'life0 mut self,
request: GetChartRangeRequestRequest,
) -> Pin<Box<dyn Future<Output = Result<GetChartRangeRequestResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Please note that this function can be usually replaced by its streaming equivalent getCandles which is the preferred way of retrieving current candle data. Returns chart info with data between given start and end dates.
Limitations: there are limitations in charts data availability. Detailed ranges for charts data, what can be accessed with specific period, are as follows:
- PERIOD_M1 — <0-1) month, i.e. one month time
- PERIOD_M30 — <1-7) month, six months time
- PERIOD_H4 — <7-13) month, six months time
- PERIOD_D1 — 13 month, and earlier on
Note, that specific PERIOD_ is the lowest (i.e. the most detailed) period, accessible in listed range. For instance, in months range <1-7) you can access periods: PERIOD_M30, PERIOD_H1, PERIOD_H4, PERIOD_D1, PERIOD_W1, PERIOD_MN1. Specific data ranges availability is guaranteed, however those ranges may be wider, e.g.: PERIOD_M1 may be accessible for 1.5 months back from now, where 1.0 months is guaranteed.
Sourcefn get_commission_def<'life0, 'async_trait>(
&'life0 mut self,
request: GetCommissionDefRequest,
) -> Pin<Box<dyn Future<Output = Result<GetCommissionDefResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_commission_def<'life0, 'async_trait>(
&'life0 mut self,
request: GetCommissionDefRequest,
) -> Pin<Box<dyn Future<Output = Result<GetCommissionDefResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns calculation of commission and rate of exchange. The value is calculated as expected value, and therefore might not be perfectly accurate.
Sourcefn get_current_user_data<'life0, 'async_trait>(
&'life0 mut self,
request: GetCurrentUserDataRequest,
) -> Pin<Box<dyn Future<Output = Result<GetCurrentUserDataResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_current_user_data<'life0, 'async_trait>(
&'life0 mut self,
request: GetCurrentUserDataRequest,
) -> Pin<Box<dyn Future<Output = Result<GetCurrentUserDataResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns information about account currency, and account leverage.
Sourcefn get_ibs_history<'life0, 'async_trait>(
&'life0 mut self,
request: GetIbsHistoryRequest,
) -> Pin<Box<dyn Future<Output = Result<GetIbsHistoryResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_ibs_history<'life0, 'async_trait>(
&'life0 mut self,
request: GetIbsHistoryRequest,
) -> Pin<Box<dyn Future<Output = Result<GetIbsHistoryResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns IBs data from the given time range.
Sourcefn get_margin_level<'life0, 'async_trait>(
&'life0 mut self,
request: GetMarginLevelRequest,
) -> Pin<Box<dyn Future<Output = Result<GetMarginLevelResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_margin_level<'life0, 'async_trait>(
&'life0 mut self,
request: GetMarginLevelRequest,
) -> Pin<Box<dyn Future<Output = Result<GetMarginLevelResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Please note that this function can be usually replaced by its streaming equivalent getBalance which is the preferred way of retrieving account indicators. Returns various account indicators.
Sourcefn get_margin_trade<'life0, 'async_trait>(
&'life0 mut self,
request: GetMarginTradeRequest,
) -> Pin<Box<dyn Future<Output = Result<GetMarginTradeResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_margin_trade<'life0, 'async_trait>(
&'life0 mut self,
request: GetMarginTradeRequest,
) -> Pin<Box<dyn Future<Output = Result<GetMarginTradeResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns expected margin for given instrument and volume. The value is calculated as expected margin value, and therefore might not be perfectly accurate.
Sourcefn get_news<'life0, 'async_trait>(
&'life0 mut self,
request: GetNewsRequest,
) -> Pin<Box<dyn Future<Output = Result<GetNewsResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_news<'life0, 'async_trait>(
&'life0 mut self,
request: GetNewsRequest,
) -> Pin<Box<dyn Future<Output = Result<GetNewsResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Please note that this function can be usually replaced by its streaming equivalent getNews which is the preferred way of retrieving news data. Returns news from trading server which were sent within specified period of time.
Sourcefn get_profit_calculation<'life0, 'async_trait>(
&'life0 mut self,
request: GetProfitCalculationRequest,
) -> Pin<Box<dyn Future<Output = Result<GetProfitCalculationResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_profit_calculation<'life0, 'async_trait>(
&'life0 mut self,
request: GetProfitCalculationRequest,
) -> Pin<Box<dyn Future<Output = Result<GetProfitCalculationResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates estimated profit for given deal data Should be used for calculator-like apps only. Profit for opened transactions should be taken from server, due to higher precision of server calculation.
Sourcefn get_server_time<'life0, 'async_trait>(
&'life0 mut self,
request: GetServerTimeRequest,
) -> Pin<Box<dyn Future<Output = Result<GetServerTimeResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_server_time<'life0, 'async_trait>(
&'life0 mut self,
request: GetServerTimeRequest,
) -> Pin<Box<dyn Future<Output = Result<GetServerTimeResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns current time on trading server.
Sourcefn get_step_rules<'life0, 'async_trait>(
&'life0 mut self,
request: GetStepRulesRequest,
) -> Pin<Box<dyn Future<Output = Result<GetStepRulesResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_step_rules<'life0, 'async_trait>(
&'life0 mut self,
request: GetStepRulesRequest,
) -> Pin<Box<dyn Future<Output = Result<GetStepRulesResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns a list of step rules for DMAs.
Sourcefn get_symbol<'life0, 'async_trait>(
&'life0 mut self,
request: GetSymbolRequest,
) -> Pin<Box<dyn Future<Output = Result<GetSymbolResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_symbol<'life0, 'async_trait>(
&'life0 mut self,
request: GetSymbolRequest,
) -> Pin<Box<dyn Future<Output = Result<GetSymbolResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns information about symbol available for the user.
Sourcefn get_tick_prices<'life0, 'async_trait>(
&'life0 mut self,
request: GetTickPricesRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTickPricesResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_tick_prices<'life0, 'async_trait>(
&'life0 mut self,
request: GetTickPricesRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTickPricesResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Please note that this function can be usually replaced by its streaming equivalent getTickPrices which is the preferred way of retrieving ticks data. Returns array of current quotations for given symbols, only quotations that changed from given timestamp are returned. New timestamp obtained from output will be used as an argument of the next call of this command.
Sourcefn get_trade_records<'life0, 'async_trait>(
&'life0 mut self,
request: GetTradeRecordsRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTradeRecordsResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_trade_records<'life0, 'async_trait>(
&'life0 mut self,
request: GetTradeRecordsRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTradeRecordsResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns array of trades listed in orders argument.
Sourcefn get_trades<'life0, 'async_trait>(
&'life0 mut self,
request: GetTradesRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTradesResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_trades<'life0, 'async_trait>(
&'life0 mut self,
request: GetTradesRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTradesResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Please note that this function can be usually replaced by its streaming equivalent getTrades which is the preferred way of retrieving trades data. Returns array of user’s trades.
Sourcefn get_trades_history<'life0, 'async_trait>(
&'life0 mut self,
request: GetTradesHistoryRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTradesHistoryResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_trades_history<'life0, 'async_trait>(
&'life0 mut self,
request: GetTradesHistoryRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTradesHistoryResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Please note that this function can be usually replaced by its streaming equivalent getTrades which is the preferred way of retrieving trades data. Returns array of user’s trades which were closed within specified period of time.
Sourcefn get_trading_hours<'life0, 'async_trait>(
&'life0 mut self,
request: GetTradingHoursRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTradingHoursResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_trading_hours<'life0, 'async_trait>(
&'life0 mut self,
request: GetTradingHoursRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTradingHoursResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns quotes and trading times.
Sourcefn get_version<'life0, 'async_trait>(
&'life0 mut self,
request: GetVersionRequest,
) -> Pin<Box<dyn Future<Output = Result<GetVersionResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_version<'life0, 'async_trait>(
&'life0 mut self,
request: GetVersionRequest,
) -> Pin<Box<dyn Future<Output = Result<GetVersionResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the current API version.
Sourcefn trade_transaction<'life0, 'async_trait>(
&'life0 mut self,
request: TradeTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<TradeTransactionResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn trade_transaction<'life0, 'async_trait>(
&'life0 mut self,
request: TradeTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<TradeTransactionResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Starts trade transaction. tradeTransaction sends main transaction information to the server.
§Note
How to verify that the trade request was accepted? The status field set to ‘true’ does not imply that the transaction was accepted. It only means, that the server acquired your request and began to process it. To analyse the status of the transaction (for example to verify if it was accepted or rejected) use the tradeTransactionStatus command with the order number, that came back with the response of the tradeTransaction command. You can find the example here: https://developers.xstore.pro/api/tutorials/opening_and_closing_trades2
Sourcefn trade_transaction_status<'life0, 'async_trait>(
&'life0 mut self,
request: TradeTransactionStatusRequest,
) -> Pin<Box<dyn Future<Output = Result<TradeTransactionStatusResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn trade_transaction_status<'life0, 'async_trait>(
&'life0 mut self,
request: TradeTransactionStatusRequest,
) -> Pin<Box<dyn Future<Output = Result<TradeTransactionStatusResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Description: Please note that this function can be usually replaced by its streaming equivalent getTradeStatus which is the preferred way of retrieving transaction status data. Returns current transaction status. At any time of transaction processing client might check the status of transaction on server side. In order to do that client must provide unique order taken from tradeTransaction invocation.