Skip to content

Strange Behavior with int'l tickers #48

@lilly-lumosity

Description

@lilly-lumosity

Hello,

Not an urgent issue just something I noticed and wanted to bring to your attention. I use this function to get sec filings for US tickers, and accidentally ran it on a few Canadian tickers today ("RY CN", "TD CN", "BMO CN"). To my surprise, instead of returning nothing (as these companies do not file 8Ks), I got a response containing other companies 8Ks- each of them returning the same 324 filings. Interestingly the tickers in the responses are affiliated with Canada but listed on the NYSE.
Again, not super urgent as I mistakenly came across this bug, just wanted to raise it!

Thanks for maintaining this great package!

Lilly

Response (truncated)

[{'ticker': 'LGF.A',
  'formType': '8-K',
  'accessionNo': '0001193125-23-303999',
  'cik': '929351',
  'companyNameLong': 'LIONS GATE ENTERTAINMENT CORP /CN/ (Filer)',
...

{'ticker': 'CP',
  'formType': '8-K',
  'accessionNo': '0000016875-23-000033',
  'cik': '16875',
  'companyNameLong': 'CANADIAN PACIFIC KANSAS CITY LTD/CN (Filer)',
  'companyName': 'CANADIAN PACIFIC KANSAS CITY LTD/CN',
...

 {'ticker': 'FTK',
  'formType': '8-K',
  'accessionNo': '0000928054-23-000118',
  'cik': '928054',
  'companyNameLong': 'FLOTEK INDUSTRIES INC/CN/ (Filer)',
...
]

Function

 query_string = f'ticker:{ticker} AND formType:"{filing_type}" AND NOT formType:"{filing_type}/A"  AND NOT formType: "NT {filing_type}" AND NOT formType:"S-{filing_type}" AND filedAt:[{start_date} TO {end_date}]'

    initial_query = {
        "query": {"query_string": {"query": query_string}},
        "from": "0",
        "size": "50",
        "sort": [{"filedAt": {"order": "desc"}}],
    }


    response = requests.post(
        "https://api.sec-api.io", headers=headers, json=initial_query
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions