Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
use config.json in views/plot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
CelestialCrafter committed Nov 16, 2023
1 parent b0454cb commit e083f6a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions views/plot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import io
import io, json
import matplotlib
import matplotlib.pyplot as plt
import plots.colors as colors
Expand All @@ -10,7 +10,8 @@
matplotlib.use('Agg')

def plot(algorithm):
prices = get_prices('ETH/USD', interval=1440)
config = json.load(open('config.json', 'r'))
prices = get_prices(config['pair'], interval=1440)

if algorithm not in get_algorithms():
return 'Invalid Algorithm', 404
Expand Down

0 comments on commit e083f6a

Please sign in to comment.