Skip to content

Commit ab9ab20

Browse files
committed
remove the alpha vantage integration from this package
1 parent 0605371 commit ab9ab20

20 files changed

+1
-2473
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ The Alpaca SDK will check the environment for a number of variables which can be
6666
| APCA_RETRY_CODES=429,504 | 429,504 | comma-separated HTTP status code for which retry is attempted |
6767
| POLYGON_WS_URL | wss://socket.polygon.io/stocks | Endpoint for streaming polygon data. You likely don't need to change this unless you want to proxy it for example |
6868
| POLYGON_KEY_ID | | Your Polygon key, if it's not the same as your Alpaca API key. Most users will not need to set this to access Polygon. |
69-
| ALPHAVANTAGE_API_KEY=<key_id> | | Your Alpha Vantage API key. You can get [one for free here](https://www.alphavantage.co/support/#api-key). |
7069

7170
## REST
7271

@@ -406,67 +405,6 @@ dict[symbol -> `Financials`] if `symbol` is a list of string.
406405
### polygon/REST.news(symbol)
407406
Returns a `NewsList` entity for the symbol.
408407

409-
410-
---
411-
# Alpha Vantage API Service
412-
413-
In addition to Polygon is Alpha Vantage, for users without a live account (paper trading) or want to use the unique features of AV data. You can get a free key [here](https://www.alphavantage.co/support/#api-key) and the documentation is [here](https://www.alphavantage.co/documentation/). Premium keys are also available [here](https://www.alphavantage.co/premium/#intro)
414-
This python SDK wraps their API service and seamlessly integrates it with the Alpaca
415-
API. `alpaca_trade_api.REST.alpha_vantage` will be the `REST` object for Alpha Vantage.
416-
417-
The example below gives AAPL daily OHLCV data in a DataFrame format.
418-
419-
```py
420-
import alpaca_trade_api as tradeapi
421-
422-
api = tradeapi.REST()
423-
aapl = api.alpha_vantage.historic_quotes('AAPL', adjusted=True, output_format='pandas')
424-
```
425-
426-
## alpha_vantage/REST
427-
It is initialized through alpaca `REST` object.
428-
429-
### alpha_vantage/REST.get(params=None)
430-
Customizable endpoint, where you can pass all keywords/paramters from the documentation:https://www.alphavantage.co/documentation/#
431-
432-
Returns the specific customized data.
433-
434-
### alpha_vantage/REST.historic_quotes(symbol, adjusted=False, outputsize='full', cadence='daily', output_format=None)
435-
Returns a `csv`, `json`, or `pandas` object of historical OHLCV data.
436-
437-
### alpha_vantage/REST.intraday_quotes(symbol, interval='5min', outputsize='full', output_format=None)
438-
Returns a `csv`, `json`, or `pandas` object of intraday OHLCV data.
439-
440-
### alpha_vantage/REST.current_quote(symbol)
441-
Returns a `json` object with the current OHLCV data of the selected symbol.
442-
443-
### alpha_vantage/REST.last_quote(symbol)
444-
Returns a `json` object with the current OHLCV data of the selected symbol (same as `current_quote`).
445-
446-
### alpha_vantage/REST.search_endpoint(keywords, datatype='json')
447-
Returns a `csv`, `json`, or `pandas` object that contains the best-matching symbols and market information based on keywords of your choice.
448-
449-
### alpha_vantage/REST.company(symbol, datatype='json')
450-
Same as `search_endpoint`.
451-
452-
### alpha_vantage/REST.historic_fx_quotes(from_symbol, to_symbol, outputsize='full', cadence='daily', output_format=None)
453-
Returns a `csv`, `json`, or `pandas` object of historical OHLCV data for the currency pair.
454-
455-
### alpha_vantage/REST.intraday_fx_quotes(from_symbol, to_symbol, interval='5min', outputsize='full', output_format=None)
456-
Returns a `csv`, `json`, or `pandas` object of intraday OHLCV data for the currency pair.
457-
458-
### alpha_vantage/REST.exchange_rate(from_currency, to_currency)
459-
Returns a `json` object with the current OHLCV data of the selected currency pair (digital or physical)
460-
461-
### alpha_vantage/REST.historic_cryptocurrency_quotes(self, symbol, market, cadence='daily', output_format=None)
462-
Returns a `csv`, `json`, or `pandas` object of historical OHLCV data for the cryptocurrency pair.
463-
464-
### alpha_vantage/REST.techindicators(self, techindicator='SMA', output_format='json', **kwargs)
465-
Returns a `csv`, `json`, or `pandas` object with the data from the techindicator of choice.
466-
467-
### alpha_vantage/REST.sector()
468-
Returns a `json` of the currrency sector performances.
469-
470408
## Support and Contribution
471409

472410
For technical issues particular to this module, please report the

β€Žalpaca_trade_api/alpha_vantage/__init__.pyβ€Ž

Lines changed: 0 additions & 1 deletion
This file was deleted.

β€Žalpaca_trade_api/alpha_vantage/rest.pyβ€Ž

Lines changed: 0 additions & 155 deletions
This file was deleted.

β€Žalpaca_trade_api/common.pyβ€Ž

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,6 @@ def get_polygon_credentials(alpaca_key: str = None) -> str:
101101
return key_id
102102

103103

104-
def get_alpha_vantage_credentials(alpha_vantage_key: str = None) -> str:
105-
key_id = alpha_vantage_key or os.environ.get('ALPHAVANTAGE_API_KEY')
106-
if key_id is None:
107-
raise ValueError('Key ID must be given to access Alpha Vantage API'
108-
' (env: ALPHAVANTAGE_API_KEY)')
109-
return key_id
110-
111-
112104
def get_api_version(api_version: str) -> str:
113105
api_version = api_version or os.environ.get('APCA_API_VERSION')
114106
if api_version is None:

β€Žalpaca_trade_api/rest.pyβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
Aggs, Trade, Quote, Watchlist, PortfolioHistory
1717
)
1818
from . import polygon
19-
from . import alpha_vantage
2019

2120
logger = logging.getLogger(__name__)
2221
Positions = List[Position]
@@ -82,7 +81,6 @@ def __init__(self,
8281
'APCA_RETRY_CODES', '429,504').split(',')]
8382
self.polygon = polygon.REST(
8483
self._key_id, 'staging' in self._base_url)
85-
self.alpha_vantage = alpha_vantage.REST(self._key_id)
8684

8785
def _request(self,
8886
method,

β€Žrequirements/requirements.txtβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ requests>2,<3
33
urllib3>1.24,<1.26
44
websocket-client>=0.56.0,<1
55
websockets>=8.0,<9
6-
alpha_vantage>=2,<3
6+

β€Žsetup.pyβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
packages=[
3535
'alpaca_trade_api',
3636
'alpaca_trade_api.polygon',
37-
'alpaca_trade_api.alpha_vantage',
3837
],
3938
install_requires=REQUIREMENTS,
4039
tests_require=REQUIREMENTS_TEST,

β€Žtests/test_alpha_vantage/__init__.pyβ€Ž

Whitespace-only changes.

β€Žtests/test_alpha_vantage/test_data/global_quoteβ€Ž

Lines changed: 0 additions & 14 deletions
This file was deleted.

β€Žtests/test_alpha_vantage/test_data/mock_batch_quotesβ€Ž

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
Β (0)