Depending on applicable regulations or business limitations, specific API requests may not be available for your use.

Get a Reported Closed Tax Lot

This request returns the information for a specific reported closed tax lot for a specific security within an account. A reported closed tax lot has already been reported to our tax processing service provider.

Request URL

Syntax GET /restapi/accounts/{accountnumber}/reportedtaxlots/{originatingtxnid}/{closingtxnid}
Example URL https://testapi.foliofn.com/restapi/accounts/RA1234ABCD/reportedtaxlots/8829162/8759691

Error Codes

HTTP Code Status Field Code Message Description
400 accountnumber VALIDATION_FIELD Reportable taxes are not available for the non-taxable account. Reported closed tax lot not available for the specified account number.
404 - - - Tax data is currently not available.

Response Data Fields

Field Description
taxYear The year for which the closed tax lot was reported. This value cannot be the current year.
termOfSale An indicator on whether the gain or loss is long-term or short-term. The available options are “S”, “L”, and “U”. (This is different format from closed tax lot.)
security.ticker The ticker of the security transacted in this tax lot. Please note that ticker can occasionally change. To trace the history of changes of a ticker, use GET /security/{ticker}
security.cusip The CUSIP of the security.
security.id The Folio-specific internal ID of the security. This value is immutable for the security. (Because tickers or CUSIPs may change, we keep the same security.id on our side to track the history of that security.)
accountNumber The account number that holds this closed tax lot.
adjustedCostBasis The adjusted cost basis of the closed lot, adjusted to account for various events such as stock splits, exchanges, return of capital transactions, and wash sales.
netSaleAmount The proceeds from the sale of shares. It is calculated as shareQuantity × salePrice.
closingTransactionId The transaction ID of the transaction that sells the shares bought by the originating transaction (originatingTransactionId).
costBasisIndicator
withholdingCountry The country to which foreignTaxWithholding applies.
covered An indicator of whether the security is covered. The available values are:
“C” for covered,
“N” for uncovered, and
“U” for unknown.
Each security has a covered start data associated with it. Purchases prior to that security’s covered date or ones where we do not know the acquisition date will be uncovered. See What are covered and noncovered securities? for more information.
disallowedLoss The amount of loss disallowed due to wash sales.
foreignTaxWithholding The amount of foreign tax already withheld from this lot’s closing transaction.
reportableGainLoss The amount of gain or loss after adjusting for wash sales.
adjustedAcquisitionDate The adjusted cost basis of the closed lot, adjusted for wash sales.
lotReliefStrategyIndicator Tax lot relief method used on the reported tax lot. The available options are “F” for FIFO, “S” for specific lot, and “A” for average.
“A” is the only option available for non-taxable accounts and is never used for taxable accounts.
“F” will only be used in taxable accounts when the taxlotreliefemethod of the closingTransactionID is “FIFO”.
All other taxlotreliefmethod codes map to “S”.
originalAcquisitionDate The original acquisition date. If there were wash sales, the adjusted acquisition date will be in adjustedAcquisitionDate. This field can be null.
originalCostBasis The actual cost of the lot at the time of purchase. If any adjustments must be made due to wash sales, the adjusted cost would be held in adjustedCostBasis.
originatingTransactionId The transaction ID of the purchase transaction that created the tax lot. This value should equal the originatingTransactionId of the request.
salePrice The unit cost of a share at which the tax lot was relieved. For example, if a client sells 50 shares of security A @ $10.00 per share, salePrice is $10.00.
shareQuantity The number of the shares in the closed tax lot.
closingTransactionSettlementDate The settlement date of the cash in the case of a sell, or the transaction date in the case of a corporate action.
taxLotId Tax lot ID.
closingTransactionDate The date of execution of the sale transaction that closed this tax lot.
federalTaxWithholding The amount of federal tax already withheld from this lot’s closing transaction.
stateTaxWithholding The amount of state tax already withheld from this lot’s closing transaction.
withholdingState The state to which stateTaxWithholding applies.

Response Example


Status Code: 200 OK
Content-Type: application/json
Date: Wed, 18 Dec 2013 19:01:54 GMT
Server: Sun GlassFish Enterprise Server v2.1.1
Transfer-Encoding: chunked
X-Powered-By: Servlet/2.5

{
  "exDate": null,
  "statementTrail": null,
  "taxYear": "2012",
  "termOfSale": "ST",
  "transCode": "SLE",
  "security": {
    "ticker": "WHR",
    "cusip": "963320106",
    "id": null
  },
  "accountNumber": "RA1234ABCD",
  "adjustedCostBasis": "5551.76",
  "costBasisEffectiveDate": null,
  "netSaleAmount": "4048.06",
  "closingTransactionId": "8759691",
  "costBasisIndicator": " ",
  "withholdingCountry": null,
  "covered": "C",
  "disallowedLoss": "1503.70",
  "foreignTaxWithholding": null,
  "reportableGainLoss": "0.00",
  "adjustedAcquisitionDate": "2011-08-09T00:00:00.000-05:00",
  "lotReliefStrategyIndicator": "S",
  "originalAcquisitionDate": "2011-11-02T00:00:00.000-05:00",
  "originatingTransactionSettlementDate": null,
  "originalCostBasis": "4000.00",
  "originatingTransactionId": "8829162",
  "salePrice": "51.72796",
  "shareQuantity": "78.25827",
  "closingTransactionSettlementDate": "2012-01-17T05:00:00.000+0000",
  "taxLotId": "8829162",
  "closingTransactionDate": "2012-01-11T05:00:00.000+0000",
  "federalTaxWithholding": null,
  "stateTaxWithholding": null,
  "withholdingState": null
}


Change Log

02/22/2016

  1. Add error codes information.

Getting Started

REST APIs

Resources

Developer Home