question

Upvote
Accepted
33 0 1 8

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.

Upvote
Accepted
19k 85 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
85.2k 290 53 77

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

Upvote
33 0 1 8

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
19k 85 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.

Upvotes
1 0 0 2

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=`?

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
27.2k 65 17 14

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.



get.png (24.2 KiB)
post.png (51.6 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.

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

1724152049561.png

1724152049561.png (125.0 KiB)
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.

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.