question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does xbbg cache each request?

See original GitHub issue

Hi, I am trying to understand when I make repeated calls like this:

blp.bdib("ESA Index", dt="2020-01-25", session="allday", ref="CME", cache=True)

vs

blp.bdib("ESA Index", dt="2020-01-25", session="allday", ref="CME")

Does it cache the result of these calls? Does the cache argument doing anything?

Thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
alpha-xonecommented, Apr 17, 2021

Thanks for the info. It is fixed in version 0.7.6a8.

2reactions
tagomatechcommented, Apr 20, 2021

Hi. For some reason, I’m also unable to get blp.bdib working.

For example, (Windows user here) I defined properly the BBG_ROOT environment variable, and amended assets.yml and exch.yml to be able to pull Euronext commodities futures series. blp.bdh and blp.bdtick work perfectly well, but blp.bdib returns me OperationalError: unable to open database file whatever the kwargs I may try out.

The example provided in XBBG documentation blp.bdib(ticker='BHP AU Equity', dt='2018-10-17').tail() gets me the same error message.

I’ll continue to dig as I need those data (!), but any help is much welcome indeed!

Many thanks. tag

Ok, so I got it working. It was a simple sqlite3 connection issue, more specifically with the command with db.SQLite(f'{data_path}/Logs/xbbg.db') as con: in \xbbg\core\trials.py

The thing is that I hadn’t any Logs folder. So I manually created one, \xbbg\markets\Logs (location depending on BBG_ROOT).

The code examples in my previous post now work just fine.

Maybe @shadow-of-life-bravo can see whether this would also solve his issue?

Thank you. tag

Read more comments on GitHub >

github_iconTop Results From Across the Web

xbbg — xbbg 0.7.7a2 documentation
0.7.0 - bdh preserves columns orders (both tickers and flds). timeout argument is available for all queries - bdtick usually takes longer to...
Read more >
Build a Real-time Market Monitor with Bloomberg, xbbg, Redis ...
xbbg is an intuitive Bloomberg python API. Redis is an open source, in-memory data structure store, used as a database, cache and message ......
Read more >
blpapi.Session — BLPAPI Python 3.13.1 documentation
If state is Available , all requests will be serviced from a cache and the user may expect to see significantly reduced latency....
Read more >
Per-request cache in Django? - Stack Overflow
Using a custom middleware you can get a Django cache instance guaranteed to be cleared for each request. This is what I used...
Read more >
BLPAPI: Developer's Guide - Bloomberg Professional Services
class of the requested security. 2. The API streams all market data updates to you as they occur and continues to do so...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found