Skip to content

Instantly share code, notes, and snippets.

View aprsn's full-sized avatar
🎯
Focusing

Alper San aprsn

🎯
Focusing
View GitHub Profile
@aprsn
aprsn / script.py
Created January 26, 2021 14:09
Collect historical stock prices and write in to Excel with Python
import requests
import pandas
API_KEY = 'YOUR_API_KEY' # get your free API key from https://moon.finage.co.uk/register?subscribe=API00
symbol = input('Symbol: ')
start_date = input('Start date: ')
end_date = input('End date: ')
response = requests.get('https://api.finage.co.uk/agg/stock/'+ symbol +'/1/day/'+ start_date +'/'+ end_date +'?apikey=' + API_KEY)
@aprsn
aprsn / script.py
Last active January 26, 2021 14:09
Collect historical stock prices with Python
import requests
API_KEY = 'YOUR_API_KEY' # get your free API key from https://moon.finage.co.uk/register?subscribe=API00
symbol = input('Symbol: ')
start_date = input('Start date: ')
end_date = input('End date: ')
response = requests.get('https://api.finage.co.uk/agg/stock/'+ symbol +'/1/day/'+ start_date +'/'+ end_date +'?apikey=' + API_KEY)
from flask import Flask
from flask import render_template
import requests as req
import json
app = Flask(__name__)
@app.route('/convert/')
@app.route('/convert/<base>/<to>/<amount>')
def convert(base=None, to=None, amount=None):
@aprsn
aprsn / app.py
Last active July 30, 2020 16:35
Finage Example Currency Converter Page Steps
from flask import Flask
from flask import render_template
app = Flask(__name__)
@app.route('/convert/')
@app.route('/convert/<base>/<to>/<amount>')
def convert(base=None, to=None, amount=None):
return render_template('index.html', base=base, to=to, value = value)