tradedesk-marketdata 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. tradedesk_marketdata-2.0.0/.codecrew/AGENTS.md +56 -0
  2. tradedesk_marketdata-2.0.0/.codecrew/config.yml +2 -0
  3. tradedesk_marketdata-2.0.0/.github/workflows/ci.yml +38 -0
  4. tradedesk_marketdata-2.0.0/.github/workflows/commitlint.yml +48 -0
  5. tradedesk_marketdata-2.0.0/.github/workflows/finalize-release.yml +39 -0
  6. tradedesk_marketdata-2.0.0/.github/workflows/prepare-release.yml +16 -0
  7. tradedesk_marketdata-2.0.0/.github/workflows/publish.yml +30 -0
  8. tradedesk_marketdata-2.0.0/.gitignore +15 -0
  9. tradedesk_marketdata-2.0.0/.pre-commit-config.yaml +6 -0
  10. tradedesk_marketdata-2.0.0/AGENTS.md +6 -0
  11. tradedesk_marketdata-2.0.0/CLAUDE.md +5 -0
  12. tradedesk_marketdata-2.0.0/CONTRIBUTING.md +176 -0
  13. tradedesk_marketdata-2.0.0/LICENSE +201 -0
  14. tradedesk_marketdata-2.0.0/NOTICE +15 -0
  15. tradedesk_marketdata-2.0.0/PKG-INFO +844 -0
  16. tradedesk_marketdata-2.0.0/README.md +811 -0
  17. tradedesk_marketdata-2.0.0/cliff.toml +56 -0
  18. tradedesk_marketdata-2.0.0/docs/writing-a-source.md +118 -0
  19. tradedesk_marketdata-2.0.0/pyproject.toml +94 -0
  20. tradedesk_marketdata-2.0.0/scripts/audit_fx_scale.py +146 -0
  21. tradedesk_marketdata-2.0.0/scripts/convert_tick_cache_to_candles.py +131 -0
  22. tradedesk_marketdata-2.0.0/scripts/dukascopy_audit.py +426 -0
  23. tradedesk_marketdata-2.0.0/scripts/dukascopy_cross_provider.py +305 -0
  24. tradedesk_marketdata-2.0.0/scripts/histdata_splice_check.py +222 -0
  25. tradedesk_marketdata-2.0.0/tests/histdata_fixtures.py +63 -0
  26. tradedesk_marketdata-2.0.0/tests/source_feeds.py +131 -0
  27. tradedesk_marketdata-2.0.0/tests/test_audit_fx_scale.py +93 -0
  28. tradedesk_marketdata-2.0.0/tests/test_cli.py +480 -0
  29. tradedesk_marketdata-2.0.0/tests/test_compression.py +88 -0
  30. tradedesk_marketdata-2.0.0/tests/test_dukascopy_caching.py +474 -0
  31. tradedesk_marketdata-2.0.0/tests/test_dukascopy_cancel.py +91 -0
  32. tradedesk_marketdata-2.0.0/tests/test_dukascopy_cleanup.py +162 -0
  33. tradedesk_marketdata-2.0.0/tests/test_dukascopy_decode_ticks.py +119 -0
  34. tradedesk_marketdata-2.0.0/tests/test_dukascopy_download_backoff.py +95 -0
  35. tradedesk_marketdata-2.0.0/tests/test_dukascopy_download_bi5.py +143 -0
  36. tradedesk_marketdata-2.0.0/tests/test_dukascopy_partial_commit.py +416 -0
  37. tradedesk_marketdata-2.0.0/tests/test_dukascopy_probe_format.py +9 -0
  38. tradedesk_marketdata-2.0.0/tests/test_dukascopy_provenance.py +102 -0
  39. tradedesk_marketdata-2.0.0/tests/test_dukascopy_units.py +139 -0
  40. tradedesk_marketdata-2.0.0/tests/test_export_1min_cache.py +146 -0
  41. tradedesk_marketdata-2.0.0/tests/test_export_driver.py +382 -0
  42. tradedesk_marketdata-2.0.0/tests/test_export_helpers.py +189 -0
  43. tradedesk_marketdata-2.0.0/tests/test_export_progress.py +86 -0
  44. tradedesk_marketdata-2.0.0/tests/test_export_tickt_to_candles.py +145 -0
  45. tradedesk_marketdata-2.0.0/tests/test_histdata_decode.py +383 -0
  46. tradedesk_marketdata-2.0.0/tests/test_histdata_export.py +387 -0
  47. tradedesk_marketdata-2.0.0/tests/test_histdata_level_check.py +248 -0
  48. tradedesk_marketdata-2.0.0/tests/test_histdata_splice_check.py +113 -0
  49. tradedesk_marketdata-2.0.0/tests/test_histdata_symbol_map.py +342 -0
  50. tradedesk_marketdata-2.0.0/tests/test_metadata.py +44 -0
  51. tradedesk_marketdata-2.0.0/tests/test_normalize.py +740 -0
  52. tradedesk_marketdata-2.0.0/tests/test_parallel.py +168 -0
  53. tradedesk_marketdata-2.0.0/tests/test_rescale.py +169 -0
  54. tradedesk_marketdata-2.0.0/tests/test_scale_sentry.py +139 -0
  55. tradedesk_marketdata-2.0.0/tests/test_source_boundary.py +110 -0
  56. tradedesk_marketdata-2.0.0/tests/test_source_conformance.py +229 -0
  57. tradedesk_marketdata-2.0.0/tests/test_verify.py +363 -0
  58. tradedesk_marketdata-2.0.0/tradedesk_marketdata/__init__.py +12 -0
  59. tradedesk_marketdata-2.0.0/tradedesk_marketdata/_zstio.py +40 -0
  60. tradedesk_marketdata-2.0.0/tradedesk_marketdata/cancel.py +17 -0
  61. tradedesk_marketdata-2.0.0/tradedesk_marketdata/cli.py +368 -0
  62. tradedesk_marketdata-2.0.0/tradedesk_marketdata/export.py +769 -0
  63. tradedesk_marketdata-2.0.0/tradedesk_marketdata/metadata.py +27 -0
  64. tradedesk_marketdata-2.0.0/tradedesk_marketdata/normalize.py +361 -0
  65. tradedesk_marketdata-2.0.0/tradedesk_marketdata/normalize_cli.py +104 -0
  66. tradedesk_marketdata-2.0.0/tradedesk_marketdata/parallel.py +149 -0
  67. tradedesk_marketdata-2.0.0/tradedesk_marketdata/price_bands.example.toml +77 -0
  68. tradedesk_marketdata-2.0.0/tradedesk_marketdata/rescale.py +193 -0
  69. tradedesk_marketdata-2.0.0/tradedesk_marketdata/rescale_cli.py +129 -0
  70. tradedesk_marketdata-2.0.0/tradedesk_marketdata/scale_sentry.py +151 -0
  71. tradedesk_marketdata-2.0.0/tradedesk_marketdata/source.py +362 -0
  72. tradedesk_marketdata-2.0.0/tradedesk_marketdata/sources/__init__.py +63 -0
  73. tradedesk_marketdata-2.0.0/tradedesk_marketdata/sources/dukascopy.py +868 -0
  74. tradedesk_marketdata-2.0.0/tradedesk_marketdata/sources/histdata.example.toml +236 -0
  75. tradedesk_marketdata-2.0.0/tradedesk_marketdata/sources/histdata.py +1089 -0
  76. tradedesk_marketdata-2.0.0/tradedesk_marketdata/verify.py +546 -0
  77. tradedesk_marketdata-2.0.0/tradedesk_marketdata/verify_cli.py +120 -0
  78. tradedesk_marketdata-2.0.0/uv.lock +3175 -0
@@ -0,0 +1,56 @@
1
+ # Agents
2
+
3
+ This repository is part of a CodeCrew project — coordination state lives in
4
+ GitHub issues and PRs, per the protocol at
5
+ https://github.com/radiusred/gh-codecrew/blob/main/SPEC.md.
6
+
7
+ - **Version check.** Finish it before any verb but two:
8
+ `gh codecrew version` and `gh codecrew identity token`, which read no
9
+ pointer and change nothing. Compare the protocol `gh codecrew version`
10
+ prints with the `codecrew:` field of `.codecrew/config.yml`: the binary
11
+ must implement the same major and a minor at least the pointer's — the
12
+ CLI checks the major alone. In a spoke the floor is the hub's field,
13
+ which may be ahead of the spoke's: read it with
14
+ `gh api repos/<hub>/contents/.codecrew/config.yml -H "Accept: application/vnd.github.raw"`
15
+ (`<hub>` is the spoke pointer's `hub:`) under whatever `gh` auth the
16
+ session has; if that read is refused, mint your seat identity
17
+ (`export GH_TOKEN=$(gh codecrew identity token <slug>)`, per your role
18
+ contract) and retry it at once. If the binary falls short and you
19
+ install the tools, upgrade (`gh extension upgrade codecrew`); otherwise
20
+ raise it with `gh codecrew checkpoint` and stop. Never upgrade mid-task.
21
+ Only once the check passes, go on.
22
+ - `.codecrew/config.yml` names the hub; the hub's `.codecrew/roles/`
23
+ holds the role contracts. Then read the contract for the role you were
24
+ dispatched as before doing anything else — `gh codecrew roles show <role>`
25
+ prints it with this project's `.codecrew/roles/<role>.local.md` extension
26
+ appended (blank until the project writes one; in a hub `init` scaffolds the
27
+ file with a comment saying what belongs there).
28
+ - `gh codecrew status` shows where the project is; `gh codecrew help`
29
+ lists the workflow verbs. Blocked gates refuse with
30
+ `refused[CODE]: detail` — act on the code, don't work around it.
31
+ - Plans before commits, decisions recorded when made, and the verifier is
32
+ never the doer. Reviews are model reviews: a clean-context session under
33
+ the reviewer contract — even in pure solo, where its findings land as a
34
+ PR comment before the operator confirms.
35
+ - **Contract drift.** `gh codecrew status` reports when a `.codecrew/roles/` contract
36
+ is missing or differs from the one embedded in the installed CLI. One
37
+ that is missing, or still an earlier release's text, is brought up to
38
+ date by `gh codecrew roles sync`, delivered as a housekeeping PR (SPEC §4)
39
+ with no task. One that differs from every release's text is this
40
+ project's own fork, and local conventions are legitimate: the
41
+ coordination layer compares (`gh codecrew roles diff <role>`, full upstream
42
+ text via `gh codecrew roles show <role> --latest`), decides what to adopt,
43
+ and reconciles it in a task with the decision recorded, moving the
44
+ project's additions into the role's `.local.md` extension. Never overwrite
45
+ a fork blindly. This file is CodeCrew's too, and `roles sync` brings it up
46
+ to date the same way, only while it is a release's text; the project's
47
+ own instructions belong in the root `AGENTS.md`.
48
+ - **Dispatch authorization.** If you are the operator's primary session —
49
+ not dispatched as any specific role — then when a role is routed to a
50
+ GitHub App and that role's action is needed (a review, a verdict),
51
+ dispatching a clean-context sub-agent session as that App is authorized
52
+ and expected; use the dispatch prompt in
53
+ https://github.com/radiusred/gh-codecrew/blob/main/docs/identities.md. A
54
+ session dispatched *as* a role never dispatches another role — that
55
+ belongs to its coordination layer (platform, orchestrating session, or
56
+ operator) — and never chooses or briefs its own judge.
@@ -0,0 +1,2 @@
1
+ codecrew: "2.1" # protocol version (SPEC.md §5): a different major is refused; not the CLI release
2
+ hub: radiusred/trading-hub
@@ -0,0 +1,38 @@
1
+ name: CI
2
+ # CI runs on pull_request only. The post-merge `push: branches: [main]` trigger
3
+ # was removed: every feature/release PR already runs the full
4
+ # matrix as the merge gate, and rebase-merge means no semantic-merge surprises,
5
+ # so re-running on the push to main only doubled GHA spend.
6
+ on:
7
+ pull_request:
8
+ jobs:
9
+ test:
10
+ # Skip on automated release version-bump PRs (release/*): they only change
11
+ # the __version__ string against code that already passed CI on its feature
12
+ # PRs, so re-running the full matrix there just burns GHA minutes.
13
+ if: ${{ !startsWith(github.head_ref, 'release/') }}
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
19
+
20
+ steps:
21
+ - uses: actions/checkout@v6
22
+
23
+ - name: Install uv
24
+ uses: astral-sh/setup-uv@v7
25
+ with:
26
+ enable-cache: true
27
+ python-version: ${{ matrix.python-version }}
28
+
29
+ - name: Install dependencies
30
+ run: uv sync --extra dev
31
+
32
+ - name: Run tests with coverage
33
+ run: |
34
+ uv run pytest \
35
+ --cov=tradedesk_marketdata \
36
+ --cov-report=term-missing \
37
+ --cov-report=xml \
38
+ --cov-fail-under=75
@@ -0,0 +1,48 @@
1
+ name: Lint commit messages
2
+ # Every pull request in this repository reports this check, docs-only ones included:
3
+ # no path filter, no branch guard, no `[skip ci]` bypass. `gh codecrew task
4
+ # finish` refuses NO_CHECKS on a PR that reports none (SPEC §8), and the job
5
+ # name is the check context the org's require-lint ruleset pins.
6
+ #
7
+ # Copied from radiusred/trading-hub's commitlint.yml, which takes the RAD-nnn
8
+ # step verbatim from radiusred/tradedesk's `lint-commits` job and adds the org's
9
+ # shared commitlint action.
10
+ on:
11
+ pull_request:
12
+
13
+ permissions:
14
+ contents: read
15
+ pull-requests: read
16
+
17
+ jobs:
18
+ lint-commits:
19
+ name: Lint commit messages
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v6
23
+ with:
24
+ fetch-depth: 0
25
+
26
+ - name: Forbid internal ticket references (RAD-nnn)
27
+ run: |
28
+ if [ "${{ github.event_name }}" = "pull_request" ]; then
29
+ msgs=$(git log --format='%s%n%b' "origin/${{ github.base_ref }}..HEAD")
30
+ else
31
+ before="${{ github.event.before }}"
32
+ after="${{ github.sha }}"
33
+ if [ "$before" = "0000000000000000000000000000000000000000" ]; then
34
+ msgs=$(git log --format='%s%n%b' -1 "$after")
35
+ else
36
+ msgs=$(git log --format='%s%n%b' "${before}..${after}")
37
+ fi
38
+ fi
39
+ bad=$(printf '%s' "$msgs" | grep -E 'RAD-[0-9]+' || true)
40
+ if [ -n "$bad" ]; then
41
+ echo "::error::Commit message(s) contain internal ticket reference(s):"
42
+ printf '%s\n' "$bad"
43
+ exit 1
44
+ fi
45
+ echo "OK – no internal ticket references found."
46
+
47
+ - name: Lint against the Radius Red commitlint config
48
+ uses: radiusred/.github/.github/actions/commitlint@main
@@ -0,0 +1,39 @@
1
+ name: Finalize Release
2
+
3
+ # Tags and publishes the GitHub release once an automated release PR
4
+ # (branch release/*) has merged. This replaces the idle "Wait for Merge" poll
5
+ # loop that used to live in reusable-release.yml's execute job:
6
+ # the release runner now exits immediately after opening the PR, and this
7
+ # merge-triggered workflow does the tag + publish. A workflow_dispatch escape
8
+ # hatch is provided for the rare case where finalize needs a manual re-run.
9
+
10
+ on:
11
+ pull_request:
12
+ types: [closed]
13
+ workflow_dispatch:
14
+ inputs:
15
+ release_branch:
16
+ description: "Merged release branch, e.g. release/v1.2.3"
17
+ required: true
18
+ type: string
19
+ merge_sha:
20
+ description: "Merge commit SHA to tag and target the release at"
21
+ required: true
22
+ type: string
23
+
24
+ jobs:
25
+ finalize:
26
+ if: >-
27
+ ${{ github.event_name == 'workflow_dispatch' ||
28
+ (github.event.pull_request.merged == true &&
29
+ startsWith(github.event.pull_request.head.ref, 'release/')) }}
30
+ permissions:
31
+ contents: write
32
+ pull-requests: read
33
+ uses: radiusred/.github/.github/workflows/reusable-finalize-release.yml@main
34
+ with:
35
+ release_branch: ${{ github.event.pull_request.head.ref || inputs.release_branch }}
36
+ merge_sha: ${{ github.event.pull_request.merge_commit_sha || inputs.merge_sha }}
37
+ secrets:
38
+ RELEASE_APP_CLIENT_ID: ${{ vars.RELEASE_APP_CLIENT_ID }}
39
+ RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
@@ -0,0 +1,16 @@
1
+ name: Prepare Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ call-reusable-release:
8
+ uses: radiusred/.github/.github/workflows/reusable-release.yml@main
9
+ permissions:
10
+ contents: write
11
+ pull-requests: write
12
+ with:
13
+ approval_environment: release-approval
14
+ secrets:
15
+ RELEASE_APP_CLIENT_ID: ${{ vars.RELEASE_APP_CLIENT_ID }}
16
+ RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
@@ -0,0 +1,30 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ publish:
12
+ name: Build and publish to PyPI
13
+ runs-on: ubuntu-latest
14
+ environment: pypi
15
+ permissions:
16
+ id-token: write # Required for trusted publishing
17
+
18
+ steps:
19
+ - uses: actions/checkout@v6
20
+
21
+ - name: Install uv
22
+ uses: astral-sh/setup-uv@v7
23
+ with:
24
+ python-version: "3.14"
25
+
26
+ - name: Build package
27
+ run: uv build
28
+
29
+ - name: Publish to PyPI
30
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,15 @@
1
+ __pycache__/
2
+ .cache
3
+ .coverage
4
+ .dist/
5
+ .mypy_cache
6
+ .pytest_cache/
7
+ .ruff_cache/
8
+ .tldr
9
+ .vscode
10
+ .venv/
11
+
12
+ *.pyc
13
+ *.egg-info/
14
+ build/
15
+ dist/
@@ -0,0 +1,6 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ # Ruff version.
4
+ rev: v0.14.13
5
+ hooks:
6
+ - id: ruff-format
@@ -0,0 +1,6 @@
1
+ # Agents
2
+
3
+ This repository is a CodeCrew project — the instructions for an agent
4
+ dispatched here are in `.codecrew/AGENTS.md`; read that file first.
5
+
6
+ @.codecrew/AGENTS.md
@@ -0,0 +1,5 @@
1
+ @AGENTS.md
2
+
3
+ <!-- CodeCrew: Claude Code reads CLAUDE.md, not AGENTS.md; the import above
4
+ loads the entry point every harness shares. Add Claude-specific
5
+ instructions below it. -->
@@ -0,0 +1,176 @@
1
+ # Contributing to tradedesk-marketdata
2
+
3
+ We welcome contributions to `tradedesk-marketdata`. This guide covers the
4
+ standards and workflow you need to contribute successfully.
5
+
6
+ ## Scope
7
+
8
+ This repository is intentionally standalone and does not depend on the
9
+ `tradedesk` framework.
10
+
11
+ ## What this repository holds
12
+
13
+ This is a public repository. It holds:
14
+
15
+ - the market-data downloader: the export framework, its CLIs, and its cache
16
+ repair and audit tools;
17
+ - its providers (`tradedesk_marketdata/sources/`), each with the shipped
18
+ example configuration a user copies and edits (such as
19
+ `sources/histdata.example.toml`);
20
+ - their tests, fixtures (synthetic, never downloaded provider data) and
21
+ documentation.
22
+
23
+ It does not hold:
24
+
25
+ - trading strategies, signals or anything that decides a trade;
26
+ - research artefacts: results, notebooks, reports, findings about a market;
27
+ - venue-, account- or deployment-specific configuration or paths: no one
28
+ user's cache location, instrument list, credentials or hosts in code,
29
+ docs, examples or tests.
30
+
31
+ Until tooling enforces this, it is a review rule: a contribution that adds
32
+ any of the above is declined.
33
+
34
+ New providers follow [Writing a source](docs/writing-a-source.md).
35
+
36
+ ## Getting Started
37
+
38
+ 1. Fork the repository and create a feature branch from `main`.
39
+ 2. Clone locally and install the dev dependencies:
40
+
41
+ ```bash
42
+ pip install -e '.[dev]'
43
+ ```
44
+
45
+ Or with [`uv`](https://docs.astral.sh/uv/):
46
+
47
+ ```bash
48
+ uv sync --extra dev
49
+ ```
50
+
51
+ ### Optional: MCP / code-summary tooling
52
+
53
+ `llm-tldr` is not a runtime dependency and is not installed by default.
54
+ If you use the MCP code-summary tool, install it separately:
55
+
56
+ ```bash
57
+ uv sync --extra tooling
58
+ ```
59
+
60
+ ## Code Standards
61
+
62
+ ### Python Version
63
+
64
+ Python 3.11+ is required.
65
+
66
+ ### Style and Linting
67
+
68
+ We use [ruff](https://docs.astral.sh/ruff/) for linting and formatting:
69
+
70
+ ```bash
71
+ ruff check .
72
+ ruff format --check .
73
+ ```
74
+
75
+ Rules enforced: `E`, `F`, `I` (import sorting), `B` (bugbear), `UP` (pyupgrade).
76
+ Line length is 100 characters.
77
+
78
+ ### Type Checking
79
+
80
+ We use [mypy](https://mypy.readthedocs.io/):
81
+
82
+ ```bash
83
+ mypy .
84
+ ```
85
+
86
+ All contributions must pass with zero type errors.
87
+
88
+ ## Conventions
89
+
90
+ - All timestamps are UTC and written as ISO-8601 strings.
91
+ - Exported datasets are canonical and self-describing via `<output>.meta.json`.
92
+ - `--price-divisor` is applied once at export time; downstream code must not
93
+ rescale.
94
+ - Keep Dukascopy concurrency conservative. One symbol export already uses two
95
+ downloader threads internally, so `--workers 1` caps total download
96
+ concurrency at two requests and is the safest default when reproducing
97
+ failures or filling gaps.
98
+ - HistData.com is a free service: keep its requests strictly sequential per
99
+ instrument (one month zip per request, with a pause between months) and
100
+ never parallelise them within a symbol. Tests must not touch either network;
101
+ stub `sources.histdata._fetch_month_zip` or a source's session as the existing tests do.
102
+ - When exporter, cache-normalization, or probe logic changes, rerun the
103
+ maintainer audit scripts in `scripts/` against a populated cache:
104
+ `dukascopy_audit.py` for local gap/DST/spread/stale checks and
105
+ `dukascopy_cross_provider.py` for cross-provider close-price correlation.
106
+
107
+ ## Testing
108
+
109
+ We use [pytest](https://docs.pytest.org/):
110
+
111
+ ```bash
112
+ pytest --cov=tradedesk_marketdata --cov-fail-under=75
113
+ ```
114
+
115
+ - All new and existing tests must pass following any code change.
116
+ - Code coverage must remain at or above 75%.
117
+ - Include tests for new functionality or bug fixes.
118
+
119
+ ## Credentials and Release Automation
120
+
121
+ Normal exporter runs, local development, and CI do not require repository
122
+ secrets or broker credentials.
123
+
124
+ Maintainers triggering `.github/workflows/prepare-release.yml` must configure
125
+ these repository secrets:
126
+
127
+ - `RELEASE_APP_ID`
128
+ - `RELEASE_APP_PRIVATE_KEY`
129
+
130
+ The shared reusable release workflow uses those values to mint a GitHub App
131
+ token for checkout, version bumping, pushing the release commit, and creating
132
+ the GitHub release. `.github/workflows/publish.yml` uses PyPI trusted
133
+ publishing via GitHub OIDC (`id-token: write`), so no PyPI API token secret is
134
+ expected in this repository.
135
+
136
+ ## Pull Requests
137
+
138
+ - Keep changes small, well-scoped, and documented in PR descriptions.
139
+ - Open PRs against `main`.
140
+ - Rebase your branch onto `main` before submitting — we do not use merge commits.
141
+ - Provide a brief rationale and expected impact in the PR description.
142
+ - Do not include secrets or internal data.
143
+
144
+ ## Commit Messages
145
+
146
+ Follow [Conventional Commits](https://www.conventionalcommits.org/):
147
+
148
+ ```
149
+ feat(cli): add parquet output format
150
+ fix(export): handle missing tick hours gracefully
151
+ docs: update cache directory guidance
152
+ ```
153
+
154
+ Describe the symptom, instrument class, or component in prose. Do **not**
155
+ reference downstream-private issue trackers (e.g. `RAD-1234`, `INTERNAL-42`)
156
+ in commit messages, code comments, docstrings, README sections, or test
157
+ descriptions. External readers cannot resolve those identifiers, so the
158
+ prose description must stand on its own. Operator scripts that hardcode
159
+ a single user's cache root or one-off remediation dates likewise do not
160
+ belong in this repository.
161
+
162
+ ## Reporting Issues
163
+
164
+ If you find a bug or have a feature request, open an issue describing the goal
165
+ and expected behaviour. Include steps to reproduce for bugs.
166
+
167
+ If unsure about scope or approach, open an issue to discuss before implementing.
168
+
169
+ ---
170
+
171
+ ## License
172
+
173
+ Licensed under the Apache License, Version 2.0.
174
+ See: https://www.apache.org/licenses/LICENSE-2.0
175
+
176
+ Copyright 2026 [Radius Red Ltd.](https://www.radiusred.uk)
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,15 @@
1
+ tradedesk-marketdata
2
+
3
+ Copyright 2026 Radius Red Ltd.
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.