Using the Package
Entities
The dataset currently holds 152 entities. Each entity is a structured record with brand metadata, logos, financial identifiers, and category tags. All accessors return plain data — no classes, no wrappers.
getEntity
Look up a single entity by its id. Returns undefined for an unknown id.
import { getEntity } from '@finmarks/finmarks';
const hdfc = getEntity('hdfc-bank');
hdfc?.name; // 'HDFC Bank'
hdfc?.brand_color; // '#004C8F'
hdfc?.ifsc_prefix; // 'HDFC'
hdfc?.categories; // ['private-bank', 'upi-psp']mustGetEntity
Like getEntity but throws when the id is unknown. Use this when a missing entity means a bug in your code rather than an expected case — it saves optional chaining on a value you know exists.
import { mustGetEntity } from '@finmarks/finmarks';
const paytm = mustGetEntity('paytm'); // throws if not found
paytm.name; // 'Paytm' — no ?. neededhasEntity
Returns true if an entity with this id exists in the dataset.
import { hasEntity } from '@finmarks/finmarks';
hasEntity('phonepe'); // true
hasEntity('not-real'); // falsegetAllEntities
Returns every entity in the dataset. Pass { includeInactive: false } to drop entities with a status other than 'active'.
import { getAllEntities } from '@finmarks/finmarks';
// All entities, including defunct and acquired
getAllEntities();
// Active entities only
getAllEntities({ includeInactive: false });getAllEntityIds
Returns every entity id, in dataset order.
import { getAllEntityIds } from '@finmarks/finmarks';
const ids = getAllEntityIds();
// ['hdfc-bank', 'icici-bank', 'sbi', ...]Entity status
Entities are not deleted when they are acquired or shut down — they stay in the dataset with an updated status, because old logos and identifiers still appear in real data.
| Status | Meaning |
|---|---|
active | Operating under its own brand |
acquired | No longer independent; acquired_by is set |
defunct | Shut down |
rebranded | Operating under a different name; acquired_by points at the successor |