Skip to content

commodities

github-actions[bot] edited this page Aug 25, 2026 · 2 revisions

@elite-dangerous-almanac/core / commodities

commodities

Elite Dangerous market commodities — the goods traded at station commodity markets, standard and rare.

Every lookup searches both registries by default — import the function and call it:

import { getCommodityByName, commoditiesInCategory } from '@elite-dangerous-almanac/core/commodities';

getCommodityByName('gold')?.category;   // -> 'Metals'
commoditiesInCategory('Metals').length; // -> every metal, standard and rare

The by-key lookups also take an optional trailing argument to narrow the search to one registry, or to an array you have filtered yourself. It must be one of the exported catalogues by reference; ALL_COMMODITIES (or omitting it) is the one that answers from an index rather than a scan:

import { getCommodityByName } from '@elite-dangerous-almanac/core/commodities';
import { COMMODITIES } from '@elite-dangerous-almanac/core/commodities/commodities-standard';

getCommodityByName('lavian brandy', COMMODITIES); // -> null; it is a rare

A lookup that returns an array takes no catalogue — narrow its result with .filter():

import { commoditiesInCategory } from '@elite-dangerous-almanac/core/commodities';

commoditiesInCategory('Metals').filter((c) => !c.rare).length; // -> the standard ones only

Interfaces

Type Aliases

Variables

Functions

API

Guides
astro
Classes (1)
ProceduralSystem

Properties

Accessors

Methods

Interfaces (16)
Type Aliases (3)
Variables (11)
Functions (37)
Subpath modules (3)
commodities
Interfaces (1)
Type Aliases (1)
Variables (3)
Functions (3)
equipment
Interfaces (6)
Type Aliases (8)
Variables (3)
Functions (10)
Subpath modules (2)
i18n
Interfaces (1)
Type Aliases (1)
Functions (17)
materials
Enumerations (2)
Interfaces (2)
Type Aliases (2)
Variables (9)
Functions (9)
ships
Classes (3)
BuildMetrics

Methods

LoadoutEditError

Constructors

Properties

Methods

ShipLoadout

Accessors

Methods

Interfaces (125)
Type Aliases (44)
Variables (10)
Functions (85)
Subpath modules (8)

Clone this wiki locally