GithubHelp home page GithubHelp logo

nhedlund / intrinio Goto Github PK

View Code? Open in Web Editor NEW
32.0 32.0 13.0 47 KB

Intrinio Python client SDK (unofficial)

License: MIT License

Python 96.92% Shell 1.94% PowerShell 1.13%
intrinio intrinio-api market-data

intrinio's People

Contributors

dependabot[bot] avatar nhedlund avatar sihangpu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

intrinio's Issues

Unable to set API Username/Password at Runtime

The README needs to be updated, the following doesn't work

import intrinio
intrinio.username = 'USERNAME_FROM_INTRINIO'
intrinio.password = 'PASSWORD_FROM_INTRINIO'

Replace with

import intrinio
intrinio.client.username = 'USERNAME_FROM_INTRINIO'
intrinio.client.password = 'PASSWORD_FROM_INTRINIO'

FYI, I'm running Python 3.5.0

Parsing the 'date' column?

(full disclosure, I'm a complete scrub at python)

So when I query the historical endpoint, I get a the following dataframe:

screen shot 2017-07-17 at 4 22 28 pm

But when I try to get the columns, I'm not really getting date columns. The only columns I get is:
screen shot 2017-07-17 at 4 23 39 pm

When I try getting the date column, I get the following error: KeyError: "['date'] not in index"

Is this an issue dealing with the dtype='object'? Any chance anyone knows how to extract the date column for the dataframe (using pandas)?

pip installation on remote server throws package not found error

remote:        Collecting intrinio==0.1.14 (from -r /tmp/build_e74cdbc82006a71a2a1e42669e8f527a/requirements.txt (line 6))
remote:          Downloading intrinio-0.1.14.tar.gz
remote:            Complete output from command python setup.py egg_info:
remote:            Traceback (most recent call last):
remote:              File "<string>", line 1, in <module>
remote:              File "/tmp/pip-build-wysyxkzd/intrinio/setup.py", line 9, in <module>
remote:                import pypandoc
remote:            ModuleNotFoundError: No module named 'pypandoc'
remote:
remote:            ----------------------------------------
remote:        Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-wysyxkzd/intrinio/
remote:  !     Push rejected, failed to compile Python app.

KeyError: 'total_pages'

When making a call like this to intrinio API

https://api.intrinio.com/data_point?identifier=AERI&item=marketcap,enterprisevalue,ask_price

Note response does not have total_pages at all

{  
   "data":[  
      {  
         "identifier":"AERI",
         "item":"marketcap",
         "value":2053125654.3
      },
      {  
         "identifier":"AERI",
         "item":"enterprisevalue",
         "value":1894659654.3
      },
      {  
         "identifier":"AERI",
         "item":"ask_price",
         "value":57.0
      }
   ],
   "result_count":3,
   "api_call_credits":3
}

When using library like this:

 intrinio.get('data_point', identifier='AERI', item='=marketcap,enterprisevalue,ask_price')

this line raises an error: KeyError: 'total_pages'

page.total_pages = response['total_pages']

Suggestion: using default value 1 should solve the issue in such cases:

page.total_pages = response.get('total_pages', 1)

cannot retrieve economic data with get function

I am trying to get historical data for $VXTYN using:
df = intrinio.get(identifier='$VXTYN', start_date='2016-01-01')
TypeError: get() missing 1 required positional argument: 'endpoint'
not sure what argument is required. can you please help me out?

Using Financials for TTM returns a TypeError

Hi - When I use the financials function to retrieve data for TTM and for YTD data, I get an error when the data is sorted. The other time periods appear to work fine.

The traceback is below. I'm using Python 3.6.

Thanks!

Traceback (most recent call last):

File "", line 1, in
financials_test = intrinio.financials('AAPL', type = 'TTM') #, type = 'TTM', statement = 'calculations')

File "C:\ProgramData\Anaconda3\lib\site-packages\intrinio\endpoints.py", line 153, in financials
r = r.sort_index()

File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\frame.py", line 3260, in sort_index
na_position=na_position)

File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\sorting.py", line 247, in nargsort
indexer = non_nan_idx[non_nans.argsort(kind=kind)]

TypeError: '<' not supported between instances of 'tuple' and 'int'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.