question

Upvote
Accepted
16 0 0 1

Missing scopes

Good day!

We try to pull data from “Refinitiv Data Library for .Net" to get prices for "TRADEWEB 30-YR GNMA II".


Following your instructions here’s the code we use:


var instruments = new string[]

{

"USG23015=TWEB",

"USG230151=TWEB",

"USG230152=TWEB",

"USG23015RA=TWEB",

"USG23015RB=TWEB",

"USG23020=TWEB",

"USG230201=TWEB",

"USG230202=TWEB",

"USG23020RA=TWEB",

"USG23020RB=TWEB",

"USG23025=TWEB",

"USG230251=TWEB",

"USG230252=TWEB",

"USG23025RA=TWEB",

"USG23025RB=TWEB",

"USG23030=TWEB",

"USG230301=TWEB",

"USG230302=TWEB",

"USG23030RA=TWEB",

"USG23030RB=TWEB"

};


var fields = new string[]

{

"COUPN_RATE",

"GEN_TEXT16",

"RTR_OPN_PR",

"CF_BID",

"CF_ASK",

"VALUE_TS1"

};


var prices = Pricing.Definition(instruments).Fields(fields).GetData();



And we get the following error message:

{"HttpStatus":{"HTTPStatusCode":403,"HTTPReason":"Forbidden","Contents":{"error":{"id":"61747cd8-d51e-415c-afab-03235bf87e45","code":"insufficient_scope","message":"access denied. Scopes required to access the resource: [trapi.data.pricing.read]. Missing scopes: [trapi.data.pricing.read]","status":"Forbidden"}}},"HttpHeaders":[{"Key":"Date","Value":["Tue, 30 Aug 2022 15:55:02 GMT"]},{"Key":"Connection","Value":["keep-alive"]},{"Key":"Access-Control-Allow-Origin","Value":["*"]},{"Key":"Access-Control-Expose-Headers","Value":["X-Amzn-Trace-Id, X-Served-By, X-Tr-Requestid, Server"]},{"Key":"Server","Value":["edsgw"]},{"Key":"WWW-Authenticate","Value":["Bearer realm=\"POST /data/pricing/snapshots/v1\", scope=\"trapi.data.pricing.read\", error=\"insufficient_scope\", error_description=\"one or more scopes required to access the resource are missing for the provided token\""]},{"Key":"X-Amzn-Trace-Id","Value":["Root=1-630e32d6-573dab5207e053597688e7a5"]},{"Key":"X-Served-By","Value":["region=us-east-1; cid=268f41263ff945358b8896782d30dbea"]},{"Key":"X-Tr-Requestid","Value":["61747cd8-d51e-415c-afab-03235bf87e45"]}],"IsSuccess":false,"Data":null}

Library: “Refinitiv Data Library for .Net"

Language:. Net Core 6 / C#

Environment: Windows

refinitiv-data-platform-libraries
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.

1 Answer

Upvotes
Accepted
8.1k 15 5 8

hi @alexander.suslov ,

trapi.data.pricing is required for getting price data for an instrument and seems like your account doesn't cover this scope. I'm asking your Refinitiv Account Manager to contact you regarding access to the product.

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.