Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter Twenty-oneEDGARView Integration (continued)

EDGARLookupSeries Function

Overview

The EDGARLookupSeries function accesses the SEC’s public-facing company database and returns an array with series information for a specified CIK and Series ID.

Syntax/Parameters

Syntax

string [] = EDGARLookupSeries ( string cik | qword cik, string id );

Parameters

cik

A string or a qword that specifies the registrant CIK to retrieve. Note that EDGAR CIK values can exceed a 32-bit integer or dword size.

id

A string specifying the Series ID to lookup.

Return Value

A string array containing data from the SEC. On failure, the array will be empty. Use the GetLastError function to return details of the error.

If the CIK or Series cannot be located (but a connection was made to the SEC), the last error will be ERROR_EOD with 1 or 2 depending on whether the CIK or Series cannot be found, respectively.

If there is an issue with the content of the response, ERROR_SYNTAX with a low word code will be returned. Contact technical support if this error is returned since it can indicate that the SEC has changed its response format.

Remarks

The information returned by this function is the same as the public-facing company database. Note that this information can differ slightly from the private-access company database, specifically in the area of the address since the SEC stores multiple types of addresses.

Each entry within the returned list will have one of the following key names:

  Name   Description
  General Information    
    CompanyName   Company name.
    CIK   Company CIK (should match request).
  Series and Class    
    SeriesID   The series ID which will be the same as the query value.
    SeriesName   The name of the series.
    SeriesStatus    The status of the series. This is normally ‘Active’ or ‘Inactive’.
    Classes    A list of the class ID codes attached to the series.

 

An example of reading a random fund and series information (any valid CIK can be used, so illustrate series and class data, pick a CIK for an investment company with one or more series):

    string              list[];
    string              cik, series;
    string              s1;
    int                 ix, size;
    int                 rc;

    cik = "0000355916";
    series = "S000002876";

    list = EDGARLookupSeries(cik, series);
    if (IsError()) {
      rc = GetLastError();
      AddMessage("CIK/Series Not found %s, 0x%08X", cik, rc);
      exit;
      }

    size = ArrayGetAxisDepth(list);

    while (ix < size) {
      s1 = ArrayGetKeyName(list, ix);
      AddMessage("%3d - %-30s : %s", ix, s1, list[ix]);
      ix++;
      }

This will result in a fairly long list of data, some of it presented in the log below:

  0 - CompanyName                    : BlackRock Variable Series Funds, Inc.
  1 - CIK                            : 0000355916
  2 - SeriesID                       : S000002876
  3 - SeriesName                     : BlackRock Large Cap Core V.I. Fund
  4 - SeriesStatus                   : Active
  5 - Classes                        : C000007905 C000007906 C000007907

The company database operates outside of EDGAR operation hours and is normally available on a 24/7 basis.

Repeatedly calling with the same CIK will not likely pound the SEC’s server since both the application and WinInet will cache pages. Further, if changes are made to the SEC database, they are not likely to quickly appear when referenced from the EDGARLookupCIK function.

Related Functions

Platform Support

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

Legato IDE, Legato Basic