List Gains Cost Basis
curl --request GET \
--url https://api.anchorage-staging.com/v2/tax/gains/costbasis/{subaccountId} \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v2/tax/gains/costbasis/{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/costbasis/{subaccountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"sold": {
"assetType": "BTC",
"quantity": "0.1"
},
"proceeds": {
"assetType": "USD",
"quantity": "300"
},
"taxYear": "2023",
"saleDate": "2022-06-30T22:15:31.99999Z",
"gainType": "LONG_TERM",
"gain": {
"assetType": "USD",
"quantity": "20000"
},
"cost": {
"assetType": "USD",
"quantity": "305"
}
},
{
"sold": {
"assetType": "ETH",
"quantity": "1"
},
"proceeds": {
"assetType": "USD",
"quantity": "1850"
},
"taxYear": "2023",
"saleDate": "2023-06-30T22:15:31.99999Z",
"gainType": "SHORT_TERM",
"gain": {
"assetType": "USD",
"quantity": "150"
},
"cost": {
"assetType": "USD",
"quantity": "1880"
}
}
]
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}List Gains Cost Basis
Permissions required: Subaccount
List subaccount’s breakdown of combined cost basis, proceeds and gains/losses
GET
/
tax
/
gains
/
costbasis
/
{subaccountId}
List Gains Cost Basis
curl --request GET \
--url https://api.anchorage-staging.com/v2/tax/gains/costbasis/{subaccountId} \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v2/tax/gains/costbasis/{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/costbasis/{subaccountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"sold": {
"assetType": "BTC",
"quantity": "0.1"
},
"proceeds": {
"assetType": "USD",
"quantity": "300"
},
"taxYear": "2023",
"saleDate": "2022-06-30T22:15:31.99999Z",
"gainType": "LONG_TERM",
"gain": {
"assetType": "USD",
"quantity": "20000"
},
"cost": {
"assetType": "USD",
"quantity": "305"
}
},
{
"sold": {
"assetType": "ETH",
"quantity": "1"
},
"proceeds": {
"assetType": "USD",
"quantity": "1850"
},
"taxYear": "2023",
"saleDate": "2023-06-30T22:15:31.99999Z",
"gainType": "SHORT_TERM",
"gain": {
"assetType": "USD",
"quantity": "150"
},
"cost": {
"assetType": "USD",
"quantity": "1880"
}
}
]
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"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 subaccount's tax gains cost bases
Show child attributes
Show child attributes
Example:
[
{
"sold": { "assetType": "BTC", "quantity": "0.1" },
"proceeds": { "assetType": "USD", "quantity": "300" },
"taxYear": "2023",
"saleDate": "2022-06-30T22:15:31.99999Z",
"gainType": "LONG_TERM",
"gain": { "assetType": "USD", "quantity": "20000" },
"cost": { "assetType": "USD", "quantity": "305" }
},
{
"sold": { "assetType": "ETH", "quantity": "1" },
"proceeds": { "assetType": "USD", "quantity": "1850" },
"taxYear": "2023",
"saleDate": "2023-06-30T22:15:31.99999Z",
"gainType": "SHORT_TERM",
"gain": { "assetType": "USD", "quantity": "150" },
"cost": { "assetType": "USD", "quantity": "1880" }
}
]
Was this page helpful?
⌘I