Struct septoria::client::TradingClient
source · [−]Expand description
The client for the Lemon API.
Fields
api_key: String
The API key.
base_url: Url
The base url for the API
Implementations
sourceimpl TradingClient
impl TradingClient
sourcepub fn get_order(
&self,
id: Option<String>
) -> Result<GenericResponse<OrderResults>, Error>
pub fn get_order(
&self,
id: Option<String>
) -> Result<GenericResponse<OrderResults>, Error>
Get orders
sourcepub fn post_order(
&self,
_body: OrderPlacing
) -> Result<GenericResponse<OrderResults>, Error>
pub fn post_order(
&self,
_body: OrderPlacing
) -> Result<GenericResponse<OrderResults>, Error>
Post and create a new order.
sourceimpl TradingClient
impl TradingClient
sourceimpl TradingClient
impl TradingClient
sourcepub fn get_account_information(
&self
) -> Result<AccountInformation<AccountResults>, Error>
pub fn get_account_information(
&self
) -> Result<AccountInformation<AccountResults>, Error>
Get account information
sourceimpl TradingClient
impl TradingClient
sourcepub fn get_positions_performance(
&self
) -> Result<PaginationResponse<PositionPerformance>, Error>
pub fn get_positions_performance(
&self
) -> Result<PaginationResponse<PositionPerformance>, Error>
Get an overview of your position performances Using this endpoint, you can retrieve when positions were opened and closed, potential profits/losses, or related fees for position orders.
sourceimpl TradingClient
impl TradingClient
sourcepub fn get_statements(
&self,
limit: Option<i64>,
page: Option<u32>
) -> Result<PaginationResponse<Statement>, Error>
pub fn get_statements(
&self,
limit: Option<i64>,
page: Option<u32>
) -> Result<PaginationResponse<Statement>, Error>
Get all change events happening to your positions.
sourceimpl TradingClient
impl TradingClient
sourcepub fn get_positions(&self) -> Result<PaginationResponse<Position>, Error>
pub fn get_positions(&self) -> Result<PaginationResponse<Position>, Error>
Get all positions
sourceimpl TradingClient
impl TradingClient
sourcepub fn paper_client(api_key: &str) -> Self
pub fn paper_client(api_key: &str) -> Self
Create a new client for paper trading with the given API key.
sourcepub fn live_client(api_key: String) -> Self
pub fn live_client(api_key: String) -> Self
Create a new client for live trading with the given API key.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for TradingClient
impl Send for TradingClient
impl Sync for TradingClient
impl Unpin for TradingClient
impl !UnwindSafe for TradingClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more