This repository has been archived by the owner on Jun 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement SSE streaming, add client and sse examples
- Loading branch information
Showing
8 changed files
with
398 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Client\n", | ||
"All methods from `all.ipynb` that are available on IEXcloud are available as methods on the authenticated client" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import pyEX" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"c = pyEX.Client() # can pass token as argument or pick up from env" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Symbols data" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<div>\n", | ||
"<style scoped>\n", | ||
" .dataframe tbody tr th:only-of-type {\n", | ||
" vertical-align: middle;\n", | ||
" }\n", | ||
"\n", | ||
" .dataframe tbody tr th {\n", | ||
" vertical-align: top;\n", | ||
" }\n", | ||
"\n", | ||
" .dataframe thead th {\n", | ||
" text-align: right;\n", | ||
" }\n", | ||
"</style>\n", | ||
"<table border=\"1\" class=\"dataframe\">\n", | ||
" <thead>\n", | ||
" <tr style=\"text-align: right;\">\n", | ||
" <th></th>\n", | ||
" <th>date</th>\n", | ||
" <th>iexId</th>\n", | ||
" <th>isEnabled</th>\n", | ||
" <th>name</th>\n", | ||
" <th>type</th>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>symbol</th>\n", | ||
" <th></th>\n", | ||
" <th></th>\n", | ||
" <th></th>\n", | ||
" <th></th>\n", | ||
" <th></th>\n", | ||
" </tr>\n", | ||
" </thead>\n", | ||
" <tbody>\n", | ||
" <tr>\n", | ||
" <th>A</th>\n", | ||
" <td>2019-01-24</td>\n", | ||
" <td>IEX_46574843354B2D52</td>\n", | ||
" <td>True</td>\n", | ||
" <td>Agilent Technologies, Inc.</td>\n", | ||
" <td>cs</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>AA</th>\n", | ||
" <td>2019-01-24</td>\n", | ||
" <td>IEX_4238333734532D52</td>\n", | ||
" <td>True</td>\n", | ||
" <td>Alcoa Corp.</td>\n", | ||
" <td>cs</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>AAAU</th>\n", | ||
" <td>2019-01-24</td>\n", | ||
" <td>IEX_474B433136332D52</td>\n", | ||
" <td>True</td>\n", | ||
" <td>Perth Mint Physical Gold ETF</td>\n", | ||
" <td>et</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>AABA</th>\n", | ||
" <td>2019-01-24</td>\n", | ||
" <td>IEX_4E5434354A302D52</td>\n", | ||
" <td>True</td>\n", | ||
" <td>Altaba Inc.</td>\n", | ||
" <td>cef</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>AAC</th>\n", | ||
" <td>2019-01-24</td>\n", | ||
" <td>IEX_4843364642592D52</td>\n", | ||
" <td>True</td>\n", | ||
" <td>AAC Holdings, Inc.</td>\n", | ||
" <td>cs</td>\n", | ||
" </tr>\n", | ||
" </tbody>\n", | ||
"</table>\n", | ||
"</div>" | ||
], | ||
"text/plain": [ | ||
" date iexId isEnabled \\\n", | ||
"symbol \n", | ||
"A 2019-01-24 IEX_46574843354B2D52 True \n", | ||
"AA 2019-01-24 IEX_4238333734532D52 True \n", | ||
"AAAU 2019-01-24 IEX_474B433136332D52 True \n", | ||
"AABA 2019-01-24 IEX_4E5434354A302D52 True \n", | ||
"AAC 2019-01-24 IEX_4843364642592D52 True \n", | ||
"\n", | ||
" name type \n", | ||
"symbol \n", | ||
"A Agilent Technologies, Inc. cs \n", | ||
"AA Alcoa Corp. cs \n", | ||
"AAAU Perth Mint Physical Gold ETF et \n", | ||
"AABA Altaba Inc. cef \n", | ||
"AAC AAC Holdings, Inc. cs " | ||
] | ||
}, | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"c.symbolsDF().head()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"['A', 'AA', 'AAAU', 'AABA', 'AAC', 'AADR', 'AAL', 'AAMC', 'AAME', 'AAN']" | ||
] | ||
}, | ||
"execution_count": 4, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"pyEX.symbolsList()[:10]" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.7.2" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.