[Type] MajorAssetClasses

Return

Returns information about major asset classes available in the system. This may include asset classes such as stocks, bonds, cash, etc.

Endpoint URL

https://api.wealthtechs.com/v2/graphql/

Authorization

// Authorization via JWT Token

Authorization: Bearer <YourToken>

Responses

CodeType
200Success
204No Content
400Bad Request
401Unauthorized

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 MajorAssetClasses {\r\n    majorAssetClasses {\r\n        nodes {\r\n            id\r\n            name\r\n            description\r\n            primaryTypeCode\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": {
        "majorAssetClasses": {
            "nodes": [
                {
                    "id": 1,
                    "name": "Cash",
                    "description": null,
                    "primaryTypeCode": "U"
                },
                {
                    "id": 2,
                    "name": "Equity",
                    "description": null,
                    "primaryTypeCode": "T"
                },
                {
                    "id": 3,
                    "name": "Fixed Income",
                    "description": null,
                    "primaryTypeCode": "C"
                },
                {
                    "id": 4,
                    "name": "Securitized",
                    "description": null,
                    "primaryTypeCode": "O"
                },
                {
                    "id": 5,
                    "name": "Account",
                    "description": null,
                    "primaryTypeCode": "O"
                },
                {
                    "id": 6,
                    "name": "Derivatives",
                    "description": null,
                    "primaryTypeCode": "O"
                },
                {
                    "id": 7,
                    "name": "Expense",
                    "description": null,
                    "primaryTypeCode": "O"
                },
                {
                    "id": 8,
                    "name": "Insurance",
                    "description": null,
                    "primaryTypeCode": "O"
                },
                {
                    "id": 9,
                    "name": "Fund",
                    "description": null,
                    "primaryTypeCode": "T"
                },
                {
                    "id": 10,
                    "name": "Other",
                    "description": null,
                    "primaryTypeCode": "O"
                }
            ]
        }
    }
}