Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter Twenty-oneEDGARView Integration (continued)

EDGARFetchFilingsByFileNumber Function

Overview

The EDGARFetchFilingsByFileNumber function queries the EDGAR Archive returns an index of matching filings.

Syntax/Parameters

Syntax

string[][] = EDGARFetchFilingsByFileNumber ( string file_number, [boolean exclude],
                                                        [int count | string date],
                                                        [string prior],
                                                        [boolean piq_flag );

Parameters

file_number

A string specifying an SEC file number to retrieve filings.

exclude

An optional boolean value to exclude section 16 filings (Forms 3/4/5 and amendments). The default value is FALSE.

count

An optional int value specifying a limit on the count of items to fetch. Or,

date

An optional string value specifying the oldest item to fetch. The string must be in the format YYYY-MM-DD with no spaces and zero filled.

prior

An optional string value specifying the date to fetch from. The string must be in the format YYYYMMDD with no other characters and zero filled. To use this parameter without count or date parameters, set that parameter position to 0 or "".

piq_flag

An optional boolean specifying to perform an incremental query. When set, and not restricting parameters are present, the fetch will moved from loading the maximum records on each query to an include month-by-month query. See Remarks below.

Return Value

A string table containing an index all matching files. On error, the table will be empty. Use the GetLastError function to retrieve error details. If the CIK does not exist, ERROR_REMOTE (0x88000000) with ERROR_FILE_NOT_FOUND (2) will be returned.

Some parameters are checked prior to running the query to the SEC, these will set the error code to ERROR_SYNTAX with the parameter number in the low word of the error code.

The last error can also be set to ERROR_OVERFLOW if there are items in the list than the SEC’s site will return. However, the list will contain items with the error set.

Remarks

This function “scrapes” the SEC’s public side EDGAR Archive and returns a table of matching filings for a specific CIK.

The column key names are as follows:

  Name   Description  
  form   Submission form type.  
  date   Date of the filing in the for YYYY-MM-DD. Certain entries may also have a time of day in the form of HH:MM:SS, as 24 hour time. The values are delimited by a space,  
  file_no   The file number the filing was made under.  
  film_no   Related SEC film number.  
  description   The description of the filing as shown on the archive index.  
  accession   The accession number of the filing.  
  uri   The URI of the index page. This is relative to the SEC Archive.  

 

In many cases, section 16 links will significantly expand the number of index entries. Setting the exclude parameter to TRUE will exclude all Section 16 filings.

Note that the EDGAR archive will only enumerate 2000 filings per query. Using the exclude function will allow for more non-Section 16 filings. The piq_flag parameter forces a month-by-month query, if and only if, a date, count or prior filters has not been applied. The prior parameter can be used to segment the filing retrieval. Check the last error for ERROR_OVERFLOW to determine if the parameters should be narrowed.

Incremental query is significantly slower than the standard query. It is suggested that the standard query be performed and then move to the incremental query if an ERROR_OVERFLOW is required.

Note that depending on the connection and number of filings, this function can take a number of seconds (or longer) or complete. Use the count or date to limit the total pages scraped. If a progress window is open within the script, the EDGARFetchFilingsByCIK will update the second status line with download information.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic

Page revised 2024-12-13