@stoqey/ib (Low-Level SDK)Guides & Resources
Testing & Contributing Guide
Local development setup, running Jest unit tests, code style guidelines, and contribution instructions.
Local Development Workflow
To contribute features or fix bugs in @stoqey/ib:
-
Clone the repository:
git clone https://github.com/stoqey/ib.git cd ib -
Install dependencies:
yarn install -
Build TypeScript source:
yarn build
Running Jest Unit & Integration Tests
Test Environment Safety
Always test on a paper trading account as unit or integration tests may submit test orders or modify open positions!
Run All Unit Tests
yarn testRun Specific Test File
npx jest src/tests/unit/api/api.test.tsCode Guidelines & PR Expectations
- TypeScript Standard: Keep public API exports in
src/index.tsandsrc/api-next/index.tsin sync. - Code Style: Follow existing ESLint / Prettier rules (2-space indentation, double quotes, semicolons).
- Minimal Diffs: Keep changes focused and localized; avoid refactoring unrelated files.
- Tests: Add unit test coverage for new methods or fixes.