blp | Pythonic interface for Bloomberg Open API

 by   matthewgilbert Python Version: 0.0.3 License: Apache-2.0

kandi X-RAY | blp Summary

kandi X-RAY | blp Summary

blp is a Python library. blp has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. However blp build file is not available. You can install using 'pip install blp' or download it from GitHub, PyPI.

blp provides a simple pythonic interface to the blpapi package. blp is the next iteration of the pdblp package. blp was designed with the following in mind.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              blp has a low active ecosystem.
              It has 48 star(s) with 14 fork(s). There are 6 watchers for this library.
              There were 1 major release(s) in the last 12 months.
              There are 10 open issues and 9 have been closed. On average issues are closed in 59 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of blp is 0.0.3

            kandi-Quality Quality

              blp has 0 bugs and 0 code smells.

            kandi-Security Security

              blp has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              blp code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              blp is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              blp releases are available to install and integrate.
              Deployable package is available in PyPI.
              blp has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions, examples and code snippets are available.
              It has 3456 lines of code, 173 functions and 6 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed blp and discovered the below as its top functions. This is intended to give you an instant insight into blp implemented functionality, and help decide if they suit your requirements.
            • Process the response .
            • Send a request to the Blp API .
            • Create a query .
            • Convert a dictionary to a request .
            • Create a historical data query .
            • Create an interval query .
            • Create an interval request for an interval .
            • Authenticate .
            • Subscribe to a dict .
            • Convert an element into a value .
            Get all kandi verified functions for this library.

            blp Key Features

            No Key Features are available at this moment for blp.

            blp Examples and Code Snippets

            No Code Snippets are available at this moment for blp.

            Community Discussions

            QUESTION

            How to use a list of arguments with flask_smorest/marshmallow
            Asked 2022-Apr-04 at 08:13

            I am trying to insert a collection of objects in a flask api. We use marshmallow for deserializing. My endpoint looks like this:

            ...

            ANSWER

            Answered 2022-Apr-04 at 08:13

            Disclaimer: flask-smorest maintainer speaking.

            I don't think the issue is related to the fact that the input is a list.

            IIUC, your problem is that you're gettings dicts, rather than objects, injected in the view function. This is the default marshmallow behaviour. It can be overridden in marshmallow by using a post_load hook to actually instantiate the object.

            I generally don't do that. In practice I find it better to instantiate objects in the view function. For instance, in a PUT resource, I prefer to instantiate the existing item from DB then update it with new data. In this case it is better to have the new data as dict than object.

            There may not be a single truth, here, it could be a matter of opinion, but while the idea of having the object instantiated in the decorator and passed to the view is appealing, it might be a bit of an abusive shortcut.

            I realize this answer is of the "no idea but you shouldn't do it anyway" type. Just saying laybe you shouldn't struggle to achieve this.

            This said, I'd be surprised if it worked with non-list / non-nested inputs and I'd wonder why it doesn't work specifically in this case.

            Source https://stackoverflow.com/questions/71721999

            QUESTION

            PIL.UnidentifiedImageError: cannot identify image file (when reading 4 band .tif image)
            Asked 2022-Mar-13 at 14:09

            I am working with .tif images. I try to read a .tif image in order to access it later on pixel level and read some values. The error that I get when using Pillow is this:

            ...

            ANSWER

            Answered 2022-Mar-13 at 14:09

            Your image is 4-channels of 32-bits each. PIL doesn’t support such images - see Available Modes here.

            I would suggest tifffile or OpenCV’s cv2.imread(…, cv2.IMREAD_UNCHANGED)

            Source https://stackoverflow.com/questions/71452363

            QUESTION

            Using blp.live with Pyxll Asyncio RTD in python
            Asked 2022-Feb-23 at 17:49

            I am new to Pyxll and Asyncio and having trouble get the following code going. I kept getting the initial value = 0 on the spreadsheet and it's not refreshing. Could you help and let me know what I did wrong? I followed the example from Pyxll's tutorial here: https://www.pyxll.com/docs/userguide/rtd.html#using-the-asyncio-event-loop

            ...

            ANSWER

            Answered 2022-Feb-23 at 17:49

            I figured out with xbbg blp.bdp function which does similar thing. This is a good substitute if you have a massive bbg function pulling RT price. PyXLL allows you to input an array of tickers which saves a lot of time. I hope this could save someone some time :)

            Source https://stackoverflow.com/questions/71231777

            QUESTION

            Bloomberg API FX Forwards NDFs not returning prices
            Asked 2022-Jan-06 at 10:57

            Please can anyone advise how I may retrieve FX Forwards NDF's outright bid / outright ask or indeed any price data for USD/KRW for the 1W, 1M, 3M etc tenors.

            I have attempted to follow the DAPI instructions as well as attempting to find answers via Stackoverflow to no avail. I can however succesfully retrieve live bid asks for SPOT USD KRW or even Equities such as AAPL no problem

            I have tried using different combinations of the tickers, although I see no error codes no actual live prices come back? Please does anyone have any ideas to get live ticking NDF outright prices:

            Any & all help is greatly appreciated :) as Bloomberg seemingly don't provide any assistance

            ['USD/KRW N 2M Curncy'], ['USD/KRW N 3M Curncy'] , ['USD/KRW N 3M ICAP Curncy']

            p.s the Excel Bloomberg formula such as =BFxForward("USDKRW","3M","BidOutright") is essentially what I'm trying to replicate via python, attempting to follow the DAPI instructions seems to not work.

            I have used the C++ BLPAPI pdf examples to attempt to get this working however no NDF examples seemingly exist.

            ...

            ANSWER

            Answered 2022-Jan-06 at 10:57

            This is the KRW FRD screen in the Bloomi Terminal:

            If you hover the mouse over the 3M outright Bid (in the circle), the pop-up shows the underlying ticker to be KWN+3M BGN Curncy.

            When I put this ticker in Excel as: =BDP("KWN+3M BGN Curncy","BID","UpdateFrequency",500) then I get updating bid side pricing which matches the Terminal screen.

            Since the underlying DAPI for Excel and Python is the same, I would guess that this ticker will work with the blpapi too. I usually find it is quicker to test tickers and fields in Excel.

            Source https://stackoverflow.com/questions/70598337

            QUESTION

            Getting data with diferent currencies from Bloomberg API,using python?
            Asked 2021-Nov-29 at 21:10

            I am trying to extract data from Bloomberg. I need data for multiple fields with diferent currencies. I can't get what I need from this answer https://github.com/alpha-xone/xbbg

            Can anyone help, please?. for a "specifc time" and on a "period of time"?

            I tried the following code but it didn't work.

            ...

            ANSWER

            Answered 2021-Nov-29 at 21:10

            It is best to group similar securities together when pulling in historic data. In the OP's question, 'TPXDDVD Index' is a calculated total return index. Hence it will not have the same fields available as the other two, which as their tickers suggest are quoted funds.

            Taking just the two quoted funds, SCTOGAA LN Equity and VAPEJSI ID Equity, we can determine the default currency in which each field is denominated. This being Bloomberg, naming conventions are organic and may not be obvious! The two value fields are FUND_NET_ASSET_VAL and FUND_TOTAL_ASSETS, and the default currency might be different for each.

            We can use the bdp() function to pull back these currencies as follows (NB tickers are in a python list:

            Source https://stackoverflow.com/questions/70150485

            QUESTION

            Python PIL unexpected quit of process when cropping
            Asked 2021-Nov-24 at 16:43

            I am working on a short script which should slice a tiff file in smaller pieces.

            The files are bigger as typical (the biggest file has 16000 x 28800 pixels 1 bit depth)

            My idea is, to crop each of this rectangles and save this as a new file, with the same resolution as the original image

            ...

            ANSWER

            Answered 2021-Nov-24 at 16:25

            It seams PIL and crop has some problems with LZW compression. Removing the compression with Photoshop makes the script running like expected.

            Source https://stackoverflow.com/questions/70088111

            QUESTION

            How to translate a BDS excel-formula to XBBG API for Python
            Asked 2021-Aug-31 at 13:52

            I have the following Bloomberg BDS excel-formula: (";" is substituted with "," due to different settings in excel)

            ...

            ANSWER

            Answered 2021-Aug-31 at 13:52

            You are specifying the parameters incorrectly. The function does not understand the CHAIN_POINTS_OVRD value, so is falling back to the default of 1, which is why the returned dataframe only has one value.

            With xbbg you can usually supply Python types, with the override name becoming the parameter name (no quotes) in the bds call. So in this case the date override can be a datetime value, and the chain points override can be a number.

            Source https://stackoverflow.com/questions/68993926

            QUESTION

            How to add options to bloomberg bdh query using api in python
            Asked 2021-Aug-20 at 09:15

            I have the following excel-formula:

            =@BDH("TSLA US Equity";"IVOL_Delta";start_date;end_date;IVOL_MATURITY=Maturity_90D;IVOL_DELTA_LEVEL=DELTA_LVL_25;IVOL_DELTA_PUT_OR_CALL=IVOL_CALL;days=a;Sort=D;cols=2;rows=1826).

            Where the security is TSLA US Equity, the field is IVOL_Delta, start date and end dates speaks for itself, and the options is the remaining.

            It works just fine in Excel.

            I would like to use the API for python instead, but I don't know how to translate the options to a feasible input, I have tried both as dictionary and as list (could have messed something up though).

            I tried the following code without luck (it works if the if I delete the dict and "options=opt" lines):

            ...

            ANSWER

            Answered 2021-Aug-20 at 09:15

            The output in Excel of this formula:

            =BDH("TSLA US Equity","PX_LAST,IVOL_Delta,VOLUME_TOTAL_CALL",D2,D3,"IVOL_MATURITY","Maturity_90D","IVOL_DELTA_LEVEL","DELTA_LVL_25","IVOL_DELTA_PUT_OR_CALL","IVOL_CALL")

            is:

            You can get the same data using the xbbg package. There are plenty of wrappers for Bloomberg in Python, but this one is my personal favourite (pip install xbbg)

            Source https://stackoverflow.com/questions/68849816

            QUESTION

            Get commodity index futures price on bloomberg api
            Asked 2021-Jun-25 at 14:42

            I need to get open, high, low, close, volume data from bloomberg api for commodities like CL1, S 1, C1...

            Right now, I am doing

            ...

            ANSWER

            Answered 2021-Jun-25 at 14:42

            Xbbg uses an 'exchange' purely as a method for working out the timezone and trading hours for calls to the underlying Bloomberg API (as the API only takes a start and end UTC date/time).

            The reason that "CL1" works and "S 1" doesn't is that the former ticker is listed in the default xbbg assets.yml file. This file provides a lookup of common tickers to identify their trading hours / TZ. The 'exchanges' are listed in exch.yml.

            The parameter name to use for tickers that are not in assets.yml to specify CME is 'ref':

            Source https://stackoverflow.com/questions/68132136

            QUESTION

            GLSL In ThreeJS Mix FragColor With UnrealBloom To Get Selective Glow
            Asked 2021-Apr-15 at 17:32

            I want to implement selective bloom for an imported GLTF model in ThreeJS using an Emission map.

            To achieve this I am supposed to first make the objects that should not have bloom completely black and using the UnrealBloomPass and the ShaderPass I'm going to mix the bloomed and non-bloomed effect passes together somehow.

            I need to use GLSL code, which I'm only barely familiar with. Here is my basic setup:

            View Example In JSFiddle

            ...

            ANSWER

            Answered 2021-Apr-15 at 17:32

            The order for selective bloom is still the same:

            1. Make all non-bloomed objects totally black
            2. Render the scene with bloomComposer
            3. Restore materials/colors to previous
            4. Render the scene with finalComposer

            Patch model's material, having a common uniform, that indicates which render will be used:

            Source https://stackoverflow.com/questions/67110345

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install blp

            You can install from PyPI using. or from conda-forge using.
            Reading the docs is the best way to get started, take a look at Quickstart or if you are having issues Troubleshooting.

            Support

            Please refer to Contributing for guidelines on contributing.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install blp

          • CLONE
          • HTTPS

            https://github.com/matthewgilbert/blp.git

          • CLI

            gh repo clone matthewgilbert/blp

          • sshUrl

            git@github.com:matthewgilbert/blp.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link