Skip to main content

Crate oanda_client

Crate oanda_client 

Source
Expand description

Async provider-native client for the OANDA v20 REST API.

The caller owns credentials, their storage, and the Tokio runtime.

Re-exports§

pub use accounts as account;
pub use orders as order;
pub use positions as position;
pub use trades as trade;
pub use transactions as transaction;
pub use stream::HttpStream;
pub use stream::PriceStreamEvent;
pub use stream::TransactionStreamEvent;

Modules§

accounts
OANDA account endpoint contracts.
instruments
Instrument models and candle endpoint contracts.
models
Provider-native OANDA v20 models.
orders
OANDA order endpoint contracts.
positions
OANDA position endpoint contracts.
pricing
OANDA pricing endpoint contracts.
primitives
Exact values, timestamps, and validated provider identities.
stream
Bounded newline-delimited HTTP streams.
trades
OANDA trade endpoint contracts.
transactions
OANDA transaction endpoint contracts.
transport
HTTP client, streaming, and error contracts.

Structs§

AccountID
Validated OANDA AccountID.
ApiResponse
A typed OANDA response with the provider’s request and pagination metadata.
CandleSpecification
Validated OANDA CandleSpecification.
Client
Shareable OANDA v20 client.
ClientBuilder
Validated client configuration.
ClientComment
Validated OANDA ClientComment.
ClientID
Validated OANDA ClientID.
ClientRequestID
Validated OANDA ClientRequestID.
ClientTag
Validated OANDA ClientTag.
Currency
Validated OANDA Currency.
GenericRejection
Common OANDA error fields on endpoints without a specific rejection schema.
InstrumentName
Validated OANDA InstrumentName.
InvalidId
Error returned when a provider identifier is empty or contains control characters.
OrderID
Validated OANDA OrderID.
OrderSpecifier
Validated OANDA OrderSpecifier.
PricingComponent
Validated OANDA PricingComponent.
RequestID
Validated OANDA RequestID.
Timestamp
UTC instant accepted from RFC3339 or OANDA’s fractional Unix-seconds form.
TradeID
Validated OANDA TradeID.
TradeSpecifier
Validated OANDA TradeSpecifier.
TransactionID
Validated OANDA TransactionID.

Enums§

Environment
OANDA account environment.
Error
An OANDA client failure.
OperationError
An endpoint error with its documented rejection body when available.
Patch
A mutation field that may be left unchanged, cleared, or set.
Supplied
What OANDA actually supplied for an optional contract field.

Type Aliases§

Result
Result returned by client operations.