diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f99515f2..c67448893 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ - Realized Price 1st Percentile - Realized Price 0.5th Percentile - Realized Price 0.1th Percentile +- Node + - Added a `node.args` file where you can set the path to your node `datadir` and where you can add additional args (you can see the syntax in `parser/README.md`) ### App diff --git a/parser/src/datasets/price/mod.rs b/parser/src/datasets/price/mod.rs index 8b07a5f49..ded9511ba 100644 --- a/parser/src/datasets/price/mod.rs +++ b/parser/src/datasets/price/mod.rs @@ -300,15 +300,32 @@ impl PriceDatasets { let previous_timestamp = previous_timestamp.map(clean_timestamp); - let ohlc = self.get_from_1mn_kraken(timestamp, previous_timestamp).unwrap_or_else(|_| { + let ohlc = self + .get_from_1mn_kraken(timestamp, previous_timestamp) + .unwrap_or_else(|_| { self.get_from_1mn_binance(timestamp, previous_timestamp) - .unwrap_or_else(|_| self.get_from_har_binance(timestamp, previous_timestamp).unwrap_or_else(|_| { - let date = WNaiveDate::from_timestamp(timestamp); + .unwrap_or_else(|_| { + self.get_from_har_binance(timestamp, previous_timestamp) + .unwrap_or_else(|_| { + let date = WNaiveDate::from_timestamp(timestamp); - panic!( - "Can't find price for {height} - {timestamp} - {date}, please update binance.har file" - ) - })) + panic!( + "Can't find the price for: height: {height} - date: {date} +1mn APIs are limited to the last 16 hours for Binance's and the last 10 hours for Kraken's +How to fix this: +1. Go to https://www.binance.com/en/trade/BTC_USDT?type=spot +2. Select 1mn interval +3. Open the inspector/dev tools +4. Go to the Network Tab +5. Filter URLs by 'uiKlines' +6. Go back to the chart and scroll until you pass the date mentioned few lines ago +7. Go back to the dev tools +8. Export to a har file (if there is no explicit button, click on the cog button) +9. Move the file to 'parser/imports/binance.har' +" + ) + }) + }) }); self.ohlcs.height.insert(height, ohlc);