User Tools

Site Tools


rest_apis

REST APIs


TEST

restAPITest.js
# https://marketplace.visualstudio.com/items?itemName=humao.rest-client
#
#
# JWJ0215 REST APIs  ********** TEST  TEST  TEST  TEST  TEST  TEST **********
#
@baseUrl = https://api.refinitiv.com @rdpVersion = v1
 
@username = {{$dotenv RDP_USERNAME}} @password = {{$dotenv RDP_PASSWORD}}
 
@client_id = {{$dotenv RDP_CLIENT_ID}}
 
### RDP Auth Service # @name rdpAuth
 
POST thedac.service-now.com/auth/oauth2/{{rdpVersion}}/token HTTP/1.1 Content-Type: application/x-www-form-urlencoded Authorization: token {{client_id}} Accept: application/json
 
username={{username}}&password={{password}}&client_id={{client_id}}&grant_type=password&scope=trapi&takeExclusiveSignOnControl=true
 
#### Variable Response
 
@accessToken = {{rdpAuth.response.body.$.access_token}}
 
### RDP ESG /UNIVERSE: Return the full universe available for ESG
 
@symbol = "IBM.N"
 
GET thedacaredev.service-now.com/data/environmental-social-governance/{{rdpVersion}}/views/basic?universe={{symbol}} HTTP/1.1 Content-Type: application/json Authorization: Bearer {{accessToken}}
 
### RDP ESG /VIEWS/MEASURES-FULL: Returns scores and measures with full history
 
GET thedacaredev.service-now.comdata/environmental-social-governance/{{rdpVersion}}/views/measures-full
?universe={{symbol}} &start=-5 &end=0
Authorization: Bearer {{accessToken}}
 
### RDP IPA /FINANCIAL-CONTRACTS: API endpoint for Financial Contract analytics, that returns calculations relevant to each contract type.
 
POST {{baseUrl}}/data/quantitative-analytics/{{rdpVersion}}/financial-contracts HTTP/1.1 Content-Type: application/json Authorization: Bearer {{accessToken}}
 
{
"fields": [ "InstrumentTag", "StartDate", "EndDate", "FxSpot", "FxSwapsCcy1Ccy2", "FxOutrightCcy1Ccy2" ], "outputs": [ "Data", "Headers" ], "universe": [
 
{
"instrumentType": "FxCross", "instrumentDefinition": {
 
"instrumentTag": "FX_deal_001", "fxCrossType": "FxForward", "fxCrossCode": "EURGBP", "legs": [ { "tenor": "3M10D" } ]
}, "pricingParameters": {
 
"valuationDate": "2019-02-02T00:00:00Z", "priceSide": "Mid"
}
 
}
 
]
 
}

rest_apis.txt · Last modified: by johnsonjohn

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki