EIKON API just hangs and nothing happens

Hi Team, One of our users experiencing following issue with Eikon API - iibrary(eikonapir). He says that when he runs the api, it just hangs without any error messages, etc. Also no issues when running in his colleagues pc. Looks like it is the user's pc or R package issue, but what else can cause these types of idiosyncratic problems? Your input will be highly appreciated. Thanks!

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @bob.kim

    First, we need to verify if this is a problem in the R environment or eikonapir module.

    The client can run the below code with the httr module to get data from Eikon.

    library(httr)
    APP_KEY <- "<api_key>"
    URL <- "http://localhost:9000/api/v1/data&quot;
    Body <- '{
            "Entity": {
                "E": "DataGrid",
                "W": {
                    "fields": [
                        {
                            "name": "CF_BID"
                        }
                    ],
                    "instruments": [
                        "AAPL.O"
                    ]
                }
            }
        }'
    Response <- httr::POST(URL,
                     add_headers("x-tr-applicationid" = APP_KEY),
                     content_type_json(),
                     body = Body)
    data <- httr::content(Response, "parsed", "application/json", encoding="UTF-8")

    If this code doesn't work, it could be a problem in the client's environment, not in eikonapir.

Answers

  • Hi @bob.kim

    The eikonapir is a community contribute package.

    Please redirect the user to post their questions to the contributor (I believe it is on Github).