Skip to content

Polygon Stock Middleware Backend Endpoints  #8

Description

@theDe-bugger

Description

Need a backend endpoint that the site can access to test the crypto arbitrage strategies for a specific currency, two exchanges, and time frame.

Overall:

  • Gurik made an endpoint similar to this for cryptos, feel free to discuss this with him
  • pretty simple, just use our api key thats in the server folder and call polygon for corresponding data requests
  • you can start by throwing a 400 error for any issues that come up, but will need to specify error codes for diff errors

We need to make GET request!

Endpoint

'/api/stock'

Params

  • stock ticker
  • start datetime
  • end datetime

Return

  • the data as received from polygon
  • note that this return could be fairly heavy and lead to a bottleneck
  • what are some ways you can address this? data aggregation? limit the data request to just a specific time period?

Example Call

GET /api/stock
with params:

  • stock ticker = AAPL
  • start = "01/01/2023 10:00:00"
  • end = "09/09/2023 18:00:00"

Return results the same way polygon does

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions