@@ -128,112 +128,6 @@ def search_endpoint(self, keywords, datatype='json'):
128128 'keywords' : keywords , 'datatype' : datatype }
129129 return self .get (params )
130130
131- def historic_fx_quotes (
132- self , from_symbol , to_symbol , outputsize = 'full' ,
133- cadence = 'daily' , output_format = None
134- ):
135- ''' Returns one of the FX_* endpoints of the Alpha Vantage API.
136-
137- Params:
138- from_currency: The symbol to convert
139- to_currency: The symbol to convert to
140- cadence: Choose between ['daily', 'weekly', 'monthly']
141- output_format: Choose between['json', 'csv', 'pandas']
142-
143- Returns:
144- pandas, csv, or json
145- '''
146- if output_format :
147- self ._foreignexchange .output_format = output_format
148- if cadence == 'daily' :
149- data , _ = self ._foreignexchange .get_currency_exchange_daily (
150- from_symbol = from_symbol ,
151- to_symbol = to_symbol ,
152- outputsize = outputsize
153- )
154- if cadence == 'weekly' :
155- data , _ = self ._foreignexchange .get_currency_exchange_weekly (
156- from_symbol = from_symbol ,
157- to_symbol = to_symbol ,
158- outputsize = outputsize
159- )
160- if cadence == 'monthly' :
161- data , _ = self ._foreignexchange .get_currency_exchange_monthly (
162- from_symbol = from_symbol ,
163- to_symbol = to_symbol ,
164- outputsize = outputsize
165- )
166- return data
167-
168- def intraday_fx_quotes (
169- self , from_symbol , to_symbol , interval = '5min' ,
170- outputsize = 'full' , output_format = None
171- ):
172- ''' Returns the FX_INTRADAY endpoint of the Alpha Vantage API.
173-
174- Params:
175- from_currency: The symbol to convert
176- to_currency: The symbol to convert to
177- interval: Choose between['1min', '5min', '15min', '30min', '60min']
178- output_format: Choose between['json', 'csv', 'pandas']
179-
180- Returns:
181- pandas, csv, or json
182- '''
183- if output_format :
184- self ._foreignexchange .output_format = output_format
185- data , _ = self ._foreignexchange .get_currency_exchange_intraday (
186- from_symbol = from_symbol ,
187- to_symbol = to_symbol ,
188- interval = interval ,
189- outputsize = outputsize
190- )
191- return data
192-
193- def exchange_rate (self , from_currency , to_currency ):
194- ''' Returns the exchange rate of two currencies, digital or physical.
195- CURRENCY_EXCHANGE_RATE endpoint of the Alpha Vantage API
196-
197- Params:
198- from_currency: The symbol to convert
199- to_currency: The symbol to convert to
200-
201- Returns:
202- json
203- '''
204- params = {'function' : "CURRENCY_EXCHANGE_RATE" ,
205- 'from_currency' : from_currency , 'to_currency' : to_currency }
206- data = self .get (params )
207- return data
208-
209- def historic_cryptocurrency_quotes (
210- self , symbol , market , cadence = 'daily' , output_format = None
211- ):
212- ''' Returns one of the DIGITAL_CURRENCY_* endpoints of the
213- Alpha Vantage API.
214-
215- Params:
216- symbol: The cryptocurrency to return
217- market: The market it's being sold on
218- cadence: Choose between ['daily', 'weekly', 'monthly']
219- output_format: Choose between['json', 'csv', 'pandas']
220-
221- Returns:
222- pandas, csv, or json
223- '''
224- if output_format :
225- self ._cryptocurrencies .output_format = output_format
226- if cadence == 'daily' :
227- data , _ = self ._cryptocurrencies .get_digital_currency_daily (
228- symbol = symbol , market = market )
229- if cadence == 'weekly' :
230- data , _ = self ._cryptocurrencies .get_digital_currency_weekly (
231- symbol = symbol , market = market )
232- if cadence == 'monthly' :
233- data , _ = self ._cryptocurrencies .get_digital_currency_monthly (
234- symbol = symbol , market = market )
235- return data
236-
237131 def techindicators (
238132 self , techindicator = 'SMA' , output_format = 'json' , ** kwargs
239133 ):
0 commit comments