Skip to main content

BoC Valet API Wrapper

Project description


Coverage Status

Simple, pandas integrated API wrapper for the Bank of Canada Valet API.

Their documentation page can be found here


To install this package

Getting Started:

To get started using pyvalet, simply open up a new python file and type:

from pyvalet import ValetInterpreter

vi = ValetInterpreter()

This will be your interface with all the features of pyvalet.

To see what sort of data is available, try running one of the following commands:



These two commands will provide you with a pandas DataFrame containing all possible series, or groups to explore using the Valet API. The three fields output are 'name', 'label' and 'link'.

The first time you run these commands, the ValetInterpreter will cache them so there is no need to assign the output, unless you plan to filter these lists.

They can be accessed through:



To get more details about these series or groups, the get_series_detail() or get_group_detail() methods are available

df = vi.get_series_detail("FXUSDCAD", response_format='csv')

df_group, df_series = vi.get_group_detail("FX_RATES_DAILY", response_format='csv')

The output of .get_series_detail() is a pandas DataFrame containing, among other things, the name and description of a given series.

The output of .get_group_detail() is one pandas Series, and one DataFrame. The Series containing details about the group itself, and the DataFrame containing the same information about all series in the group.

Diving even deeper, you can pull observations from these series or groups using the get_series_observations() and get_groups_observations() methods.

df_series, df = vi.get_series_observations("FXUSDCAD", response_format='csv')
df = vi.get_group_observations("FX_RATES_DAILY", response_format='csv')

Additional keyword arguments can be passed to alter the query. See the docstrings for more information.

Like the methods for group details, the output of get_series_observations() is one pandas Series, and one DataFrame. The Series contains the details for the series queries, and the DataFrame contains the observations themselves.

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyvalet, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size pyvalet-0.1-py3-none-any.whl (6.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pyvalet-0.1.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page