question

Upvotes
Accepted
3 0 0 4

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


#technologyrdp-apiendpoint
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @Moti.Konak ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

Upvote
Accepted
17.4k 82 39 63

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
79.2k 251 52 74

@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.


1707970367848.png (43.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
3 0 0 4

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
17.4k 82 39 63

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.