How to use the investpy.get_certificate_recent_data function in investpy

To help you get started, we’ve selected a few investpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alvarob96 / investpy / tests / test_investpy.py View on Github external
{
            'as_json': False,
            'order': 'ascending',
        },
        {
            'as_json': True,
            'order': 'descending',
        },
        {
            'as_json': False,
            'order': 'descending',
        },
    ]

    for param in params:
        investpy.get_certificate_recent_data(certificate='COMMERZBANK SG 31Dec99',
                                             country='france',
                                             as_json=param['as_json'],
                                             order=param['order'],
                                             interval='Daily')

        investpy.get_certificate_historical_data(certificate='COMMERZBANK SG 31Dec99',
                                                 country='france',
                                                 from_date='01/01/1990',
                                                 to_date='01/01/2019',
                                                 as_json=param['as_json'],
                                                 order=param['order'],
                                                 interval='Daily')

    params = [
        {
            'certificate': 'COMMERZBANK SG 31Dec99',
github alvarob96 / investpy / tests / test_investpy_errors.py View on Github external
'as_json': False,
            'order': 'ascending',
            'interval': 'Daily'
        },
        {
            'certificate': 'error',
            'country': 'france',
            'as_json': False,
            'order': 'ascending',
            'interval': 'Daily'
        }
    ]

    for param in params:
        try:
            investpy.get_certificate_recent_data(certificate=param['certificate'],
                                                 country=param['country'],
                                                 as_json=param['as_json'],
                                                 order=param['order'],
                                                 interval=param['interval'])
        except:
            pass
        
    params = [
        {
            'certificate': None,
            'country': 'france',
            'from_date': '01/01/2018',
            'to_date': '01/01/2019',
            'as_json': False,
            'order': 'ascending',
            'interval': 'Daily'