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

Can't retrieve data #48

Open
matteoberla opened this issue Jan 24, 2025 · 2 comments
Open

Can't retrieve data #48

matteoberla opened this issue Jan 24, 2025 · 2 comments

Comments

@matteoberla
Copy link

Hi,
I've set up both aggr and aggr-server locally (no docker, just on my localhost)

-Is it possible to run it without influxDb? (I see that ./data dir is populated with exchanges pairs data)

When I open aggr on http://localhost:8081/ I see an error on the terminal where I've started aggr-server.
Every time I try to refresh the page this is printed on the terminal:

TypeError: Cannot read properties of undefined (reading 'format')
    at /Users/sasoftware/Desktop/test/aggr-server/src/server.js:413:21
    at Layer.handle [as handle_request] (/Users/sasoftware/Desktop/test/aggr-server/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/sasoftware/Desktop/test/aggr-server/node_modules/express/lib/router/route.js:144:13)
    at Route.dispatch (/Users/sasoftware/Desktop/test/aggr-server/node_modules/express/lib/router/route.js:114:3)
    at Layer.handle [as handle_request] (/Users/sasoftware/Desktop/test/aggr-server/node_modules/express/lib/router/layer.js:95:5)
    at /Users/sasoftware/Desktop/test/aggr-server/node_modules/express/lib/router/index.js:284:15
    at param (/Users/sasoftware/Desktop/test/aggr-server/node_modules/express/lib/router/index.js:365:14)
    at param (/Users/sasoftware/Desktop/test/aggr-server/node_modules/express/lib/router/index.js:376:14)
    at param (/Users/sasoftware/Desktop/test/aggr-server/node_modules/express/lib/router/index.js:376:14)
    at param (/Users/sasoftware/Desktop/test/aggr-server/node_modules/express/lib/router/index.js:376:14)

What am I doing wrong? Am I missing something?

aggr-server:
-I've copied the config.json.example into config.json without any changes
-I've tries to comment INFLUX_HOST and INFLUX_PORT from .env file

http://localhost:3000/ responds with {"message":"hi"} so I think it's set up correctly

aggr:
-I've added API_URL with the url of the server (http://localhost:3000/) to .env and .env.production, also tried to run with API_URL=http://localhost:3000/ npm run serve

Aggr without the historical data works fine (even if I see some errors on the webpage)
When I try to add the aggr-server connection nothing changes except for the error I see in the terminal

@Tucsky
Copy link
Owner

Tucsky commented Jan 24, 2025

While aggr-server is designed to save tick data in /data (as file), the client cannot make use of it directly as a source for populating the chart in realtime, its way to much data. Influx will take care of it for compressing the raw data into timeframes. Trade files in /data is used as a backup for influx or other external charting / analysis purposes

@matteoberla
Copy link
Author

So I need to setup influx in order to see all the historical data in the chart, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants