예제 #1
0
파일: fapi.py 프로젝트: Peter-Luk/finance
async def quote_hk(code: int):
    _ = Equity(code, False)
    return {_.yahoo_code: f'{_}'}
예제 #2
0
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import plotly.graph_objects as go
from plotly.subplots import make_subplots

# import pandas as pd
# from datetime import datetime
from fat import Equity

# e1 = Equity('mrna', exchange='Nasdaq')
e1 = Equity(6645, exchange='TSE')
df = e1()
# df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv')

app = dash.Dash(__name__)

app.layout = html.Div([
    dcc.Checklist(id='toggle-rangeslider',
                  options=[{
                      'label': 'Include Rangeslider',
                      'value': 'slider'
                  }],
                  value=['slider']),
    dcc.Graph(id="graph"),
])


@app.callback(Output("graph", "figure"),
              [Input("toggle-rangeslider", "value")])
예제 #3
0
파일: fapi.py 프로젝트: Peter-Luk/finance
async def optinum_nyse(code: str):
    _ = Equity(code, exchange="NYSE")
    return _.optinum()
예제 #4
0
파일: fapi.py 프로젝트: Peter-Luk/finance
async def quote_nyse(code: str):
    _ = Equity(code, exchange="NYSE")
    return {_.yahoo_code: f'{_}'}
예제 #5
0
파일: fapi.py 프로젝트: Peter-Luk/finance
async def optinum_tse(code: str):
    __  = prefer_stock('TSE')
    if code.lower() in __.keys():
        _ = Equity(__[code.lower()], exchange='TSE')
        return _.optinum()
예제 #6
0
파일: fapi.py 프로젝트: Peter-Luk/finance
async def quote_tse(code: str):
    __  = prefer_stock('TSE')
    if code.lower() in __.keys():
        _ = Equity(__[code.lower()], exchange='TSE')
        return {_.yahoo_code: f'{_}'}
예제 #7
0
파일: fapi.py 프로젝트: Peter-Luk/finance
async def optinum_hk(code: int):
    _ = Equity(code, False)
    return _.optinum()