| Crates.io | tuff |
| lib.rs | tuff |
| version | 0.0.1 |
| created_at | 2025-03-16 14:05:46.739043+00 |
| updated_at | 2025-03-16 14:05:46.739043+00 |
| description | A powerful and flexible trading framework built in Rust |
| homepage | https://github.com/jackson211/tuff |
| repository | https://github.com/jackson211/tuff |
| max_upload_size | |
| id | 1594440 |
| size | 6,101 |
Tuff is a powerful and flexible trading framework built in Rust, designed for both novice and experienced traders. It provides a simple syntax for defining trading strategies, a comprehensive library of technical indicators, and robust risk management features, all while prioritizing user privacy.
Clone the repository:
git clone https://github.com/jackson211/tuff.git
cd tuff
Build the project:
cargo build
Run the project:
cargo run
Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.
This project is licensed under the MIT License.
The repository includes a WebSocket example that demonstrates how to connect to Binance's WebSocket API with proxy support.
By default, the example connects to Binance's WebSocket API:
cargo run --example binance -- -n 5
This will connect to Binance's WebSocket API and process 5 messages.
There are several ways to use a proxy (which is recommended for connecting to Binance):
-p option to specify a proxy:cargo run --example binance -- -p http://your-proxy-address:port
For SOCKS5 proxies:
cargo run --example binance -- -p socks5://your-proxy-address:port
export https_proxy=http://127.0.0.1:7890
export http_proxy=http://127.0.0.1:7890
export all_proxy=socks5://127.0.0.1:7890
cargo run --example binance
Default fallback: If no proxy is specified and no environment variables are found, the example defaults to using:
http://127.0.0.1:7890 for HTTP/HTTPS connectionssocks5://127.0.0.1:7890 for other connectionsDisable proxies: To explicitly disable all proxies and connect directly:
cargo run --example binance -- --no-proxy
If you want to test with a simple echo server instead of Binance:
cargo run --example binance -- -u wss://echo.websocket.org
For a full list of options:
cargo run --example binance -- --help