The Whalewisdom API

The Whalewisdom API lets you interact with our 13F database in a variety of ways. Although most of the functionality provided through the API is already available by utilizing the website, the API is provided to help streamline and automate data retrieval.

In order to use the API you must have an account registered with Whalewisdom.com. Once registered you will need to login and go to your user profile to create new API access keys. These will be used to authenticate your API calls.

Each API call starts with an endpoint of

 https://whalewisdom.com/shell/command

What follows the endpoint depends on a number of factors including how you are to be authenticated, what command you want to execute and how you want the results formatted. The following documentation provides details into using the API.

Access to resources

You must have an account in order to access the API. Access is further restricted into two types: subscribers and non-subscribers. Subscribers have full access to all quarterly 13F data. Non-subscribers have access to the last 8 quarters worth of data not including the current quarter.

Authenticating your API Call

When you send a request to the Whalewisdom API, you must have your credentials verified to authenticate yourself to the system. There are 3 separate ways to authenticate your API call. Which one you use really depends on how you are making the call and personal preference.

  1. If you are doing the API calls through a browser then the easiest way is by simply logging into the site with your account login/password and letting the browser maintain your session using a session cookie.
  2. The preferred option for desktop and other non-browser applications is to include a digital signature with each request.

    Every API user has the ability to create access keys for signing each request. Two access keys are used: a shared access key and a secret access key.

    shared access key -
    identifies you as the party responsible for service requests. You include it in each API request so it is not a secret.
    Secret Access Key -
    used to create a digital signature with each request. Your secret access key is secret and is not actually included in any request. You should not share it with anyone.

    Each request you make must be digitally signed as follows:

     https://whalewisdom.com/shell/command?args=[args]&api_shared_key=[api_shared_key]&api_sig=[api_sig]&timestamp=[timestamp]
          

    [args] is the JSON formatted object that contains the actual command and other par They are discussed in detail under "Making an API call".

    [timestamp] a date-time value that marks the day and time the request was sent. Requests expire after a certain length of time to prevent malicious users from capturing requests and resubmitting them at a later time. This parameter is only used when authenticated via digital signatures.

    For example: 2011-06-01T13:00:01Z

    [api_shared_key] is the API Shared Access Key that has been assigned to your account. You can see your shared access key by going to your user profile.

    [api_sig] is a signature of the args parameter created using your secret access key. The api_sig is constructed using the HMAC-SHA1 algorithm. You take the HMAC-SHA1 digest of the [args] parameter and then encode the results in base64. The process is similar to how OAuth signs requests except with our API we are using the args and timestamp query parameters (before they are URL encoded). When creating the signature, combine the args and timestamp with an ASCII newline ("\n") character. For Ruby the process would look like this:

              require 'digest/sha1'
              t=Time.now
              digest = OpenSSL::Digest::Digest.new( 'sha1' )
              hmac = OpenSSL::HMAC.digest( digest, secret_access_key, args+"\n"+t.utc.strftime('%Y-%m-%dT%H:%M:%SZ') )
              sig=Base64.encode64( hmac ).chomp.gsub(/\n/, '')
          
  3. A third option is to use basic HTTP authentication. Your login/password are sent in the header of each HTTP request. This is simple to use and widely supported, but considered insecure.

Making an API call

Each API call is an HTTP GET or POST request. The GET request is constructed as follows:

 https://whalewisdom.com/shell/command[.output_type]?args=[args]&api_shared_key=[api_shared_key]&api_sig=[api_sig]
  

Required parameters:

  • [args] - The args parameter contains the actual command to execute. It is a JSON object with the command to run and any additional parameters. View the detailed instructions for each available command and to see how the args parameter is constructed. If using a GET Request, be sure to properly URL encode the args parameter as it will likely contain spaces, quotes, and other disallowed URL characters. Use the Online Interactive Shell to experiment with the available commands and see how the args parameter is constructed.
Optional Parameters:
  • [.output_type] - By default command results are output in HTML format. If the command you are running supports outputting results in another format such as JSON or CSV then you would specify that here by adding a .json or .csv to the URL. For example:
     https://whalewisdom.com/shell/command.json?args=%7B%22command%22:%22stock_lookup%22,%20%22name%22:%22apple%20comp%22%7D
        
    would perform a stock lookup of "Apple" and return the results in JSON
  • [api_shared_key] - Used when authenticating via digital signatures. See details under the "authenticating your API call" section above
  • [api_sig] - Used when authenticating via digital signatures. See details under the "authenticating your API call" section above

There is an Online Interactive Shell that lets you execute API command and see what the correct API call format will be. Get more details here

some important concepts

  • Many commands will require you to enter the id for the quarter (time period) you wish to query against. The quarter id can be found by running the "quarters" command. Type "quarters" in the Shell and you will get a list of all quarters in the system as well as which ones you have access to. For example quarter id 1 is for 3/31/2001 while quarter id 40 is for 12/31/2010.
  • Use the "filer_lookup" command to find a 13F filer's id in the system. Provide a partial name or CIK of the filer you want to find and if the filer is in our system it will return the id to you.
  • Use the "stock_lookup" command to find a stock's id in our system. Provide a ticker symbol or partial name and the stock_lookup command will return a list of matching stocks along with their ids.
Every JSON object you build for a request will have a "command" key with the command to run as the value. For example {"command":"stock_lookup"....}

Available API Calls

quarters
The quarters command lists all 13F filing dates currently in the database and their availability for use by your account.
JSON object/value pairs:
None
Available Outputs: html, json, csv
Example:
    {"command":"quarters"}
  
Sample format for a GET request API call:
    https://whalewisdom.com/shell/command.html?args=%7B%22command%22:%22quarters%22%7D
  


stock_lookup
stock_lookup returns a list of stocks that match either the ticker symbol or name provided. The stock identifier, name, symbol, and status (active or delisted) will be returned.
JSON object/value pairs:
keyvaluetyperequired
nameNAMEstringeither name or symbol is requireda partial or complete name to search for
symbolSYMBOLstringeither name or symbol is requiredthe stock ticker symbol to search for
Available Outputs: html, json, csv
examples:
{"command":"stock_lookup", "name":"Apple Comp"}
{"command":"stock_lookup", "symbol":"aapl"}
A complete GET API call would look similarly to:
    https://whalewisdom.com/shell/command.html?args=%7B%22command%22:%22stock_lookup%22,%20%22name%22:%22apple%20comp%22%7D
  


filer_lookup
The filer_lookup command returns a list of 13F filers including the filer identifier, name and CIK. The maximum number of records returned is 1,000.
JSON object/value pairs:
keyvaluetyperequired
nameNAMEstringat least one param is requireda partial or complete name to search for
cikCIKstringat least one param is requiredthe filer Central Index Key(CIK) to search for
idIDnumberat least one param is requiredthe database ID of the filer
cityIDstringat least one param is requiredthe city provided by the filer
stateIDstringat least one param is requiredthe state the filer resides in
state_incorporationIDstringat least one param is requiredthe state the filer is incorporated in
business_phoneIDstringat least one param is requiredbusiness phone provided by filer
irs_numberIDstringat least one param is requiredIRS number provided by filer
offsetIDstringoffset to return if bringing back over 1,000 records
Available Outputs: html, json, csv
examples:
{"command":"filer_lookup", "name":"berkshire"}
{"command":"filer_lookup", "cik":"0001067983"}
A complete GET request API call would look similarly to:
    https://whalewisdom.com/shell/command.html?args=%7B%22command%22:%22filer_lookup%22,%20%22name%22:%22berkshire%22%7D
  


stock_comparison
The stock_comparison allows for Quarterly comparison of 13F holders of a specific stock
JSON object/value pairs:
keyvaluetyperequired
stockidSTOCK ID - the id of the stocknumericrequired
q1idQUARTER 1 ID - the id of one of the 13F filing quarters to comparenumericrequired
q2idQUARTER 2 ID - the id of the other 13F filing quarter to comparenumericrequired
orderORDER BYstringoptionalfiler_name, q1_shares, q2_shares, or percent_change
dirDIRECTIONstringoptionalASC or DESC
Available Outputs: html, json, csv
examples:
{"command":"stock_comparison","stockid":3598,"q1id":39,"q2id":40}
(This will do a stock comparison of E*Trade for the 9/30/2010 and 12/31/2010 quarters)
{"command":"stock_comparison","stockid":3598,"q1id":39,"q2id":40,"order":"q2_shares","dir":"DESC"}
(This will do a stock comparison of E*Trade for the 9/30/2010 and 12/31/2010 quarters ordering by q2 shares in descending order)
A complete API call would look similarly to:
    https://whalewisdom.com/shell/command.html?args=%7B%22command%22:%22stock_comparison%22,%22stockid%22:3598,%22q1id%22:39,%22q2id%22:40%7D
  


holdings_comparison
The holdings_comparison lets you compare a filer's 13F holdings between two quarters
JSON object/value pairs:
keyvaluetyperequired
fileridFILER IDnumericrequiredthe id of the filer
q1idQUARTER 1 IDnumericrequiredthe id of one of the 13F filing quarters to compare
q2idQUARTER 2 IDnumericrequiredthe id of the other 13F filing quarter to compare
orderORDER BYstringoptionalcolumn to sort by - stock, q2_market_value, q1_percent_of_portfolio, q2_percent_of_portfolio, q2_shares, q1_shares, q1_market_value, percent_change, or absolute_change
dirDIRECTIONstringoptionalASC or DESC
filterFILTERarray of stringsoptionalAn array with possible values of SHARES, CALL, PUT, or PRN. if set to one or more of these values then the results will be restricted to those types of assets
stockidDIRECTIONnumericoptionalthis will restrict results to the stock id you provide
Available Outputs: html, json, csv
examples:
{"command":"holdings_comparison","filerid":163,"q1id":39,"q2id":40}
(This will do a 13F holdings comparison of Appaloosa for the 9/30/2010 and 12/31/2010 quarters and display the results on screen)
{"command":"holdings_comparison","filerid":163,"q1id":39,"q2id":40,"order":"q2_shares","dir":"DESC"}
(This will do a holdings comparison of Appaloosa for the 9/30/2010 and 12/31/2010 quarters ordering by q2 shares in descending order)
{"command":"holdings_comparison","filerid":163,"q1id":39,"q2id":40,"order":"q2_shares","filter":["CALL","PUT"]}
(This will do a holdings comparison of Appaloosa for the 9/30/2010 and 12/31/2010 quarters and only return any CALL or PUT holdings)
A complete API call would look similarly to:
    https://whalewisdom.com/shell/command.html?args=%7B%22command%22:%22holdings_comparison%22,%22filerid%22:163,%22q1id%22:39,%22q2id%22:40%7D
  


backtester
The backtester allows you to combine different hedge funds into blended portfolios and backtest the performance. Please click here for detailed instructions on Backtester options. Please note that this will queue backtester reports only. Results will be emailed to you once completed.
JSON object/value pairs:
keyvaluetyperequired
filers[FILER IDS]array of numbersrequiredAn array of filer ids to include
q1idQUARTER 1 IDnumericrequiredthe id of the quarter to start backtesting from
q2idQUARTER 2 IDnumericoptionalthe id of the quarter to end backtesting on. Defaults to the latest quarter if none given
balancingBALANCE TYPE IDnumericoptional Defaults to choice 1. Enter 1,2, or 3. Choose how stocks are rebalanced, options are
  1. 1. most frequently held stocks by absolute count
  2. 2. most frequently held stocks by dollar value
  3. 3. most frequently held stocks by absolute count that appear among the largest 10 holdings
  4. 4. Single largest holding from each filer's 13F portfolio
weightingWEIGHT TYPE IDnumericoptionalDefaults to choice 1. Enter 1 or 2. Choose how funds are allocated among stocks each rebalancing, options are
  1. 1. Balance portfolio on basis of aggregate stock weightings
  2. 2. Balance portfolio by equally weighing stocks
sizeSIZEnumericoptionalDefaults to 10. The number of holdings to use. You may enter 3, 5, 10, or 20
starting_amount AMOUNTnumericoptionalDefaults to $1,000,000. The starting dollar amount of the portfolio
backtesting_days DAYSnumericoptional - 0 to 60Defaults to 45 days. Days after quarter ending date to do backtest calculation
email_to"EMAIL ADDRESS"stringoptionalDefaults to the email address associated with your account. Backtesters are queued in the system and emailed to the address you provide once completed
Available Outputs: html, json. Please note that the actual Backtester results are emailed to your account. The output is for verifying the successful queueing of the backtester report.
examples:
{"command":"backtester","filers":[2182,349],"q1id":36}
(This will queue a backtester with Paulson & Co and Berkshire Hathaway starting at the 12/31/2009 quarter.)
{"command":"backtester","filers":[2182,349],"q1id":36,"q2id":40,"size":5,"balancing":2,"weighting":2,"starting_amount":10000,"email_to":"contact@whalewisdom.com"}
(This will queue a backtester with Paulson & Co and Berkshire Hathaway starting at the 12/31/2009 quarter and ending on 12/31/2010 with the number of holdings set to 5, stock balancing set to "most frequently held stocks by dollar value", weighting set to "Balance portfolio by equally weighing stocks", the starting amount set to $10,000, and the email address to send the report to set to contact@whalewisdom.com )
{"command":"backtester","filers":[2182,349],"q1id":36,"q2id":40,"save":"My Saved Report"}
(This will queue a backtester with Paulson & Co and Berkshire Hathaway starting at the 12/31/2009 quarter. The report will be saved as "My Saved Report" for future retrieval)
A complete API call would look similarly to:
    https://whalewisdom.com/shell/command.html?args=%7B%22command%22:%22backtester%22,%22filers%22:%5B2182,349%5D,%22q1id%22:36%7D
  


backtester_status
The backtester_status command lets you check on the status of your backtester report
JSON object/value pairs:
keyvaluetyperequired
queue_idQUEUE IDnumericyour queued report id
Available Outputs: html, json
examples:
{"command":"backtester_status", "queue_id":5}
A complete API call would look similarly to:
    https://whalewisdom.com/shell/command.html?args=%7B%22command%22:%22backtester_status%22,%20%22queue_id%22:5%7D
  


backtester_saved
The backtester_saved command lists all of your saved backtesters
JSON object/value pairs:
none
Available Outputs: html, json
examples:
{"command":"backtester_saved"}
A complete API call would look similarly to:
    https://whalewisdom.com/shell/command.html?args=%7B%22command%22:%22backtester_saved%22%7D
  


backtester_load
The backtester_loads command lets you load a previously saved Backtester
JSON object/value pairs:
keyvaluetyperequired
idIDnumericrequiredthe id of the Backtester to load
Available Outputs: html, json
examples:
{"command":"backtester_load","id":5}
A complete API call would look similarly to:
    https://whalewisdom.com/shell/command.html?args=%7B%22command%22:%22backtester_load%22,%20%22id%22:117%7D
  


backtester_delete
The backtester_delete command lets you delete a previously saved Backtester
JSON object/value pairs:
keyvaluetyperequired
idIDnumericrequiredthe id of the Backtester to load
Available Outputs: html, json
examples:
{"command":"backtester_delete","id":5}
A complete API call would look similarly to:
    https://whalewisdom.com/shell/command.html?args=%7B%22command%22:%22backtester_delete%22,%20%22id%22:11%7D%20
  


guru
The guru allows you to see which stocks are most commonly held and how concentrated the holdings are for a given group of funds
JSON object/value pairs:
keyvaluetyperequired
filers[FILER IDS]array of numbersrequiredAn array of filer ids to include
quarter_idQUARTER IDnumericrequiredthe id of the quarter to look at
holdings_percentPERCENTnumericrequiredholdings percentage threshold
stocks[STOCKS]array of numbersoptionalarray of stocks to restrict search to
orderORDER BYstringoptionalcolumn to sort by - stock or percent
dirDIRECTIONstringoptionalASC or DESC
saveSAVE NAMEstringoptionalSave the report criteria to the database for future retrieval.
Available Outputs: html, json, csv
examples:
{"command":"guru","filers":[2182,349],"quarter_id":36}
(This will run the guru's report with Paulson & Co and Berkshire Hathaway for the 12/31/2009 quarter.)
{"command":"guru","filers":[2182,349],"quarter_id":36,"stocks":[195,3573],"sort":"holdings_percent","dir":"DESC","save":"My Saved Report"}

(This will run the guru's report with Paulson & Co and Berkshire Hathaway for the 12/31/2009 quarter and restricted to Apple and Amazon. The report will be order by the percent column in descending order The report will be saved as "My Saved Report" for future retrieval)
A complete API call would look similarly to:
    https://whalewisdom.com/shell/command.html?args=%7B%22command%22:%22guru%22,%22filers%22:%5B2182,349%5D,%22quarter_id%22:36%7D
  


guru_saved
The guru_saved command lets you list all saved Guru Reports, load a previously saved Guru Report, or delete a saved Guru Report
JSON object/value pairs:
keyvaluetyperequired
save_action"ACTION"stringrequired"load", "delete", or "list" saved reports
idIDnumericoptionalRequired for the "load" and "delete" save_actions. The id of the saved report
Available Outputs: html, json, csv
examples:
{"command":"guru_saved","save_action":"load", "id":5}
(loads the saved guru report with an id of 5)
{"command":"guru_saved","save_action":"delete", "id":5}
(delete the saved guru report with an id of 5)
{"command":"guru_saved","save_action":"list"}
(lists all of your saved Guru Reports)
A complete API call would look similarly to:
    https://whalewisdom.com/shell/command.html?args=%7B%22command%22:%22guru_saved%22,%22save_action%22:%22load%22,%20%22id%22:5%7D
  


combined_holdings_comparison
The combined_holdings_comparison lets you combine multiple 13F Filer holdings into one portfolio and compare changes over multiple quarters
JSON object/value pairs:
keyvaluetyperequired
filers[FILER IDS]array of numbersrequiredarray of filer ids
q1idQUARTER 1 IDnumericrequiredthe id of one of the 13F filing quarters to combine
q2idQUARTER 2 IDnumericrequiredthe id of the last quarter to combine
order"ORDER BY"stringoptionalcolumn to sort by - stock, q2_market_value, q1_percent_of_portfolio, q2_percent_of_portfolio, q2_shares, q1_shares, q1_market_value, percent_change, or absolute_change
dir"DIRECTION"stringoptionalASC or DESC
filter[FILTER]array of stringsoptionalAn array with possible values of SHARES, CALL, PUT, or PRN. if set to one or more of these values then the results will be restricted to those types of assets
stocks[STOCK IDS]array of numbersrequiredarray of stock ids to restrict results to
stockidSTOCK IDnumericoptionalthis will restrict results to the specific stock id you provide
save"SAVE NAME"stringoptionalSave the report criteria to the database for future retrieval.
save_action"ACTION"stringoptional"load","delete", or "list" save reports
saveidSAVE IDnumericoptionalused with the load or delete save_action. The id of the saved report
Available Outputs: html, json, csv
examples:
(This will combine the holdings of Paulson & Co and Berkshire Hathaway for the 6/30/2010, 9/30/2010 and 12/31/2010 quarters and display the results on screen)
{"command":"combined_holdings_comparison","filers":[2182,349],"q1id":38,"q2id":40}
(This will combine the holdings of Paulson & Co and Berkshire Hathaway for the 6/30/2010, 9/30/2010 and 12/31/2010 quarters and only return any CALL or PUT holdings)
{"command":"combined_holdings_comparison","filers":[2182,349],"q1id":38,"q2id":40,"filter":["CALL","PUT"]}
A complete API call would look similarly to:
    https://whalewisdom.com/shell/command.html?args=%7B%22command%22:%22combined_holdings_comparison%22,%22filers%22:%5B2182,349%5D,%22q1id%22:38,%22q2id%22:40%7D
  


filing_data_feed
The filing_data_feed command returns all new 13F filings that have been received or any existing filings that were reprocessed due to errors. This API call is only available for premium data feed subscribers. Due to performance reasons, only 10 filings at a time will be returned. Multiple calls may be required to get all filing data.
Filing data returned is designed to match Whalewisdom database snapshots. A data dictionary listing all fields output by this command is here
The filing_data_feed command automatically keeps track of the last filing, filer, and stock you have received from the site. As a result you can simply call filing_data_feed without the need for additional parameters. The additional parameters below are available to override what data is returned in case of problems with previous calls.
JSON object/value pairs:
keyvaluetyperequired
tsTimestampstringoptional Allows you to override the last date and time to download changed data from. The timestamp format is %Y-%m-%dT%H:%M:%SZ. For example 2011-07-27T15:58:39Z
last_filing_idLast Filing IDnumber optional Will bring back all 13F filings whose id is greater than last_filing_id
last_stock_idLast Stock IDnumber optional Will bring back all stocks whose ID is greater than last_stock_id
last_filer_idLast Filer IDnumber optional Will bring back all filers whose ID is greater than last_filer_id
Available Outputs: json or csv * (Specifying CSV will return a .zip file with 4 CSV files for each table:filers, filings,filing_stock_records, stocks).
examples:
{"command":"filing_data_feed"}
This outputs everything from the filings table that has been received or reprocessed since your last request. Output will be limited to 500 filings at a time so additional calls may need to be made. Once a call returns 0 filings then you know you are up-to-date.
{"command":"filing_data_feed", "ts":"2011-07-27T15:58:39Z","last_filing_id":"134500"}
This outputs everything that has been received or reprocessed since 7/27/2011 11:58:39 EST. Output will be limited to 500 filings at a time so additional calls using the "last_filing_id" parameter may need to be made.
A complete GET request API call would look similarly to:
    https://whalewisdom.com/shell/command.json?args=%7B%22command%22%3A%22filing_data_feed%22%7D%20×tamp=2011-7-29T1%3A21%3A41Z
  


condensed_data_feed
The condensed_data_feed command is very similar to the filing_data_feed command, the only difference being that the data returned by the condensed_data_feed is is in a more concise summarized format. Using the condensed_data_feed will bring back all new portfolios that have been received or any existing holdings that were reprocessed due to errors. This API call is only available for premium data feed subscribers. Due to performance reasons, only 100 filers portfolios at a time will be returned. Multiple calls may be required to get all filing data.
Filing data returned is designed to match Whalewisdom database snapshots. A data dictionary listing all fields output by this command is here
The condensed_data_feed command automatically keeps track of the last update you received from the site. As a result you can simply call condensed_data_feed without the need for additional parameters. The additional parameters below are available to override what data is returned in case of problems with previous calls.
JSON object/value pairs:
keyvaluetyperequired
tsTimestampstringoptional Allows you to override the last date and time to download changed data from. The timestamp format is %Y-%m-%dT%H:%M:%SZ. For example 2011-07-27T15:58:39Z
quarter_idQuarter IDnumber optional Will bring back all holdings for the specified quarter. Must be used in conjunction with a filer_id
last_stock_idLast Stock IDnumber optional Will bring back all stocks whose ID is greater than last_stock_id
last_filer_idLast Filer IDnumber optional Will bring back all filers whose ID is greater than last_filer_id
filer_idSpecific Filer IDnumber optional Will bring back a specific filer's data. Must be used in conjunction with a quarter_id
Available Outputs: json or csv * (Specifying CSV will return a .zip file with 5 CSV files for each table:filers, holdings, stocks, quarters, and holdings_to_replace).
examples:
{"command":"condensed_data_feed"}
This outputs everything from the filings table that has been received or reprocessed since your last request. Output will be limited to 10000 holdings at a time so additional calls may need to be made. Once a call returns 0 filings then you know you are up-to-date.
{"command":"condensed_data_feed", "ts":"2011-07-27T15:58:39Z"}
This outputs everything that has been received or reprocessed since 7/27/2011 11:58:39 EST. Output will be limited to 100 filings at a time
A complete GET request API call would look similarly to:
 https://whalewisdom.com/shell/command.html?args=%7B%22command%22%3A%22condensed_data_feed%22%7D%20×tamp=2011-11-16T19%3A1%3A49Z
  


export
The export lets you export the entire 13f holdings history for a single filer. Standard subscription users are limited to exporting 50 filers per quarter.
JSON object/value pairs:
keyvaluetyperequired
filer_idFILER IDnumericrequiredid of filer to export
quarters[QUARTER_ID's]array of numbersrequired array of quarter ids to export
outputOUTPUT IDnumericrequired either 1 or 2. 1 to output all 13f holdings into a single CSV file. 2 to output all 13f holdings into separate CSV files per quarter
columns[COLUMN ID's]array of numbersrequired Columns to include in export -
  • 1 - Filer Name
  • 2 - Stock Name
  • 3 - Stock Ticker
  • 4 - Quarter Date
  • 5 - Type of Security
  • 6 - Current Shares Held
  • 7 - Current Market Value
  • 8 - Previous Shares Held
  • 9 - Previous Market Value
  • 10 - Current % of Portfolio
  • 11 - Previous % of Portfolio
  • 12 - Current Rank
  • 13 - Previous Rank
  • 14 - Change in Shares
  • 15 - Type of Change
email"EMAIL"stringrequiredemail address to send export to
Available Outputs: html, json, csv
examples:
(This will export the 13f holdings of Berkshire Hathaway for the 12/31/2010, 3/31/2011 and 6/30/2011 quarters to a single CSV file and email it to testemail@test.com)
{"command":"export","quarters":[40,41,42],"columns":[1,2,3,4,5,6,7,8],"filer_id":349,"output":1,"email":"testemail@test.com"}
A complete API call would look similarly to:
    https://whalewisdom.com/shell/command.html?args=%7B%22command%22%3A%22export%22%2C%22quarters%22%3A%5B40%2C41%2C42%5D%2C%22columns%22%3A%5B16%2C17%2C18%5D%2C%22filer_id%22%3A349%2C%22output%22%3A1%2C%22email%22%3A%22testemail%40test.com%22%7D
  


holdings
The holdings lets you output all holdings for a filer or list of filers. Holdings data is taken from 13F filings and you can optionally incorporate Schedule 13D/G information as well. This command is limited to your subscription level.
JSON object/value pairs:
optional
keyvaluetyperequired
filer_ids[FILER ID]numeric arrayrequiredids of filers to include
quarter_ids[QUARTER_ID]numeric arrayoptional. leave blank to get most recent data ids of quarters to retrieve
stock_ids[STOCK ID]numeric arrayoptionalids of stocks to restrict output to
all_quarters1 or 0numberoptional. If set to 1 then all available quarters are retrieved
sort"ORDER BY"stringoptionalcolumn to sort by -
dir"DIRECTION"stringoptionalASC or DESC
limitstringnumberlimit number of results returned
columns[COLUMN ID's]array of numbersoptional - leave blank for all Columns to include -
  • 1. filer_id
  • 2. filer_name
  • 3. stock_id
  • 4. stock_name
  • 5. stock_ticker
  • 6. security_type
  • 7. shares_change
  • 8. position_change_type
  • 9. current_ranking
  • 10. previous_ranking
  • 11. current_percent_of_portfolio
  • 12. previous_percent_of_portfolio
  • 13. current_mv
  • 14. previous_mv
  • 15. current_shares
  • 16. previous_shares
  • 17. source_date
  • 18. source
include_13d1 or 0numberoptional. If set to 1 and pulling latest quarterly data then any 13D/G filing after the 13F filing data will replace the 13F holdings information
Available Outputs: json, csv
examples:
(This will retrieve all current holdings of Berkshire Hathaway and Paulson & Co augmented with any available 13D/G filings
{"command":"holdings","filer_ids":[349,2182],"include_13d":1}
A complete API call would look similarly to:
    https://whalewisdom.com/shell/command.json?args=%7B%22command%22%3A%22holdings%22%2C%22filer_ids%22%3A%5B349%2C2182%5D%2C%22include_13d%22%3A1%7D%20×tamp=2014-2-7T15%3A33%3A43Z
  


holders
The holders lets you output all holders for a stock or group of stocks. Holders data is taken from 13F filings and you can optionally incorporate Schedule 13D/G information as well. This command is limited to your subscription level.
JSON object/value pairs:
optional
keyvaluetyperequired
filer_ids[FILER ID]numeric arrayoptionalids of filers to restrict output to
quarter_ids[QUARTER_ID]numeric arrayoptional. leave blank to get most recent data ids of quarters to retrieve
stock_ids[STOCK ID]numeric arrayrequiredids of stocks to restrict output to
all_quarters1 or 0numberoptional. If set to 1 then all available quarters are retrieved
sort"ORDER BY"stringoptionalcolumn to sort by -
dir"DIRECTION"stringoptionalASC or DESC
limitstringnumberlimit number of results returned
columns[COLUMN ID's]array of numbersoptional - leave blank for all Columns to include -
  • 1. filer_id
  • 2. filer_name
  • 3. stock_id
  • 4. stock_name
  • 5. stock_ticker
  • 6. security_type
  • 7. shares_change
  • 8. position_change_type
  • 9. current_ranking
  • 10. previous_ranking
  • 11. current_percent_of_portfolio
  • 12. previous_percent_of_portfolio
  • 13. current_mv
  • 14. previous_mv
  • 15. current_shares
  • 16. previous_shares
  • 17. source_date
  • 18. source
include_13d1 or 0numberoptional. If set to 1 and pulling latest quarterly data then any 13D/G filing after the 13F filing data will replace the 13F holdings information
Available Outputs: json, csv
examples:
(This will retrieve all current holdings of Apple and Halliburton augmented with any available 13D/G filings
{"command":"holders","stock_ids":[195,411],"include_13d":1}
A complete API call would look similarly to:
    https://whalewisdom.com/shell/command.json?args=%7B%22command%22%3A%22holdings%22%2C%22filer_ids%22%3A%5B349%2C2182%5D%2C%22include_13d%22%3A1%7D%20×tamp=2014-2-7T15%3A33%3A43Z