[Type] SecurityTypes
Return
This endpoint lists security types used in the system. It may include stocks, bonds, options, or other types of financial instruments.This endpoint lists security types used in the system. It may include stocks, bonds, options, or other types of financial instruments.
Endpoint URL
https://api.wealthtechs.com/v2/graphql/
Authorization
// Authorization via JWT Token
Authorization: Bearer <YourToken>
Learn how to get access to our API V2.0 by clicking here.
You can copy and use our API v2.0 Example Token to get familiar with our API GraphQL Resources.
Responses
Code | Type |
---|---|
200 | Success |
204 | No Content |
400 | Bad Request |
401 | Unauthorized |
Example Code
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySW5mbyI6IntcIklkXCI6OTgxLFwiSWRlbnRpdHlJZFwiOlwiNjMyMzhhZTQtMzAyMC00NWI5LWEwODktOTE2ZTY4MDMyZTY3XCIsXCJVc2VyTmFtZVwiOlwiMF9URVNUX0NMSUVOVFwiLFwiRW1haWxcIjpcInRlc3RjbGllbnRAd2VhbHRodGVjaHMuY29tXCIsXCJGaXJzdE5hbWVcIjpcIlRlc3RcIixcIkxhc3ROYW1lXCI6XCJDbGllbnRcIixcIklzQ2xpZW50VXNlclwiOmZhbHNlfSIsIm5iZiI6MTY5NDcwMjU3OSwiZXhwIjoxOTI0OTIzNjAwLCJpc3MiOiJXZWFsdGhUZWNocyIsImF1ZCI6IkFQSVVzZXJzIn0.bNcP0ouNwtFoxrI7pYXw0WKiw0TN6w_R2-Ban5moo1A");
var graphql = JSON.stringify({
query: "query SecurityTypes {\r\n securityTypes {\r\n nodes {\r\n id\r\n code\r\n description\r\n majorAssetClassId\r\n }\r\n }\r\n}",
variables: {}
})
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: graphql,
redirect: 'follow'
};
fetch("https://api.wealthtechs.com/v2/graphql/", requestOptions)
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response
{
"data": {
"securityTypes": {
"nodes": [
{
"id": 1,
"code": "AB",
"description": "ASSET BACKED OBLIGATIONS",
"majorAssetClassId": 13
},
{
"id": 2,
"code": "AD",
"description": "ADR",
"majorAssetClassId": 2
},
{
"id": 3,
"code": "AG",
"description": "GOVERNMENT AGENCY",
"majorAssetClassId": 13
},
{
"id": 4,
"code": "AP",
"description": "ADR - PREFERRED STOCKS",
"majorAssetClassId": 2
},
{
"id": 5,
"code": "BA",
"description": "BANKERS ACCEPTANCE",
"majorAssetClassId": 3
},
{
"id": 6,
"code": "CA",
"description": "CASH & EQUIVALENTS",
"majorAssetClassId": 1
},
{
"id": 7,
"code": "CB",
"description": "CORPORATE BONDS",
"majorAssetClassId": 3
},
{
"id": 8,
"code": "CD",
"description": "CERTIFICATES OF DEPOSIT",
"majorAssetClassId": 3
},
{
"id": 9,
"code": "CE",
"description": "CLOSED END FUND",
"majorAssetClassId": 9
},
{
"id": 10,
"code": "CF",
"description": "COMMODITY FUTURE",
"majorAssetClassId": 6
}
]
}
}
}