List Gains
curl --request GET \
--url https://api.anchorage-staging.com/v2/tax/gains/summary/{subaccountId} \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v2/tax/gains/summary/{subaccountId}"
headers = {"Api-Access-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Access-Key': '<api-key>'}};
fetch('https://api.anchorage-staging.com/v2/tax/gains/summary/{subaccountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"shortTerm": {
"assetType": "USD",
"quantity": "20204.23"
},
"longTerm": {
"assetType": "USD",
"quantity": "200304.1"
},
"total": {
"assetType": "USD",
"quantity": "220308.33"
}
}
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}List Gains
Permissions required: Subaccount
List subaccount’s gains for a period breakdown to short term, long term and total
GET
/
tax
/
gains
/
summary
/
{subaccountId}
List Gains
curl --request GET \
--url https://api.anchorage-staging.com/v2/tax/gains/summary/{subaccountId} \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v2/tax/gains/summary/{subaccountId}"
headers = {"Api-Access-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Access-Key': '<api-key>'}};
fetch('https://api.anchorage-staging.com/v2/tax/gains/summary/{subaccountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"shortTerm": {
"assetType": "USD",
"quantity": "20204.23"
},
"longTerm": {
"assetType": "USD",
"quantity": "200304.1"
},
"total": {
"assetType": "USD",
"quantity": "220308.33"
}
}
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Authorizations
An API key associated with a security role
Path Parameters
The ID of the subaccount
Query Parameters
ISO-8601 formatted date as a filter start date.
ISO-8601 formatted date as a filter end date.
Response
Successfully returned the gains
Breakdown of tax gains into short term, long term and total
Show child attributes
Show child attributes
Example:
{
"shortTerm": {
"assetType": "USD",
"quantity": "20204.23"
},
"longTerm": {
"assetType": "USD",
"quantity": "200304.1"
},
"total": {
"assetType": "USD",
"quantity": "220308.33"
}
}
Was this page helpful?