Skip to content

API issues #2

Open
Open
@chasealanbrown

Description

After realizing that a simple mkdir db command is required (This is a simple fix that can be added to the package), there is some trouble regarding the API.

The input/api.json file shows ..."morningstar.com/api/v2/search/"... being used for the REST API, which doesn't appear to be functional anymore.

Here is the output when running now:

=================================================================
====================== Welcome to msTables ======================

Available actions:

0 - Change database file name (current name = 'mstables.sqlite')
1 - Create database tables and import latest symbols
2 - Download Morningstar data into database
3 - Erase all records from database tables
4 - Delete all database tables
5 - Erase all downloaded history from 'Fetched_urls' table
6 - Create a database back-up file

=================================================================
Enter action no.:
2

Qty. of records to be updated:
1000000

Qty. of records pending update per API no.:

      Pending
API          
1      88,701
2      88,701
3      88,701
4     138,312
5     138,312
6     138,312
7     138,312
8     138,312
9      34,032
10    138,312
11    138,312
12    138,312
13    138,312
14    138,312
15    138,312
16    138,312

Total URL requests pending =	1,959,879
Total URL requests planned =	1,959,879


Run 1 / 817	(150 requests per API per run = 2400 requests per run)
 - Success rate:	0 out of 2,400 (0.0%)
 - Fetch Duration:	48.57 sec
 - Total Duration:	48.59 sec
 - Speed:		0.00 records/sec

Run 2 / 817
 - Success rate:	0 out of 2,400 (0.0%)
 - Fetch Duration:	41.45 sec
 - Total Duration:	41.47 sec
 - Speed:		0.00 records/sec

Run 3 / 817
 - Success rate:	0 out of 2,400 (0.0%)
 - Fetch Duration:	41.82 sec
 - Total Duration:	41.84 sec
 - Speed:		0.00 records/sec

In order to fix this, it seems that a large re-write of the package would be neccessary. This would likely be fruitful, as it appears that authentication is required now for morningstar API access, and it would also make this code far more simple and readable using something such as https://github.com/aaaccell/morningstar in order to make the calls.

One simple and fast suggestion is to provide a link to the resulting sqlite3 file via dropbox or torrent at specified yearly / monthly intervals, in case some users are incapable of creating the database due to changes in the API or other issues.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions