Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistence Layer #2545

Open
2 tasks
byte-bandit opened this issue Jan 28, 2025 · 0 comments
Open
2 tasks

Persistence Layer #2545

byte-bandit opened this issue Jan 28, 2025 · 0 comments
Assignees
Labels
Milestone

Comments

@byte-bandit
Copy link

byte-bandit commented Jan 28, 2025

Background

The database should contain historic and live price data information on token/GRAIN pairs, so that the following information can ultimately be constructed upon request, fulfilling the Datafeed API:

⏰ Estimate: 2 days

Search Symbols

[
    {
        "symbol": "<short symbol name>",
        "description": "<symbol description>",
        "exchange": "<symbol exchange name>",
        "ticker": "<symbol ticker name>",
        "type": "stock"
    },
]

Resolve symbol

{
    ticker: 'BTCUSD',
    name: 'BTCUSD',
    description: 'Bitcoin/USD',
    type: symbolItem.type,
    session: '24x7',
    timezone: 'Etc/UTC',
    exchange: 'Example Exchange',
    minmov: 1,
    pricescale: 100,
    has_intraday: false,
    visible_plots_set: 'ohlcv',
    has_weekly_and_monthly: false,
    supported_resolutions: ['1', '5', '30', '60', '1D', '1W'],
    volume_precision: 2,
    data_status: 'streaming',
}

Get Bars

{
  open: price,
  high: price,
  low: price,
  close: price,
  time: time.getTime(),
}

Done when

  • A db schema is defined the allows speedy on-demand query and construction of all information outlined above
  • SQL migrations are written and tested

Notes

  • A lot of the information can likely be hard-coded and won't need to be stored with the token
  • One table of token definitions, one table of historic price data?
@byte-bandit byte-bandit added this to the next milestone Jan 28, 2025
@byte-bandit byte-bandit self-assigned this Jan 28, 2025
@byte-bandit byte-bandit mentioned this issue Jan 28, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant