Metadata-Version: 2.4
Name: onetick-ext-view
Version: 2.0.0
Summary: OneTick database viewer
Author-email: solutions <solutions@onetick.com>
License-Expression: MIT
Project-URL: OneTick, https://onetick.com
Project-URL: onetick-py, https://pypi.org/project/onetick-py/
Classifier: Topic :: Database :: Front-Ends
Classifier: Topic :: Scientific/Engineering
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: onetick-py>=1.195.0
Requires-Dist: textual==8.2.8
Requires-Dist: pandas
Requires-Dist: pytz
Provides-Extra: webapi
Requires-Dist: onetick-py[webapi]>=1.195.0; extra == "webapi"
Dynamic: license-file

## onetick-ext-view

Onetick View is a terminal UI for browsing Onetick databases.

It is based on [onetick-py](https://pypi.org/project/onetick-py/) library and can work in two modes: localy-installed mode and WebAPI mode.
The mode depends on the set environment variables and installed onetick python api libraries.
See onetick-py documentation for details: https://docs.pip.distribution.sol.onetick.com/static/installation/webapi.html.

In order to use WebAPI mode install package with `webapi` extra:
```
pip install onetick-ext-view[webapi]
```

#### Usage (WebAPI mode):

    # set env variables:
    OTP_HTTP_ADDRESS='https://rest.cloud.onetick.com'
    OTP_ACCESS_TOKEN_URL='https://cloud-auth.parent.onetick.com/realms/OMD/protocol/openid-connect/token'
    OTP_CLIENT_ID='?????????????'
    OTP_CLIENT_SECRET='?????????'

    onetick view                                           # (get remote databases from WebAPI server)

#### Usage (locally-installed mode):

    # set env variables:
    MAIN_ONE_TICK_DIR="/opt/one_market_data/one_tick"

    onetick view                                           # (scan current working dir)
    onetick view /tmp                                      # (i.e. for tests with --keep-generated=always)
    onetick view --remote-ts remote.example.com:40001      # (connect to remote server)
    onetick view /tmp --remote-ts remote.example.com:40001 # (both scan specific directory and connect to remote server)

#### Global settings:
- press **H** to show/hide key bindings of the current window
- press **Z** to select timezone
- press **D** to toggle dark mode
- press **Q** to quit

#### Program windows:
All windows:
- press **Esc** or **Backspace** to go back
- press **Shift+Up/Down** for faster vertical scroll
- press **Alt+Shift+Up/Down** for fastest vertical scroll
- use **Alt+Wheel** for fast vertical mouse scroll

1. Databases window: does recursive search in subdirectories
   and shows available databases
    - press **F** to filter databases

2. Dates window: shows available dates for selected database
    - press **F** to filter dates

3. Tick types window: shows available tick types for a specific day
    - press **F** to filter tick types

4. Symbols window: shows available symbols for selected tick type
    - press **F** to filter symbols
    - press **C** to show/hide record count

5. Data window: shows symbol data (more ticks are loaded automatically while scrolling)
    - press **Shift+Left/Right** for faster horizontal scroll
    - press **Alt+Shift+Left/Right** for fastest horizontal scroll
    - use **Ctrl+Alt+Wheel** for fast horizontal mouse scroll
    - press **F** to filter ticks: where clause, start/end time, discard on match
    - press **T** to transpose table
    - press **C** to dump loaded ticks to CSV file
