-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Front end and Backend communication complete
- Loading branch information
Showing
17 changed files
with
104 additions
and
71 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Import necessary modules | ||
import threading | ||
from flask import Blueprint, request, jsonify, current_app | ||
from flask_jwt_extended import jwt_required | ||
from app import db | ||
from app.models.backtest import Indicator, Coin | ||
from app.services.backtest_service import run_backtest_by_id | ||
from app.services.kafka_service import kafka_service | ||
|
||
# Define Blueprint | ||
bp = Blueprint('data', __name__) | ||
|
||
# Endpoint for fetching coins | ||
@bp.route('/coins', methods=['GET']) | ||
@jwt_required() | ||
def fetch_coins(): | ||
# Assuming you have a model named Coin | ||
coins = Coin.query.all() | ||
coin_list = [{'id': coin.id, 'name': coin.name, 'symbol': coin.symbol} for coin in coins] | ||
|
||
return jsonify({'coins': coin_list}), 200 | ||
|
||
# Endpoint for fetching indicators | ||
@bp.route('/indicators', methods=['GET']) | ||
@jwt_required() | ||
def fetch_indicators(): | ||
# Assuming you have a model named Indicator | ||
indicators = Indicator.query.all() | ||
indicator_list = [{'id': indicator.id, 'name': indicator.name, 'description': indicator.description} for indicator in indicators] | ||
print(indicator_list) | ||
return jsonify({'indicators': indicator_list}), 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
/* src/index.css */ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
// tailwind.config.js | ||
/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
content: [], | ||
content: [ | ||
"./src/**/*.{js,jsx,ts,tsx}", | ||
], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,5 @@ mlflow | |
psycopg2 | ||
python-dotenv | ||
ccxt | ||
yfinance | ||
yfinance | ||
flask_cors |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.