example of snapshot using the endpoint

All,

I am trying to use an endpoint to get snapshot of the 'YIELD' fid of few RICs(e.g. SPY, DIA).

I believe the appropriate endpoint is https://api.refinitiv.com/data/pricing/snapshots/v1/ but not sure and could not find full example.

Can you please share an example using Python?

Thanks

Moti


Best Answer

  • nick.zincone
    nick.zincone admin
    Answer ✓

    Hi @Moti.Konak

    If you are accessing this content directly from RDP (Platform session) and are a Wealth client, you should have access to the 'data/pricing/snapshots/v1/' endpoint. If so, you can follow the Pricing Snapshot example. Otherwise, if you have access to streaming data, you can follow the "Alternative method for Snapshot data" within that same example.

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Moti.Konak

    If you would like to use the REST API call directly, you can access the API playground and select the /data/pricing/snapshots/v1/ endpoint.

    The playground can generate the sample Python code.

    https://api.refinitiv.com/data/pricing/snapshots/v1/?universe=/SPY,/DIA&fields=YIELD


    1707970367848.png

    I used delayed RICs: /SPY and /DIA because I don't have permission to access those real-time RICs.

  • Thanks Both!!

    I am getting the following error while using the rest API copied from the playground into Python :

    {"error":{"id":"e1f34f35-ef10-41ca-991a-90c451992b78","code":"insufficient_scope","message":"access denied. Scopes required to access the resource: [trapi.data.pricing.read]. Missing scopes: [trapi.data.pricing.read]","status":"Forbidden"}}

    Also, the "send" button is grayed out for me in the API Playground using //data/pricing/snapshots/v1/ endpoint.

    Do I have a permission issue? if so, what kind of permission do I need to ask for?

    Thanks

    Moti

  • Hi @Moti.Konak

    You are not permissioned for this service. In my above answer, you can try to use the streaming service instead using the alternative approach mechanism. If you want to go the route of getting permission via that snapshot endpoint, you have to reach out to your account representative and request you need access to the snapshot service.

  • maxma
    maxma Newcomer

    i got the same question, if we want to get some stock like `CBA.AX`, what should i input after "universe"?

    is it `/CBA.AX=`?

  • Hello @maxma

    The answered question will not be monitored. Please post a new question next time.

    The RDP /data/pricing/snapshots/v1/ endpoint supports both HTTP GET and HTTP POST request as follows:

    HTTP GET:

    You can just input CBA.AX RIC Code after the universe query parameter (without "=" suffix).

    get.png

    HTTP POST:

    post.png

    Note: The RIC codes with "=" suffix are the Currency RICs such as THB=, HKD=, etc.


  • maxma
    maxma Newcomer

    this is my result, is it because i don't have permission?

    1724152049561.png

  • Hello @maxma

    Yes, the error indicates that your RDP account does not have a permission to request this CBA.AX RIC (and possibly others *.AX RICs too).

    Please contact your LSEG representative or Account Manager to fix this permission issue for you.