Skip to content

CookBook

Stefan Morrell edited this page Mar 26, 2026 · 4 revisions

Contents


Cookbook

Practical examples of using Trade Dangerous in common or slightly odd situations.

This page is deliberately recipe-driven. It is not the full option reference, and it does not try to duplicate it.

For installation and first-time setup, see the Setup Guide.

For the full command reference, see Command Line Options.

For plugin-specific import details, see Plugin Options.

Read This First

These examples assume a normal installed TD, so the command is:

trade

You'd only trade.py or python -m trade if you've done something mad like download the repo, rather than follow the normal install method.

The examples also use the long option names for clarity. TD accepts many abbreviations, but the longer forms are usually easier to read and easier to come back to later.

One important modern detail: for run, the current option name is --jumps-per. Older text or older error messages may still refer to --jumps.

Results will vary depending on your local database and how fresh your data is, so this page focuses on the commands, not on pretending your output will match somebody else's line-for-line.

Refresh Your Data The Normal Way

For nearly all users, the normal update path is:

trade import -P eddblink

For a fuller refresh, we normally recommend skipping vendor data unless you specifically need it:

trade import -P eddblink -O all,skipvend

If you prefer the GUI, start:

tradegui

and use the Import workspace there.

List Stations In A System

Use local with --ly 0, and ask for detail so the stations are shown.

trade local @sol --ly 0 -v

If you want the extra Itms column as well, use -vv:

trade local @sol --ly 0 -vv

Using @sol forces TD to treat sol as a system name.

Find Systems Near A System

To list systems within a few light years of a system:

trade local @lave --ly 8

This is the basic "what is near here?" command.

If you give TD a station instead of a system, it will use the station's host system.

Find Trading Stations Near You

If you want nearby systems, but only care about stations that are actually useful for trading:

trade local @sol --ly 15 --stations --trading -v

That asks for systems within 15ly of Sol, filters to systems with stations, filters again to stations with market/trade data, and shows the station rows.

You can add the usual station filters as well, for example:

trade local @sol --ly 15 --stations --trading --pad L --no-planet -v

Plan An In-System Trading Tour

If you want TD to stay inside one multi-station system, set --jumps-per 0.

For example, to make TD plan a trading tour within Sol:

trade run --from @sol --capacity 50 --credits 40000 --ly-per 15 --jumps-per 0 --hops 8 --unique -vv

The important parts are:

  • --from @sol means "start somewhere in Sol"
  • --jumps-per 0 means "do not leave the system"
  • --unique means "do not revisit stations"
  • --hops 8 means 8 station-to-station legs

If you want to force a specific starting station instead, give a station:

trade run --from "sol/mars high" --capacity 50 --credits 40000 --ly-per 15 --jumps-per 0 --hops 8 --unique

Plan A Route That Comes Back Home

If you want a route that returns to where it started, use --loop.

For example:

trade run --from @alioth --via @lagunnosso --loop --hops 7 --jumps-per 2 --capacity 52 --credits 268224 --ly-per 14.18 --empty-ly 15.92 --insurance 100000 --progress

Useful knobs here are:

  • --loop to come back to the starting station
  • --via to force a place to be included
  • --avoid to exclude places or items
  • --unique to avoid revisiting stations
  • --insurance so you do not trade away your rebuy

If you specify several --via places, make sure --hops is high enough to allow them.

Compare Two Stations Directly

If you already know the two stations you care about, use trade trade:

trade trade "sol/abraham lincoln" "lave/lave station"

A few useful variants:

trade trade "sol/abraham lincoln" "lave/lave station" --limit 10
trade trade "sol/abraham lincoln" "lave/lave station" --fill
trade trade "sol/abraham lincoln" "lave/lave station" --reverse

Use this when you want the station-to-station trade table, rather than a full route search.

Find Somewhere To Buy An Item

Use buy:

trade buy gold --near @sol --ly 15

If you want stations carrying several things at once:

trade buy "gold,silver" --near @sol --ly 15 --one-stop

If you want cheaper results first rather than nearer ones:

trade buy gold --near @sol --ly 15 --price-sort

If you want bigger stock first:

trade buy gold --near @sol --ly 15 --units-sort

Find Somewhere To Sell An Item

Use sell:

trade sell gold --near @sol --ly-per 15

If you want best price first rather than nearest first:

trade sell gold --near @sol --ly-per 15 --price-sort

Yes, sell uses --ly-per while buy uses --ly when searching around a --near system. That is the current CLI, not a typo in this page.

Inspect One Station Market

If you just want to inspect a station's market, use market:

trade market "sol/abraham lincoln"

Only show what the station is selling:

trade market "sol/abraham lincoln" --selling

Only show what the station is buying:

trade market "sol/abraham lincoln" --buying

This is usually the quickest way to answer "what does this station actually stock or pay for?"

Find Old Data To Refresh

If you want to see stale data in your database:

trade olddata --limit 20

If you want to find stale data near a particular area and sort it into a practical refresh route:

trade olddata --near @sol --ly 20 --route --min-age 7

That is useful if you are deliberately revisiting old stations to refresh your local data.

Find Rares Near A System

Use rares:

trade rares @lave --ly 180

If you want to sort by price rather than distance:

trade rares @lave --ly 180 --price-sort --limit 10

If you want rares near one place but at least a certain distance away from another:

trade rares @lave --ly 180 --away 120 --from @sol

--away and --from are a pair. If you use one, you need the other.

Want The Full Reference

This page is intentionally the quick practical version.

For the full detail, use:

A Note On Deprecated Workflows

Older copies of the documentation talked a lot about update, station, direct station editing, and similar early-era workflows.

Those are no longer the normal supported way of working with TD.

For current use, prefer:

  • trade import -P eddblink
  • trade import -P spansh when you specifically want that path
  • EDMC + UpdateTD for solo/self-curated database workflows

If you are reading old examples on the internet and they tell you to build your workflow around update or station, assume you are looking at archaeology rather than current documentation.

Clone this wiki locally