| Crates.io | oanda-v20-openapi |
| lib.rs | oanda-v20-openapi |
| version | 0.2.1 |
| created_at | 2025-09-06 12:43:35.504604+00 |
| updated_at | 2025-09-08 13:01:53.522522+00 |
| description | The full OANDA v20 API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1827031 |
| size | 1,112,706 |
Status: pre-alpha. Autogenerated. Lightly hand-patched. Expect breaking changes.
This crate is an autogenerated Rust client for the OANDA v20 REST API. It is not well-tested and is under active development. The upstream OpenAPI/Swagger spec appears abandoned, so this repository includes a maintained copy of the v20 spec with updates.
I am not affiliated with OANDA. Use at your own risk.
Autogenerated request/response types and API methods from an OpenAPI spec.
Minimal ergonomics added only where necessary to get things compiling.
No stability guarantees yet (SemVer 0.x; breaking changes may happen at any time).
The public v20 spec is invalid and out of date.
If you spot mismatches with the API spec in the repository or want to suggest an improvement, please open an issue with the exact endpoint and a redacted sample payload.
Hardly any test coverage. Basic unit tests exist for bugs I have found while using this crate in my own projects. Zero integration tests with the actual API for now.
Generated code first. The only manual code in this crate is to test the generated code.
This project is generated from the local spec (patched). Typical flow:
Edit the spec v20-openapi.yaml and keep patches minimal and documented.
Run the generation script gen.sh to rewrite the client code.
Build and run tests with cargo test.
To avoid editing generated code, unit tests live under tests/.
Until 1.0, any release may contain breaking changes.
Release notes on GitHub will note the changes.
Issues and PRs are welcome, especially reports of spec/response mismatches with small, reproducible samples. Please keep changes narrowly scoped (one endpoint or one model at a time).
While working on this API spec I am also trying to wrap it in a more idiomatic and testable oanda-v20-rs crate.
This project is unofficial and not endorsed by OANDA.
No warranties of any kind. The API and/or this client may change without notice.
Foreign exchange and CFD trading involve significant risk of loss. Nothing here is financial advice.