Skip to main content

Python library to download historical data from

Project description


Build Status

Python client library to download data from


  • Contracts lookup by market categories, id, code, name or their combinations using a rich set of mathching options
  • Download data of any timeframe available on ranging from ticks to monthly resolution


  • pip install finam-export

Samples provided

  • samples/ - simply lists some contracts from every supported market
  • samples/ - downloads some data and prints it out
  • samples/ - shows how you can leverage lookup capabilities

Utility scripts

  • scripts/ - feature-rich standalone script to download finam's data
  • scripts/ - to quickly check what's availble on finam

Show me something working!

Here's the output

*** Current Russian ruble exchange rates ***
        <DATE>    <TIME>  <OPEN>  <HIGH>  <LOW>  <CLOSE>      <VOL>
2163  20200911  00:00:00   75.19   75.19  74.72    74.95  765709000
*** Current Brent Oil price ***
        <DATE>    <TIME>  <OPEN>  <HIGH>  <LOW>  <CLOSE>   <VOL>
4206  20200911  00:00:00   39.96   40.34  39.38    39.92  114897

and here's the code producing this output:

import logging

from finam.export import Exporter, Market, LookupComparator

Full-on example displaying up-to-date values of some important indicators

def main():
    exporter = Exporter()
    print('*** Current Russian ruble exchange rates ***')
    rub = exporter.lookup(name='USDRUB_TOD', market=Market.CURRENCIES)
    assert len(rub) == 1
    data =[0], market=Market.CURRENCIES)

    print('*** Current Brent Oil price ***')
    oil = exporter.lookup(name='Brent', market=Market.COMMODITIES,
    assert len(oil) == 1
    data =[0], market=Market.COMMODITIES)

if __name__ == '__main__':

Playing samples

If you have cloned it from github:

pip install -r ./requirements.txt
PYTHONPATH=. ./samples/

Technical details

  • Targeted to Linux/Mac
  • Uses pandas inside, all data returned is pandas DataFrames
  • Tested with python3.6+
  • Good tests coverage
  • Detailed logging of what's going on


  • clone the repo
  • pip install -r ./requirements.txt
  • run tests to ensure all is fine
  • nosetests
  • go ahead and enhance it!
  • don't forget to cover your changes with tests

Project details

Download files

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

Files for finam-export, version 3.0.1
Filename, size File type Python version Upload date Hashes
Filename, size finam-export-3.0.1.tar.gz (8.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page