예제 #1
0
def search_autocomplete():
    """
    @author: EM
    Functionality to return all the symbols that are supported by IEX API.
    """
    symbols = web.get_iex_symbols().symbol.values
    names = web.get_iex_symbols().name.values

    data = {}
    data["symbols"] = symbols.tolist()
    data["names"] = names.tolist()

    values = []

    for q in range(len(symbols)):
        values.append(data["symbols"][q] + " " + data["names"][q])
    return values
예제 #2
0
def quote_validate(symbol):
    """
    @author: EM
    Look up and confirm quote for symbol.

    This function is undergoing serious changes and should not be relied on at the moment.
    """

    # Reject symbol if it starts with caret
    if symbol.startswith("^"):
        return None

    # Reject symbol if it contains comma
    if "," in symbol:
        return None

    # Query IEX for quote
    symbols = web.get_iex_symbols().symbol.values.tolist()
    if symbol in symbols:
        return symbol.upper()
    else:
        return None
예제 #3
0
파일: test_iex.py 프로젝트: anshikka/Soda
 def test_live_prices(self):
     dftickers = get_iex_symbols()
     tickers = dftickers[:5].symbol.values
     df = get_last_iex(tickers[:5])
     assert df["price"].mean() > 0
예제 #4
0
파일: test_iex.py 프로젝트: anshikka/Soda
 def test_symbols(self):
     df = get_iex_symbols()
     assert 'GS' in df.symbol.values
예제 #5
0
import os

dataframe_list = []
chunks_list = []
download = requests.get(
    'http://www.nasdaq.com/screening/companies-by-name.aspx?letter=0&exchange=all&render=download'
)

with open('Tickers.csv', 'w') as file:
    writer = csv.writer(file)
    reader = csv.reader(download.text.splitlines())
    for row in reader:
        writer.writerow(row)

ticker_df = pd.read_csv('Tickers.csv')
IEX_tickers = pdr.get_iex_symbols()
IEX_tickers = IEX_tickers['symbol']
IEX_tickers = list(IEX_tickers)
IEX_tickers = [i.replace('-', '-P') for i in IEX_tickers]
symbols = ticker_df['Symbol']
symbols = list(symbols)
symbols = symbols + IEX_tickers
symbols = [s.replace('.', '-') for s in symbols]
symbols = [s.replace('^', '-P') for s in symbols]
symbols = list(set(symbols))
path = 'C:\\Users\Francesco\Desktop\Python_Scripts\Portfolio-Project\Stock_Data'
directory = os.listdir(path)
os.chdir(path)
directory = [s.replace('_Close.csv', '') for s in directory]
#tickers = []
stock = pd.DataFrame()
예제 #6
0
                    [
                        html.Div([], id="graphs-content"),
                        html.Div([], id="data-plot"),
                    ],
                    id="main-content",
                ),
                html.Div([], id="news-content", className="new_ticker"),
            ],
            className="content",
        ),
    ],
    className="container",
)

# Getting the stock names & symbols & remove stock with long name [more information on #https://iexcloud.io/docs/api/#symbols]
symbols = web.get_iex_symbols()
symbols_list = pd.DataFrame({
    "symbol": symbols["symbol"],
    "name": symbols["name"]
})
symbols_list["name"].replace("", np.nan, inplace=True)
symbols_list["symbol"].replace("", np.nan, inplace=True)
symbols_list.dropna(inplace=True)
mask = symbols_list["name"].str.len() < 40
symbols_list = symbols_list.loc[mask]
symbols_list = symbols_list.reset_index(drop=True)


# For Part 1 dropdown
@app.callback(Output("dropdown_tickers", "options"),
              [Input("dropdown_tickers", "value")])
예제 #7
0
 def get_all_stock_code() -> []:
     sym = pdr.get_iex_symbols()
     pdr.get_nasdaq_symbols()
     return sym['symbol'].to_list()
# encoding: utf-8
'''
@author: headsome jerry
@time:18-8-5下午1:11
@file_name:ttttteeeeeessssssttttt.py.py
'''

from pandas_datareader import data as pdr
import pandas as pd
import fix_yahoo_finance as yf
yf.pdr_override()  # <== that's all it takes :-)
bits = pdr.get_iex_symbols()[8658:]
import quandl
# download dataframe
#data = pdr.get_data_yahoo("SPY", start="2010-01-01", end="2017-04-30")
#data2=pdr.get_data_yahoo('AAPL',start="2010-01-01", end="2017-04-30")
# writer=pd.ExcelWriter('fulll.xlsx')
# data.to_excel(writer,'1')
# data2.to_excel(writer,'2')
# writer.save()
# pdr.get_data_yahoo("XLM",start="2010-01-01", end="2017-04-30")

quandl.ApiConfig.api_key = 'vNbJmE3vy2XtEHpAVyWT'

q = quandl.get('GDAX/ETH_EUR')

qq = quandl.get('BCHARTS/BITFLYERUSD',
                start_date='2016-08-04',
                end_date='2018-08-04')