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

Get All Open Tax Lots

This request returns the information for all open tax lots for a specific account.
The originatingTransactionId will only be returned for taxable accounts. For non-taxable accounts the average cost of each position is provided.

Request URL

Syntax GET /restapi/accounts/{accountnumber}/opentaxlots?format=csv
Example URL https://api.uat.foliofn.com/restapi/accounts/RA1234ABCD/opentaxlots?format=csv

Error Codes

See Get an Open Tax Lot for the details of each error code.

Response Data Fields

Field Description
accountNumber The account number whose open tax lot was requested.
shareQuantity The number of the shares in the tax lot.
giftDate The date that the lot was gifted in the case that this is a gifted lot (as specified by getGiftedInheritedInd). Otherwise, the value of this field is null.
transferDate The date that this lot was received in, if it was transferred into this account. Otherwise, the value of this field is null.
costBasisKnown A Boolean indicator of whether cost basis is known. A cost basis may not be known if this is an uncovered lot that is transferred in from other financial institution. “true” or “false”.
covered A Boolean indicator of whether the security is covered; “true” is covered and “false” is uncovered. Each security type 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.
gainLossTerm An indicator of whether the gain/loss for the tax lot is long term or short term if the shares are sold today. The available options are “SHORT_TERM”, “LONG_TERM”, and “UNKNOWN”.
security.ticker The ticker of the security transacted in this open 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 ID of the security.
originatingTransactionId The transaction ID of the transaction that created the tax lot.
originalSharePrice The original unit price of the open tax lot.
adjustedCostBasis The adjusted cost basis of the open tax lot, adjusted to account for events such as stock splits, exchanges, return of capital transactions, and wash sales. If no adjustments have been made, this field is null.
giftedFairMarketValue The fair market value of the tax lot as of the date of gift, represented as the total cost.
adjustedAcquisitionDate The acquisition date of the open lot, adjusted for wash sales. If no adjustments have been made, this field is null.
giftedInheritedIndicator An indicator of whether the shares are gifted or inherited. The available options are “NONE”, “GIFTED”, “INHERITED”, “INHERITED_THEN_GIFTED”.
washSaleIndicator A Boolean indicator of whether this lot has been adjusted due to a wash sale. The value is either “true” if adjusted or “false” if not adjusted.
purchaseReinvestmentIndicator An indicator of whether the shares were acquired by a new purchase or by a reinvestment of a dividend. The available options are “PURCHASE” and “DIVIDEND_REINVESTMENT”.
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 original cost of the lot at the time of purchase. If there were wash sales, the adjusted cost basis will be in adjustedCostBasis.

Response Example


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

[
  {
    "accountNumber": "RA1234ABCD",
    "shareQuantity": "8.97145",
    "giftDate": null,
    "transferDate": null,
    "lastTradeDate": "2013-01-25T05:00:00.000+0000",
    "costBasisKnown": true,
    "covered": true,
    "gainLossTerm": "SHORT_TERM",
    "security": {
      "ticker": "AAPL",
      "cusip": "037833100",
    },
    "originatingTransactionId": "92896207",
    "origionalSharePrice": "445.85881",
    "adjustedCostBasis": "4000.00",
    "gifedFairMarketValue": null,
    "adjustedAcquisitionDate": "2013-01-25T05:00:00.000+0000",
    "giftedInheritedIndicator": "NONE",
    "washSaleIndicator": false,
    "purchaseReinvestmentIndicator": "PURCHASE",
    "origionalAcquisitionDate": "2013-01-25T05:00:00.000+0000",
    "origionalCostBasis": "4000.00"
  },
  {
    "accountNumber": "RA1234ABCD",
    "shareQuantity": "7.06098",
    "giftDate": null,
    "transferDate": null,
    "lastTradeDate": "2013-04-08T00:00:00.000-05:00",
    "costBasisKnown": true,
    "covered": true,
    "gainLossTerm": "SHORT_TERM",
    "security": {
      "ticker": "AAPL",
      "cusip": "037833100",
    },
    "originatingTransactionId": "101418058",
    "origionalSharePrice": "424.87020",
    "adjustedCostBasis": "3000.00",
    "gifedFairMarketValue": null,
    "adjustedAcquisitionDate": "2013-04-08T00:00:00.000-05:00",
    "giftedInheritedIndicator": "NONE",
    "washSaleIndicator": false,
    "purchaseReinvestmentIndicator": "PURCHASE",
    "origionalAcquisitionDate": "2013-04-08T00:00:00.000-05:00",
    "origionalCostBasis": "3000.00"
  }
]

Response Example for CSV format


HTTP/1.1 200 OK
Date: Tue, 09 May 2017 18:01:31 GMT
Content-Length: 2115
Content-Type: application/tax-information
Content-Disposition: attachment;filename=RD91653005_open_tax_lot.csv
Set-Cookie: JSESSIONID=LhPuX5AWEkT0zApcLOSDjRLAizi-60AqcrqHmI_WKruZ-Wuq0hvc!1942241555; path=/; secure; HttpOnly
Set-Cookie: _WL_AUTHCOOKIE_JSESSIONID=SNHEzhXID6.ToGfMc0FY; path=/; secure; HttpOnly
Content-Language: en
Strict-Transport-Security: max-age=157680000

Symbol,Security,Quantity of Shares,Date Bought,Share Price,Total Purchase Cost,Adjusted Acquisition Date,Adjusted Cost Basis,Account Number,Account Name,Status,Report Date,Current Price,Total Current Value,Unrealized Gain/Loss,Covered,Inherited,Gifted
CLCT,COLLECTORS UNIVERSE INC,0.35632,05/06/2016,21.16075,7.54,05/06/2016,7.54,RD91653005,AccountName-RD91653005,LT,05/09/2017,26.330,9.38,1.84,Y,No,No
CVA,COVANTA HLDG CORP,0.54977,05/06/2016,17.80745,9.79,05/06/2016,9.79,RD91653005,AccountName-RD91653005,LT,05/09/2017,14.075,7.74,-2.05,Y,No,No



 ******************************************************************
 *
 *    The proceeds and cost basis are reported to the IRS for
 *    'covered' tax lots in taxable accounts.  Only the proceeds are
 *    reported to the IRS for 'non-covered' tax lots.
 *
 *    The cost basis and gain/loss information is based on trade data
 *    or information provided to us by another brokerage firm
 *    or information that you enter. Total realized and unrealized
 *    gains/losses do not include securities for which cost basis is
 *    unavailable. The tax tools allow you to change the cost basis of
 *    non-covered tax lots  however  we take no responsibility for the
 *    information that you provide.
 *
 *    Remember the accuracy of the calculations provided depend on
 *    the accuracy of the information you have entered. For securities
 *    purchased through this account  the calculations are based on
 *    actual trade data. While an attempt is made to provide precise
 *    data the accuracy of all trade information is not guaranteed.
 *
 *    This information is for general guidance. We are not authorized to
 *    give tax advice. Because of the complexity of tax regulations and the
 *    individual circumstances of our customers  this information may not
 *    be complete or accurate for tax-reporting purposes.  For example  we
 *    do not identify losses that may be disallowed due to wash sale rules
 *    for non-covered securities.
 *
 ******************************************************************


Change Log

05/12/2017

  1. New query param 'format'.

03/24/2017

  1. Added note on how taxable & non-taxable accounts are handled.

02/22/2016

  1. Added error codes information.

Getting Started

REST APIs

Resources

Developer Home