fca_api.raw_api#
This module implements the low-level Financial Services Register API client.
It provides direct access to the FS Register API endpoints with minimal abstraction/data validation.
- class fca_api.raw_api.FcaApiResponse(response: Response)[source]#
A simple
httpx.Response-based wrapper for the API responses.- __init__(response: Response) None[source]#
Initialiser requiring a
httpx.Responseobject.- Parameters:
response (httpx.Response) – The response from the original request.
- property fca_api_status: str#
The status message of the API response.
- Returns:
The status message of the API response.
- Return type:
str
- Type:
str
- property result_info: dict#
The pagination information in the API response.
- Returns:
The pagination information in the API response.
- Return type:
dict
- Type:
dict
- property message: str#
The status message in the API response.
- Returns:
The status message in the API response.
- Return type:
str
- Type:
str
- property data: T#
The data in the API response.
- Returns:
The data in the API response - will usually be either a
dictor alistof dicts.- Return type:
T
- Type:
dictorlist
- class fca_api.raw_api.RawClient(credentials: Tuple[str, str] | AsyncClient, api_limiter: Callable[[], AsyncContextManager[None, bool | None]] | None = None)[source]#
Low-level client for the Financial Services Register API (V0.1).
This client provides direct access to the FS Register API endpoints with minimal abstraction/data validation.
Consult the API documentation for further details.
https://register.fca.org.uk/Developer/s/
- __init__(credentials: Tuple[str, str] | AsyncClient, api_limiter: Callable[[], AsyncContextManager[None, bool | None]] | None = None) None[source]#
Initialiser accepting either API credentials or a pre-configured session.
- Parameters:
credentials – Connection credentials. Supports two forms: 1. A tuple of (api_username: str, api_key: str) 2. An instance of httpx.Client (with correct headers set)
api_limiter (Function returning async context, optional) –
An optional asynchronous callable to be used as a rate limiter for API calls. If not provided, no rate limiting is applied.
- Suggested package:
- property api_session: AsyncClient#
The API session instance.
- Return type:
httpx.AsyncClient
- Type:
httpx.AsyncClient
- property api_version: str#
The API version being used by the client.
- Returns:
The API version being used by the client.
- Return type:
str
- Type:
str
- async common_search(resource_name: str, resource_type: Literal['firm', 'individual', 'fund'], page: int | None = None) FcaApiResponse[list[dict[str, Any]]][source]#
FcaApiResponse: Returns a response containing the results of a search using the FS Register API common search API endpoint.Directly calls the API common search endpoint:
/V0.1/Search?q=resource_name>&type=resource_type
to perform a case-insensitive search in the FS Register on the given resource name (or name substring) and resource type (
"firm","individual","fund").Returns an
FcaApiResponseobject if the API call completes without exceptions or errors.- Parameters:
resource_name (str) – The name (or name substring) of a resource to search for in the FS Register, e.g.
"ABC Company","John Smith","International Super Fund".resource_type (str) – The resource type to search for - according to the API this must be one of the following strings:
"firm","individual", or"fund".
- Returns:
Wrapper of the API response object - there may be no data in the response if no matching resources are found.
- Return type:
FcaApiResponse[list[dict[str, Any]]]
- Raises:
FcaRequestError – If there was a
httpx.RequestErrorin making the original request.
- async search_frn(firm_name: str, page: int | None = None) FcaApiResponse[list[dict[str, str]]][source]#
FcaApiResponse: Returns a response containing firm records matching the given firm name.Calls the common_search method to perform the search.
Returns a FcaApiResponse containing the api response with matching firm records.
- Parameters:
firm_name (str) –
The firm name (case insensitive).
Returns an API response with all matching form records.
- Returns:
A response containing a list of matching firm records.
- Return type:
FcaApiResponse[list[dict[str, str]]]
- async get_firm(frn: str) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing firm details, given its firm reference number (FRN)Handler for the top-level firm details API endpoint:
/V0.1/Firm/{FRN}
Returns a
FcaApiResponse, with data if the FRN is found, otherwise with no data.- Parameters:
frn (str) – The firm reference number (FRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the FRN isn’t found.
- Return type:
- async get_firm_names(frn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing the alternative or secondary trading name details of a firm, given its firm reference number (FRN).Handler for the firm names API endpoint:
/V0.1/Firm/{FRN}/Names
Returns a
FcaApiResponse, with data if the FRN is found, otherwise with no data.- Parameters:
frn (str) – The firm reference number (FRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the FRN isn’t found.
- Return type:
- async get_firm_addresses(frn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing the address details of a firm, given its firm reference number (FRN).Handler for the firm address details API endpoint:
/V0.1/Firm/{FRN}/Address
Returns a
FcaApiResponse, with data if the FRN is found, otherwise with no data.- Parameters:
frn (str) – The firm reference number (FRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the FRN isn’t found.
- Return type:
- async get_firm_controlled_functions(frn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing the controlled functions associated with a firm, given its firm reference number (FRN).Handler for the firm controlled functions API endpoint:
/V0.1/Firm/{FRN}/CF
Returns a
FcaApiResponse, with data if the FRN is found, otherwise with no data.- Parameters:
frn (str) – The firm reference number (FRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the FRN isn’t found.
- Return type:
- async get_firm_individuals(frn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing the individuals associated with a firm, given its firm reference number (FRN).Handler for the firm individuals API endpoint:
/V0.1/Firm/{FRN}/Individuals
Returns a
FcaApiResponse, with data if the FRN is found, otherwise with no data.- Parameters:
frn (str) – The firm reference number (FRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the FRN isn’t found.
- Return type:
- async get_firm_permissions(frn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing the permissions associated with a firm, given its firm reference number (FRN).Handler for the firm permissions API endpoint:
/V0.1/Firm/{FRN}/Permissions
Returns a
FcaApiResponse, with data if the FRN is found, otherwise with no data.- Parameters:
frn (str) – The firm reference number (FRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the FRN isn’t found.
- Return type:
- async get_firm_requirements(frn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing the requirements associated with a firm, given its firm reference number (FRN).Handler for the firm requirements API endpoint:
/V0.1/Firm/{FRN}/Requirements
Returns a
FcaApiResponse, with data if the FRN is found, otherwise with no data.- Parameters:
frn (str) – The firm reference number (FRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the FRN isn’t found.
- Return type:
- async get_firm_requirement_investment_types(frn: str, req_ref: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing any investment types listed for a specific requirement associated with a firm, given its firm reference number (FRN).Handler for the firm requirement investment types API endpoint:
/V0.1/Firm/{FRN}/Requirements/<ReqRef>/InvestmentTypes
Returns a
FcaApiResponse, with data if the FRN is found, otherwise with no data.- Parameters:
frn (str) – The firm reference number (FRN).
req_ref (str) – The requirement reference number as a string.
- Returns:
Wrapper of the API response object - there may be no data in the response if the FRN isn’t found.
- Return type:
- async get_firm_regulators(frn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing the regulators associated with a firm, given its firm reference number (FRN).Handler for the firm regulators API endpoint:
/V0.1/Firm/{FRN}/Regulators
Returns a
FcaApiResponse, with data if the FRN is found, otherwise with no data.- Parameters:
frn (str) – The firm reference number (FRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the FRN isn’t found.
- Return type:
- async get_firm_passports(frn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing the passports associated with a firm, given its firm reference number (FRN).Handler for the firm passports API endpoint:
/V0.1/Firm/{FRN}/Passports
Returns a
FcaApiResponse, with data if the FRN is found, otherwise with no data.- Parameters:
frn (str) – The firm reference number (FRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the FRN isn’t found.
- Return type:
- async get_firm_passport_permissions(frn: str, country: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing country-specific passport permissions for a firm and a country, given its firm reference number (FRN) and country name.Handler for the firm passport permissions API endpoint:
/V0.1/Firm/{FRN}/Requirements/{Country}/Permission
Returns a
FcaApiResponse, with data if the FRN is found, otherwise with no data.- Parameters:
frn (str) – The firm reference number (FRN).
country (str) – The country name.
- Returns:
Wrapper of the API response object - there may be no data in the response if the FRN isn’t found.
- Return type:
- async get_firm_waivers(frn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing any waivers applying to a firm, given its firm reference number (FRN).Handler for the firm waivers API endpoint:
/V0.1/Firm/{FRN}/Waivers
Returns a
FcaApiResponse, with data if the FRN is found, otherwise with no data.- Parameters:
frn (str) – The firm reference number (FRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the FRN isn’t found.
- Return type:
- async get_firm_exclusions(frn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing any exclusions applying to a firm, given its firm reference number (FRN).Handler for the firm exclusions API endpoint:
/V0.1/Firm/{FRN}/Exclusions
Returns a
FcaApiResponse, with data if the FRN is found, otherwise with no data.- Parameters:
frn (str) – The firm reference number (FRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the FRN isn’t found.
- Return type:
- async get_firm_disciplinary_history(frn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing the disciplinary history of a firm, given its firm reference number (FRN).Handler for the firm disciplinary history API endpoint:
/V0.1/Firm/{FRN}/DisciplinaryHistory
Returns a
FcaApiResponse, with data if the FRN is found, otherwise with no data.- Parameters:
frn (str) – The firm reference number (FRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the FRN isn’t found.
- Return type:
- async get_firm_appointed_representatives(frn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing information on the appointed representatives of a firm, given its firm reference number (FRN).Handler for the firm appointed representatives API endpoint:
/V0.1/Firm/{FRN}/AR
Returns a
FcaApiResponse, with data if the FRN is found, otherwise with no data.- Parameters:
frn (str) – The firm reference number (FRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the FRN isn’t found.
- Return type:
- async search_irn(individual_name: str, page: int | None = None) FcaApiResponse[list[dict[str, str]]][source]#
FcaApiResponse: Returns a response containing individual records matching the given individual name.Returns a FcaApiResponse containing the api response with matching individual records.
- Parameters:
individual_name (str) – The individual name (case insensitive). The name needs to be precise enough to guarantee a unique return value, otherwise a JSON array of all matching records are returned.
- Returns:
A response containing a list of matching individual records.
- Return type:
FcaApiResponse[list[dict[str, str]]]
- async get_individual(irn: str) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing individual details, given their individual reference number (IRN)Handler for top-level individual details API endpoint:
/V0.1/Individuals/{IRN}
Returns a
FcaApiResponse, with data if the IRN is found, otherwise with no data.- Parameters:
irn (str) – The individual reference number (IRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the IRN isn’t found.
- Return type:
- async get_individual_controlled_functions(irn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing the controlled functions associated with an individual, given their individual reference number (FRN).Handler for the individual controlled functions API endpoint:
/V0.1/Firm/{IRN}/CF
Returns a
FcaApiResponse, with data if the IRN is found, otherwise with no data.- Parameters:
irn (str) – The individual reference number (IRN).
- Returns:
Wrapepr of the API response object - there may be no data in the response if the IRN isn’t found.
- Return type:
- async get_individual_disciplinary_history(irn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing the disciplinary history of an individual, given their individual reference number (FRN).Handler for the individual disciplinary history API endpoint:
/V0.1/Firm/{IRN}/DisciplinaryHistory
Returns a
FcaApiResponse, with data if the IRN is found, otherwise with no data.- Parameters:
irn (str) – The individual reference number (IRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the IRN isn’t found.
- Return type:
- async search_prn(fund_name: str, page: int | None = None) FcaApiResponse[list[dict[str, str]]][source]#
FcaApiResponse: Returns a response containing fund records matching the given fund name.Returns a FcaApiResponse containing the api response with matching fund records.
- Parameters:
fund_name (str) – The fund name (case insensitive). The name needs to be precise enough to guarantee a unique return value, otherwise a JSON array of all matching records are returned.
- Returns:
A response containing a list of matching fund records.
- Return type:
FcaApiResponse[list[dict[str, str]]]
- __weakref__#
list of weak references to the object
- async get_fund(prn: str) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing fund (or collective investment scheme (CIS)) details, given its product reference number (PRN)Handler for top-level fund details API endpoint:
/V0.1/CIS/{PRN}
Returns a
FcaApiResponse, with data if the PRN is found, otherwise with no data.- Parameters:
prn (str) – The product reference number (PRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the PRN isn’t found.
- Return type:
- async get_fund_names(prn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing the alternative or secondary trading name details of a fund (or collective investment scheme (CIS)), given its product reference number (PRN).Handler for top-level fund names API endpoint:
/V0.1/CIS/{PRN}/Names
Returns a
FcaApiResponse, with data if the PRN is found, otherwise with no data.- Parameters:
prn (str) – The product reference number (PRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the PRN isn’t found.
- Return type:
- async get_fund_subfunds(prn: str, page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing the subfund details of a fund (or collective investment scheme (CIS)), given its product reference number (PRN).Handler for top-level subfund details API endpoint:
/V0.1/CIS/{PRN}/Subfund
Returns a
FcaApiResponse, with data if the PRN is found, otherwise with no data.- Parameters:
prn (str) – The product reference number (PRN).
- Returns:
Wrapper of the API response object - there may be no data in the response if the PRN isn’t found.
- Return type:
- async get_regulated_markets(page: int | None = None) FcaApiResponse[source]#
FcaApiResponse: Returns a response containing details of all current regulated markets, as defined in UK and EU / EEA financial services legislation.For further information consult the API documentation:
https://register.fca.org.uk/Developer/s/
or the FCA glossary:
https://www.handbook.fca.org.uk/handbook/glossary/G978.html?date=2007-01-20
- Returns:
Wrapper of the API response object - there may be no data in the response if the common search query produces no results.
- Return type: