I am trying to build a dashboard that gets real-time data from Bloomberg using functions like bdp, bdh. I am using blpconnect() to establish a connection with Bloomberg, however, when I deploy the app on shinyapps.io, it gives me an error. The app runs on my local computer though. Log:
2022-07-21T18:16:23.294669+00:00 shinyapps[6670285]: Registered S3 method overwritten by 'quantmod':
**2022-07-21T18:16:23.293756+00:00 shinyapps[6670285]: **
2022-07-21T18:16:23.294230+00:00 shinyapps[6670285]: Attaching package: ‘PerformanceAnalytics’
**2022-07-21T18:16:23.294287+00:00 shinyapps[6670285]: **
2022-07-21T18:16:23.295015+00:00 shinyapps[6670285]: The following object is masked from ‘package:dplyr’:
2022-07-21T18:16:23.294349+00:00 shinyapps[6670285]: The following object is masked from ‘package:graphics’:
2022-07-21T18:16:23.294457+00:00 shinyapps[6670285]: legend
2022-07-21T18:16:23.294611+00:00 shinyapps[6670285]: Loading required package: TTR
2022-07-21T18:16:23.294021+00:00 shinyapps[6670285]: first, last
**2022-07-21T18:16:23.294507+00:00 shinyapps[6670285]: **
**2022-07-21T18:16:23.294960+00:00 shinyapps[6670285]: **
**2022-07-21T18:16:23.293965+00:00 shinyapps[6670285]: **
2022-07-21T18:16:23.294724+00:00 shinyapps[6670285]: method from
**2022-07-21T18:16:23.295071+00:00 shinyapps[6670285]: **
2022-07-21T18:16:23.294908+00:00 shinyapps[6670285]: Attaching package: ‘kableExtra’
2022-07-21T18:16:23.295124+00:00 shinyapps[6670285]: group_rows
2022-07-21T18:16:23.295383+00:00 shinyapps[6670285]: The following object is masked from ‘package:tidyr’:
**2022-07-21T18:16:23.295436+00:00 shinyapps[6670285]: **
2022-07-21T18:16:23.295278+00:00 shinyapps[6670285]: Attaching package: ‘reshape2’
**2022-07-21T18:16:23.295913+00:00 shinyapps[6670285]: **
**2022-07-21T18:16:23.295333+00:00 shinyapps[6670285]: **
**2022-07-21T18:16:23.295541+00:00 shinyapps[6670285]: **
2022-07-21T18:16:23.295969+00:00 shinyapps[6670285]: days, hours, minutes, seconds, years
2022-07-21T18:16:23.295490+00:00 shinyapps[6670285]: smiths
2022-07-21T18:16:23.295661+00:00 shinyapps[6670285]: Please respect the Bloomberg licensing agreement and terms of service.
**2022-07-21T18:16:23.294409+00:00 shinyapps[6670285]: **
**2022-07-21T18:16:23.295174+00:00 shinyapps[6670285]: **
2022-07-21T18:16:23.295595+00:00 shinyapps[6670285]: Rblpapi version 0.3.13 using Blpapi headers 3.8.18.1 and run-time 3.8.18.1.
**2022-07-21T18:16:23.296018+00:00 shinyapps[6670285]: **
**2022-07-21T18:16:23.294781+00:00 shinyapps[6670285]: as.zoo.data.frame zoo **
**2022-07-21T18:16:23.294839+00:00 shinyapps[6670285]: **
**2022-07-21T18:16:23.295224+00:00 shinyapps[6670285]: **
2022-07-21T18:16:23.295763+00:00 shinyapps[6670285]: Attaching package: ‘chron’
**2022-07-21T18:16:23.295814+00:00 shinyapps[6670285]: **
2022-07-21T18:16:23.295862+00:00 shinyapps[6670285]: The following objects are masked from ‘package:lubridate’:
**2022-07-21T18:16:23.295713+00:00 shinyapps[6670285]: **
**2022-07-21T18:16:24.292359+00:00 shinyapps[6670285]: **
2022-07-21T18:16:24.292410+00:00 shinyapps[6670285]: Attaching package: ‘DescTools’
**2022-07-21T18:16:24.292458+00:00 shinyapps[6670285]: **
2022-07-21T18:16:24.292512+00:00 shinyapps[6670285]: The following objects are masked from ‘package:tidyquant’:
**2022-07-21T18:16:24.292556+00:00 shinyapps[6670285]: **
2022-07-21T18:16:24.292599+00:00 shinyapps[6670285]: IRR, NPV, PMT
**2022-07-21T18:16:24.292645+00:00 shinyapps[6670285]: **
**2022-07-21T18:16:24.292685+00:00 shinyapps[6670285]: **
**2022-07-21T18:16:24.292765+00:00 shinyapps[6670285]: **
**2022-07-21T18:16:24.292723+00:00 shinyapps[6670285]: 21JUL2022_18:16:24.224 49:140583829202688 ERROR blpapi_platformtransporttcp.cpp:671 blpapi.session.transporttcp.{1}.<127.0.0.1:8194> Connection failed **
**2022-07-21T18:16:24.292806+00:00 shinyapps[6670285]: 21JUL2022_18:16:24.224 49:140583829202688 WARN blpapi_platformcontroller.cpp:371 blpapi.session.platformcontroller.{1} Platform: 0 failed 1 consecutive connect attempts, stopped trying to reconnect. **
2022-07-21T18:16:24.292841+00:00 shinyapps[6670285]: Error in value[3L] : Failed to start session.
2022-07-21T18:16:24.292923+00:00 shinyapps[6670285]: Execution halted
2022-07-21T18:16:24.292882+00:00 shinyapps[6670285]: Calls: local ... tryCatch -> tryCatchList -> tryCatchOne ->
2022-07-21T18:16:24.292961+00:00 shinyapps[6670285]: Shiny application exiting ...
Is there any way to fetch Bloomberg data into the shiny app on the shinyapps.io server?
There is no way to fetch this data on the Shinyapps.io-Server. Since the rblpapi is accessing your local bloomberg instance, which is not running on the shinyapps.io-server, it is not possible for the app to access the data on the server, and this is the reason why your local app version is able to fetch the data. Futhermore, check the Bloomberg license agreement. They are very strict and percise where you are allowed to access and use the provided data. I highly question that you are allowed to use their real time data in an external cloud based app.