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

Commit

Permalink
algo sync with mongo
Browse files Browse the repository at this point in the history
  • Loading branch information
fou3fou3 authored and CelestialCrafter committed Nov 1, 2023
1 parent 310cc59 commit 6ce22c1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions views/plot.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import io
import matplotlib
import matplotlib.pyplot as plt
import plots.colors as colors
from utils import get_algorithms
from price import get_prices
from importlib import import_module
import plots.colors as colors
import matplotlib

matplotlib.use('Agg')

def plot(algorithm):
prices = get_prices('ETH/USD', interval=1440)

if algorithm not in ['bollinger_bands', 'rsi', 'price']:
if algorithm not in get_algorithms():
return 'Invalid Algorithm', 404
import_module(f'plots.{algorithm}').plot(prices)

Expand Down

0 comments on commit 6ce22c1

Please sign in to comment.