# getByType · FT4 TypeScript client · Chromia Docs (concept)

> getByType(
    connection: Connection ,
    type: string,
    limit?: OptionalLimit ,
    cursor?: OptionalPageCursor ,
): Promise< PaginatedEntity < Accou

Source: https://docs.chromia.com/pages/ft4-ts-client/functions/accounts.getByType/

Function

# getByType

* ```signature
  getByType(
      connection: Connection,
      type: string,
      limit?: OptionalLimit,
      cursor?: OptionalPageCursor,
  ): Promise<PaginatedEntity<Account>>
  ```

  Fetches all accounts of a specific type as a paginated entity

  #### Parameters

  + connection: [Connection](https://docs.chromia.com/pages/ft4-ts-client/interfaces/ft-session.Connection/)

    the blockchain connection to use
  + type: string

    the type of account to fetch
  + limit: [OptionalLimit](https://docs.chromia.com/pages/ft4-ts-client/types/ft-session.OptionalLimit/) = null

    maximum page size
  + cursor: [OptionalPageCursor](https://docs.chromia.com/pages/ft4-ts-client/types/ft-session.OptionalPageCursor/) = null

    where the page should start

  #### Returns Promise<[PaginatedEntity](https://docs.chromia.com/pages/ft4-ts-client/types/utils.PaginatedEntity/)<[Account](https://docs.chromia.com/pages/ft4-ts-client/interfaces/accounts.Account/)>>

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-ts-client/functions/accounts.getByType.html)Generated API reference, mirrored from the live docs
