Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
# lens


NUFT's data fetching from internal servers solution


Only supporting Python 3.12 for now. Heavily in progress, more versions and whatnot soon.


## Usage
Lens provides a simple data fetching API. All queries require `startup` to be called on the instance before fetching.

Startup validates the selected project root (or default: `/pool/lens`).
Specific information on the contents of a data directory can be viewed in that directory's `metadata.json`.
A complete example of the file layout is available in either `file_structure.md` (tree) or `test/testing_data`.

```python
ln = Lens()
ln.startup()
df = ln.load_trades_for_day("avax", "2025-02-21")
df = ln.load_depth_for_day("avax", "2025-02-21")
```

These are the only two queries currently available, and both return `pd.DataFrame`. Headers are included.

`main.py` is included as a quick way to run the startup checks without needing to integrate with another codebase.