pub struct Client {
pub reqwest: Client,
pub host: String,
pub authentication: String,
}
Expand description
HTTP Client used to call the OANDA web services.
Fields§
§reqwest: Client
The reqwest object to use. Note that this is a synchronous client that cannot be used in async code.
host: String
OANDA host to use (do not include https://)
authentication: String
OANDA API key
Implementations§
source§impl Client
impl Client
pub async fn candles( &self, x: GetInstrumentCandlesRequest ) -> Result<GetInstrumentCandlesResponse, Box<dyn Error>>
source§impl Client
impl Client
pub async fn orderbook( &self, x: GetOrderBookRequest ) -> Result<GetOrderBookResponse, Box<dyn Error>>
source§impl Client
impl Client
pub async fn positionbook( &self, x: GetPositionBookRequest ) -> Result<GetPositionBookResponse, Box<dyn Error>>
source§impl Client
impl Client
pub async fn pricing( &self, x: GetPricesRequest ) -> Result<GetPricesResponse, Box<dyn Error>>
source§impl Client
impl Client
pub async fn accounts( &self, x: ListAccountsRequest ) -> Result<ListAccountsResponse, Box<dyn Error>>
source§impl Client
impl Client
pub async fn account_summary( &self, x: GetAccountSummaryRequest ) -> Result<GetAccountSummaryResponse, Box<dyn Error>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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
Mutably borrows from an owned value. Read more