# Contributing to tradestation-api
Thank you for your interest in contributing! This document provides guidelines for contributing to the project.
## Getting Started
1. Fork the repository
2. Clone your fork: `git clone https://github.com/<you>/tradestation-api.git`
3. Create a feature branch: `git checkout -b feature/my-feature`
4. Make your changes
5. Run tests: `cargo test`
6. Push and open a pull request
## Development Setup
- Rust 1.82+ (edition 2024)
- No external services required for testing (we use `wiremock` for HTTP mocking)
```sh
# Run all tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Run ignored (not-yet-implemented) tests
cargo test -- --ignored
# Check formatting
cargo fmt -- --check
# Lint
cargo clippy -- -D warnings
```
## Code Style
- Follow standard Rust conventions (`cargo fmt`, `cargo clippy`)
- Use `#[serde(rename_all = "PascalCase")]` for TradeStation API types
- All public items must have doc comments
- Keep functions focused and small
## Adding a New Endpoint
1. Write a failing test in the appropriate `tests/*_tests.rs` file
2. Add the response/request types with `#[serde(rename_all = "PascalCase")]`
3. Implement the method on `Client`
4. Remove the `#[ignore]` attribute from the test
5. Verify the test passes
## Testing
- Use `wiremock` for HTTP mocking in integration tests
- Use realistic JSON payloads matching TradeStation's PascalCase format
- Every endpoint must have at least one test
## Pull Request Guidelines
- One feature or fix per PR
- Include tests for new functionality
- Update CHANGELOG.md
- Keep commits atomic and well-described
## Reporting Issues
- Use GitHub Issues
- Include Rust version, OS, and minimal reproduction steps
- For API discrepancies, include the TradeStation documentation link
## License
By contributing, you agree that your contributions will be licensed under the MIT License.