Skip to content

feat: Mock Data SDK & Contributor Infrastructure#1

Merged
e35ventura merged 3 commits intomainfrom
feature/mock-data-sdk-wrapper
Feb 26, 2026
Merged

feat: Mock Data SDK & Contributor Infrastructure#1
e35ventura merged 3 commits intomainfrom
feature/mock-data-sdk-wrapper

Conversation

@e35ventura
Copy link
Collaborator

Summary

This PR adds the complete contributor infrastructure for building hackathon tools without needing a Synth API key.

What's Included

1. Mock Data Bank (73 JSON files)
Real API responses fetched from all 10 Synth endpoints across all 9 supported assets (BTC, ETH, SOL, XAU, SPY, NVDA, TSLA, AAPL, GOOGL). Organized per-endpoint under mock_data/.

2. Dual-Mode SDK Wrapper (synth_client/)

  • If SYNTH_API_KEY env var is set → hits the real API
  • If not set → automatically loads from mock_data/ with a warning
  • 10 methods covering every Synth endpoint
  • Zero-config for contributors — just import and go

3. Tool Template (tools/_template/)
Starter kit with example main.py, requirements.txt, README.md template, and tests/ directory. Contributors copy this to start.

4. GitHub Actions CI (pr_mock_tests.yml)
Runs automatically on every PR. Discovers all tools, installs their deps, runs pytest in mock mode. Zero API calls.

5. Test Suite (76 tests)
Comprehensive parameterized tests covering all endpoints × all assets × both horizons. All passing in 0.08s.

6. README Rewrite
Full getting started guide, endpoint reference table with asset/horizon compatibility, project structure diagram, and PR lifecycle documentation.

API Compatibility Notes Discovered

  • 1h horizon only works for crypto (BTC, ETH, SOL) and XAU — equities are 24h only
  • Option pricing works for all assets except XAU
  • Polymarket endpoints are BTC-only (no asset parameter)

API Budget Impact

  • 84 calls used for mock data generation (~1.7% of monthly 5,000)
  • CI pipeline uses 0 calls per PR (mock mode only)
  • Maintainer live testing: ~2-5 calls per PR review

- Generate mock data from all 10 Synth API endpoints across 9 assets
  (73 JSON files covering prediction percentiles, volatility, option pricing,
  liquidation, LP bounds, LP probabilities, polymarket, and leaderboard)
- Add dual-mode SynthClient wrapper (auto-detects mock vs live mode via
  SYNTH_API_KEY env var)
- Add tool template under tools/_template/ with example main.py and tests
- Add GitHub Actions workflow for automated mock tests on every PR
- Add comprehensive test suite (76 tests, all passing)
- Rewrite README with getting started guide, endpoint reference table,
  asset/horizon compatibility matrix, and PR lifecycle docs
- Add .gitignore and requirements.txt
@e35ventura e35ventura merged commit 616fdbd into main Feb 26, 2026
1 check passed
@e35ventura e35ventura deleted the feature/mock-data-sdk-wrapper branch February 26, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants