soldermaskdocs

Stock and pricing

This stage checks whether you can build the board today, at the quantities people order. It reads stock and price for every part from the parts catalogue on disk.

Stock at design time answers the question for one board. inventory.sweep() asks again at 1, 10, 25 and 100 boards. Twenty-five is a typical first run.

Where the figures come from

The sweep looks each part up once, by exact LCSC code, for the first quantity. The other quantities use the figures the part was resolved with.

SettingThe lookup readsThe workbench says
DefaultThe catalogue on disk. Its figures are as old as that catalogue.catalogue
SOLDERMASK_PARTS=jlcsearchjlcsearch, over the networklive

The catalogue is the mirror's last daily build, or JLCPCB's own catalogue from the last soldermask setup --parts. To see its date:

  • soldermask setup prints it on the parts line, such as 723,227 components, from JLCPCB's API 2026-09-16.
  • The MCP status tool returns it as catalogue.built.

See Parts and packages.

With JLCPCB's API, the first quantity can disagree with the rest

With API credentials set and the Parts API granted, a part is resolved with the API's stock and price. The first quantity still reads the catalogue on disk, so its figures can differ from the other quantities.

Choosing the quantities

WhereHow
Command line--qty N, repeated, replaces the four quantities. The stock line shows the smallest, and inventory.json holds them all.
MCP build toolquantities, a list of whole numbers
WorkbenchShows the quantities the build swept. The buttons on Cost switch between them.

What each line reports

For every distinct part, the report lists:

ColumnMeaning
ReferencesThe parts on the board that use this code
Per boardHow many one board needs
NeededPer board × boards × 1.02 for assembly loss, rounded up. One board of a part used once needs 2.
StockUnits the lookup reports
Unit priceThe price at the quantity break the order lands in
Line costUnit price × needed
RiskOne of the four below
RiskMeaning
okStock covers the run with margin
tightStock is under five times what is needed. Stock moves between quote and order.
shortStock is under what is needed. This quantity cannot be built today.
goneThe lookup shows no stock

Totals

  • A quantity is buildable when no line is short or gone.
  • Each quantity's total is the parts cost plus a setup fee of $3 per distinct extended part. Basic parts have no fee.
  • The report also gives the cost per board.
  • Headroom is stock ÷ needed. The workbench shows it as runs, and anything past a thousand as 999+×.

The whole report is saved in board.json under inventory. The projects page and the version list show the one-board total as the cost.

The total is the parts, not the order

It leaves out the boards themselves, the assembly service and shipping. A part on the back needs JLCPCB's dearer Standard assembly. The fab check flags that: see JLCPCB's own table.

Stock never changes the verdict

The pass rule does not read the stock report. A board can pass and still be short at 100.

A failed lookup keeps the old figure

If the lookup for one part fails, or finds no row for its code, that line uses the figures from when the part was resolved.

Out of stock is not unresolved

A part that exists but has zero stock today still resolves. It shows as a stock note and a gone line. Stock changes hourly, and a board should not be lost to it. See Parts and packages.

On this page