[Type] TaxLots

Return

This endpoint provides detailed information about tax lots associated with users' investments. It includes data on acquisition date, cost, and other tax-related metrics.

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 TaxLots {\r\n    taxLots {\r\n        nodes {\r\n            id\r\n            custodianId\r\n            customerId\r\n            processDate\r\n            accountId\r\n            securityId\r\n            shortPosition\r\n            tradeDate\r\n            quantity\r\n            amount\r\n            originalCost\r\n            originalCostDate\r\n            originalFace\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": {
        "taxLots": {
            "nodes": [
                {
                    "id": 92298,
                    "custodianId": 0,
                    "customerId": 0,
                    "processDate": "2023-09-19T00:00:00.000-04:00",
                    "accountId": 12,
                    "securityId": 10363,
                    "shortPosition": false,
                    "tradeDate": "2023-09-19T00:00:00.000-04:00",
                    "quantity": 81000.0000000000,
                    "amount": 746.0100000000,
                    "originalCost": 825.0900000000,
                    "originalCostDate": "2014-01-10T00:00:00.000-05:00",
                    "originalFace": 81000.0000000000
                },
                {
                    "id": 92299,
                    "custodianId": 0,
                    "customerId": 0,
                    "processDate": "2023-09-19T00:00:00.000-04:00",
                    "accountId": 14,
                    "securityId": 16085,
                    "shortPosition": false,
                    "tradeDate": "2023-09-19T00:00:00.000-04:00",
                    "quantity": 61207.6300000000,
                    "amount": 61207.6300000000,
                    "originalCost": null,
                    "originalCostDate": null,
                    "originalFace": null
                },
                {
                    "id": 92300,
                    "custodianId": 0,
                    "customerId": 0,
                    "processDate": "2023-09-19T00:00:00.000-04:00",
                    "accountId": 14,
                    "securityId": 14952,
                    "shortPosition": false,
                    "tradeDate": "2023-09-19T00:00:00.000-04:00",
                    "quantity": 64.0000000000,
                    "amount": 10380.8000000000,
                    "originalCost": 10493.7600000000,
                    "originalCostDate": "2023-06-16T00:00:00.000-04:00",
                    "originalFace": null
                },
                {
                    "id": 92301,
                    "custodianId": 0,
                    "customerId": 0,
                    "processDate": "2023-09-19T00:00:00.000-04:00",
                    "accountId": 12,
                    "securityId": 9994,
                    "shortPosition": false,
                    "tradeDate": "2023-09-19T00:00:00.000-04:00",
                    "quantity": 26000.0000000000,
                    "amount": 17932.2000000000,
                    "originalCost": 21409.4700000000,
                    "originalCostDate": "2020-12-22T00:00:00.000-05:00",
                    "originalFace": 26000.0000000000
                },
                {
                    "id": 92302,
                    "custodianId": 0,
                    "customerId": 0,
                    "processDate": "2023-09-19T00:00:00.000-04:00",
                    "accountId": 12,
                    "securityId": 10208,
                    "shortPosition": false,
                    "tradeDate": "2023-09-19T00:00:00.000-04:00",
                    "quantity": 185000.0000000000,
                    "amount": 3620.4500000000,
                    "originalCost": 3971.6200000000,
                    "originalCostDate": "2015-03-17T00:00:00.000-04:00",
                    "originalFace": 185000.0000000000
                },
                {
                    "id": 92303,
                    "custodianId": 0,
                    "customerId": 0,
                    "processDate": "2023-09-19T00:00:00.000-04:00",
                    "accountId": 12,
                    "securityId": 10292,
                    "shortPosition": false,
                    "tradeDate": "2023-09-19T00:00:00.000-04:00",
                    "quantity": 1000.0000000000,
                    "amount": 27.4900000000,
                    "originalCost": 0.0000000000,
                    "originalCostDate": "2019-03-21T00:00:00.000-04:00",
                    "originalFace": 1000.0000000000
                },
                {
                    "id": 92304,
                    "custodianId": 0,
                    "customerId": 0,
                    "processDate": "2023-09-19T00:00:00.000-04:00",
                    "accountId": 12,
                    "securityId": 10398,
                    "shortPosition": false,
                    "tradeDate": "2023-09-19T00:00:00.000-04:00",
                    "quantity": 1000.0000000000,
                    "amount": 9.0000000000,
                    "originalCost": 0.0000000000,
                    "originalCostDate": "2019-03-21T00:00:00.000-04:00",
                    "originalFace": 1000.0000000000
                },
                {
                    "id": 92305,
                    "custodianId": 0,
                    "customerId": 0,
                    "processDate": "2023-09-19T00:00:00.000-04:00",
                    "accountId": 14,
                    "securityId": 16061,
                    "shortPosition": false,
                    "tradeDate": "2023-09-19T00:00:00.000-04:00",
                    "quantity": 93.0000000000,
                    "amount": 8820.1200000000,
                    "originalCost": 10626.8600000000,
                    "originalCostDate": "2023-06-16T00:00:00.000-04:00",
                    "originalFace": null
                },
                {
                    "id": 92306,
                    "custodianId": 0,
                    "customerId": 0,
                    "processDate": "2023-09-19T00:00:00.000-04:00",
                    "accountId": 12,
                    "securityId": 10174,
                    "shortPosition": false,
                    "tradeDate": "2023-09-19T00:00:00.000-04:00",
                    "quantity": 101000.0000000000,
                    "amount": 384.8100000000,
                    "originalCost": 0.0000000000,
                    "originalCostDate": "2019-03-21T00:00:00.000-04:00",
                    "originalFace": 101000.0000000000
                },
                {
                    "id": 92307,
                    "custodianId": 0,
                    "customerId": 0,
                    "processDate": "2023-09-19T00:00:00.000-04:00",
                    "accountId": 12,
                    "securityId": 10175,
                    "shortPosition": false,
                    "tradeDate": "2023-09-19T00:00:00.000-04:00",
                    "quantity": 49000.0000000000,
                    "amount": 251.3700000000,
                    "originalCost": 287.3200000000,
                    "originalCostDate": "2013-08-22T00:00:00.000-04:00",
                    "originalFace": 49000.0000000000
                }
            ]
        }
    }
}