GET /v2/odata/Positions

Return

Returns details of user's investment positions. This includes the quantity of each asset in a specific account and its current value.

Endpoint URL

https://api.wealthtechs.com/v2/odata/Positions

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 requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.wealthtechs.com/v2/odata/Positions?$top=5", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example Response

{
    "@odata.context": "https://api.wealthtechs.com/v2/odata/$metadata#Positions",
    "value": [
        {
            "CustodianId": 0,
            "CustomerId": 0,
            "ProcessDate": "2023-09-11T00:00:00-04:00",
            "AccountId": 12,
            "SecurityId": 8492,
            "ShortPosition": false,
            "Quantity": 200000,
            "MarketValue": 198652.8,
            "OriginalCost": 199112,
            "OriginalCostDate": "1950-01-01T00:00:00-05:00",
            "OriginalFace": null
        },
        {
            "CustodianId": 0,
            "CustomerId": 0,
            "ProcessDate": "2023-09-11T00:00:00-04:00",
            "AccountId": 12,
            "SecurityId": 8516,
            "ShortPosition": false,
            "Quantity": 200000,
            "MarketValue": 193444.6,
            "OriginalCost": 200011,
            "OriginalCostDate": "1950-01-01T00:00:00-05:00",
            "OriginalFace": null
        },
        {
            "CustodianId": 0,
            "CustomerId": 0,
            "ProcessDate": "2023-09-11T00:00:00-04:00",
            "AccountId": 12,
            "SecurityId": 8646,
            "ShortPosition": false,
            "Quantity": 500000,
            "MarketValue": 495548,
            "OriginalCost": 500012,
            "OriginalCostDate": "1950-01-01T00:00:00-05:00",
            "OriginalFace": null
        },
        {
            "CustodianId": 0,
            "CustomerId": 0,
            "ProcessDate": "2023-09-11T00:00:00-04:00",
            "AccountId": 12,
            "SecurityId": 8648,
            "ShortPosition": false,
            "Quantity": 500000,
            "MarketValue": 497752,
            "OriginalCost": 500012,
            "OriginalCostDate": "1950-01-01T00:00:00-05:00",
            "OriginalFace": null
        },
        {
            "CustodianId": 0,
            "CustomerId": 0,
            "ProcessDate": "2023-09-11T00:00:00-04:00",
            "AccountId": 12,
            "SecurityId": 8661,
            "ShortPosition": false,
            "Quantity": 40000,
            "MarketValue": 39959.08,
            "OriginalCost": 41533.16,
            "OriginalCostDate": "1950-01-01T00:00:00-05:00",
            "OriginalFace": null
        }
    ]
}