v1

latestOpenAPI 3.0.02026-08-04134348905.1 KB
Tax

List Gains Cost Basis

Permissions required: Subaccount

List subaccount's breakdown of combined cost basis, proceeds and gains/losses

get/tax/gains/costbasis/{subaccountId}

Path parameters

subaccountIdstring required

The ID of the subaccount

Query parameters

startDateTimestring date-time required

ISO-8601 formatted date as a filter start date.

endDateTimestring date-time required

ISO-8601 formatted date as a filter end date.

Response

Successfully returned the subaccount's tax gains cost bases

Example response

{
  "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"
      }
    }
  ]
}