partition stringclasses 3 values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1 value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
valid | batchDF | Batch several data requests into one invocation
https://iexcloud.io/docs/api/#batch-requests
Args:
symbols (list); List of tickers to request
fields (list); List of fields to request
range_ (string); Date range for chart
last (int);
token (string); Access token
version (string); API version
Returns:
DataFrame: results in json | pyEX/stocks.py | def batchDF(symbols, fields=None, range_='1m', last=10, token='', version=''):
'''Batch several data requests into one invocation
https://iexcloud.io/docs/api/#batch-requests
Args:
symbols (list); List of tickers to request
fields (list); List of fields to request
range_ (string); Date range for chart
last (int);
token (string); Access token
version (string); API version
Returns:
DataFrame: results in json
'''
x = batch(symbols, fields, range_, last, token, version)
ret = {}
if isinstance(symbols, str):
for field in x.keys():
ret[field] = _MAPPING[field](x[field])
else:
for symbol in x.keys():
for field in x[symbol].keys():
if field not in ret:
ret[field] = pd.DataFrame()
dat = x[symbol][field]
dat = _MAPPING[field](dat)
dat['symbol'] = symbol
ret[field] = pd.concat([ret[field], dat], sort=True)
return ret | def batchDF(symbols, fields=None, range_='1m', last=10, token='', version=''):
'''Batch several data requests into one invocation
https://iexcloud.io/docs/api/#batch-requests
Args:
symbols (list); List of tickers to request
fields (list); List of fields to request
range_ (string); Date range for chart
last (int);
token (string); Access token
version (string); API version
Returns:
DataFrame: results in json
'''
x = batch(symbols, fields, range_, last, token, version)
ret = {}
if isinstance(symbols, str):
for field in x.keys():
ret[field] = _MAPPING[field](x[field])
else:
for symbol in x.keys():
for field in x[symbol].keys():
if field not in ret:
ret[field] = pd.DataFrame()
dat = x[symbol][field]
dat = _MAPPING[field](dat)
dat['symbol'] = symbol
ret[field] = pd.concat([ret[field], dat], sort=True)
return ret | [
"Batch",
"several",
"data",
"requests",
"into",
"one",
"invocation"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L92-L127 | [
"def",
"batchDF",
"(",
"symbols",
",",
"fields",
"=",
"None",
",",
"range_",
"=",
"'1m'",
",",
"last",
"=",
"10",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"x",
"=",
"batch",
"(",
"symbols",
",",
"fields",
",",
"range_",
",",
"last",
",",
"token",
",",
"version",
")",
"ret",
"=",
"{",
"}",
"if",
"isinstance",
"(",
"symbols",
",",
"str",
")",
":",
"for",
"field",
"in",
"x",
".",
"keys",
"(",
")",
":",
"ret",
"[",
"field",
"]",
"=",
"_MAPPING",
"[",
"field",
"]",
"(",
"x",
"[",
"field",
"]",
")",
"else",
":",
"for",
"symbol",
"in",
"x",
".",
"keys",
"(",
")",
":",
"for",
"field",
"in",
"x",
"[",
"symbol",
"]",
".",
"keys",
"(",
")",
":",
"if",
"field",
"not",
"in",
"ret",
":",
"ret",
"[",
"field",
"]",
"=",
"pd",
".",
"DataFrame",
"(",
")",
"dat",
"=",
"x",
"[",
"symbol",
"]",
"[",
"field",
"]",
"dat",
"=",
"_MAPPING",
"[",
"field",
"]",
"(",
"dat",
")",
"dat",
"[",
"'symbol'",
"]",
"=",
"symbol",
"ret",
"[",
"field",
"]",
"=",
"pd",
".",
"concat",
"(",
"[",
"ret",
"[",
"field",
"]",
",",
"dat",
"]",
",",
"sort",
"=",
"True",
")",
"return",
"ret"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | bulkBatch | Optimized batch to fetch as much as possible at once
https://iexcloud.io/docs/api/#batch-requests
Args:
symbols (list); List of tickers to request
fields (list); List of fields to request
range_ (string); Date range for chart
last (int);
token (string); Access token
version (string); API version
Returns:
dict: results in json | pyEX/stocks.py | def bulkBatch(symbols, fields=None, range_='1m', last=10, token='', version=''):
'''Optimized batch to fetch as much as possible at once
https://iexcloud.io/docs/api/#batch-requests
Args:
symbols (list); List of tickers to request
fields (list); List of fields to request
range_ (string); Date range for chart
last (int);
token (string); Access token
version (string); API version
Returns:
dict: results in json
'''
fields = fields or _BATCH_TYPES
args = []
empty_data = []
list_orig = empty_data.__class__
if not isinstance(symbols, list_orig):
raise PyEXception('Symbols must be of type list')
for i in range(0, len(symbols), 99):
args.append((symbols[i:i+99], fields, range_, last, token, version))
pool = ThreadPool(20)
rets = pool.starmap(batch, args)
pool.close()
ret = {}
for i, d in enumerate(rets):
symbols_subset = args[i][0]
if len(d) != len(symbols_subset):
empty_data.extend(list_orig(set(symbols_subset) - set(d.keys())))
ret.update(d)
for k in empty_data:
if k not in ret:
if isinstance(fields, str):
ret[k] = {}
else:
ret[k] = {x: {} for x in fields}
return ret | def bulkBatch(symbols, fields=None, range_='1m', last=10, token='', version=''):
'''Optimized batch to fetch as much as possible at once
https://iexcloud.io/docs/api/#batch-requests
Args:
symbols (list); List of tickers to request
fields (list); List of fields to request
range_ (string); Date range for chart
last (int);
token (string); Access token
version (string); API version
Returns:
dict: results in json
'''
fields = fields or _BATCH_TYPES
args = []
empty_data = []
list_orig = empty_data.__class__
if not isinstance(symbols, list_orig):
raise PyEXception('Symbols must be of type list')
for i in range(0, len(symbols), 99):
args.append((symbols[i:i+99], fields, range_, last, token, version))
pool = ThreadPool(20)
rets = pool.starmap(batch, args)
pool.close()
ret = {}
for i, d in enumerate(rets):
symbols_subset = args[i][0]
if len(d) != len(symbols_subset):
empty_data.extend(list_orig(set(symbols_subset) - set(d.keys())))
ret.update(d)
for k in empty_data:
if k not in ret:
if isinstance(fields, str):
ret[k] = {}
else:
ret[k] = {x: {} for x in fields}
return ret | [
"Optimized",
"batch",
"to",
"fetch",
"as",
"much",
"as",
"possible",
"at",
"once"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L130-L176 | [
"def",
"bulkBatch",
"(",
"symbols",
",",
"fields",
"=",
"None",
",",
"range_",
"=",
"'1m'",
",",
"last",
"=",
"10",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"fields",
"=",
"fields",
"or",
"_BATCH_TYPES",
"args",
"=",
"[",
"]",
"empty_data",
"=",
"[",
"]",
"list_orig",
"=",
"empty_data",
".",
"__class__",
"if",
"not",
"isinstance",
"(",
"symbols",
",",
"list_orig",
")",
":",
"raise",
"PyEXception",
"(",
"'Symbols must be of type list'",
")",
"for",
"i",
"in",
"range",
"(",
"0",
",",
"len",
"(",
"symbols",
")",
",",
"99",
")",
":",
"args",
".",
"append",
"(",
"(",
"symbols",
"[",
"i",
":",
"i",
"+",
"99",
"]",
",",
"fields",
",",
"range_",
",",
"last",
",",
"token",
",",
"version",
")",
")",
"pool",
"=",
"ThreadPool",
"(",
"20",
")",
"rets",
"=",
"pool",
".",
"starmap",
"(",
"batch",
",",
"args",
")",
"pool",
".",
"close",
"(",
")",
"ret",
"=",
"{",
"}",
"for",
"i",
",",
"d",
"in",
"enumerate",
"(",
"rets",
")",
":",
"symbols_subset",
"=",
"args",
"[",
"i",
"]",
"[",
"0",
"]",
"if",
"len",
"(",
"d",
")",
"!=",
"len",
"(",
"symbols_subset",
")",
":",
"empty_data",
".",
"extend",
"(",
"list_orig",
"(",
"set",
"(",
"symbols_subset",
")",
"-",
"set",
"(",
"d",
".",
"keys",
"(",
")",
")",
")",
")",
"ret",
".",
"update",
"(",
"d",
")",
"for",
"k",
"in",
"empty_data",
":",
"if",
"k",
"not",
"in",
"ret",
":",
"if",
"isinstance",
"(",
"fields",
",",
"str",
")",
":",
"ret",
"[",
"k",
"]",
"=",
"{",
"}",
"else",
":",
"ret",
"[",
"k",
"]",
"=",
"{",
"x",
":",
"{",
"}",
"for",
"x",
"in",
"fields",
"}",
"return",
"ret"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | bulkBatchDF | Optimized batch to fetch as much as possible at once
https://iexcloud.io/docs/api/#batch-requests
Args:
symbols (list); List of tickers to request
fields (list); List of fields to request
range_ (string); Date range for chart
last (int);
token (string); Access token
version (string); API version
Returns:
DataFrame: results in json | pyEX/stocks.py | def bulkBatchDF(symbols, fields=None, range_='1m', last=10, token='', version=''):
'''Optimized batch to fetch as much as possible at once
https://iexcloud.io/docs/api/#batch-requests
Args:
symbols (list); List of tickers to request
fields (list); List of fields to request
range_ (string); Date range for chart
last (int);
token (string); Access token
version (string); API version
Returns:
DataFrame: results in json
'''
dat = bulkBatch(symbols, fields, range_, last, token, version)
ret = {}
for symbol in dat:
for field in dat[symbol]:
if field not in ret:
ret[field] = pd.DataFrame()
d = dat[symbol][field]
d = _MAPPING[field](d)
d['symbol'] = symbol
ret[field] = pd.concat([ret[field], d], sort=True)
return ret | def bulkBatchDF(symbols, fields=None, range_='1m', last=10, token='', version=''):
'''Optimized batch to fetch as much as possible at once
https://iexcloud.io/docs/api/#batch-requests
Args:
symbols (list); List of tickers to request
fields (list); List of fields to request
range_ (string); Date range for chart
last (int);
token (string); Access token
version (string); API version
Returns:
DataFrame: results in json
'''
dat = bulkBatch(symbols, fields, range_, last, token, version)
ret = {}
for symbol in dat:
for field in dat[symbol]:
if field not in ret:
ret[field] = pd.DataFrame()
d = dat[symbol][field]
d = _MAPPING[field](d)
d['symbol'] = symbol
ret[field] = pd.concat([ret[field], d], sort=True)
return ret | [
"Optimized",
"batch",
"to",
"fetch",
"as",
"much",
"as",
"possible",
"at",
"once"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L179-L208 | [
"def",
"bulkBatchDF",
"(",
"symbols",
",",
"fields",
"=",
"None",
",",
"range_",
"=",
"'1m'",
",",
"last",
"=",
"10",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"dat",
"=",
"bulkBatch",
"(",
"symbols",
",",
"fields",
",",
"range_",
",",
"last",
",",
"token",
",",
"version",
")",
"ret",
"=",
"{",
"}",
"for",
"symbol",
"in",
"dat",
":",
"for",
"field",
"in",
"dat",
"[",
"symbol",
"]",
":",
"if",
"field",
"not",
"in",
"ret",
":",
"ret",
"[",
"field",
"]",
"=",
"pd",
".",
"DataFrame",
"(",
")",
"d",
"=",
"dat",
"[",
"symbol",
"]",
"[",
"field",
"]",
"d",
"=",
"_MAPPING",
"[",
"field",
"]",
"(",
"d",
")",
"d",
"[",
"'symbol'",
"]",
"=",
"symbol",
"ret",
"[",
"field",
"]",
"=",
"pd",
".",
"concat",
"(",
"[",
"ret",
"[",
"field",
"]",
",",
"d",
"]",
",",
"sort",
"=",
"True",
")",
"return",
"ret"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | _bookToDF | internal | pyEX/stocks.py | def _bookToDF(b):
'''internal'''
quote = b.get('quote', [])
asks = b.get('asks', [])
bids = b.get('bids', [])
trades = b.get('trades', [])
df1 = pd.io.json.json_normalize(quote)
df1['type'] = 'quote'
df2 = pd.io.json.json_normalize(asks)
df2['symbol'] = quote['symbol']
df2['type'] = 'ask'
df3 = pd.io.json.json_normalize(bids)
df3['symbol'] = quote['symbol']
df3['type'] = 'bid'
df4 = pd.io.json.json_normalize(trades)
df4['symbol'] = quote['symbol']
df3['type'] = 'trade'
df = pd.concat([df1, df2, df3, df4], sort=True)
_toDatetime(df)
return df | def _bookToDF(b):
'''internal'''
quote = b.get('quote', [])
asks = b.get('asks', [])
bids = b.get('bids', [])
trades = b.get('trades', [])
df1 = pd.io.json.json_normalize(quote)
df1['type'] = 'quote'
df2 = pd.io.json.json_normalize(asks)
df2['symbol'] = quote['symbol']
df2['type'] = 'ask'
df3 = pd.io.json.json_normalize(bids)
df3['symbol'] = quote['symbol']
df3['type'] = 'bid'
df4 = pd.io.json.json_normalize(trades)
df4['symbol'] = quote['symbol']
df3['type'] = 'trade'
df = pd.concat([df1, df2, df3, df4], sort=True)
_toDatetime(df)
return df | [
"internal"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L229-L253 | [
"def",
"_bookToDF",
"(",
"b",
")",
":",
"quote",
"=",
"b",
".",
"get",
"(",
"'quote'",
",",
"[",
"]",
")",
"asks",
"=",
"b",
".",
"get",
"(",
"'asks'",
",",
"[",
"]",
")",
"bids",
"=",
"b",
".",
"get",
"(",
"'bids'",
",",
"[",
"]",
")",
"trades",
"=",
"b",
".",
"get",
"(",
"'trades'",
",",
"[",
"]",
")",
"df1",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"quote",
")",
"df1",
"[",
"'type'",
"]",
"=",
"'quote'",
"df2",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"asks",
")",
"df2",
"[",
"'symbol'",
"]",
"=",
"quote",
"[",
"'symbol'",
"]",
"df2",
"[",
"'type'",
"]",
"=",
"'ask'",
"df3",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"bids",
")",
"df3",
"[",
"'symbol'",
"]",
"=",
"quote",
"[",
"'symbol'",
"]",
"df3",
"[",
"'type'",
"]",
"=",
"'bid'",
"df4",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"trades",
")",
"df4",
"[",
"'symbol'",
"]",
"=",
"quote",
"[",
"'symbol'",
"]",
"df3",
"[",
"'type'",
"]",
"=",
"'trade'",
"df",
"=",
"pd",
".",
"concat",
"(",
"[",
"df1",
",",
"df2",
",",
"df3",
",",
"df4",
"]",
",",
"sort",
"=",
"True",
")",
"_toDatetime",
"(",
"df",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | bookDF | Book data
https://iextrading.com/developer/docs/#book
realtime during Investors Exchange market hours
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def bookDF(symbol, token='', version=''):
'''Book data
https://iextrading.com/developer/docs/#book
realtime during Investors Exchange market hours
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
x = book(symbol, token, version)
df = _bookToDF(x)
return df | def bookDF(symbol, token='', version=''):
'''Book data
https://iextrading.com/developer/docs/#book
realtime during Investors Exchange market hours
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
x = book(symbol, token, version)
df = _bookToDF(x)
return df | [
"Book",
"data"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L256-L272 | [
"def",
"bookDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"x",
"=",
"book",
"(",
"symbol",
",",
"token",
",",
"version",
")",
"df",
"=",
"_bookToDF",
"(",
"x",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | cashFlow | Pulls cash flow data. Available quarterly (4 quarters) or annually (4 years).
https://iexcloud.io/docs/api/#cash-flow
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def cashFlow(symbol, token='', version=''):
'''Pulls cash flow data. Available quarterly (4 quarters) or annually (4 years).
https://iexcloud.io/docs/api/#cash-flow
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/cash-flow', token, version) | def cashFlow(symbol, token='', version=''):
'''Pulls cash flow data. Available quarterly (4 quarters) or annually (4 years).
https://iexcloud.io/docs/api/#cash-flow
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/cash-flow', token, version) | [
"Pulls",
"cash",
"flow",
"data",
".",
"Available",
"quarterly",
"(",
"4",
"quarters",
")",
"or",
"annually",
"(",
"4",
"years",
")",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L275-L291 | [
"def",
"cashFlow",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/cash-flow'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | cashFlowDF | Pulls cash flow data. Available quarterly (4 quarters) or annually (4 years).
https://iexcloud.io/docs/api/#cash-flow
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def cashFlowDF(symbol, token='', version=''):
'''Pulls cash flow data. Available quarterly (4 quarters) or annually (4 years).
https://iexcloud.io/docs/api/#cash-flow
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
val = cashFlow(symbol, token, version)
df = pd.io.json.json_normalize(val, 'cashflow', 'symbol')
_toDatetime(df)
_reindex(df, 'reportDate')
df.replace(to_replace=[None], value=np.nan, inplace=True)
return df | def cashFlowDF(symbol, token='', version=''):
'''Pulls cash flow data. Available quarterly (4 quarters) or annually (4 years).
https://iexcloud.io/docs/api/#cash-flow
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
val = cashFlow(symbol, token, version)
df = pd.io.json.json_normalize(val, 'cashflow', 'symbol')
_toDatetime(df)
_reindex(df, 'reportDate')
df.replace(to_replace=[None], value=np.nan, inplace=True)
return df | [
"Pulls",
"cash",
"flow",
"data",
".",
"Available",
"quarterly",
"(",
"4",
"quarters",
")",
"or",
"annually",
"(",
"4",
"years",
")",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L294-L314 | [
"def",
"cashFlowDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"val",
"=",
"cashFlow",
"(",
"symbol",
",",
"token",
",",
"version",
")",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"val",
",",
"'cashflow'",
",",
"'symbol'",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'reportDate'",
")",
"df",
".",
"replace",
"(",
"to_replace",
"=",
"[",
"None",
"]",
",",
"value",
"=",
"np",
".",
"nan",
",",
"inplace",
"=",
"True",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | chart | Historical price/volume data, daily and intraday
https://iexcloud.io/docs/api/#historical-prices
Data Schedule
1d: -9:30-4pm ET Mon-Fri on regular market trading days
-9:30-1pm ET on early close trading days
All others:
-Prior trading day available after 4am ET Tue-Sat
Args:
symbol (string); Ticker to request
timeframe (string); Timeframe to request e.g. 1m
date (datetime): date, if requesting intraday
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def chart(symbol, timeframe='1m', date=None, token='', version=''):
'''Historical price/volume data, daily and intraday
https://iexcloud.io/docs/api/#historical-prices
Data Schedule
1d: -9:30-4pm ET Mon-Fri on regular market trading days
-9:30-1pm ET on early close trading days
All others:
-Prior trading day available after 4am ET Tue-Sat
Args:
symbol (string); Ticker to request
timeframe (string); Timeframe to request e.g. 1m
date (datetime): date, if requesting intraday
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
if timeframe is not None and timeframe != '1d':
if timeframe not in _TIMEFRAME_CHART:
raise PyEXception('Range must be in %s' % str(_TIMEFRAME_CHART))
return _getJson('stock/' + symbol + '/chart' + '/' + timeframe, token, version)
if date:
date = _strOrDate(date)
return _getJson('stock/' + symbol + '/chart' + '/date/' + date, token, version)
return _getJson('stock/' + symbol + '/chart', token, version) | def chart(symbol, timeframe='1m', date=None, token='', version=''):
'''Historical price/volume data, daily and intraday
https://iexcloud.io/docs/api/#historical-prices
Data Schedule
1d: -9:30-4pm ET Mon-Fri on regular market trading days
-9:30-1pm ET on early close trading days
All others:
-Prior trading day available after 4am ET Tue-Sat
Args:
symbol (string); Ticker to request
timeframe (string); Timeframe to request e.g. 1m
date (datetime): date, if requesting intraday
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
if timeframe is not None and timeframe != '1d':
if timeframe not in _TIMEFRAME_CHART:
raise PyEXception('Range must be in %s' % str(_TIMEFRAME_CHART))
return _getJson('stock/' + symbol + '/chart' + '/' + timeframe, token, version)
if date:
date = _strOrDate(date)
return _getJson('stock/' + symbol + '/chart' + '/date/' + date, token, version)
return _getJson('stock/' + symbol + '/chart', token, version) | [
"Historical",
"price",
"/",
"volume",
"data",
"daily",
"and",
"intraday"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L317-L345 | [
"def",
"chart",
"(",
"symbol",
",",
"timeframe",
"=",
"'1m'",
",",
"date",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"if",
"timeframe",
"is",
"not",
"None",
"and",
"timeframe",
"!=",
"'1d'",
":",
"if",
"timeframe",
"not",
"in",
"_TIMEFRAME_CHART",
":",
"raise",
"PyEXception",
"(",
"'Range must be in %s'",
"%",
"str",
"(",
"_TIMEFRAME_CHART",
")",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/chart'",
"+",
"'/'",
"+",
"timeframe",
",",
"token",
",",
"version",
")",
"if",
"date",
":",
"date",
"=",
"_strOrDate",
"(",
"date",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/chart'",
"+",
"'/date/'",
"+",
"date",
",",
"token",
",",
"version",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/chart'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | _chartToDF | internal | pyEX/stocks.py | def _chartToDF(c):
'''internal'''
df = pd.DataFrame(c)
_toDatetime(df)
_reindex(df, 'date')
return df | def _chartToDF(c):
'''internal'''
df = pd.DataFrame(c)
_toDatetime(df)
_reindex(df, 'date')
return df | [
"internal"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L348-L353 | [
"def",
"_chartToDF",
"(",
"c",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"c",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'date'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | chartDF | Historical price/volume data, daily and intraday
https://iexcloud.io/docs/api/#historical-prices
Data Schedule
1d: -9:30-4pm ET Mon-Fri on regular market trading days
-9:30-1pm ET on early close trading days
All others:
-Prior trading day available after 4am ET Tue-Sat
Args:
symbol (string); Ticker to request
timeframe (string); Timeframe to request e.g. 1m
date (datetime): date, if requesting intraday
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def chartDF(symbol, timeframe='1m', date=None, token='', version=''):
'''Historical price/volume data, daily and intraday
https://iexcloud.io/docs/api/#historical-prices
Data Schedule
1d: -9:30-4pm ET Mon-Fri on regular market trading days
-9:30-1pm ET on early close trading days
All others:
-Prior trading day available after 4am ET Tue-Sat
Args:
symbol (string); Ticker to request
timeframe (string); Timeframe to request e.g. 1m
date (datetime): date, if requesting intraday
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
c = chart(symbol, timeframe, date, token, version)
df = pd.DataFrame(c)
_toDatetime(df)
if timeframe is not None and timeframe != '1d':
_reindex(df, 'date')
else:
if not df.empty:
df.set_index(['date', 'minute'], inplace=True)
else:
return pd.DataFrame()
return df | def chartDF(symbol, timeframe='1m', date=None, token='', version=''):
'''Historical price/volume data, daily and intraday
https://iexcloud.io/docs/api/#historical-prices
Data Schedule
1d: -9:30-4pm ET Mon-Fri on regular market trading days
-9:30-1pm ET on early close trading days
All others:
-Prior trading day available after 4am ET Tue-Sat
Args:
symbol (string); Ticker to request
timeframe (string); Timeframe to request e.g. 1m
date (datetime): date, if requesting intraday
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
c = chart(symbol, timeframe, date, token, version)
df = pd.DataFrame(c)
_toDatetime(df)
if timeframe is not None and timeframe != '1d':
_reindex(df, 'date')
else:
if not df.empty:
df.set_index(['date', 'minute'], inplace=True)
else:
return pd.DataFrame()
return df | [
"Historical",
"price",
"/",
"volume",
"data",
"daily",
"and",
"intraday"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L356-L386 | [
"def",
"chartDF",
"(",
"symbol",
",",
"timeframe",
"=",
"'1m'",
",",
"date",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"c",
"=",
"chart",
"(",
"symbol",
",",
"timeframe",
",",
"date",
",",
"token",
",",
"version",
")",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"c",
")",
"_toDatetime",
"(",
"df",
")",
"if",
"timeframe",
"is",
"not",
"None",
"and",
"timeframe",
"!=",
"'1d'",
":",
"_reindex",
"(",
"df",
",",
"'date'",
")",
"else",
":",
"if",
"not",
"df",
".",
"empty",
":",
"df",
".",
"set_index",
"(",
"[",
"'date'",
",",
"'minute'",
"]",
",",
"inplace",
"=",
"True",
")",
"else",
":",
"return",
"pd",
".",
"DataFrame",
"(",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | bulkMinuteBars | fetch many dates worth of minute-bars for a given symbol | pyEX/stocks.py | def bulkMinuteBars(symbol, dates, token='', version=''):
'''fetch many dates worth of minute-bars for a given symbol'''
_raiseIfNotStr(symbol)
dates = [_strOrDate(date) for date in dates]
list_orig = dates.__class__
args = []
for date in dates:
args.append((symbol, '1d', date, token, version))
pool = ThreadPool(20)
rets = pool.starmap(chart, args)
pool.close()
return list_orig(itertools.chain(*rets)) | def bulkMinuteBars(symbol, dates, token='', version=''):
'''fetch many dates worth of minute-bars for a given symbol'''
_raiseIfNotStr(symbol)
dates = [_strOrDate(date) for date in dates]
list_orig = dates.__class__
args = []
for date in dates:
args.append((symbol, '1d', date, token, version))
pool = ThreadPool(20)
rets = pool.starmap(chart, args)
pool.close()
return list_orig(itertools.chain(*rets)) | [
"fetch",
"many",
"dates",
"worth",
"of",
"minute",
"-",
"bars",
"for",
"a",
"given",
"symbol"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L389-L403 | [
"def",
"bulkMinuteBars",
"(",
"symbol",
",",
"dates",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"dates",
"=",
"[",
"_strOrDate",
"(",
"date",
")",
"for",
"date",
"in",
"dates",
"]",
"list_orig",
"=",
"dates",
".",
"__class__",
"args",
"=",
"[",
"]",
"for",
"date",
"in",
"dates",
":",
"args",
".",
"append",
"(",
"(",
"symbol",
",",
"'1d'",
",",
"date",
",",
"token",
",",
"version",
")",
")",
"pool",
"=",
"ThreadPool",
"(",
"20",
")",
"rets",
"=",
"pool",
".",
"starmap",
"(",
"chart",
",",
"args",
")",
"pool",
".",
"close",
"(",
")",
"return",
"list_orig",
"(",
"itertools",
".",
"chain",
"(",
"*",
"rets",
")",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | bulkMinuteBarsDF | fetch many dates worth of minute-bars for a given symbol | pyEX/stocks.py | def bulkMinuteBarsDF(symbol, dates, token='', version=''):
'''fetch many dates worth of minute-bars for a given symbol'''
data = bulkMinuteBars(symbol, dates, token, version)
df = pd.DataFrame(data)
if df.empty:
return df
_toDatetime(df)
df.set_index(['date', 'minute'], inplace=True)
return df | def bulkMinuteBarsDF(symbol, dates, token='', version=''):
'''fetch many dates worth of minute-bars for a given symbol'''
data = bulkMinuteBars(symbol, dates, token, version)
df = pd.DataFrame(data)
if df.empty:
return df
_toDatetime(df)
df.set_index(['date', 'minute'], inplace=True)
return df | [
"fetch",
"many",
"dates",
"worth",
"of",
"minute",
"-",
"bars",
"for",
"a",
"given",
"symbol"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L406-L414 | [
"def",
"bulkMinuteBarsDF",
"(",
"symbol",
",",
"dates",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"data",
"=",
"bulkMinuteBars",
"(",
"symbol",
",",
"dates",
",",
"token",
",",
"version",
")",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"data",
")",
"if",
"df",
".",
"empty",
":",
"return",
"df",
"_toDatetime",
"(",
"df",
")",
"df",
".",
"set_index",
"(",
"[",
"'date'",
",",
"'minute'",
"]",
",",
"inplace",
"=",
"True",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | collections | Returns an array of quote objects for a given collection type. Currently supported collection types are sector, tag, and list
https://iexcloud.io/docs/api/#collections
Args:
tag (string); Sector, Tag, or List
collectionName (string); Associated name for tag
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def collections(tag, collectionName, token='', version=''):
'''Returns an array of quote objects for a given collection type. Currently supported collection types are sector, tag, and list
https://iexcloud.io/docs/api/#collections
Args:
tag (string); Sector, Tag, or List
collectionName (string); Associated name for tag
token (string); Access token
version (string); API version
Returns:
dict: result
'''
if tag not in _COLLECTION_TAGS:
raise PyEXception('Tag must be in %s' % str(_COLLECTION_TAGS))
return _getJson('stock/market/collection/' + tag + '?collectionName=' + collectionName, token, version) | def collections(tag, collectionName, token='', version=''):
'''Returns an array of quote objects for a given collection type. Currently supported collection types are sector, tag, and list
https://iexcloud.io/docs/api/#collections
Args:
tag (string); Sector, Tag, or List
collectionName (string); Associated name for tag
token (string); Access token
version (string); API version
Returns:
dict: result
'''
if tag not in _COLLECTION_TAGS:
raise PyEXception('Tag must be in %s' % str(_COLLECTION_TAGS))
return _getJson('stock/market/collection/' + tag + '?collectionName=' + collectionName, token, version) | [
"Returns",
"an",
"array",
"of",
"quote",
"objects",
"for",
"a",
"given",
"collection",
"type",
".",
"Currently",
"supported",
"collection",
"types",
"are",
"sector",
"tag",
"and",
"list"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L417-L434 | [
"def",
"collections",
"(",
"tag",
",",
"collectionName",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"if",
"tag",
"not",
"in",
"_COLLECTION_TAGS",
":",
"raise",
"PyEXception",
"(",
"'Tag must be in %s'",
"%",
"str",
"(",
"_COLLECTION_TAGS",
")",
")",
"return",
"_getJson",
"(",
"'stock/market/collection/'",
"+",
"tag",
"+",
"'?collectionName='",
"+",
"collectionName",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | collectionsDF | Returns an array of quote objects for a given collection type. Currently supported collection types are sector, tag, and list
https://iexcloud.io/docs/api/#collections
Args:
tag (string); Sector, Tag, or List
collectionName (string); Associated name for tag
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def collectionsDF(tag, query, token='', version=''):
'''Returns an array of quote objects for a given collection type. Currently supported collection types are sector, tag, and list
https://iexcloud.io/docs/api/#collections
Args:
tag (string); Sector, Tag, or List
collectionName (string); Associated name for tag
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(collections(tag, query, token, version))
_toDatetime(df)
_reindex(df, 'symbol')
return df | def collectionsDF(tag, query, token='', version=''):
'''Returns an array of quote objects for a given collection type. Currently supported collection types are sector, tag, and list
https://iexcloud.io/docs/api/#collections
Args:
tag (string); Sector, Tag, or List
collectionName (string); Associated name for tag
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(collections(tag, query, token, version))
_toDatetime(df)
_reindex(df, 'symbol')
return df | [
"Returns",
"an",
"array",
"of",
"quote",
"objects",
"for",
"a",
"given",
"collection",
"type",
".",
"Currently",
"supported",
"collection",
"types",
"are",
"sector",
"tag",
"and",
"list"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L437-L455 | [
"def",
"collectionsDF",
"(",
"tag",
",",
"query",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"collections",
"(",
"tag",
",",
"query",
",",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'symbol'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | company | Company reference data
https://iexcloud.io/docs/api/#company
Updates at 4am and 5am UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def company(symbol, token='', version=''):
'''Company reference data
https://iexcloud.io/docs/api/#company
Updates at 4am and 5am UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/company', token, version) | def company(symbol, token='', version=''):
'''Company reference data
https://iexcloud.io/docs/api/#company
Updates at 4am and 5am UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/company', token, version) | [
"Company",
"reference",
"data"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L458-L473 | [
"def",
"company",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/company'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | _companyToDF | internal | pyEX/stocks.py | def _companyToDF(c, token='', version=''):
'''internal'''
df = pd.io.json.json_normalize(c)
_toDatetime(df)
_reindex(df, 'symbol')
return df | def _companyToDF(c, token='', version=''):
'''internal'''
df = pd.io.json.json_normalize(c)
_toDatetime(df)
_reindex(df, 'symbol')
return df | [
"internal"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L476-L481 | [
"def",
"_companyToDF",
"(",
"c",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"c",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'symbol'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | companyDF | Company reference data
https://iexcloud.io/docs/api/#company
Updates at 4am and 5am UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def companyDF(symbol, token='', version=''):
'''Company reference data
https://iexcloud.io/docs/api/#company
Updates at 4am and 5am UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
c = company(symbol, token, version)
df = _companyToDF(c)
return df | def companyDF(symbol, token='', version=''):
'''Company reference data
https://iexcloud.io/docs/api/#company
Updates at 4am and 5am UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
c = company(symbol, token, version)
df = _companyToDF(c)
return df | [
"Company",
"reference",
"data"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L484-L500 | [
"def",
"companyDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"c",
"=",
"company",
"(",
"symbol",
",",
"token",
",",
"version",
")",
"df",
"=",
"_companyToDF",
"(",
"c",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | delayedQuote | This returns the 15 minute delayed market quote.
https://iexcloud.io/docs/api/#delayed-quote
15min delayed
4:30am - 8pm ET M-F when market is open
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def delayedQuote(symbol, token='', version=''):
'''This returns the 15 minute delayed market quote.
https://iexcloud.io/docs/api/#delayed-quote
15min delayed
4:30am - 8pm ET M-F when market is open
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/delayed-quote', token, version) | def delayedQuote(symbol, token='', version=''):
'''This returns the 15 minute delayed market quote.
https://iexcloud.io/docs/api/#delayed-quote
15min delayed
4:30am - 8pm ET M-F when market is open
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/delayed-quote', token, version) | [
"This",
"returns",
"the",
"15",
"minute",
"delayed",
"market",
"quote",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L503-L519 | [
"def",
"delayedQuote",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/delayed-quote'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | delayedQuoteDF | This returns the 15 minute delayed market quote.
https://iexcloud.io/docs/api/#delayed-quote
15min delayed
4:30am - 8pm ET M-F when market is open
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def delayedQuoteDF(symbol, token='', version=''):
'''This returns the 15 minute delayed market quote.
https://iexcloud.io/docs/api/#delayed-quote
15min delayed
4:30am - 8pm ET M-F when market is open
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.io.json.json_normalize(delayedQuote(symbol, token, version))
_toDatetime(df)
_reindex(df, 'symbol')
return df | def delayedQuoteDF(symbol, token='', version=''):
'''This returns the 15 minute delayed market quote.
https://iexcloud.io/docs/api/#delayed-quote
15min delayed
4:30am - 8pm ET M-F when market is open
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.io.json.json_normalize(delayedQuote(symbol, token, version))
_toDatetime(df)
_reindex(df, 'symbol')
return df | [
"This",
"returns",
"the",
"15",
"minute",
"delayed",
"market",
"quote",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L522-L540 | [
"def",
"delayedQuoteDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"delayedQuote",
"(",
"symbol",
",",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'symbol'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | dividends | Dividend history
https://iexcloud.io/docs/api/#dividends
Updated at 9am UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def dividends(symbol, timeframe='ytd', token='', version=''):
'''Dividend history
https://iexcloud.io/docs/api/#dividends
Updated at 9am UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
if timeframe not in _TIMEFRAME_DIVSPLIT:
raise PyEXception('Range must be in %s' % str(_TIMEFRAME_DIVSPLIT))
return _getJson('stock/' + symbol + '/dividends/' + timeframe, token, version) | def dividends(symbol, timeframe='ytd', token='', version=''):
'''Dividend history
https://iexcloud.io/docs/api/#dividends
Updated at 9am UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
if timeframe not in _TIMEFRAME_DIVSPLIT:
raise PyEXception('Range must be in %s' % str(_TIMEFRAME_DIVSPLIT))
return _getJson('stock/' + symbol + '/dividends/' + timeframe, token, version) | [
"Dividend",
"history"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L543-L560 | [
"def",
"dividends",
"(",
"symbol",
",",
"timeframe",
"=",
"'ytd'",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"if",
"timeframe",
"not",
"in",
"_TIMEFRAME_DIVSPLIT",
":",
"raise",
"PyEXception",
"(",
"'Range must be in %s'",
"%",
"str",
"(",
"_TIMEFRAME_DIVSPLIT",
")",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/dividends/'",
"+",
"timeframe",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | _dividendsToDF | internal | pyEX/stocks.py | def _dividendsToDF(d):
'''internal'''
df = pd.DataFrame(d)
_toDatetime(df)
_reindex(df, 'exDate')
return df | def _dividendsToDF(d):
'''internal'''
df = pd.DataFrame(d)
_toDatetime(df)
_reindex(df, 'exDate')
return df | [
"internal"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L563-L568 | [
"def",
"_dividendsToDF",
"(",
"d",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"d",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'exDate'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | dividendsDF | Dividend history
https://iexcloud.io/docs/api/#dividends
Updated at 9am UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def dividendsDF(symbol, timeframe='ytd', token='', version=''):
'''Dividend history
https://iexcloud.io/docs/api/#dividends
Updated at 9am UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
d = dividends(symbol, timeframe, token, version)
df = _dividendsToDF(d)
return df | def dividendsDF(symbol, timeframe='ytd', token='', version=''):
'''Dividend history
https://iexcloud.io/docs/api/#dividends
Updated at 9am UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
d = dividends(symbol, timeframe, token, version)
df = _dividendsToDF(d)
return df | [
"Dividend",
"history"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L571-L587 | [
"def",
"dividendsDF",
"(",
"symbol",
",",
"timeframe",
"=",
"'ytd'",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"d",
"=",
"dividends",
"(",
"symbol",
",",
"timeframe",
",",
"token",
",",
"version",
")",
"df",
"=",
"_dividendsToDF",
"(",
"d",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | earnings | Earnings data for a given company including the actual EPS, consensus, and fiscal period. Earnings are available quarterly (last 4 quarters) and annually (last 4 years).
https://iexcloud.io/docs/api/#earnings
Updates at 9am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def earnings(symbol, token='', version=''):
'''Earnings data for a given company including the actual EPS, consensus, and fiscal period. Earnings are available quarterly (last 4 quarters) and annually (last 4 years).
https://iexcloud.io/docs/api/#earnings
Updates at 9am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/earnings', token, version) | def earnings(symbol, token='', version=''):
'''Earnings data for a given company including the actual EPS, consensus, and fiscal period. Earnings are available quarterly (last 4 quarters) and annually (last 4 years).
https://iexcloud.io/docs/api/#earnings
Updates at 9am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/earnings', token, version) | [
"Earnings",
"data",
"for",
"a",
"given",
"company",
"including",
"the",
"actual",
"EPS",
"consensus",
"and",
"fiscal",
"period",
".",
"Earnings",
"are",
"available",
"quarterly",
"(",
"last",
"4",
"quarters",
")",
"and",
"annually",
"(",
"last",
"4",
"years",
")",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L590-L605 | [
"def",
"earnings",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/earnings'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | _earningsToDF | internal | pyEX/stocks.py | def _earningsToDF(e):
'''internal'''
if e:
df = pd.io.json.json_normalize(e, 'earnings', 'symbol')
_toDatetime(df)
_reindex(df, 'EPSReportDate')
else:
df = pd.DataFrame()
return df | def _earningsToDF(e):
'''internal'''
if e:
df = pd.io.json.json_normalize(e, 'earnings', 'symbol')
_toDatetime(df)
_reindex(df, 'EPSReportDate')
else:
df = pd.DataFrame()
return df | [
"internal"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L608-L616 | [
"def",
"_earningsToDF",
"(",
"e",
")",
":",
"if",
"e",
":",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"e",
",",
"'earnings'",
",",
"'symbol'",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'EPSReportDate'",
")",
"else",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | earningsDF | Earnings data for a given company including the actual EPS, consensus, and fiscal period. Earnings are available quarterly (last 4 quarters) and annually (last 4 years).
https://iexcloud.io/docs/api/#earnings
Updates at 9am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def earningsDF(symbol, token='', version=''):
'''Earnings data for a given company including the actual EPS, consensus, and fiscal period. Earnings are available quarterly (last 4 quarters) and annually (last 4 years).
https://iexcloud.io/docs/api/#earnings
Updates at 9am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
e = earnings(symbol, token, version)
df = _earningsToDF(e)
return df | def earningsDF(symbol, token='', version=''):
'''Earnings data for a given company including the actual EPS, consensus, and fiscal period. Earnings are available quarterly (last 4 quarters) and annually (last 4 years).
https://iexcloud.io/docs/api/#earnings
Updates at 9am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
e = earnings(symbol, token, version)
df = _earningsToDF(e)
return df | [
"Earnings",
"data",
"for",
"a",
"given",
"company",
"including",
"the",
"actual",
"EPS",
"consensus",
"and",
"fiscal",
"period",
".",
"Earnings",
"are",
"available",
"quarterly",
"(",
"last",
"4",
"quarters",
")",
"and",
"annually",
"(",
"last",
"4",
"years",
")",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L619-L635 | [
"def",
"earningsDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"e",
"=",
"earnings",
"(",
"symbol",
",",
"token",
",",
"version",
")",
"df",
"=",
"_earningsToDF",
"(",
"e",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | earningsTodayDF | Returns earnings that will be reported today as two arrays: before the open bto and after market close amc.
Each array contains an object with all keys from earnings, a quote object, and a headline key.
https://iexcloud.io/docs/api/#earnings-today
Updates at 9am, 11am, 12pm UTC daily
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def earningsTodayDF(token='', version=''):
'''Returns earnings that will be reported today as two arrays: before the open bto and after market close amc.
Each array contains an object with all keys from earnings, a quote object, and a headline key.
https://iexcloud.io/docs/api/#earnings-today
Updates at 9am, 11am, 12pm UTC daily
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
x = earningsToday(token, version)
z = []
for k in x:
ds = x[k]
for d in ds:
d['when'] = k
z.extend(ds)
df = pd.io.json.json_normalize(z)
if not df.empty:
df.drop_duplicates(inplace=True)
_toDatetime(df)
_reindex(df, 'symbol')
return df | def earningsTodayDF(token='', version=''):
'''Returns earnings that will be reported today as two arrays: before the open bto and after market close amc.
Each array contains an object with all keys from earnings, a quote object, and a headline key.
https://iexcloud.io/docs/api/#earnings-today
Updates at 9am, 11am, 12pm UTC daily
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
x = earningsToday(token, version)
z = []
for k in x:
ds = x[k]
for d in ds:
d['when'] = k
z.extend(ds)
df = pd.io.json.json_normalize(z)
if not df.empty:
df.drop_duplicates(inplace=True)
_toDatetime(df)
_reindex(df, 'symbol')
return df | [
"Returns",
"earnings",
"that",
"will",
"be",
"reported",
"today",
"as",
"two",
"arrays",
":",
"before",
"the",
"open",
"bto",
"and",
"after",
"market",
"close",
"amc",
".",
"Each",
"array",
"contains",
"an",
"object",
"with",
"all",
"keys",
"from",
"earnings",
"a",
"quote",
"object",
"and",
"a",
"headline",
"key",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L656-L685 | [
"def",
"earningsTodayDF",
"(",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"x",
"=",
"earningsToday",
"(",
"token",
",",
"version",
")",
"z",
"=",
"[",
"]",
"for",
"k",
"in",
"x",
":",
"ds",
"=",
"x",
"[",
"k",
"]",
"for",
"d",
"in",
"ds",
":",
"d",
"[",
"'when'",
"]",
"=",
"k",
"z",
".",
"extend",
"(",
"ds",
")",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"z",
")",
"if",
"not",
"df",
".",
"empty",
":",
"df",
".",
"drop_duplicates",
"(",
"inplace",
"=",
"True",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'symbol'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | spread | This returns an array of effective spread, eligible volume, and price improvement of a stock, by market.
Unlike volume-by-venue, this will only return a venue if effective spread is not ‘N/A’. Values are sorted in descending order by effectiveSpread.
Lower effectiveSpread and higher priceImprovement values are generally considered optimal.
Effective spread is designed to measure marketable orders executed in relation to the market center’s
quoted spread and takes into account hidden and midpoint liquidity available at each market center.
Effective Spread is calculated by using eligible trade prices recorded to the consolidated tape and
comparing those trade prices to the National Best Bid and Offer (“NBBO”) at the time of the execution.
View the data disclaimer at the bottom of the stocks app for more information about how these values are calculated.
https://iexcloud.io/docs/api/#earnings-today
8am ET M-F
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def spread(symbol, token='', version=''):
'''This returns an array of effective spread, eligible volume, and price improvement of a stock, by market.
Unlike volume-by-venue, this will only return a venue if effective spread is not ‘N/A’. Values are sorted in descending order by effectiveSpread.
Lower effectiveSpread and higher priceImprovement values are generally considered optimal.
Effective spread is designed to measure marketable orders executed in relation to the market center’s
quoted spread and takes into account hidden and midpoint liquidity available at each market center.
Effective Spread is calculated by using eligible trade prices recorded to the consolidated tape and
comparing those trade prices to the National Best Bid and Offer (“NBBO”) at the time of the execution.
View the data disclaimer at the bottom of the stocks app for more information about how these values are calculated.
https://iexcloud.io/docs/api/#earnings-today
8am ET M-F
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/effective-spread', token, version) | def spread(symbol, token='', version=''):
'''This returns an array of effective spread, eligible volume, and price improvement of a stock, by market.
Unlike volume-by-venue, this will only return a venue if effective spread is not ‘N/A’. Values are sorted in descending order by effectiveSpread.
Lower effectiveSpread and higher priceImprovement values are generally considered optimal.
Effective spread is designed to measure marketable orders executed in relation to the market center’s
quoted spread and takes into account hidden and midpoint liquidity available at each market center.
Effective Spread is calculated by using eligible trade prices recorded to the consolidated tape and
comparing those trade prices to the National Best Bid and Offer (“NBBO”) at the time of the execution.
View the data disclaimer at the bottom of the stocks app for more information about how these values are calculated.
https://iexcloud.io/docs/api/#earnings-today
8am ET M-F
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/effective-spread', token, version) | [
"This",
"returns",
"an",
"array",
"of",
"effective",
"spread",
"eligible",
"volume",
"and",
"price",
"improvement",
"of",
"a",
"stock",
"by",
"market",
".",
"Unlike",
"volume",
"-",
"by",
"-",
"venue",
"this",
"will",
"only",
"return",
"a",
"venue",
"if",
"effective",
"spread",
"is",
"not",
"‘N",
"/",
"A’",
".",
"Values",
"are",
"sorted",
"in",
"descending",
"order",
"by",
"effectiveSpread",
".",
"Lower",
"effectiveSpread",
"and",
"higher",
"priceImprovement",
"values",
"are",
"generally",
"considered",
"optimal",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L688-L713 | [
"def",
"spread",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/effective-spread'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | spreadDF | This returns an array of effective spread, eligible volume, and price improvement of a stock, by market.
Unlike volume-by-venue, this will only return a venue if effective spread is not ‘N/A’. Values are sorted in descending order by effectiveSpread.
Lower effectiveSpread and higher priceImprovement values are generally considered optimal.
Effective spread is designed to measure marketable orders executed in relation to the market center’s
quoted spread and takes into account hidden and midpoint liquidity available at each market center.
Effective Spread is calculated by using eligible trade prices recorded to the consolidated tape and
comparing those trade prices to the National Best Bid and Offer (“NBBO”) at the time of the execution.
View the data disclaimer at the bottom of the stocks app for more information about how these values are calculated.
https://iexcloud.io/docs/api/#earnings-today
8am ET M-F
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def spreadDF(symbol, token='', version=''):
'''This returns an array of effective spread, eligible volume, and price improvement of a stock, by market.
Unlike volume-by-venue, this will only return a venue if effective spread is not ‘N/A’. Values are sorted in descending order by effectiveSpread.
Lower effectiveSpread and higher priceImprovement values are generally considered optimal.
Effective spread is designed to measure marketable orders executed in relation to the market center’s
quoted spread and takes into account hidden and midpoint liquidity available at each market center.
Effective Spread is calculated by using eligible trade prices recorded to the consolidated tape and
comparing those trade prices to the National Best Bid and Offer (“NBBO”) at the time of the execution.
View the data disclaimer at the bottom of the stocks app for more information about how these values are calculated.
https://iexcloud.io/docs/api/#earnings-today
8am ET M-F
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(spread(symbol, token, version))
_toDatetime(df)
_reindex(df, 'venue')
return df | def spreadDF(symbol, token='', version=''):
'''This returns an array of effective spread, eligible volume, and price improvement of a stock, by market.
Unlike volume-by-venue, this will only return a venue if effective spread is not ‘N/A’. Values are sorted in descending order by effectiveSpread.
Lower effectiveSpread and higher priceImprovement values are generally considered optimal.
Effective spread is designed to measure marketable orders executed in relation to the market center’s
quoted spread and takes into account hidden and midpoint liquidity available at each market center.
Effective Spread is calculated by using eligible trade prices recorded to the consolidated tape and
comparing those trade prices to the National Best Bid and Offer (“NBBO”) at the time of the execution.
View the data disclaimer at the bottom of the stocks app for more information about how these values are calculated.
https://iexcloud.io/docs/api/#earnings-today
8am ET M-F
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(spread(symbol, token, version))
_toDatetime(df)
_reindex(df, 'venue')
return df | [
"This",
"returns",
"an",
"array",
"of",
"effective",
"spread",
"eligible",
"volume",
"and",
"price",
"improvement",
"of",
"a",
"stock",
"by",
"market",
".",
"Unlike",
"volume",
"-",
"by",
"-",
"venue",
"this",
"will",
"only",
"return",
"a",
"venue",
"if",
"effective",
"spread",
"is",
"not",
"‘N",
"/",
"A’",
".",
"Values",
"are",
"sorted",
"in",
"descending",
"order",
"by",
"effectiveSpread",
".",
"Lower",
"effectiveSpread",
"and",
"higher",
"priceImprovement",
"values",
"are",
"generally",
"considered",
"optimal",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L716-L743 | [
"def",
"spreadDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"spread",
"(",
"symbol",
",",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'venue'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | estimates | Provides the latest consensus estimate for the next fiscal period
https://iexcloud.io/docs/api/#estimates
Updates at 9am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def estimates(symbol, token='', version=''):
'''Provides the latest consensus estimate for the next fiscal period
https://iexcloud.io/docs/api/#estimates
Updates at 9am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/estimates', token, version) | def estimates(symbol, token='', version=''):
'''Provides the latest consensus estimate for the next fiscal period
https://iexcloud.io/docs/api/#estimates
Updates at 9am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/estimates', token, version) | [
"Provides",
"the",
"latest",
"consensus",
"estimate",
"for",
"the",
"next",
"fiscal",
"period"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L746-L761 | [
"def",
"estimates",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/estimates'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | estimatesDF | Provides the latest consensus estimate for the next fiscal period
https://iexcloud.io/docs/api/#estimates
Updates at 9am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def estimatesDF(symbol, token='', version=''):
'''Provides the latest consensus estimate for the next fiscal period
https://iexcloud.io/docs/api/#estimates
Updates at 9am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
f = estimates(symbol, token, version)
df = _estimatesToDF(f)
return df | def estimatesDF(symbol, token='', version=''):
'''Provides the latest consensus estimate for the next fiscal period
https://iexcloud.io/docs/api/#estimates
Updates at 9am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
f = estimates(symbol, token, version)
df = _estimatesToDF(f)
return df | [
"Provides",
"the",
"latest",
"consensus",
"estimate",
"for",
"the",
"next",
"fiscal",
"period"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L775-L791 | [
"def",
"estimatesDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"f",
"=",
"estimates",
"(",
"symbol",
",",
"token",
",",
"version",
")",
"df",
"=",
"_estimatesToDF",
"(",
"f",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | financials | Pulls income statement, balance sheet, and cash flow data from the four most recent reported quarters.
https://iexcloud.io/docs/api/#financials
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def financials(symbol, token='', version=''):
'''Pulls income statement, balance sheet, and cash flow data from the four most recent reported quarters.
https://iexcloud.io/docs/api/#financials
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/financials', token, version) | def financials(symbol, token='', version=''):
'''Pulls income statement, balance sheet, and cash flow data from the four most recent reported quarters.
https://iexcloud.io/docs/api/#financials
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/financials', token, version) | [
"Pulls",
"income",
"statement",
"balance",
"sheet",
"and",
"cash",
"flow",
"data",
"from",
"the",
"four",
"most",
"recent",
"reported",
"quarters",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L794-L809 | [
"def",
"financials",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/financials'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | _financialsToDF | internal | pyEX/stocks.py | def _financialsToDF(f):
'''internal'''
if f:
df = pd.io.json.json_normalize(f, 'financials', 'symbol')
_toDatetime(df)
_reindex(df, 'reportDate')
else:
df = pd.DataFrame()
return df | def _financialsToDF(f):
'''internal'''
if f:
df = pd.io.json.json_normalize(f, 'financials', 'symbol')
_toDatetime(df)
_reindex(df, 'reportDate')
else:
df = pd.DataFrame()
return df | [
"internal"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L812-L820 | [
"def",
"_financialsToDF",
"(",
"f",
")",
":",
"if",
"f",
":",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"f",
",",
"'financials'",
",",
"'symbol'",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'reportDate'",
")",
"else",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | financialsDF | Pulls income statement, balance sheet, and cash flow data from the four most recent reported quarters.
https://iexcloud.io/docs/api/#financials
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def financialsDF(symbol, token='', version=''):
'''Pulls income statement, balance sheet, and cash flow data from the four most recent reported quarters.
https://iexcloud.io/docs/api/#financials
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
f = financials(symbol, token, version)
df = _financialsToDF(f)
return df | def financialsDF(symbol, token='', version=''):
'''Pulls income statement, balance sheet, and cash flow data from the four most recent reported quarters.
https://iexcloud.io/docs/api/#financials
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
f = financials(symbol, token, version)
df = _financialsToDF(f)
return df | [
"Pulls",
"income",
"statement",
"balance",
"sheet",
"and",
"cash",
"flow",
"data",
"from",
"the",
"four",
"most",
"recent",
"reported",
"quarters",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L823-L839 | [
"def",
"financialsDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"f",
"=",
"financials",
"(",
"symbol",
",",
"token",
",",
"version",
")",
"df",
"=",
"_financialsToDF",
"(",
"f",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | incomeStatement | Pulls income statement data. Available quarterly (4 quarters) or annually (4 years).
https://iexcloud.io/docs/api/#income-statement
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def incomeStatement(symbol, token='', version=''):
'''Pulls income statement data. Available quarterly (4 quarters) or annually (4 years).
https://iexcloud.io/docs/api/#income-statement
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/income', token, version) | def incomeStatement(symbol, token='', version=''):
'''Pulls income statement data. Available quarterly (4 quarters) or annually (4 years).
https://iexcloud.io/docs/api/#income-statement
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/income', token, version) | [
"Pulls",
"income",
"statement",
"data",
".",
"Available",
"quarterly",
"(",
"4",
"quarters",
")",
"or",
"annually",
"(",
"4",
"years",
")",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L842-L857 | [
"def",
"incomeStatement",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/income'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | incomeStatementDF | Pulls income statement data. Available quarterly (4 quarters) or annually (4 years).
https://iexcloud.io/docs/api/#income-statement
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def incomeStatementDF(symbol, token='', version=''):
'''Pulls income statement data. Available quarterly (4 quarters) or annually (4 years).
https://iexcloud.io/docs/api/#income-statement
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
val = incomeStatement(symbol, token, version)
df = pd.io.json.json_normalize(val, 'income', 'symbol')
_toDatetime(df)
_reindex(df, 'reportDate')
return df | def incomeStatementDF(symbol, token='', version=''):
'''Pulls income statement data. Available quarterly (4 quarters) or annually (4 years).
https://iexcloud.io/docs/api/#income-statement
Updates at 8am, 9am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
val = incomeStatement(symbol, token, version)
df = pd.io.json.json_normalize(val, 'income', 'symbol')
_toDatetime(df)
_reindex(df, 'reportDate')
return df | [
"Pulls",
"income",
"statement",
"data",
".",
"Available",
"quarterly",
"(",
"4",
"quarters",
")",
"or",
"annually",
"(",
"4",
"years",
")",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L860-L878 | [
"def",
"incomeStatementDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"val",
"=",
"incomeStatement",
"(",
"symbol",
",",
"token",
",",
"version",
")",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"val",
",",
"'income'",
",",
"'symbol'",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'reportDate'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | ipoTodayDF | This returns a list of upcoming or today IPOs scheduled for the current and next month. The response is split into two structures:
rawData and viewData. rawData represents all available data for an IPO. viewData represents data structured for display to a user.
https://iexcloud.io/docs/api/#ipo-calendar
10am, 10:30am UTC daily
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def ipoTodayDF(token='', version=''):
'''This returns a list of upcoming or today IPOs scheduled for the current and next month. The response is split into two structures:
rawData and viewData. rawData represents all available data for an IPO. viewData represents data structured for display to a user.
https://iexcloud.io/docs/api/#ipo-calendar
10am, 10:30am UTC daily
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
val = ipoToday(token, version)
if val:
df = pd.io.json.json_normalize(val, 'rawData')
_toDatetime(df)
_reindex(df, 'symbol')
else:
df = pd.DataFrame()
return df | def ipoTodayDF(token='', version=''):
'''This returns a list of upcoming or today IPOs scheduled for the current and next month. The response is split into two structures:
rawData and viewData. rawData represents all available data for an IPO. viewData represents data structured for display to a user.
https://iexcloud.io/docs/api/#ipo-calendar
10am, 10:30am UTC daily
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
val = ipoToday(token, version)
if val:
df = pd.io.json.json_normalize(val, 'rawData')
_toDatetime(df)
_reindex(df, 'symbol')
else:
df = pd.DataFrame()
return df | [
"This",
"returns",
"a",
"list",
"of",
"upcoming",
"or",
"today",
"IPOs",
"scheduled",
"for",
"the",
"current",
"and",
"next",
"month",
".",
"The",
"response",
"is",
"split",
"into",
"two",
"structures",
":",
"rawData",
"and",
"viewData",
".",
"rawData",
"represents",
"all",
"available",
"data",
"for",
"an",
"IPO",
".",
"viewData",
"represents",
"data",
"structured",
"for",
"display",
"to",
"a",
"user",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L898-L919 | [
"def",
"ipoTodayDF",
"(",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"val",
"=",
"ipoToday",
"(",
"token",
",",
"version",
")",
"if",
"val",
":",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"val",
",",
"'rawData'",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'symbol'",
")",
"else",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | ipoUpcomingDF | This returns a list of upcoming or today IPOs scheduled for the current and next month. The response is split into two structures:
rawData and viewData. rawData represents all available data for an IPO. viewData represents data structured for display to a user.
https://iexcloud.io/docs/api/#ipo-calendar
10am, 10:30am UTC daily
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def ipoUpcomingDF(token='', version=''):
'''This returns a list of upcoming or today IPOs scheduled for the current and next month. The response is split into two structures:
rawData and viewData. rawData represents all available data for an IPO. viewData represents data structured for display to a user.
https://iexcloud.io/docs/api/#ipo-calendar
10am, 10:30am UTC daily
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
val = ipoUpcoming(token, version)
if val:
df = pd.io.json.json_normalize(val, 'rawData')
_toDatetime(df)
_reindex(df, 'symbol')
else:
df = pd.DataFrame()
return df | def ipoUpcomingDF(token='', version=''):
'''This returns a list of upcoming or today IPOs scheduled for the current and next month. The response is split into two structures:
rawData and viewData. rawData represents all available data for an IPO. viewData represents data structured for display to a user.
https://iexcloud.io/docs/api/#ipo-calendar
10am, 10:30am UTC daily
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
val = ipoUpcoming(token, version)
if val:
df = pd.io.json.json_normalize(val, 'rawData')
_toDatetime(df)
_reindex(df, 'symbol')
else:
df = pd.DataFrame()
return df | [
"This",
"returns",
"a",
"list",
"of",
"upcoming",
"or",
"today",
"IPOs",
"scheduled",
"for",
"the",
"current",
"and",
"next",
"month",
".",
"The",
"response",
"is",
"split",
"into",
"two",
"structures",
":",
"rawData",
"and",
"viewData",
".",
"rawData",
"represents",
"all",
"available",
"data",
"for",
"an",
"IPO",
".",
"viewData",
"represents",
"data",
"structured",
"for",
"display",
"to",
"a",
"user",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L939-L960 | [
"def",
"ipoUpcomingDF",
"(",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"val",
"=",
"ipoUpcoming",
"(",
"token",
",",
"version",
")",
"if",
"val",
":",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"val",
",",
"'rawData'",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'symbol'",
")",
"else",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | keyStats | Key Stats about company
https://iexcloud.io/docs/api/#key-stats
8am, 9am ET
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def keyStats(symbol, token='', version=''):
'''Key Stats about company
https://iexcloud.io/docs/api/#key-stats
8am, 9am ET
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/stats', token, version) | def keyStats(symbol, token='', version=''):
'''Key Stats about company
https://iexcloud.io/docs/api/#key-stats
8am, 9am ET
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/stats', token, version) | [
"Key",
"Stats",
"about",
"company"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L963-L978 | [
"def",
"keyStats",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/stats'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | _statsToDF | internal | pyEX/stocks.py | def _statsToDF(s):
'''internal'''
if s:
df = pd.io.json.json_normalize(s)
_toDatetime(df)
_reindex(df, 'symbol')
else:
df = pd.DataFrame()
return df | def _statsToDF(s):
'''internal'''
if s:
df = pd.io.json.json_normalize(s)
_toDatetime(df)
_reindex(df, 'symbol')
else:
df = pd.DataFrame()
return df | [
"internal"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L981-L989 | [
"def",
"_statsToDF",
"(",
"s",
")",
":",
"if",
"s",
":",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"s",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'symbol'",
")",
"else",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | keyStatsDF | Key Stats about company
https://iexcloud.io/docs/api/#key-stats
8am, 9am ET
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def keyStatsDF(symbol, token='', version=''):
'''Key Stats about company
https://iexcloud.io/docs/api/#key-stats
8am, 9am ET
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
s = keyStats(symbol, token, version)
df = _statsToDF(s)
return df | def keyStatsDF(symbol, token='', version=''):
'''Key Stats about company
https://iexcloud.io/docs/api/#key-stats
8am, 9am ET
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
s = keyStats(symbol, token, version)
df = _statsToDF(s)
return df | [
"Key",
"Stats",
"about",
"company"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L992-L1008 | [
"def",
"keyStatsDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"s",
"=",
"keyStats",
"(",
"symbol",
",",
"token",
",",
"version",
")",
"df",
"=",
"_statsToDF",
"(",
"s",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | largestTrades | This returns 15 minute delayed, last sale eligible trades.
https://iexcloud.io/docs/api/#largest-trades
9:30-4pm ET M-F during regular market hours
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def largestTrades(symbol, token='', version=''):
'''This returns 15 minute delayed, last sale eligible trades.
https://iexcloud.io/docs/api/#largest-trades
9:30-4pm ET M-F during regular market hours
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/largest-trades', token, version) | def largestTrades(symbol, token='', version=''):
'''This returns 15 minute delayed, last sale eligible trades.
https://iexcloud.io/docs/api/#largest-trades
9:30-4pm ET M-F during regular market hours
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/largest-trades', token, version) | [
"This",
"returns",
"15",
"minute",
"delayed",
"last",
"sale",
"eligible",
"trades",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1011-L1026 | [
"def",
"largestTrades",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/largest-trades'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | largestTradesDF | This returns 15 minute delayed, last sale eligible trades.
https://iexcloud.io/docs/api/#largest-trades
9:30-4pm ET M-F during regular market hours
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def largestTradesDF(symbol, token='', version=''):
'''This returns 15 minute delayed, last sale eligible trades.
https://iexcloud.io/docs/api/#largest-trades
9:30-4pm ET M-F during regular market hours
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(largestTrades(symbol, token, version))
_toDatetime(df)
_reindex(df, 'time')
return df | def largestTradesDF(symbol, token='', version=''):
'''This returns 15 minute delayed, last sale eligible trades.
https://iexcloud.io/docs/api/#largest-trades
9:30-4pm ET M-F during regular market hours
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(largestTrades(symbol, token, version))
_toDatetime(df)
_reindex(df, 'time')
return df | [
"This",
"returns",
"15",
"minute",
"delayed",
"last",
"sale",
"eligible",
"trades",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1029-L1046 | [
"def",
"largestTradesDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"largestTrades",
"(",
"symbol",
",",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'time'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | list | Returns an array of quotes for the top 10 symbols in a specified list.
https://iexcloud.io/docs/api/#list
Updated intraday
Args:
option (string); Option to query
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def list(option='mostactive', token='', version=''):
'''Returns an array of quotes for the top 10 symbols in a specified list.
https://iexcloud.io/docs/api/#list
Updated intraday
Args:
option (string); Option to query
token (string); Access token
version (string); API version
Returns:
dict: result
'''
if option not in _LIST_OPTIONS:
raise PyEXception('Option must be in %s' % str(_LIST_OPTIONS))
return _getJson('stock/market/list/' + option, token, version) | def list(option='mostactive', token='', version=''):
'''Returns an array of quotes for the top 10 symbols in a specified list.
https://iexcloud.io/docs/api/#list
Updated intraday
Args:
option (string); Option to query
token (string); Access token
version (string); API version
Returns:
dict: result
'''
if option not in _LIST_OPTIONS:
raise PyEXception('Option must be in %s' % str(_LIST_OPTIONS))
return _getJson('stock/market/list/' + option, token, version) | [
"Returns",
"an",
"array",
"of",
"quotes",
"for",
"the",
"top",
"10",
"symbols",
"in",
"a",
"specified",
"list",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1049-L1066 | [
"def",
"list",
"(",
"option",
"=",
"'mostactive'",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"if",
"option",
"not",
"in",
"_LIST_OPTIONS",
":",
"raise",
"PyEXception",
"(",
"'Option must be in %s'",
"%",
"str",
"(",
"_LIST_OPTIONS",
")",
")",
"return",
"_getJson",
"(",
"'stock/market/list/'",
"+",
"option",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | listDF | Returns an array of quotes for the top 10 symbols in a specified list.
https://iexcloud.io/docs/api/#list
Updated intraday
Args:
option (string); Option to query
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def listDF(option='mostactive', token='', version=''):
'''Returns an array of quotes for the top 10 symbols in a specified list.
https://iexcloud.io/docs/api/#list
Updated intraday
Args:
option (string); Option to query
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(list(option, token, version))
_toDatetime(df)
_reindex(df, 'symbol')
return df | def listDF(option='mostactive', token='', version=''):
'''Returns an array of quotes for the top 10 symbols in a specified list.
https://iexcloud.io/docs/api/#list
Updated intraday
Args:
option (string); Option to query
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(list(option, token, version))
_toDatetime(df)
_reindex(df, 'symbol')
return df | [
"Returns",
"an",
"array",
"of",
"quotes",
"for",
"the",
"top",
"10",
"symbols",
"in",
"a",
"specified",
"list",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1069-L1087 | [
"def",
"listDF",
"(",
"option",
"=",
"'mostactive'",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"list",
"(",
"option",
",",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'symbol'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | logo | This is a helper function, but the google APIs url is standardized.
https://iexcloud.io/docs/api/#logo
8am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def logo(symbol, token='', version=''):
'''This is a helper function, but the google APIs url is standardized.
https://iexcloud.io/docs/api/#logo
8am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/logo', token, version) | def logo(symbol, token='', version=''):
'''This is a helper function, but the google APIs url is standardized.
https://iexcloud.io/docs/api/#logo
8am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/logo', token, version) | [
"This",
"is",
"a",
"helper",
"function",
"but",
"the",
"google",
"APIs",
"url",
"is",
"standardized",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1090-L1105 | [
"def",
"logo",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/logo'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | logoPNG | This is a helper function, but the google APIs url is standardized.
https://iexcloud.io/docs/api/#logo
8am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
image: result as png | pyEX/stocks.py | def logoPNG(symbol, token='', version=''):
'''This is a helper function, but the google APIs url is standardized.
https://iexcloud.io/docs/api/#logo
8am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
image: result as png
'''
_raiseIfNotStr(symbol)
response = requests.get(logo(symbol, token, version)['url'])
return ImageP.open(BytesIO(response.content)) | def logoPNG(symbol, token='', version=''):
'''This is a helper function, but the google APIs url is standardized.
https://iexcloud.io/docs/api/#logo
8am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
image: result as png
'''
_raiseIfNotStr(symbol)
response = requests.get(logo(symbol, token, version)['url'])
return ImageP.open(BytesIO(response.content)) | [
"This",
"is",
"a",
"helper",
"function",
"but",
"the",
"google",
"APIs",
"url",
"is",
"standardized",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1108-L1124 | [
"def",
"logoPNG",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"response",
"=",
"requests",
".",
"get",
"(",
"logo",
"(",
"symbol",
",",
"token",
",",
"version",
")",
"[",
"'url'",
"]",
")",
"return",
"ImageP",
".",
"open",
"(",
"BytesIO",
"(",
"response",
".",
"content",
")",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | logoNotebook | This is a helper function, but the google APIs url is standardized.
https://iexcloud.io/docs/api/#logo
8am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
image: result | pyEX/stocks.py | def logoNotebook(symbol, token='', version=''):
'''This is a helper function, but the google APIs url is standardized.
https://iexcloud.io/docs/api/#logo
8am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
image: result
'''
_raiseIfNotStr(symbol)
url = logo(symbol, token, version)['url']
return ImageI(url=url) | def logoNotebook(symbol, token='', version=''):
'''This is a helper function, but the google APIs url is standardized.
https://iexcloud.io/docs/api/#logo
8am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
image: result
'''
_raiseIfNotStr(symbol)
url = logo(symbol, token, version)['url']
return ImageI(url=url) | [
"This",
"is",
"a",
"helper",
"function",
"but",
"the",
"google",
"APIs",
"url",
"is",
"standardized",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1127-L1143 | [
"def",
"logoNotebook",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"url",
"=",
"logo",
"(",
"symbol",
",",
"token",
",",
"version",
")",
"[",
"'url'",
"]",
"return",
"ImageI",
"(",
"url",
"=",
"url",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | news | News about company
https://iexcloud.io/docs/api/#news
Continuous
Args:
symbol (string); Ticker to request
count (int): limit number of results
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def news(symbol, count=10, token='', version=''):
'''News about company
https://iexcloud.io/docs/api/#news
Continuous
Args:
symbol (string); Ticker to request
count (int): limit number of results
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/news/last/' + str(count), token, version) | def news(symbol, count=10, token='', version=''):
'''News about company
https://iexcloud.io/docs/api/#news
Continuous
Args:
symbol (string); Ticker to request
count (int): limit number of results
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/news/last/' + str(count), token, version) | [
"News",
"about",
"company"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1178-L1194 | [
"def",
"news",
"(",
"symbol",
",",
"count",
"=",
"10",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/news/last/'",
"+",
"str",
"(",
"count",
")",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | _newsToDF | internal | pyEX/stocks.py | def _newsToDF(n):
'''internal'''
df = pd.DataFrame(n)
_toDatetime(df)
_reindex(df, 'datetime')
return df | def _newsToDF(n):
'''internal'''
df = pd.DataFrame(n)
_toDatetime(df)
_reindex(df, 'datetime')
return df | [
"internal"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1197-L1202 | [
"def",
"_newsToDF",
"(",
"n",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"n",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'datetime'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | newsDF | News about company
https://iexcloud.io/docs/api/#news
Continuous
Args:
symbol (string); Ticker to request
count (int): limit number of results
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def newsDF(symbol, count=10, token='', version=''):
'''News about company
https://iexcloud.io/docs/api/#news
Continuous
Args:
symbol (string); Ticker to request
count (int): limit number of results
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
n = news(symbol, count, token, version)
df = _newsToDF(n)
return df | def newsDF(symbol, count=10, token='', version=''):
'''News about company
https://iexcloud.io/docs/api/#news
Continuous
Args:
symbol (string); Ticker to request
count (int): limit number of results
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
n = news(symbol, count, token, version)
df = _newsToDF(n)
return df | [
"News",
"about",
"company"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1205-L1222 | [
"def",
"newsDF",
"(",
"symbol",
",",
"count",
"=",
"10",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"n",
"=",
"news",
"(",
"symbol",
",",
"count",
",",
"token",
",",
"version",
")",
"df",
"=",
"_newsToDF",
"(",
"n",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | marketNewsDF | News about market
https://iexcloud.io/docs/api/#news
Continuous
Args:
count (int): limit number of results
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def marketNewsDF(count=10, token='', version=''):
'''News about market
https://iexcloud.io/docs/api/#news
Continuous
Args:
count (int): limit number of results
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(marketNews(count, token, version))
_toDatetime(df)
_reindex(df, 'datetime')
return df | def marketNewsDF(count=10, token='', version=''):
'''News about market
https://iexcloud.io/docs/api/#news
Continuous
Args:
count (int): limit number of results
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(marketNews(count, token, version))
_toDatetime(df)
_reindex(df, 'datetime')
return df | [
"News",
"about",
"market"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1242-L1259 | [
"def",
"marketNewsDF",
"(",
"count",
"=",
"10",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"marketNews",
"(",
"count",
",",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'datetime'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | ohlc | Returns the official open and close for a give symbol.
https://iexcloud.io/docs/api/#news
9:30am-5pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def ohlc(symbol, token='', version=''):
'''Returns the official open and close for a give symbol.
https://iexcloud.io/docs/api/#news
9:30am-5pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/ohlc', token, version) | def ohlc(symbol, token='', version=''):
'''Returns the official open and close for a give symbol.
https://iexcloud.io/docs/api/#news
9:30am-5pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/ohlc', token, version) | [
"Returns",
"the",
"official",
"open",
"and",
"close",
"for",
"a",
"give",
"symbol",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1262-L1277 | [
"def",
"ohlc",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/ohlc'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | ohlcDF | Returns the official open and close for a give symbol.
https://iexcloud.io/docs/api/#news
9:30am-5pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def ohlcDF(symbol, token='', version=''):
'''Returns the official open and close for a give symbol.
https://iexcloud.io/docs/api/#news
9:30am-5pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
o = ohlc(symbol, token, version)
if o:
df = pd.io.json.json_normalize(o)
_toDatetime(df)
else:
df = pd.DataFrame()
return df | def ohlcDF(symbol, token='', version=''):
'''Returns the official open and close for a give symbol.
https://iexcloud.io/docs/api/#news
9:30am-5pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
o = ohlc(symbol, token, version)
if o:
df = pd.io.json.json_normalize(o)
_toDatetime(df)
else:
df = pd.DataFrame()
return df | [
"Returns",
"the",
"official",
"open",
"and",
"close",
"for",
"a",
"give",
"symbol",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1280-L1300 | [
"def",
"ohlcDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"o",
"=",
"ohlc",
"(",
"symbol",
",",
"token",
",",
"version",
")",
"if",
"o",
":",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"o",
")",
"_toDatetime",
"(",
"df",
")",
"else",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | marketOhlcDF | Returns the official open and close for whole market.
https://iexcloud.io/docs/api/#news
9:30am-5pm ET Mon-Fri
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def marketOhlcDF(token='', version=''):
'''Returns the official open and close for whole market.
https://iexcloud.io/docs/api/#news
9:30am-5pm ET Mon-Fri
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
x = marketOhlc(token, version)
data = []
for key in x:
data.append(x[key])
data[-1]['symbol'] = key
df = pd.io.json.json_normalize(data)
_toDatetime(df)
_reindex(df, 'symbol')
return df | def marketOhlcDF(token='', version=''):
'''Returns the official open and close for whole market.
https://iexcloud.io/docs/api/#news
9:30am-5pm ET Mon-Fri
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
x = marketOhlc(token, version)
data = []
for key in x:
data.append(x[key])
data[-1]['symbol'] = key
df = pd.io.json.json_normalize(data)
_toDatetime(df)
_reindex(df, 'symbol')
return df | [
"Returns",
"the",
"official",
"open",
"and",
"close",
"for",
"whole",
"market",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1319-L1340 | [
"def",
"marketOhlcDF",
"(",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"x",
"=",
"marketOhlc",
"(",
"token",
",",
"version",
")",
"data",
"=",
"[",
"]",
"for",
"key",
"in",
"x",
":",
"data",
".",
"append",
"(",
"x",
"[",
"key",
"]",
")",
"data",
"[",
"-",
"1",
"]",
"[",
"'symbol'",
"]",
"=",
"key",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"data",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'symbol'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | peers | Peers of ticker
https://iexcloud.io/docs/api/#peers
8am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def peers(symbol, token='', version=''):
'''Peers of ticker
https://iexcloud.io/docs/api/#peers
8am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/peers', token, version) | def peers(symbol, token='', version=''):
'''Peers of ticker
https://iexcloud.io/docs/api/#peers
8am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/peers', token, version) | [
"Peers",
"of",
"ticker"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1343-L1358 | [
"def",
"peers",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/peers'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | _peersToDF | internal | pyEX/stocks.py | def _peersToDF(p):
'''internal'''
df = pd.DataFrame(p, columns=['symbol'])
_toDatetime(df)
_reindex(df, 'symbol')
df['peer'] = df.index
return df | def _peersToDF(p):
'''internal'''
df = pd.DataFrame(p, columns=['symbol'])
_toDatetime(df)
_reindex(df, 'symbol')
df['peer'] = df.index
return df | [
"internal"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1361-L1367 | [
"def",
"_peersToDF",
"(",
"p",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"p",
",",
"columns",
"=",
"[",
"'symbol'",
"]",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'symbol'",
")",
"df",
"[",
"'peer'",
"]",
"=",
"df",
".",
"index",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | peersDF | Peers of ticker
https://iexcloud.io/docs/api/#peers
8am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def peersDF(symbol, token='', version=''):
'''Peers of ticker
https://iexcloud.io/docs/api/#peers
8am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
p = peers(symbol, token, version)
df = _peersToDF(p)
return df | def peersDF(symbol, token='', version=''):
'''Peers of ticker
https://iexcloud.io/docs/api/#peers
8am UTC daily
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
p = peers(symbol, token, version)
df = _peersToDF(p)
return df | [
"Peers",
"of",
"ticker"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1370-L1386 | [
"def",
"peersDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"p",
"=",
"peers",
"(",
"symbol",
",",
"token",
",",
"version",
")",
"df",
"=",
"_peersToDF",
"(",
"p",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | yesterday | This returns previous day adjusted price data for one or more stocks
https://iexcloud.io/docs/api/#previous-day-prices
Available after 4am ET Tue-Sat
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def yesterday(symbol, token='', version=''):
'''This returns previous day adjusted price data for one or more stocks
https://iexcloud.io/docs/api/#previous-day-prices
Available after 4am ET Tue-Sat
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/previous', token, version) | def yesterday(symbol, token='', version=''):
'''This returns previous day adjusted price data for one or more stocks
https://iexcloud.io/docs/api/#previous-day-prices
Available after 4am ET Tue-Sat
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/previous', token, version) | [
"This",
"returns",
"previous",
"day",
"adjusted",
"price",
"data",
"for",
"one",
"or",
"more",
"stocks"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1389-L1404 | [
"def",
"yesterday",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/previous'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | yesterdayDF | This returns previous day adjusted price data for one or more stocks
https://iexcloud.io/docs/api/#previous-day-prices
Available after 4am ET Tue-Sat
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def yesterdayDF(symbol, token='', version=''):
'''This returns previous day adjusted price data for one or more stocks
https://iexcloud.io/docs/api/#previous-day-prices
Available after 4am ET Tue-Sat
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
y = yesterday(symbol, token, version)
if y:
df = pd.io.json.json_normalize(y)
_toDatetime(df)
_reindex(df, 'symbol')
else:
df = pd.DataFrame()
return df | def yesterdayDF(symbol, token='', version=''):
'''This returns previous day adjusted price data for one or more stocks
https://iexcloud.io/docs/api/#previous-day-prices
Available after 4am ET Tue-Sat
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
y = yesterday(symbol, token, version)
if y:
df = pd.io.json.json_normalize(y)
_toDatetime(df)
_reindex(df, 'symbol')
else:
df = pd.DataFrame()
return df | [
"This",
"returns",
"previous",
"day",
"adjusted",
"price",
"data",
"for",
"one",
"or",
"more",
"stocks"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1407-L1428 | [
"def",
"yesterdayDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"y",
"=",
"yesterday",
"(",
"symbol",
",",
"token",
",",
"version",
")",
"if",
"y",
":",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"y",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'symbol'",
")",
"else",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | marketYesterdayDF | This returns previous day adjusted price data for whole market
https://iexcloud.io/docs/api/#previous-day-prices
Available after 4am ET Tue-Sat
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def marketYesterdayDF(token='', version=''):
'''This returns previous day adjusted price data for whole market
https://iexcloud.io/docs/api/#previous-day-prices
Available after 4am ET Tue-Sat
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
x = marketYesterday(token, version)
data = []
for key in x:
data.append(x[key])
data[-1]['symbol'] = key
df = pd.DataFrame(data)
_toDatetime(df)
_reindex(df, 'symbol')
return df | def marketYesterdayDF(token='', version=''):
'''This returns previous day adjusted price data for whole market
https://iexcloud.io/docs/api/#previous-day-prices
Available after 4am ET Tue-Sat
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
x = marketYesterday(token, version)
data = []
for key in x:
data.append(x[key])
data[-1]['symbol'] = key
df = pd.DataFrame(data)
_toDatetime(df)
_reindex(df, 'symbol')
return df | [
"This",
"returns",
"previous",
"day",
"adjusted",
"price",
"data",
"for",
"whole",
"market"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1448-L1470 | [
"def",
"marketYesterdayDF",
"(",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"x",
"=",
"marketYesterday",
"(",
"token",
",",
"version",
")",
"data",
"=",
"[",
"]",
"for",
"key",
"in",
"x",
":",
"data",
".",
"append",
"(",
"x",
"[",
"key",
"]",
")",
"data",
"[",
"-",
"1",
"]",
"[",
"'symbol'",
"]",
"=",
"key",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"data",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'symbol'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | price | Price of ticker
https://iexcloud.io/docs/api/#price
4:30am-8pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def price(symbol, token='', version=''):
'''Price of ticker
https://iexcloud.io/docs/api/#price
4:30am-8pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/price', token, version) | def price(symbol, token='', version=''):
'''Price of ticker
https://iexcloud.io/docs/api/#price
4:30am-8pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/price', token, version) | [
"Price",
"of",
"ticker"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1473-L1488 | [
"def",
"price",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/price'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | priceDF | Price of ticker
https://iexcloud.io/docs/api/#price
4:30am-8pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def priceDF(symbol, token='', version=''):
'''Price of ticker
https://iexcloud.io/docs/api/#price
4:30am-8pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.io.json.json_normalize({'price': price(symbol, token, version)})
_toDatetime(df)
return df | def priceDF(symbol, token='', version=''):
'''Price of ticker
https://iexcloud.io/docs/api/#price
4:30am-8pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.io.json.json_normalize({'price': price(symbol, token, version)})
_toDatetime(df)
return df | [
"Price",
"of",
"ticker"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1491-L1507 | [
"def",
"priceDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"{",
"'price'",
":",
"price",
"(",
"symbol",
",",
"token",
",",
"version",
")",
"}",
")",
"_toDatetime",
"(",
"df",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | priceTarget | Provides the latest avg, high, and low analyst price target for a symbol.
https://iexcloud.io/docs/api/#price-target
Updates at 10am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def priceTarget(symbol, token='', version=''):
'''Provides the latest avg, high, and low analyst price target for a symbol.
https://iexcloud.io/docs/api/#price-target
Updates at 10am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/price-target', token, version) | def priceTarget(symbol, token='', version=''):
'''Provides the latest avg, high, and low analyst price target for a symbol.
https://iexcloud.io/docs/api/#price-target
Updates at 10am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/price-target', token, version) | [
"Provides",
"the",
"latest",
"avg",
"high",
"and",
"low",
"analyst",
"price",
"target",
"for",
"a",
"symbol",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1510-L1525 | [
"def",
"priceTarget",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/price-target'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | priceTargetDF | Provides the latest avg, high, and low analyst price target for a symbol.
https://iexcloud.io/docs/api/#price-target
Updates at 10am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def priceTargetDF(symbol, token='', version=''):
'''Provides the latest avg, high, and low analyst price target for a symbol.
https://iexcloud.io/docs/api/#price-target
Updates at 10am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.io.json.json_normalize(priceTarget(symbol, token, version))
_toDatetime(df)
return df | def priceTargetDF(symbol, token='', version=''):
'''Provides the latest avg, high, and low analyst price target for a symbol.
https://iexcloud.io/docs/api/#price-target
Updates at 10am, 11am, 12pm UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.io.json.json_normalize(priceTarget(symbol, token, version))
_toDatetime(df)
return df | [
"Provides",
"the",
"latest",
"avg",
"high",
"and",
"low",
"analyst",
"price",
"target",
"for",
"a",
"symbol",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1528-L1544 | [
"def",
"priceTargetDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"priceTarget",
"(",
"symbol",
",",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | quote | Get quote for ticker
https://iexcloud.io/docs/api/#quote
4:30am-8pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def quote(symbol, token='', version=''):
'''Get quote for ticker
https://iexcloud.io/docs/api/#quote
4:30am-8pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/quote', token, version) | def quote(symbol, token='', version=''):
'''Get quote for ticker
https://iexcloud.io/docs/api/#quote
4:30am-8pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/quote', token, version) | [
"Get",
"quote",
"for",
"ticker"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1547-L1563 | [
"def",
"quote",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/quote'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | quoteDF | Get quote for ticker
https://iexcloud.io/docs/api/#quote
4:30am-8pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def quoteDF(symbol, token='', version=''):
'''Get quote for ticker
https://iexcloud.io/docs/api/#quote
4:30am-8pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
q = quote(symbol, token, version)
if q:
df = pd.io.json.json_normalize(q)
_toDatetime(df)
_reindex(df, 'symbol')
else:
df = pd.DataFrame()
return df | def quoteDF(symbol, token='', version=''):
'''Get quote for ticker
https://iexcloud.io/docs/api/#quote
4:30am-8pm ET Mon-Fri
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
q = quote(symbol, token, version)
if q:
df = pd.io.json.json_normalize(q)
_toDatetime(df)
_reindex(df, 'symbol')
else:
df = pd.DataFrame()
return df | [
"Get",
"quote",
"for",
"ticker"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1566-L1588 | [
"def",
"quoteDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"q",
"=",
"quote",
"(",
"symbol",
",",
"token",
",",
"version",
")",
"if",
"q",
":",
"df",
"=",
"pd",
".",
"io",
".",
"json",
".",
"json_normalize",
"(",
"q",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'symbol'",
")",
"else",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | relevant | Same as peers
https://iexcloud.io/docs/api/#relevant
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def relevant(symbol, token='', version=''):
'''Same as peers
https://iexcloud.io/docs/api/#relevant
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/relevant', token, version) | def relevant(symbol, token='', version=''):
'''Same as peers
https://iexcloud.io/docs/api/#relevant
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/relevant', token, version) | [
"Same",
"as",
"peers"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1591-L1604 | [
"def",
"relevant",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/relevant'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | relevantDF | Same as peers
https://iexcloud.io/docs/api/#relevant
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def relevantDF(symbol, token='', version=''):
'''Same as peers
https://iexcloud.io/docs/api/#relevant
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(relevant(symbol, token, version))
_toDatetime(df)
return df | def relevantDF(symbol, token='', version=''):
'''Same as peers
https://iexcloud.io/docs/api/#relevant
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(relevant(symbol, token, version))
_toDatetime(df)
return df | [
"Same",
"as",
"peers"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1607-L1621 | [
"def",
"relevantDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"relevant",
"(",
"symbol",
",",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | sectorPerformanceDF | This returns an array of each sector and performance for the current trading day. Performance is based on each sector ETF.
https://iexcloud.io/docs/api/#sector-performance
8am-5pm ET Mon-Fri
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def sectorPerformanceDF(token='', version=''):
'''This returns an array of each sector and performance for the current trading day. Performance is based on each sector ETF.
https://iexcloud.io/docs/api/#sector-performance
8am-5pm ET Mon-Fri
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(sectorPerformance(token, version))
_toDatetime(df)
_reindex(df, 'name')
return df | def sectorPerformanceDF(token='', version=''):
'''This returns an array of each sector and performance for the current trading day. Performance is based on each sector ETF.
https://iexcloud.io/docs/api/#sector-performance
8am-5pm ET Mon-Fri
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(sectorPerformance(token, version))
_toDatetime(df)
_reindex(df, 'name')
return df | [
"This",
"returns",
"an",
"array",
"of",
"each",
"sector",
"and",
"performance",
"for",
"the",
"current",
"trading",
"day",
".",
"Performance",
"is",
"based",
"on",
"each",
"sector",
"ETF",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1640-L1656 | [
"def",
"sectorPerformanceDF",
"(",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"sectorPerformance",
"(",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'name'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | _splitsToDF | internal | pyEX/stocks.py | def _splitsToDF(s):
'''internal'''
df = pd.DataFrame(s)
_toDatetime(df)
_reindex(df, 'exDate')
return df | def _splitsToDF(s):
'''internal'''
df = pd.DataFrame(s)
_toDatetime(df)
_reindex(df, 'exDate')
return df | [
"internal"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1679-L1684 | [
"def",
"_splitsToDF",
"(",
"s",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"s",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'exDate'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | splitsDF | Stock split history
https://iexcloud.io/docs/api/#splits
Updated at 9am UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def splitsDF(symbol, timeframe='ytd', token='', version=''):
'''Stock split history
https://iexcloud.io/docs/api/#splits
Updated at 9am UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
s = splits(symbol, timeframe, token, version)
df = _splitsToDF(s)
return df | def splitsDF(symbol, timeframe='ytd', token='', version=''):
'''Stock split history
https://iexcloud.io/docs/api/#splits
Updated at 9am UTC every day
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
s = splits(symbol, timeframe, token, version)
df = _splitsToDF(s)
return df | [
"Stock",
"split",
"history"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1687-L1703 | [
"def",
"splitsDF",
"(",
"symbol",
",",
"timeframe",
"=",
"'ytd'",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"s",
"=",
"splits",
"(",
"symbol",
",",
"timeframe",
",",
"token",
",",
"version",
")",
"df",
"=",
"_splitsToDF",
"(",
"s",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | volumeByVenue | This returns 15 minute delayed and 30 day average consolidated volume percentage of a stock, by market.
This call will always return 13 values, and will be sorted in ascending order by current day trading volume percentage.
https://iexcloud.io/docs/api/#volume-by-venue
Updated during regular market hours 9:30am-4pm ET
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def volumeByVenue(symbol, token='', version=''):
'''This returns 15 minute delayed and 30 day average consolidated volume percentage of a stock, by market.
This call will always return 13 values, and will be sorted in ascending order by current day trading volume percentage.
https://iexcloud.io/docs/api/#volume-by-venue
Updated during regular market hours 9:30am-4pm ET
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/volume-by-venue', token, version) | def volumeByVenue(symbol, token='', version=''):
'''This returns 15 minute delayed and 30 day average consolidated volume percentage of a stock, by market.
This call will always return 13 values, and will be sorted in ascending order by current day trading volume percentage.
https://iexcloud.io/docs/api/#volume-by-venue
Updated during regular market hours 9:30am-4pm ET
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
return _getJson('stock/' + symbol + '/volume-by-venue', token, version) | [
"This",
"returns",
"15",
"minute",
"delayed",
"and",
"30",
"day",
"average",
"consolidated",
"volume",
"percentage",
"of",
"a",
"stock",
"by",
"market",
".",
"This",
"call",
"will",
"always",
"return",
"13",
"values",
"and",
"will",
"be",
"sorted",
"in",
"ascending",
"order",
"by",
"current",
"day",
"trading",
"volume",
"percentage",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1706-L1723 | [
"def",
"volumeByVenue",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/volume-by-venue'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | volumeByVenueDF | This returns 15 minute delayed and 30 day average consolidated volume percentage of a stock, by market.
This call will always return 13 values, and will be sorted in ascending order by current day trading volume percentage.
https://iexcloud.io/docs/api/#volume-by-venue
Updated during regular market hours 9:30am-4pm ET
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def volumeByVenueDF(symbol, token='', version=''):
'''This returns 15 minute delayed and 30 day average consolidated volume percentage of a stock, by market.
This call will always return 13 values, and will be sorted in ascending order by current day trading volume percentage.
https://iexcloud.io/docs/api/#volume-by-venue
Updated during regular market hours 9:30am-4pm ET
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(volumeByVenue(symbol, token, version))
_toDatetime(df)
_reindex(df, 'venue')
return df | def volumeByVenueDF(symbol, token='', version=''):
'''This returns 15 minute delayed and 30 day average consolidated volume percentage of a stock, by market.
This call will always return 13 values, and will be sorted in ascending order by current day trading volume percentage.
https://iexcloud.io/docs/api/#volume-by-venue
Updated during regular market hours 9:30am-4pm ET
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(volumeByVenue(symbol, token, version))
_toDatetime(df)
_reindex(df, 'venue')
return df | [
"This",
"returns",
"15",
"minute",
"delayed",
"and",
"30",
"day",
"average",
"consolidated",
"volume",
"percentage",
"of",
"a",
"stock",
"by",
"market",
".",
"This",
"call",
"will",
"always",
"return",
"13",
"values",
"and",
"will",
"be",
"sorted",
"in",
"ascending",
"order",
"by",
"current",
"day",
"trading",
"volume",
"percentage",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1726-L1745 | [
"def",
"volumeByVenueDF",
"(",
"symbol",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"volumeByVenue",
"(",
"symbol",
",",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'venue'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | threshold | The following are IEX-listed securities that have an aggregate fail to deliver position for five consecutive settlement days at a registered clearing agency, totaling 10,000 shares or more and equal to at least 0.5% of the issuer’s total shares outstanding (i.e., “threshold securities”).
The report data will be published to the IEX website daily at 8:30 p.m. ET with data for that trading day.
https://iexcloud.io/docs/api/#listed-regulation-sho-threshold-securities-list-in-dev
Args:
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def threshold(date=None, token='', version=''):
'''The following are IEX-listed securities that have an aggregate fail to deliver position for five consecutive settlement days at a registered clearing agency, totaling 10,000 shares or more and equal to at least 0.5% of the issuer’s total shares outstanding (i.e., “threshold securities”).
The report data will be published to the IEX website daily at 8:30 p.m. ET with data for that trading day.
https://iexcloud.io/docs/api/#listed-regulation-sho-threshold-securities-list-in-dev
Args:
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
dict: result
'''
if date:
date = _strOrDate(date)
return _getJson('stock/market/threshold-securities/' + date, token, version)
return _getJson('stock/market/threshold-securities', token, version) | def threshold(date=None, token='', version=''):
'''The following are IEX-listed securities that have an aggregate fail to deliver position for five consecutive settlement days at a registered clearing agency, totaling 10,000 shares or more and equal to at least 0.5% of the issuer’s total shares outstanding (i.e., “threshold securities”).
The report data will be published to the IEX website daily at 8:30 p.m. ET with data for that trading day.
https://iexcloud.io/docs/api/#listed-regulation-sho-threshold-securities-list-in-dev
Args:
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
dict: result
'''
if date:
date = _strOrDate(date)
return _getJson('stock/market/threshold-securities/' + date, token, version)
return _getJson('stock/market/threshold-securities', token, version) | [
"The",
"following",
"are",
"IEX",
"-",
"listed",
"securities",
"that",
"have",
"an",
"aggregate",
"fail",
"to",
"deliver",
"position",
"for",
"five",
"consecutive",
"settlement",
"days",
"at",
"a",
"registered",
"clearing",
"agency",
"totaling",
"10",
"000",
"shares",
"or",
"more",
"and",
"equal",
"to",
"at",
"least",
"0",
".",
"5%",
"of",
"the",
"issuer’s",
"total",
"shares",
"outstanding",
"(",
"i",
".",
"e",
".",
"“threshold",
"securities”",
")",
".",
"The",
"report",
"data",
"will",
"be",
"published",
"to",
"the",
"IEX",
"website",
"daily",
"at",
"8",
":",
"30",
"p",
".",
"m",
".",
"ET",
"with",
"data",
"for",
"that",
"trading",
"day",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1748-L1765 | [
"def",
"threshold",
"(",
"date",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"if",
"date",
":",
"date",
"=",
"_strOrDate",
"(",
"date",
")",
"return",
"_getJson",
"(",
"'stock/market/threshold-securities/'",
"+",
"date",
",",
"token",
",",
"version",
")",
"return",
"_getJson",
"(",
"'stock/market/threshold-securities'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | thresholdDF | The following are IEX-listed securities that have an aggregate fail to deliver position for five consecutive settlement days at a registered clearing agency, totaling 10,000 shares or more and equal to at least 0.5% of the issuer’s total shares outstanding (i.e., “threshold securities”).
The report data will be published to the IEX website daily at 8:30 p.m. ET with data for that trading day.
https://iexcloud.io/docs/api/#listed-regulation-sho-threshold-securities-list-in-dev
Args:
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def thresholdDF(date=None, token='', version=''):
'''The following are IEX-listed securities that have an aggregate fail to deliver position for five consecutive settlement days at a registered clearing agency, totaling 10,000 shares or more and equal to at least 0.5% of the issuer’s total shares outstanding (i.e., “threshold securities”).
The report data will be published to the IEX website daily at 8:30 p.m. ET with data for that trading day.
https://iexcloud.io/docs/api/#listed-regulation-sho-threshold-securities-list-in-dev
Args:
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(threshold(date, token, version))
_toDatetime(df)
return df | def thresholdDF(date=None, token='', version=''):
'''The following are IEX-listed securities that have an aggregate fail to deliver position for five consecutive settlement days at a registered clearing agency, totaling 10,000 shares or more and equal to at least 0.5% of the issuer’s total shares outstanding (i.e., “threshold securities”).
The report data will be published to the IEX website daily at 8:30 p.m. ET with data for that trading day.
https://iexcloud.io/docs/api/#listed-regulation-sho-threshold-securities-list-in-dev
Args:
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(threshold(date, token, version))
_toDatetime(df)
return df | [
"The",
"following",
"are",
"IEX",
"-",
"listed",
"securities",
"that",
"have",
"an",
"aggregate",
"fail",
"to",
"deliver",
"position",
"for",
"five",
"consecutive",
"settlement",
"days",
"at",
"a",
"registered",
"clearing",
"agency",
"totaling",
"10",
"000",
"shares",
"or",
"more",
"and",
"equal",
"to",
"at",
"least",
"0",
".",
"5%",
"of",
"the",
"issuer’s",
"total",
"shares",
"outstanding",
"(",
"i",
".",
"e",
".",
"“threshold",
"securities”",
")",
".",
"The",
"report",
"data",
"will",
"be",
"published",
"to",
"the",
"IEX",
"website",
"daily",
"at",
"8",
":",
"30",
"p",
".",
"m",
".",
"ET",
"with",
"data",
"for",
"that",
"trading",
"day",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1768-L1784 | [
"def",
"thresholdDF",
"(",
"date",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"threshold",
"(",
"date",
",",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | shortInterest | The consolidated market short interest positions in all IEX-listed securities are included in the IEX Short Interest Report.
The report data will be published daily at 4:00pm ET.
https://iexcloud.io/docs/api/#listed-short-interest-list-in-dev
Args:
symbol (string); Ticker to request
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def shortInterest(symbol, date=None, token='', version=''):
'''The consolidated market short interest positions in all IEX-listed securities are included in the IEX Short Interest Report.
The report data will be published daily at 4:00pm ET.
https://iexcloud.io/docs/api/#listed-short-interest-list-in-dev
Args:
symbol (string); Ticker to request
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
if date:
date = _strOrDate(date)
return _getJson('stock/' + symbol + '/short-interest/' + date, token, version)
return _getJson('stock/' + symbol + '/short-interest', token, version) | def shortInterest(symbol, date=None, token='', version=''):
'''The consolidated market short interest positions in all IEX-listed securities are included in the IEX Short Interest Report.
The report data will be published daily at 4:00pm ET.
https://iexcloud.io/docs/api/#listed-short-interest-list-in-dev
Args:
symbol (string); Ticker to request
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
if date:
date = _strOrDate(date)
return _getJson('stock/' + symbol + '/short-interest/' + date, token, version)
return _getJson('stock/' + symbol + '/short-interest', token, version) | [
"The",
"consolidated",
"market",
"short",
"interest",
"positions",
"in",
"all",
"IEX",
"-",
"listed",
"securities",
"are",
"included",
"in",
"the",
"IEX",
"Short",
"Interest",
"Report",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1787-L1807 | [
"def",
"shortInterest",
"(",
"symbol",
",",
"date",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"if",
"date",
":",
"date",
"=",
"_strOrDate",
"(",
"date",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/short-interest/'",
"+",
"date",
",",
"token",
",",
"version",
")",
"return",
"_getJson",
"(",
"'stock/'",
"+",
"symbol",
"+",
"'/short-interest'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | shortInterestDF | The consolidated market short interest positions in all IEX-listed securities are included in the IEX Short Interest Report.
The report data will be published daily at 4:00pm ET.
https://iexcloud.io/docs/api/#listed-short-interest-list-in-dev
Args:
symbol (string); Ticker to request
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def shortInterestDF(symbol, date=None, token='', version=''):
'''The consolidated market short interest positions in all IEX-listed securities are included in the IEX Short Interest Report.
The report data will be published daily at 4:00pm ET.
https://iexcloud.io/docs/api/#listed-short-interest-list-in-dev
Args:
symbol (string); Ticker to request
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(shortInterest(symbol, date, token, version))
_toDatetime(df)
return df | def shortInterestDF(symbol, date=None, token='', version=''):
'''The consolidated market short interest positions in all IEX-listed securities are included in the IEX Short Interest Report.
The report data will be published daily at 4:00pm ET.
https://iexcloud.io/docs/api/#listed-short-interest-list-in-dev
Args:
symbol (string); Ticker to request
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(shortInterest(symbol, date, token, version))
_toDatetime(df)
return df | [
"The",
"consolidated",
"market",
"short",
"interest",
"positions",
"in",
"all",
"IEX",
"-",
"listed",
"securities",
"are",
"included",
"in",
"the",
"IEX",
"Short",
"Interest",
"Report",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1810-L1828 | [
"def",
"shortInterestDF",
"(",
"symbol",
",",
"date",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"shortInterest",
"(",
"symbol",
",",
"date",
",",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | marketShortInterest | The consolidated market short interest positions in all IEX-listed securities are included in the IEX Short Interest Report.
The report data will be published daily at 4:00pm ET.
https://iexcloud.io/docs/api/#listed-short-interest-list-in-dev
Args:
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stocks.py | def marketShortInterest(date=None, token='', version=''):
'''The consolidated market short interest positions in all IEX-listed securities are included in the IEX Short Interest Report.
The report data will be published daily at 4:00pm ET.
https://iexcloud.io/docs/api/#listed-short-interest-list-in-dev
Args:
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
dict: result
'''
if date:
date = _strOrDate(date)
return _getJson('stock/market/short-interest/' + date, token, version)
return _getJson('stock/market/short-interest', token, version) | def marketShortInterest(date=None, token='', version=''):
'''The consolidated market short interest positions in all IEX-listed securities are included in the IEX Short Interest Report.
The report data will be published daily at 4:00pm ET.
https://iexcloud.io/docs/api/#listed-short-interest-list-in-dev
Args:
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
dict: result
'''
if date:
date = _strOrDate(date)
return _getJson('stock/market/short-interest/' + date, token, version)
return _getJson('stock/market/short-interest', token, version) | [
"The",
"consolidated",
"market",
"short",
"interest",
"positions",
"in",
"all",
"IEX",
"-",
"listed",
"securities",
"are",
"included",
"in",
"the",
"IEX",
"Short",
"Interest",
"Report",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1831-L1849 | [
"def",
"marketShortInterest",
"(",
"date",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"if",
"date",
":",
"date",
"=",
"_strOrDate",
"(",
"date",
")",
"return",
"_getJson",
"(",
"'stock/market/short-interest/'",
"+",
"date",
",",
"token",
",",
"version",
")",
"return",
"_getJson",
"(",
"'stock/market/short-interest'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | marketShortInterestDF | The consolidated market short interest positions in all IEX-listed securities are included in the IEX Short Interest Report.
The report data will be published daily at 4:00pm ET.
https://iexcloud.io/docs/api/#listed-short-interest-list-in-dev
Args:
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stocks.py | def marketShortInterestDF(date=None, token='', version=''):
'''The consolidated market short interest positions in all IEX-listed securities are included in the IEX Short Interest Report.
The report data will be published daily at 4:00pm ET.
https://iexcloud.io/docs/api/#listed-short-interest-list-in-dev
Args:
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(marketShortInterest(date, token, version))
_toDatetime(df)
return df | def marketShortInterestDF(date=None, token='', version=''):
'''The consolidated market short interest positions in all IEX-listed securities are included in the IEX Short Interest Report.
The report data will be published daily at 4:00pm ET.
https://iexcloud.io/docs/api/#listed-short-interest-list-in-dev
Args:
date (datetime); Effective Datetime
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(marketShortInterest(date, token, version))
_toDatetime(df)
return df | [
"The",
"consolidated",
"market",
"short",
"interest",
"positions",
"in",
"all",
"IEX",
"-",
"listed",
"securities",
"are",
"included",
"in",
"the",
"IEX",
"Short",
"Interest",
"Report",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stocks.py#L1852-L1869 | [
"def",
"marketShortInterestDF",
"(",
"date",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"marketShortInterest",
"(",
"date",
",",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | topsSSE | TOPS provides IEX’s aggregated best quoted bid and offer position in near real time for all securities on IEX’s displayed limit order book.
TOPS is ideal for developers needing both quote and trade data.
https://iexcloud.io/docs/api/#tops
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version | pyEX/marketdata/sse.py | def topsSSE(symbols=None, on_data=None, token='', version=''):
'''TOPS provides IEX’s aggregated best quoted bid and offer position in near real time for all securities on IEX’s displayed limit order book.
TOPS is ideal for developers needing both quote and trade data.
https://iexcloud.io/docs/api/#tops
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('tops', symbols, on_data, token, version) | def topsSSE(symbols=None, on_data=None, token='', version=''):
'''TOPS provides IEX’s aggregated best quoted bid and offer position in near real time for all securities on IEX’s displayed limit order book.
TOPS is ideal for developers needing both quote and trade data.
https://iexcloud.io/docs/api/#tops
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('tops', symbols, on_data, token, version) | [
"TOPS",
"provides",
"IEX’s",
"aggregated",
"best",
"quoted",
"bid",
"and",
"offer",
"position",
"in",
"near",
"real",
"time",
"for",
"all",
"securities",
"on",
"IEX’s",
"displayed",
"limit",
"order",
"book",
".",
"TOPS",
"is",
"ideal",
"for",
"developers",
"needing",
"both",
"quote",
"and",
"trade",
"data",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/sse.py#L31-L44 | [
"def",
"topsSSE",
"(",
"symbols",
"=",
"None",
",",
"on_data",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"return",
"_runSSE",
"(",
"'tops'",
",",
"symbols",
",",
"on_data",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | lastSSE | Last provides trade data for executions on IEX. It is a near real time, intraday API that provides IEX last sale price, size and time.
Last is ideal for developers that need a lightweight stock quote.
https://iexcloud.io/docs/api/#last
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version | pyEX/marketdata/sse.py | def lastSSE(symbols=None, on_data=None, token='', version=''):
'''Last provides trade data for executions on IEX. It is a near real time, intraday API that provides IEX last sale price, size and time.
Last is ideal for developers that need a lightweight stock quote.
https://iexcloud.io/docs/api/#last
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('last', symbols, on_data, token, version) | def lastSSE(symbols=None, on_data=None, token='', version=''):
'''Last provides trade data for executions on IEX. It is a near real time, intraday API that provides IEX last sale price, size and time.
Last is ideal for developers that need a lightweight stock quote.
https://iexcloud.io/docs/api/#last
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('last', symbols, on_data, token, version) | [
"Last",
"provides",
"trade",
"data",
"for",
"executions",
"on",
"IEX",
".",
"It",
"is",
"a",
"near",
"real",
"time",
"intraday",
"API",
"that",
"provides",
"IEX",
"last",
"sale",
"price",
"size",
"and",
"time",
".",
"Last",
"is",
"ideal",
"for",
"developers",
"that",
"need",
"a",
"lightweight",
"stock",
"quote",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/sse.py#L47-L60 | [
"def",
"lastSSE",
"(",
"symbols",
"=",
"None",
",",
"on_data",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"return",
"_runSSE",
"(",
"'last'",
",",
"symbols",
",",
"on_data",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | deepSSE | DEEP is used to receive real-time depth of book quotations direct from IEX.
The depth of book quotations received via DEEP provide an aggregated size of resting displayed orders at a price and side,
and do not indicate the size or number of individual orders at any price level.
Non-displayed orders and non-displayed portions of reserve orders are not represented in DEEP.
DEEP also provides last trade price and size information. Trades resulting from either displayed or non-displayed orders matching on IEX will be reported. Routed executions will not be reported.
https://iexcloud.io/docs/api/#deep
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version | pyEX/marketdata/sse.py | def deepSSE(symbols=None, channels=None, on_data=None, token='', version=''):
'''DEEP is used to receive real-time depth of book quotations direct from IEX.
The depth of book quotations received via DEEP provide an aggregated size of resting displayed orders at a price and side,
and do not indicate the size or number of individual orders at any price level.
Non-displayed orders and non-displayed portions of reserve orders are not represented in DEEP.
DEEP also provides last trade price and size information. Trades resulting from either displayed or non-displayed orders matching on IEX will be reported. Routed executions will not be reported.
https://iexcloud.io/docs/api/#deep
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
symbols = _strCommaSeparatedString(symbols)
channels = channels or []
if isinstance(channels, str):
if channels not in DeepChannelsSSE.options():
raise PyEXception('Channel not recognized: %s', type(channels))
channels = [channels]
elif isinstance(channels, DeepChannelsSSE):
channels = [channels.value]
elif isinstance(channels, list):
for i, c in enumerate(channels):
if isinstance(c, DeepChannelsSSE):
channels[i] = c.value
elif not isinstance(c, str) or isinstance(c, str) and c not in DeepChannelsSSE.options():
raise PyEXception('Channel not recognized: %s', c)
channels = _strCommaSeparatedString(channels)
return _streamSSE(_SSE_DEEP_URL_PREFIX.format(symbols=symbols, channels=channels, token=token, version=version), on_data) | def deepSSE(symbols=None, channels=None, on_data=None, token='', version=''):
'''DEEP is used to receive real-time depth of book quotations direct from IEX.
The depth of book quotations received via DEEP provide an aggregated size of resting displayed orders at a price and side,
and do not indicate the size or number of individual orders at any price level.
Non-displayed orders and non-displayed portions of reserve orders are not represented in DEEP.
DEEP also provides last trade price and size information. Trades resulting from either displayed or non-displayed orders matching on IEX will be reported. Routed executions will not be reported.
https://iexcloud.io/docs/api/#deep
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
symbols = _strCommaSeparatedString(symbols)
channels = channels or []
if isinstance(channels, str):
if channels not in DeepChannelsSSE.options():
raise PyEXception('Channel not recognized: %s', type(channels))
channels = [channels]
elif isinstance(channels, DeepChannelsSSE):
channels = [channels.value]
elif isinstance(channels, list):
for i, c in enumerate(channels):
if isinstance(c, DeepChannelsSSE):
channels[i] = c.value
elif not isinstance(c, str) or isinstance(c, str) and c not in DeepChannelsSSE.options():
raise PyEXception('Channel not recognized: %s', c)
channels = _strCommaSeparatedString(channels)
return _streamSSE(_SSE_DEEP_URL_PREFIX.format(symbols=symbols, channels=channels, token=token, version=version), on_data) | [
"DEEP",
"is",
"used",
"to",
"receive",
"real",
"-",
"time",
"depth",
"of",
"book",
"quotations",
"direct",
"from",
"IEX",
".",
"The",
"depth",
"of",
"book",
"quotations",
"received",
"via",
"DEEP",
"provide",
"an",
"aggregated",
"size",
"of",
"resting",
"displayed",
"orders",
"at",
"a",
"price",
"and",
"side",
"and",
"do",
"not",
"indicate",
"the",
"size",
"or",
"number",
"of",
"individual",
"orders",
"at",
"any",
"price",
"level",
".",
"Non",
"-",
"displayed",
"orders",
"and",
"non",
"-",
"displayed",
"portions",
"of",
"reserve",
"orders",
"are",
"not",
"represented",
"in",
"DEEP",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/sse.py#L63-L97 | [
"def",
"deepSSE",
"(",
"symbols",
"=",
"None",
",",
"channels",
"=",
"None",
",",
"on_data",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"symbols",
"=",
"_strCommaSeparatedString",
"(",
"symbols",
")",
"channels",
"=",
"channels",
"or",
"[",
"]",
"if",
"isinstance",
"(",
"channels",
",",
"str",
")",
":",
"if",
"channels",
"not",
"in",
"DeepChannelsSSE",
".",
"options",
"(",
")",
":",
"raise",
"PyEXception",
"(",
"'Channel not recognized: %s'",
",",
"type",
"(",
"channels",
")",
")",
"channels",
"=",
"[",
"channels",
"]",
"elif",
"isinstance",
"(",
"channels",
",",
"DeepChannelsSSE",
")",
":",
"channels",
"=",
"[",
"channels",
".",
"value",
"]",
"elif",
"isinstance",
"(",
"channels",
",",
"list",
")",
":",
"for",
"i",
",",
"c",
"in",
"enumerate",
"(",
"channels",
")",
":",
"if",
"isinstance",
"(",
"c",
",",
"DeepChannelsSSE",
")",
":",
"channels",
"[",
"i",
"]",
"=",
"c",
".",
"value",
"elif",
"not",
"isinstance",
"(",
"c",
",",
"str",
")",
"or",
"isinstance",
"(",
"c",
",",
"str",
")",
"and",
"c",
"not",
"in",
"DeepChannelsSSE",
".",
"options",
"(",
")",
":",
"raise",
"PyEXception",
"(",
"'Channel not recognized: %s'",
",",
"c",
")",
"channels",
"=",
"_strCommaSeparatedString",
"(",
"channels",
")",
"return",
"_streamSSE",
"(",
"_SSE_DEEP_URL_PREFIX",
".",
"format",
"(",
"symbols",
"=",
"symbols",
",",
"channels",
"=",
"channels",
",",
"token",
"=",
"token",
",",
"version",
"=",
"version",
")",
",",
"on_data",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | tradesSSE | Trade report messages are sent when an order on the IEX Order Book is executed in whole or in part. DEEP sends a Trade report message for every individual fill.
https://iexcloud.io/docs/api/#deep-trades
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version | pyEX/marketdata/sse.py | def tradesSSE(symbols=None, on_data=None, token='', version=''):
'''Trade report messages are sent when an order on the IEX Order Book is executed in whole or in part. DEEP sends a Trade report message for every individual fill.
https://iexcloud.io/docs/api/#deep-trades
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
symbols = _strCommaSeparatedString(symbols)
return _streamSSE(_SSE_DEEP_URL_PREFIX.format(symbols=symbols, channels='trades', token=token, version=version), on_data) | def tradesSSE(symbols=None, on_data=None, token='', version=''):
'''Trade report messages are sent when an order on the IEX Order Book is executed in whole or in part. DEEP sends a Trade report message for every individual fill.
https://iexcloud.io/docs/api/#deep-trades
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
symbols = _strCommaSeparatedString(symbols)
return _streamSSE(_SSE_DEEP_URL_PREFIX.format(symbols=symbols, channels='trades', token=token, version=version), on_data) | [
"Trade",
"report",
"messages",
"are",
"sent",
"when",
"an",
"order",
"on",
"the",
"IEX",
"Order",
"Book",
"is",
"executed",
"in",
"whole",
"or",
"in",
"part",
".",
"DEEP",
"sends",
"a",
"Trade",
"report",
"message",
"for",
"every",
"individual",
"fill",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/sse.py#L100-L113 | [
"def",
"tradesSSE",
"(",
"symbols",
"=",
"None",
",",
"on_data",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"symbols",
"=",
"_strCommaSeparatedString",
"(",
"symbols",
")",
"return",
"_streamSSE",
"(",
"_SSE_DEEP_URL_PREFIX",
".",
"format",
"(",
"symbols",
"=",
"symbols",
",",
"channels",
"=",
"'trades'",
",",
"token",
"=",
"token",
",",
"version",
"=",
"version",
")",
",",
"on_data",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | auctionSSE | DEEP broadcasts an Auction Information Message every one second between the Lock-in Time and the auction match for Opening and Closing Auctions,
and during the Display Only Period for IPO, Halt, and Volatility Auctions. Only IEX listed securities are eligible for IEX Auctions.
https://iexcloud.io/docs/api/#deep-auction
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version | pyEX/marketdata/sse.py | def auctionSSE(symbols=None, on_data=None, token='', version=''):
'''DEEP broadcasts an Auction Information Message every one second between the Lock-in Time and the auction match for Opening and Closing Auctions,
and during the Display Only Period for IPO, Halt, and Volatility Auctions. Only IEX listed securities are eligible for IEX Auctions.
https://iexcloud.io/docs/api/#deep-auction
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('auction', symbols, on_data, token, version) | def auctionSSE(symbols=None, on_data=None, token='', version=''):
'''DEEP broadcasts an Auction Information Message every one second between the Lock-in Time and the auction match for Opening and Closing Auctions,
and during the Display Only Period for IPO, Halt, and Volatility Auctions. Only IEX listed securities are eligible for IEX Auctions.
https://iexcloud.io/docs/api/#deep-auction
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('auction', symbols, on_data, token, version) | [
"DEEP",
"broadcasts",
"an",
"Auction",
"Information",
"Message",
"every",
"one",
"second",
"between",
"the",
"Lock",
"-",
"in",
"Time",
"and",
"the",
"auction",
"match",
"for",
"Opening",
"and",
"Closing",
"Auctions",
"and",
"during",
"the",
"Display",
"Only",
"Period",
"for",
"IPO",
"Halt",
"and",
"Volatility",
"Auctions",
".",
"Only",
"IEX",
"listed",
"securities",
"are",
"eligible",
"for",
"IEX",
"Auctions",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/sse.py#L116-L129 | [
"def",
"auctionSSE",
"(",
"symbols",
"=",
"None",
",",
"on_data",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"return",
"_runSSE",
"(",
"'auction'",
",",
"symbols",
",",
"on_data",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | bookSSE | Book shows IEX’s bids and asks for given symbols.
https://iexcloud.io/docs/api/#deep-book
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version | pyEX/marketdata/sse.py | def bookSSE(symbols=None, on_data=None, token='', version=''):
'''Book shows IEX’s bids and asks for given symbols.
https://iexcloud.io/docs/api/#deep-book
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('book', symbols, on_data, token, version) | def bookSSE(symbols=None, on_data=None, token='', version=''):
'''Book shows IEX’s bids and asks for given symbols.
https://iexcloud.io/docs/api/#deep-book
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('book', symbols, on_data, token, version) | [
"Book",
"shows",
"IEX’s",
"bids",
"and",
"asks",
"for",
"given",
"symbols",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/sse.py#L132-L144 | [
"def",
"bookSSE",
"(",
"symbols",
"=",
"None",
",",
"on_data",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"return",
"_runSSE",
"(",
"'book'",
",",
"symbols",
",",
"on_data",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | opHaltStatusSSE | The Exchange may suspend trading of one or more securities on IEX for operational reasons and indicates such operational halt using the Operational halt status message.
IEX disseminates a full pre-market spin of Operational halt status messages indicating the operational halt status of all securities.
In the spin, IEX will send out an Operational Halt Message with “N” (Not operationally halted on IEX) for all securities that are eligible for trading at the start of the Pre-Market Session.
If a security is absent from the dissemination, firms should assume that the security is being treated as operationally halted in the IEX Trading System at the start of the Pre-Market Session.
After the pre-market spin, IEX will use the Operational halt status message to relay changes in operational halt status for an individual security.
https://iexcloud.io/docs/api/#deep-operational-halt-status
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version | pyEX/marketdata/sse.py | def opHaltStatusSSE(symbols=None, on_data=None, token='', version=''):
'''The Exchange may suspend trading of one or more securities on IEX for operational reasons and indicates such operational halt using the Operational halt status message.
IEX disseminates a full pre-market spin of Operational halt status messages indicating the operational halt status of all securities.
In the spin, IEX will send out an Operational Halt Message with “N” (Not operationally halted on IEX) for all securities that are eligible for trading at the start of the Pre-Market Session.
If a security is absent from the dissemination, firms should assume that the security is being treated as operationally halted in the IEX Trading System at the start of the Pre-Market Session.
After the pre-market spin, IEX will use the Operational halt status message to relay changes in operational halt status for an individual security.
https://iexcloud.io/docs/api/#deep-operational-halt-status
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('op-halt-status', symbols, on_data, token, version) | def opHaltStatusSSE(symbols=None, on_data=None, token='', version=''):
'''The Exchange may suspend trading of one or more securities on IEX for operational reasons and indicates such operational halt using the Operational halt status message.
IEX disseminates a full pre-market spin of Operational halt status messages indicating the operational halt status of all securities.
In the spin, IEX will send out an Operational Halt Message with “N” (Not operationally halted on IEX) for all securities that are eligible for trading at the start of the Pre-Market Session.
If a security is absent from the dissemination, firms should assume that the security is being treated as operationally halted in the IEX Trading System at the start of the Pre-Market Session.
After the pre-market spin, IEX will use the Operational halt status message to relay changes in operational halt status for an individual security.
https://iexcloud.io/docs/api/#deep-operational-halt-status
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('op-halt-status', symbols, on_data, token, version) | [
"The",
"Exchange",
"may",
"suspend",
"trading",
"of",
"one",
"or",
"more",
"securities",
"on",
"IEX",
"for",
"operational",
"reasons",
"and",
"indicates",
"such",
"operational",
"halt",
"using",
"the",
"Operational",
"halt",
"status",
"message",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/sse.py#L147-L165 | [
"def",
"opHaltStatusSSE",
"(",
"symbols",
"=",
"None",
",",
"on_data",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"return",
"_runSSE",
"(",
"'op-halt-status'",
",",
"symbols",
",",
"on_data",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | officialPriceSSE | The Official Price message is used to disseminate the IEX Official Opening and Closing Prices.
These messages will be provided only for IEX Listed Securities.
https://iexcloud.io/docs/api/#deep-official-price
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version | pyEX/marketdata/sse.py | def officialPriceSSE(symbols=None, on_data=None, token='', version=''):
'''The Official Price message is used to disseminate the IEX Official Opening and Closing Prices.
These messages will be provided only for IEX Listed Securities.
https://iexcloud.io/docs/api/#deep-official-price
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('official-price', symbols, on_data, token, version) | def officialPriceSSE(symbols=None, on_data=None, token='', version=''):
'''The Official Price message is used to disseminate the IEX Official Opening and Closing Prices.
These messages will be provided only for IEX Listed Securities.
https://iexcloud.io/docs/api/#deep-official-price
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('official-price', symbols, on_data, token, version) | [
"The",
"Official",
"Price",
"message",
"is",
"used",
"to",
"disseminate",
"the",
"IEX",
"Official",
"Opening",
"and",
"Closing",
"Prices",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/sse.py#L168-L182 | [
"def",
"officialPriceSSE",
"(",
"symbols",
"=",
"None",
",",
"on_data",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"return",
"_runSSE",
"(",
"'official-price'",
",",
"symbols",
",",
"on_data",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | securityEventSSE | The Security event message is used to indicate events that apply to a security. A Security event message will be sent whenever such event occurs
https://iexcloud.io/docs/api/#deep-security-event
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version | pyEX/marketdata/sse.py | def securityEventSSE(symbols=None, on_data=None, token='', version=''):
'''The Security event message is used to indicate events that apply to a security. A Security event message will be sent whenever such event occurs
https://iexcloud.io/docs/api/#deep-security-event
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('security-event', symbols, on_data, token, version) | def securityEventSSE(symbols=None, on_data=None, token='', version=''):
'''The Security event message is used to indicate events that apply to a security. A Security event message will be sent whenever such event occurs
https://iexcloud.io/docs/api/#deep-security-event
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('security-event', symbols, on_data, token, version) | [
"The",
"Security",
"event",
"message",
"is",
"used",
"to",
"indicate",
"events",
"that",
"apply",
"to",
"a",
"security",
".",
"A",
"Security",
"event",
"message",
"will",
"be",
"sent",
"whenever",
"such",
"event",
"occurs"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/sse.py#L185-L197 | [
"def",
"securityEventSSE",
"(",
"symbols",
"=",
"None",
",",
"on_data",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"return",
"_runSSE",
"(",
"'security-event'",
",",
"symbols",
",",
"on_data",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | ssrStatusSSE | In association with Rule 201 of Regulation SHO, the Short Sale Price Test Message is used to indicate when a short sale price test restriction is in effect for a security.
IEX disseminates a full pre-market spin of Short sale price test status messages indicating the Rule 201 status of all securities. After the pre-market spin, IEX will use the Short sale price test status message in the event of an intraday status change.
The IEX Trading System will process orders based on the latest short sale price test restriction status.
https://iexcloud.io/docs/api/#deep-short-sale-price-test-status
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version | pyEX/marketdata/sse.py | def ssrStatusSSE(symbols=None, on_data=None, token='', version=''):
'''In association with Rule 201 of Regulation SHO, the Short Sale Price Test Message is used to indicate when a short sale price test restriction is in effect for a security.
IEX disseminates a full pre-market spin of Short sale price test status messages indicating the Rule 201 status of all securities. After the pre-market spin, IEX will use the Short sale price test status message in the event of an intraday status change.
The IEX Trading System will process orders based on the latest short sale price test restriction status.
https://iexcloud.io/docs/api/#deep-short-sale-price-test-status
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('ssr-status', symbols, on_data, token, version) | def ssrStatusSSE(symbols=None, on_data=None, token='', version=''):
'''In association with Rule 201 of Regulation SHO, the Short Sale Price Test Message is used to indicate when a short sale price test restriction is in effect for a security.
IEX disseminates a full pre-market spin of Short sale price test status messages indicating the Rule 201 status of all securities. After the pre-market spin, IEX will use the Short sale price test status message in the event of an intraday status change.
The IEX Trading System will process orders based on the latest short sale price test restriction status.
https://iexcloud.io/docs/api/#deep-short-sale-price-test-status
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('ssr-status', symbols, on_data, token, version) | [
"In",
"association",
"with",
"Rule",
"201",
"of",
"Regulation",
"SHO",
"the",
"Short",
"Sale",
"Price",
"Test",
"Message",
"is",
"used",
"to",
"indicate",
"when",
"a",
"short",
"sale",
"price",
"test",
"restriction",
"is",
"in",
"effect",
"for",
"a",
"security",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/sse.py#L200-L216 | [
"def",
"ssrStatusSSE",
"(",
"symbols",
"=",
"None",
",",
"on_data",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"return",
"_runSSE",
"(",
"'ssr-status'",
",",
"symbols",
",",
"on_data",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | systemEventSSE | The System event message is used to indicate events that apply to the market or the data feed.
There will be a single message disseminated per channel for each System Event type within a given trading session.
https://iexcloud.io/docs/api/#deep-system-event
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version | pyEX/marketdata/sse.py | def systemEventSSE(symbols=None, on_data=None, token='', version=''):
'''The System event message is used to indicate events that apply to the market or the data feed.
There will be a single message disseminated per channel for each System Event type within a given trading session.
https://iexcloud.io/docs/api/#deep-system-event
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('system-event', symbols, on_data, token, version) | def systemEventSSE(symbols=None, on_data=None, token='', version=''):
'''The System event message is used to indicate events that apply to the market or the data feed.
There will be a single message disseminated per channel for each System Event type within a given trading session.
https://iexcloud.io/docs/api/#deep-system-event
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('system-event', symbols, on_data, token, version) | [
"The",
"System",
"event",
"message",
"is",
"used",
"to",
"indicate",
"events",
"that",
"apply",
"to",
"the",
"market",
"or",
"the",
"data",
"feed",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/sse.py#L219-L233 | [
"def",
"systemEventSSE",
"(",
"symbols",
"=",
"None",
",",
"on_data",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"return",
"_runSSE",
"(",
"'system-event'",
",",
"symbols",
",",
"on_data",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | tradeBreaksSSE | Trade report messages are sent when an order on the IEX Order Book is executed in whole or in part. DEEP sends a Trade report message for every individual fill.
https://iexcloud.io/docs/api/#deep-trades
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version | pyEX/marketdata/sse.py | def tradeBreaksSSE(symbols=None, on_data=None, token='', version=''):
'''Trade report messages are sent when an order on the IEX Order Book is executed in whole or in part. DEEP sends a Trade report message for every individual fill.
https://iexcloud.io/docs/api/#deep-trades
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('trade-breaks', symbols, on_data, token, version) | def tradeBreaksSSE(symbols=None, on_data=None, token='', version=''):
'''Trade report messages are sent when an order on the IEX Order Book is executed in whole or in part. DEEP sends a Trade report message for every individual fill.
https://iexcloud.io/docs/api/#deep-trades
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('trade-breaks', symbols, on_data, token, version) | [
"Trade",
"report",
"messages",
"are",
"sent",
"when",
"an",
"order",
"on",
"the",
"IEX",
"Order",
"Book",
"is",
"executed",
"in",
"whole",
"or",
"in",
"part",
".",
"DEEP",
"sends",
"a",
"Trade",
"report",
"message",
"for",
"every",
"individual",
"fill",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/sse.py#L236-L248 | [
"def",
"tradeBreaksSSE",
"(",
"symbols",
"=",
"None",
",",
"on_data",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"return",
"_runSSE",
"(",
"'trade-breaks'",
",",
"symbols",
",",
"on_data",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | tradingStatusSSE | The Trading status message is used to indicate the current trading status of a security.
For IEX-listed securities, IEX acts as the primary market and has the authority to institute a trading halt or trading pause in a security due to news dissemination or regulatory reasons.
For non-IEX-listed securities, IEX abides by any regulatory trading halts and trading pauses instituted by the primary or listing market, as applicable.
IEX disseminates a full pre-market spin of Trading status messages indicating the trading status of all securities.
In the spin, IEX will send out a Trading status message with “T” (Trading) for all securities that are eligible for trading at the start of the Pre-Market Session.
If a security is absent from the dissemination, firms should assume that the security is being treated as operationally halted in the IEX Trading System.
After the pre-market spin, IEX will use the Trading status message to relay changes in trading status for an individual security. Messages will be sent when a security is:
Halted
Paused*
Released into an Order Acceptance Period*
Released for trading
*The paused and released into an Order Acceptance Period status will be disseminated for IEX-listed securities only. Trading pauses on non-IEX-listed securities will be treated simply as a halt.
https://iexcloud.io/docs/api/#deep-trading-status
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version | pyEX/marketdata/sse.py | def tradingStatusSSE(symbols=None, on_data=None, token='', version=''):
'''The Trading status message is used to indicate the current trading status of a security.
For IEX-listed securities, IEX acts as the primary market and has the authority to institute a trading halt or trading pause in a security due to news dissemination or regulatory reasons.
For non-IEX-listed securities, IEX abides by any regulatory trading halts and trading pauses instituted by the primary or listing market, as applicable.
IEX disseminates a full pre-market spin of Trading status messages indicating the trading status of all securities.
In the spin, IEX will send out a Trading status message with “T” (Trading) for all securities that are eligible for trading at the start of the Pre-Market Session.
If a security is absent from the dissemination, firms should assume that the security is being treated as operationally halted in the IEX Trading System.
After the pre-market spin, IEX will use the Trading status message to relay changes in trading status for an individual security. Messages will be sent when a security is:
Halted
Paused*
Released into an Order Acceptance Period*
Released for trading
*The paused and released into an Order Acceptance Period status will be disseminated for IEX-listed securities only. Trading pauses on non-IEX-listed securities will be treated simply as a halt.
https://iexcloud.io/docs/api/#deep-trading-status
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('trading-status', symbols, on_data, token, version) | def tradingStatusSSE(symbols=None, on_data=None, token='', version=''):
'''The Trading status message is used to indicate the current trading status of a security.
For IEX-listed securities, IEX acts as the primary market and has the authority to institute a trading halt or trading pause in a security due to news dissemination or regulatory reasons.
For non-IEX-listed securities, IEX abides by any regulatory trading halts and trading pauses instituted by the primary or listing market, as applicable.
IEX disseminates a full pre-market spin of Trading status messages indicating the trading status of all securities.
In the spin, IEX will send out a Trading status message with “T” (Trading) for all securities that are eligible for trading at the start of the Pre-Market Session.
If a security is absent from the dissemination, firms should assume that the security is being treated as operationally halted in the IEX Trading System.
After the pre-market spin, IEX will use the Trading status message to relay changes in trading status for an individual security. Messages will be sent when a security is:
Halted
Paused*
Released into an Order Acceptance Period*
Released for trading
*The paused and released into an Order Acceptance Period status will be disseminated for IEX-listed securities only. Trading pauses on non-IEX-listed securities will be treated simply as a halt.
https://iexcloud.io/docs/api/#deep-trading-status
Args:
symbols (string); Tickers to request
on_data (function): Callback on data
token (string); Access token
version (string); API version
'''
return _runSSE('trading-status', symbols, on_data, token, version) | [
"The",
"Trading",
"status",
"message",
"is",
"used",
"to",
"indicate",
"the",
"current",
"trading",
"status",
"of",
"a",
"security",
".",
"For",
"IEX",
"-",
"listed",
"securities",
"IEX",
"acts",
"as",
"the",
"primary",
"market",
"and",
"has",
"the",
"authority",
"to",
"institute",
"a",
"trading",
"halt",
"or",
"trading",
"pause",
"in",
"a",
"security",
"due",
"to",
"news",
"dissemination",
"or",
"regulatory",
"reasons",
".",
"For",
"non",
"-",
"IEX",
"-",
"listed",
"securities",
"IEX",
"abides",
"by",
"any",
"regulatory",
"trading",
"halts",
"and",
"trading",
"pauses",
"instituted",
"by",
"the",
"primary",
"or",
"listing",
"market",
"as",
"applicable",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/sse.py#L251-L277 | [
"def",
"tradingStatusSSE",
"(",
"symbols",
"=",
"None",
",",
"on_data",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"return",
"_runSSE",
"(",
"'trading-status'",
",",
"symbols",
",",
"on_data",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | cryptoDF | This will return an array of quotes for all Cryptocurrencies supported by the IEX API. Each element is a standard quote object with four additional keys.
https://iexcloud.io/docs/api/#crypto
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/alternative.py | def cryptoDF(token='', version=''):
'''This will return an array of quotes for all Cryptocurrencies supported by the IEX API. Each element is a standard quote object with four additional keys.
https://iexcloud.io/docs/api/#crypto
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(crypto(token, version))
_toDatetime(df)
_reindex(df, 'symbol')
return df | def cryptoDF(token='', version=''):
'''This will return an array of quotes for all Cryptocurrencies supported by the IEX API. Each element is a standard quote object with four additional keys.
https://iexcloud.io/docs/api/#crypto
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(crypto(token, version))
_toDatetime(df)
_reindex(df, 'symbol')
return df | [
"This",
"will",
"return",
"an",
"array",
"of",
"quotes",
"for",
"all",
"Cryptocurrencies",
"supported",
"by",
"the",
"IEX",
"API",
".",
"Each",
"element",
"is",
"a",
"standard",
"quote",
"object",
"with",
"four",
"additional",
"keys",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/alternative.py#L20-L35 | [
"def",
"cryptoDF",
"(",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"crypto",
"(",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'symbol'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | sentiment | This endpoint provides social sentiment data from StockTwits. Data can be viewed as a daily value, or by minute for a given date.
https://iexcloud.io/docs/api/#social-sentiment
Continuous
Args:
symbol (string); Ticker to request
type (string); 'daily' or 'minute'
date (string); date in YYYYMMDD or datetime
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/alternative.py | def sentiment(symbol, type='daily', date=None, token='', version=''):
'''This endpoint provides social sentiment data from StockTwits. Data can be viewed as a daily value, or by minute for a given date.
https://iexcloud.io/docs/api/#social-sentiment
Continuous
Args:
symbol (string); Ticker to request
type (string); 'daily' or 'minute'
date (string); date in YYYYMMDD or datetime
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
if date:
date = _strOrDate(date)
return _getJson('stock/{symbol}/sentiment/{type}/{date}'.format(symbol=symbol, type=type, date=date), token, version)
return _getJson('stock/{symbol}/sentiment/{type}/'.format(symbol=symbol, type=type), token, version) | def sentiment(symbol, type='daily', date=None, token='', version=''):
'''This endpoint provides social sentiment data from StockTwits. Data can be viewed as a daily value, or by minute for a given date.
https://iexcloud.io/docs/api/#social-sentiment
Continuous
Args:
symbol (string); Ticker to request
type (string); 'daily' or 'minute'
date (string); date in YYYYMMDD or datetime
token (string); Access token
version (string); API version
Returns:
dict: result
'''
_raiseIfNotStr(symbol)
if date:
date = _strOrDate(date)
return _getJson('stock/{symbol}/sentiment/{type}/{date}'.format(symbol=symbol, type=type, date=date), token, version)
return _getJson('stock/{symbol}/sentiment/{type}/'.format(symbol=symbol, type=type), token, version) | [
"This",
"endpoint",
"provides",
"social",
"sentiment",
"data",
"from",
"StockTwits",
".",
"Data",
"can",
"be",
"viewed",
"as",
"a",
"daily",
"value",
"or",
"by",
"minute",
"for",
"a",
"given",
"date",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/alternative.py#L38-L58 | [
"def",
"sentiment",
"(",
"symbol",
",",
"type",
"=",
"'daily'",
",",
"date",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"_raiseIfNotStr",
"(",
"symbol",
")",
"if",
"date",
":",
"date",
"=",
"_strOrDate",
"(",
"date",
")",
"return",
"_getJson",
"(",
"'stock/{symbol}/sentiment/{type}/{date}'",
".",
"format",
"(",
"symbol",
"=",
"symbol",
",",
"type",
"=",
"type",
",",
"date",
"=",
"date",
")",
",",
"token",
",",
"version",
")",
"return",
"_getJson",
"(",
"'stock/{symbol}/sentiment/{type}/'",
".",
"format",
"(",
"symbol",
"=",
"symbol",
",",
"type",
"=",
"type",
")",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | sentimentDF | This endpoint provides social sentiment data from StockTwits. Data can be viewed as a daily value, or by minute for a given date.
https://iexcloud.io/docs/api/#social-sentiment
Continuous
Args:
symbol (string); Ticker to request
type (string); 'daily' or 'minute'
date (string); date in YYYYMMDD or datetime
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/alternative.py | def sentimentDF(symbol, type='daily', date=None, token='', version=''):
'''This endpoint provides social sentiment data from StockTwits. Data can be viewed as a daily value, or by minute for a given date.
https://iexcloud.io/docs/api/#social-sentiment
Continuous
Args:
symbol (string); Ticker to request
type (string); 'daily' or 'minute'
date (string); date in YYYYMMDD or datetime
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
ret = sentiment(symbol, type, date, token, version)
if type == 'daiy':
ret = [ret]
df = pd.DataFrame(ret)
_toDatetime(df)
return df | def sentimentDF(symbol, type='daily', date=None, token='', version=''):
'''This endpoint provides social sentiment data from StockTwits. Data can be viewed as a daily value, or by minute for a given date.
https://iexcloud.io/docs/api/#social-sentiment
Continuous
Args:
symbol (string); Ticker to request
type (string); 'daily' or 'minute'
date (string); date in YYYYMMDD or datetime
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
ret = sentiment(symbol, type, date, token, version)
if type == 'daiy':
ret = [ret]
df = pd.DataFrame(ret)
_toDatetime(df)
return df | [
"This",
"endpoint",
"provides",
"social",
"sentiment",
"data",
"from",
"StockTwits",
".",
"Data",
"can",
"be",
"viewed",
"as",
"a",
"daily",
"value",
"or",
"by",
"minute",
"for",
"a",
"given",
"date",
"."
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/alternative.py#L61-L82 | [
"def",
"sentimentDF",
"(",
"symbol",
",",
"type",
"=",
"'daily'",
",",
"date",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"ret",
"=",
"sentiment",
"(",
"symbol",
",",
"type",
",",
"date",
",",
"token",
",",
"version",
")",
"if",
"type",
"==",
"'daiy'",
":",
"ret",
"=",
"[",
"ret",
"]",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"ret",
")",
"_toDatetime",
"(",
"df",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | statsDF | https://iexcloud.io/docs/api/#stats-intraday
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stats.py | def statsDF(token='', version=''):
'''https://iexcloud.io/docs/api/#stats-intraday
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(stats(token, version))
_toDatetime(df)
return df | def statsDF(token='', version=''):
'''https://iexcloud.io/docs/api/#stats-intraday
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(stats(token, version))
_toDatetime(df)
return df | [
"https",
":",
"//",
"iexcloud",
".",
"io",
"/",
"docs",
"/",
"api",
"/",
"#stats",
"-",
"intraday"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stats.py#L19-L31 | [
"def",
"statsDF",
"(",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"stats",
"(",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | recentDF | https://iexcloud.io/docs/api/#stats-recent
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stats.py | def recentDF(token='', version=''):
'''https://iexcloud.io/docs/api/#stats-recent
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(recent(token, version))
_toDatetime(df)
_reindex(df, 'date')
return df | def recentDF(token='', version=''):
'''https://iexcloud.io/docs/api/#stats-recent
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(recent(token, version))
_toDatetime(df)
_reindex(df, 'date')
return df | [
"https",
":",
"//",
"iexcloud",
".",
"io",
"/",
"docs",
"/",
"api",
"/",
"#stats",
"-",
"recent"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stats.py#L47-L60 | [
"def",
"recentDF",
"(",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"recent",
"(",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"_reindex",
"(",
"df",
",",
"'date'",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | recordsDF | https://iexcloud.io/docs/api/#stats-records
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stats.py | def recordsDF(token='', version=''):
'''https://iexcloud.io/docs/api/#stats-records
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(records(token, version))
_toDatetime(df)
return df | def recordsDF(token='', version=''):
'''https://iexcloud.io/docs/api/#stats-records
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(records(token, version))
_toDatetime(df)
return df | [
"https",
":",
"//",
"iexcloud",
".",
"io",
"/",
"docs",
"/",
"api",
"/",
"#stats",
"-",
"records"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stats.py#L76-L88 | [
"def",
"recordsDF",
"(",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"records",
"(",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | summary | https://iexcloud.io/docs/api/#stats-historical-summary
Args:
token (string); Access token
version (string); API version
Returns:
dict: result | pyEX/stats.py | def summary(date=None, token='', version=''):
'''https://iexcloud.io/docs/api/#stats-historical-summary
Args:
token (string); Access token
version (string); API version
Returns:
dict: result
'''
if date:
if isinstance(date, str):
return _getJson('stats/historical?date=' + date, token, version)
elif isinstance(date, datetime):
return _getJson('stats/historical?date=' + date.strftime('%Y%m'), token, version)
else:
raise PyEXception("Can't handle type : %s" % str(type(date)), token, version)
return _getJson('stats/historical', token, version) | def summary(date=None, token='', version=''):
'''https://iexcloud.io/docs/api/#stats-historical-summary
Args:
token (string); Access token
version (string); API version
Returns:
dict: result
'''
if date:
if isinstance(date, str):
return _getJson('stats/historical?date=' + date, token, version)
elif isinstance(date, datetime):
return _getJson('stats/historical?date=' + date.strftime('%Y%m'), token, version)
else:
raise PyEXception("Can't handle type : %s" % str(type(date)), token, version)
return _getJson('stats/historical', token, version) | [
"https",
":",
"//",
"iexcloud",
".",
"io",
"/",
"docs",
"/",
"api",
"/",
"#stats",
"-",
"historical",
"-",
"summary"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stats.py#L91-L108 | [
"def",
"summary",
"(",
"date",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"if",
"date",
":",
"if",
"isinstance",
"(",
"date",
",",
"str",
")",
":",
"return",
"_getJson",
"(",
"'stats/historical?date='",
"+",
"date",
",",
"token",
",",
"version",
")",
"elif",
"isinstance",
"(",
"date",
",",
"datetime",
")",
":",
"return",
"_getJson",
"(",
"'stats/historical?date='",
"+",
"date",
".",
"strftime",
"(",
"'%Y%m'",
")",
",",
"token",
",",
"version",
")",
"else",
":",
"raise",
"PyEXception",
"(",
"\"Can't handle type : %s\"",
"%",
"str",
"(",
"type",
"(",
"date",
")",
")",
",",
"token",
",",
"version",
")",
"return",
"_getJson",
"(",
"'stats/historical'",
",",
"token",
",",
"version",
")"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
valid | summaryDF | https://iexcloud.io/docs/api/#stats-historical-summary
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result | pyEX/stats.py | def summaryDF(date=None, token='', version=''):
'''https://iexcloud.io/docs/api/#stats-historical-summary
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(summary(date, token, version))
_toDatetime(df)
return df | def summaryDF(date=None, token='', version=''):
'''https://iexcloud.io/docs/api/#stats-historical-summary
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(summary(date, token, version))
_toDatetime(df)
return df | [
"https",
":",
"//",
"iexcloud",
".",
"io",
"/",
"docs",
"/",
"api",
"/",
"#stats",
"-",
"historical",
"-",
"summary"
] | timkpaine/pyEX | python | https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stats.py#L111-L123 | [
"def",
"summaryDF",
"(",
"date",
"=",
"None",
",",
"token",
"=",
"''",
",",
"version",
"=",
"''",
")",
":",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"summary",
"(",
"date",
",",
"token",
",",
"version",
")",
")",
"_toDatetime",
"(",
"df",
")",
"return",
"df"
] | 91cf751dafdb208a0c8b5377945e5808b99f94ba |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.