Code Monkey home page Code Monkey logo

Comments (2)

LautaroParada avatar LautaroParada commented on July 27, 2024

Hi @fabmeyer ,

As far as I understand, do you want to filter the response fields of get_search_instrument by explicitly declaring the parameters? Like the get_fundamental_equity method (can you confirm if that is correct?)

# Stock - request the quarterly statements
resp = client.get_fundamental_equity('AAPL.US', filter_='Financials::Balance_Sheet::quarterly')

If my understanding of your question is correct, I'm afraid it is not possible to include the filter. The documentation says that this method (and consequently the URL) only allows the following parameters: query_string, limit, bonds_only, exchange, type (This one is redundant with bonds_only, I do not recommend type). This characteristic is by default, and I can't do anything.

Despite that, If you still want to filter by some desired fields, the following code may help you:

import os
# load the key from the environment variables
from eod import EodHistoricalData
# import the key from the environment variables
api_key_eod = os.environ['API_EOD']
# Create the instance. You can always write directly the API key, but that's not secure.
client = EodHistoricalData(api_key_eod)

# I'm going to assume that you want companies related to blockchain
import pandas as pd
print( pd.DataFrame(client.get_search_instrument(query_string='blockchain'))[['Code', 'Name']] )

If the EOD API implements this optionality in the future, I will certainly include it in the get_search_instrument method.

I hope it helps.

from eod-data.

fabmeyer avatar fabmeyer commented on July 27, 2024

OK thanks for your time and effort.

from eod-data.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.