pub trait AccountService: Send + Sync {
// Required methods
fn get_accounts<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
) -> Pin<Box<dyn Future<Output = Result<AccountInfo, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_positions<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
) -> Pin<Box<dyn Future<Output = Result<Positions, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_working_orders<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
) -> Pin<Box<dyn Future<Output = Result<WorkingOrders, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_activity<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
from: &'life2 str,
to: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<AccountActivity, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn get_activity_with_details<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
from: &'life2 str,
to: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<AccountActivity, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn get_transactions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
from: &'life2 str,
to: &'life3 str,
page_size: u32,
page_number: u32,
) -> Pin<Box<dyn Future<Output = Result<TransactionHistory, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Interface for the account service
Required Methods§
Sourcefn get_accounts<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
) -> Pin<Box<dyn Future<Output = Result<AccountInfo, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_accounts<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
) -> Pin<Box<dyn Future<Output = Result<AccountInfo, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets information about all user accounts
Sourcefn get_positions<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
) -> Pin<Box<dyn Future<Output = Result<Positions, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_positions<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
) -> Pin<Box<dyn Future<Output = Result<Positions, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets open positions
Sourcefn get_working_orders<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
) -> Pin<Box<dyn Future<Output = Result<WorkingOrders, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_working_orders<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
) -> Pin<Box<dyn Future<Output = Result<WorkingOrders, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets working orders
Sourcefn get_activity<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
from: &'life2 str,
to: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<AccountActivity, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_activity<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
from: &'life2 str,
to: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<AccountActivity, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Sourcefn get_activity_with_details<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
from: &'life2 str,
to: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<AccountActivity, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_activity_with_details<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
from: &'life2 str,
to: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<AccountActivity, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Gets detailed account activity
This method includes additional details for each activity item by using the detailed=true parameter in the API request.
§Arguments
session- The current sessionfrom- Start date in ISO format (e.g. “2023-01-01T00:00:00Z”)to- End date in ISO format (e.g. “2023-02-01T00:00:00Z”)
§Returns
- Detailed account activity for the specified period
Sourcefn get_transactions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
from: &'life2 str,
to: &'life3 str,
page_size: u32,
page_number: u32,
) -> Pin<Box<dyn Future<Output = Result<TransactionHistory, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_transactions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
from: &'life2 str,
to: &'life3 str,
page_size: u32,
page_number: u32,
) -> Pin<Box<dyn Future<Output = Result<TransactionHistory, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Gets transaction history