feat: implement upsert functionality in fetch_history.py to accumulate OI/funding data

- Added `--upsert` flag to `fetch_history.py` for merging new data into existing parquet files.
- Implemented `upsert_parquet()` function to update existing rows with new values where `oi_change` and `funding_rate` are 0.0, while appending new rows.
- Created tests in `tests/test_fetch_history.py` to validate upsert behavior.
- Updated `.gitignore` to include `.cursor/` directory.

Made-with: Cursor
This commit is contained in:
21in7
2026-03-02 14:16:09 +09:00
parent 0fca14a1c2
commit 4c09d63505
3 changed files with 795 additions and 1 deletions

3
.gitignore vendored
View File

@@ -9,4 +9,5 @@ venv/
models/*.pkl
data/*.parquet
.worktrees/
.DS_Store
.DS_Store
.cursor/