tastytrade
tastytrade is a Rust client library for the Tastytrade API, providing programmatic access to
trading functionality, market data, and account information.
Features
- Authentication with Tastytrade accounts
- Real-time market data streaming via DxFeed
- Account and positions information
- Order management (placing, modifying, canceling)
- Real-time account streaming for balance updates and order status changes
Usage
use TastyTrade;
use TastyTradeConfig;
async
Real-time Data
The library supports real-time data streaming for both market data and account updates using DXLink:
// Create a quote streamer
use ;
use TastyTradeConfig;
use dxfeed;
async
Setup Instructions
- Clone the repository:
git clone https://github.com/joaquinbejar/tastytrade
cd tastytrade
- Build the project:
make build
- Run tests:
make test
- Format the code:
make fmt
- Run linting:
make lint
- Clean the project:
make clean
- Run the project:
make run
- Fix issues:
make fix
- Run pre-push checks:
make pre-push
- Generate documentation:
make doc
- Publish the package:
make publish
- Generate coverage report:
make coverage
CLI Example
This crate also includes a sample CLI application in the tastytrade-cli directory
that demonstrates a portfolio viewer with real-time updates.
Testing
To run unit tests:
make test
To run tests with coverage:
make coverage
Contribution and Contact
We welcome contributions to this project! If you would like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and ensure that the project still builds and all tests pass.
- Commit your changes and push your branch to your forked repository.
- Submit a pull request to the main repository.
If you have any questions, issues, or would like to provide feedback, please feel free to contact the project maintainer:
Joaquín Béjar García
- Email: jb@taunais.com
- GitHub: joaquinbejar
We appreciate your interest and look forward to your contributions!
Contribution and Contact
We welcome contributions to this project! If you would like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and ensure that the project still builds and all tests pass.
- Commit your changes and push your branch to your forked repository.
- Submit a pull request to the main repository.
If you have any questions, issues, or would like to provide feedback, please feel free to contact the project maintainer:
Joaquín Béjar García
- Email: jb@taunais.com
- GitHub: joaquinbejar
We appreciate your interest and look forward to your contributions!
✍️ License
Licensed under MIT license