fca_api.async_api#

High-level Financial Services Register API client.

Wraps the raw HTTP client to provide Pydantic-typed responses, cursor-based pagination, and an optional :class:`~fca_api.types.pagination.PageTokenSerializer` hook for signing or encrypting pagination tokens. See :class:`Client`.

class fca_api.async_api.Client(credentials: Tuple[str, str] | AsyncClient, api_limiter: Callable[[], AsyncContextManager[None, bool | None]] | None = None, page_token_serializer: PageTokenSerializer | None = None)[source]#

High-level Financial Services Register API client.

Each paginated endpoint returns a :class:`~fca_api.types.pagination.MultipageList` holding one batch and a pagination.next_page cursor. Advance with :meth:`fetch_next_page`, or pass result_count=N to collect at least N items in a single call.

Example:

async with Client(credentials=("email@example.com", "api_key")) as client:
    page = await client.search_frn("barclays")
    for firm in page.data:
        print(firm.name)
__init__(credentials: Tuple[str, str] | AsyncClient, api_limiter: Callable[[], AsyncContextManager[None, bool | None]] | None = None, page_token_serializer: PageTokenSerializer | None = None) None[source]#

Initialize the client.

Parameters:
  • credentials(email, api_key) tuple, or a pre-configured httpx.AsyncClient with auth headers set.

  • api_limiter – Optional zero-arg callable returning an async context manager; entered around each HTTP request.

  • page_token_serializer – Optional hook to sign/encrypt pagination tokens — outgoing tokens pass through serialize and incoming tokens through deserialize.

async aclose() None[source]#

Close the underlying HTTP session.

property raw_client: RawClient#

The underlying raw API client.

property api_version: str#

The API version string.

async fetch_next_page(next_page: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Opaque pagination cursor. Pass unchanged to ``Client.fetch_next_page`` to retrieve the next page; do not construct, parse, or modify it.')]) MultipageList[source]#

Fetch the next page given a pagination.next_page token.

The token embeds the originating endpoint and arguments, so resuming needs only the token — no need to retain the original query. Suitable for stateless services that hand the cursor to a caller and resume on a later request.

Raises:

ValueError – If the token does not name a resumable endpoint (position-only, malformed, or tampered).

async search_frn(firm_name: str, result_count: int = 1) MultipageList[FirmSearchResult][source]#

Search for firms by name (partial match, case-insensitive).

Parameters:
  • firm_name – Firm name (or substring) to search for.

  • result_count – Minimum items to collect; the client issues multiple API calls if needed. Defaults to 1 (one API page).

async search_irn(individual_name: str, result_count: int = 1) MultipageList[IndividualSearchResult][source]#

Search for individuals by name.

Parameters:
  • individual_name – Individual name to search for.

  • result_count – Minimum number of results to return.

Returns:

A page of individual search results with pagination metadata.

async search_prn(fund_name: str, result_count: int = 1) MultipageList[FundSearchResult][source]#

Search for funds by name.

Parameters:
  • fund_name – Fund name to search for.

  • result_count – Minimum number of results to return.

Returns:

A page of fund search results with pagination metadata.

async get_firm(frn: str) FirmDetails[source]#

Get comprehensive firm details by FRN.

Parameters:

frn – The Firm Reference Number (FRN).

Returns:

Complete firm details.

async get_firm_names(frn: str, result_count: int = 1) MultipageList[FirmNameAlias][source]#

Get firm names (current and previous) by FRN.

Parameters:
  • frn – The firm’s FRN.

  • result_count – Minimum number of results to return.

Returns:

A page of firm name aliases with pagination metadata.

async get_firm_addresses(frn: str, result_count: int = 1) MultipageList[FirmAddress][source]#

Get firm addresses by FRN.

Parameters:
  • frn – The firm’s FRN.

  • result_count – Minimum number of results to return.

Returns:

A page of firm addresses with pagination metadata.

async get_firm_controlled_functions(frn: str, result_count: int = 1) MultipageList[FirmControlledFunction][source]#

Get firm controlled functions by FRN.

Parameters:
  • frn – The firm’s FRN.

  • result_count – Minimum number of results to return.

Returns:

A page of firm controlled functions with pagination metadata.

async get_firm_individuals(frn: str, result_count: int = 1) MultipageList[FirmIndividual][source]#

Get individuals associated with a firm by FRN.

Parameters:
  • frn – The firm’s FRN.

  • result_count – Minimum number of results to return.

Returns:

A page of firm individuals with pagination metadata.

async get_firm_permissions(frn: str, result_count: int = 1) MultipageList[FirmPermission][source]#

Get firm permissions by FRN.

Parameters:
  • frn – The firm’s FRN.

  • result_count – Minimum number of results to return.

Returns:

A page of firm permissions with pagination metadata.

async get_firm_requirements(frn: str, result_count: int = 1) MultipageList[FirmRequirement][source]#

Get firm requirements by FRN.

Parameters:
  • frn – The firm’s FRN.

  • result_count – Minimum number of results to return.

Returns:

A page of firm requirements with pagination metadata.

async get_firm_requirement_investment_types(frn: str, req_ref: str, result_count: int = 1) MultipageList[FirmRequirementInvestmentType][source]#

Get investment types for a specific firm requirement.

Parameters:
  • frn – The Firm Reference Number (FRN) of the firm.

  • req_ref – The requirement reference identifier.

  • result_count – Minimum number of results to return.

Returns:

A page of investment types with pagination metadata.

async get_firm_regulators(frn: str, result_count: int = 1) MultipageList[FirmRegulator][source]#

Get firm regulators by FRN.

Parameters:
  • frn – The firm’s FRN.

  • result_count – Minimum number of results to return.

Returns:

A page of firm regulators with pagination metadata.

async get_firm_passports(frn: str, result_count: int = 1) MultipageList[FirmPassport][source]#

Get firm passports by FRN.

Parameters:
  • frn – The firm’s FRN.

  • result_count – Minimum number of results to return.

Returns:

A page of firm passports with pagination metadata.

async get_firm_passport_permissions(frn: str, country: str, result_count: int = 1) MultipageList[FirmPassportPermission][source]#

Get firm passport permissions by FRN and country.

Parameters:
  • frn – The firm’s FRN.

  • country – The country code.

  • result_count – Minimum number of results to return.

Returns:

A page of firm passport permissions with pagination metadata.

async get_firm_waivers(frn: str, result_count: int = 1) MultipageList[FirmWaiver][source]#

Get firm waivers by FRN.

Parameters:
  • frn – The firm’s FRN.

  • result_count – Minimum number of results to return.

Returns:

A page of firm waivers with pagination metadata.

async get_firm_exclusions(frn: str, result_count: int = 1) MultipageList[FirmExclusion][source]#

Get firm exclusions by FRN.

Parameters:
  • frn – The firm’s FRN.

  • result_count – Minimum number of results to return.

Returns:

A page of firm exclusions with pagination metadata.

async get_firm_disciplinary_history(frn: str, result_count: int = 1) MultipageList[FirmDisciplinaryRecord][source]#

Get disciplinary history records for a firm.

Parameters:
  • frn – The Firm Reference Number (FRN) of the firm.

  • result_count – Minimum number of results to return.

Returns:

A page of disciplinary records with pagination metadata.

async get_firm_appointed_representatives(frn: str, result_count: int = 1) MultipageList[FirmAppointedRepresentative][source]#

Get firm appointed representatives by FRN.

Parameters:
  • frn – The firm’s FRN.

  • result_count – Minimum number of results to return.

Returns:

A page of firm appointed representatives with pagination metadata.

async get_individual(irn: str) Individual[source]#

Get individual details by IRN.

Parameters:

irn – The individual’s IRN.

Returns:

The individual’s details.

async get_individual_controlled_functions(irn: str, result_count: int = 1) MultipageList[IndividualControlledFunction][source]#

Get controlled functions for an individual.

Parameters:
  • irn – The Individual Reference Number (IRN).

  • result_count – Minimum number of results to return.

Returns:

A page of controlled functions with pagination metadata.

async get_individual_disciplinary_history(irn: str, result_count: int = 1) MultipageList[IndividualDisciplinaryRecord][source]#

Get disciplinary history records for an individual.

Parameters:
  • irn – The Individual Reference Number (IRN).

  • result_count – Minimum number of results to return.

Returns:

A page of disciplinary records with pagination metadata.

__weakref__#

list of weak references to the object

async get_fund(prn: str) ProductDetails[source]#

Get fund details by PRN.

Parameters:

prn – The fund’s PRN.

Returns:

The fund’s details.

async get_fund_names(prn: str, result_count: int = 1) MultipageList[ProductNameAlias][source]#

Get fund names by PRN.

Parameters:
  • prn – The fund’s PRN.

  • result_count – Minimum number of results to return.

Returns:

A page of fund name aliases with pagination metadata.

async get_fund_subfunds(prn: str, result_count: int = 1) MultipageList[SubFundDetails][source]#

Get fund sub-funds by PRN.

Parameters:
  • prn – The fund’s PRN.

  • result_count – Minimum number of results to return.

Returns:

A page of sub-fund details with pagination metadata.

async get_regulated_markets(result_count: int = 1) MultipageList[RegulatedMarket][source]#

Get regulated markets.

Parameters:

result_count – Minimum number of results to return.

Returns:

A page of regulated markets with pagination metadata.