Skip to main content
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>'
{
  "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"
      }
    }
  ]
}

Authorizations

Api-Access-Key
string
header
required

An API key associated with a security role

Path Parameters

subaccountId
string
required

The ID of the subaccount

Query Parameters

startDateTime
string<date-time>
required

ISO-8601 formatted date as a filter start date.

endDateTime
string<date-time>
required

ISO-8601 formatted date as a filter end date.

Response

Successfully returned the subaccount's tax gains cost bases

data
TaxGainsCostBase · object[]
required
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" }
}
]