Open huzoorbux opened 4 years ago
while it can run without the api just fine, if you want the good stuff you do need to setup your own node that will collect buy and sell data over time
https://github.com/Tucsky/SignificantTrades#implement-historical-data
👇
git clone git@github.com:Tucsky/SignificantTrades.git -b feature/server ./server && rm -rf ./server/.git && cd ./server && npm install
node index pair=BTCUSD port=3000 websocket=false
here you should have a server listening at localhost:300
then go in the client folder and start it this way
API_URL=http://localhost:3000/historical/{from}/{to}/{timeframe} npm run dev
OR edit webpack.config.js directly to override current api url / supported pairs (say your server listing to ethusd instead etc)
And if you want faster api, use influx
https://dl.influxdata.com/influxdb/releases/influxdb-1.8.0_windows_amd64.zip
Install it, and specify storage=influx
when you start the server
node index storage=influx influxUrl=localhost:8086
how to make this on production?
how to make this on production?
same thing but npm run build
instead of npm run dev
API_URL=http://localhost:3000/historical/{from}/{to}/{timeframe} npm run build
generate a ./dist folder containing the production app
Listening on multiple pairs using 1 server is planned, working on it atm. I will make this process a lot easier.
Access to XMLHttpRequest at 'https://api.aggr.trade/btcusd/historical/1587798200000/1587801926237/10000/' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.