Skip to content
This repository was archived by the owner on Oct 20, 2025. It is now read-only.

rye-portfolio/prometheus-assessment

Repository files navigation

Assessment Instructions

See documentation.

  • Create a self-hosted C# .NET 8+ solution
  • Consume the 'TIME_SERIES_INTRADAY' API and expose a new API that:
    • takes the symbol as a string parameter,
    • queries the intraday data for last month,
    • assumes the data is updated every 15 minutes,
    • groups by the day, and
    • returns a JSON response in the following format.
[
    {
        "day": "2009-01-30",
        "lowAverage": 40.2958,
        "highAverage": 49.7534,
        "volume": 49073348
    }
]

Due as a GitHub repository link by the end of October 19, 2025.

My implementation

There was some ambiguity in the instructions, which is addressed here.

  • The instruction "intraday data for last month" was inferred as "all data from the entire month previous to the current month."
  • The instruction "takes the symbol as a string parameter" does not specify how the parameter should be taken (path or query). Judging by how each 'symbol' represents a unique stock history, this API exposes a resource: stock history. So, the symbol parameter is embedded in the path, in the same way one would embed other resources like orders in a path (api/orders/4E9B23), instead of in a query parameter (api/orders?symbol=4E9B23).

If there's any confusion about my code style: I try to follow engineering best-practices, outlined here.

  • Never overengineer. All behavior I define has a purpose.
  • Minimize bloat. I use record classes when possible to avoid boilerplate.
  • Minimize nesting. I use early returns for error states and cold paths.
  • Minimize visibility. This isn't a library, so all types are internal and sealed.
  • Use idiomatic patterns. C# is a mix of functional (LINQ), object-oriented (JsonConverter), and procedural programming, and I take full advantage of this.
  • Use consistent formatting. I don't care what style is used in a codebase, as long as it's consistent, hence .editorconfig.

Also - I would have liked to define unit and integration tests for this project, but that would require more time and, for this project, would be overengineering.

Ok, how do I test it?

See releases.

If the server responds with status code 500 and a body of "Missing API key (E00)":

  • If you don't have an API key, claim one from AlphaVantage here.
  • If you do have an API key, ensure it's passed as an env var or command-line arg.

About

Sample ASP.NET Core project that consumes and exposes a stock API

Resources

License

Stars

Watchers

Forks

Languages