Skip to content

User Guide

tromador edited this page Jul 1, 2026 · 9 revisions

Contents


Getting Started

The Basics

For most users, the normal Trade Dangerous commands are:

trade
tradegui

trade is the command-line interface.

tradegui is the graphical interface.

If you installed TD with pip, use trade for the command line and tradegui for the GUI. python trade.py is only for running directly from a cloned source checkout; this guide assumes the normal installed commands.

If you have not installed TD yet, start with the Setup Guide.

Command Line Parameters 101

Trade Dangerous is built around sub-commands.

The first thing you type after trade is the sub-command you want, such as:

  • run to calculate trade runs
  • local to find nearby systems/stations
  • buy to find places selling an item
  • sell to find places buying an item
  • market to inspect a station market

For example:

trade local Mokosh/BetheStation

Some arguments are required. For example, local needs a place to search around.

Other arguments are optional modifiers, usually written with one or two dashes.

trade local --detail Mokosh/BetheStation
trade local -v Mokosh/BetheStation

-v is the short form of --detail, so the above two commands do the same thing.

Some modifiers take a value. You can usually write either:

trade local -v --ly=12 Mokosh/BetheStation
trade local -v --ly 12 Mokosh/BetheStation

TD also accepts many unambiguous abbreviations, but the full option name is usually clearer and safer.

Nobody Can Hear Your Spaces...

If a system or station name contains spaces, you can usually either:

  • remove the spaces
  • or quote the name

For example:

trade local -v --ly=12 mokosh/bethestation
trade local -v --ly=12 "mokosh/bethe station"
trade local -v --ly=12 'mokosh/bethe station'

TD also ignores a lot of punctuation and case when matching names, which is why shortened and squashed forms often work.

There Is Help...

If you are unsure about a command, ask it for help:

trade local --help
trade run --help
trade import --help

For the full command reference, see Command Line Options.

For the GUI, see Graphical User Interface.

Conventions

Terms

We use the term hop to mean picking up cargo from station A, travelling to station B, and selling your cargo there.

A jump is entering hyperspace to travel between different systems.

System and Station Notation

TD generally indicates a system name in uppercase, while station names are displayed as proper names.

The convention:

SYSTEM/Station

is used to qualify a station within a system.

For example:

MOKOSH/Bethe Station

You Do Not Have To Type All Of It

TD tries hard to save you typing.

If what you type uniquely identifies the thing you mean, that is usually good enough.

For example, all of these may work if they remain unambiguous in your database:

trade local "The Ascending Phoenix"
trade local TheAscendingPhoenix
trade local ascendingp

But this breaks down when a name could mean more than one thing.

Disambiguation

This is the part people tend to miss, and it is worth understanding.

A bare name is treated as “this might be a system or a station”.

So:

trade local phoenix

may be ambiguous if phoenix could match both a system and a station.

Force a system match with @

If you want to say “this is definitely a system name”, prefix it with @:

trade local @phoenix

Force a station match with /

If you want to say “this is definitely a station name”, prefix it with /:

trade local /phoenix

Specify both system and station

If you want to search for a station within a system, use:

trade local chi/phoen

or, if you want to force the left-hand side to be treated as a system:

trade local @chi/phoen

This tells TD to find systems matching chi, then search their stations for something matching phoen.

Duplicate system names

TD now also handles the ugly case where more than one system shares the same name.

When that happens, TD may show you indexed forms such as:

Some System@1
Some System@2

If it does, you can use that exact indexed form to pick the one you mean.

For example:

trade local "Lorionis-SOC 13@2"

If TD offers you @1, @2, and so on, use one of those exact forms.

Using Trade Dangerous

The command most people care about most is run.

The run command

A simple example looks like this:

trade run --from "Mokosh/Bethe Station" --credits 20000 --capacity 16 --ly-per 8.56

This asks TD to calculate the best trade run it can find given:

  • your starting point
  • your available credits
  • your cargo capacity
  • your jump range

You can add -v, -vv, and so on for more detail:

trade run --from mok/beth --credits 20000 --capacity 16 --ly-per 8.56 -v
trade run --from mok/beth --credits 20000 --capacity 16 --ly-per 8.56 -vvv

The more detail you ask for, the more TD will tell you about the route, cargo, and profit calculations.

How TD thinks about a route

TD is entirely data-driven.

It does not try to roleplay, and it does not try to guess what “looks nice”. It looks at the data available and calculates the best route it can find within the limits you gave it.

That means:

  • different data produces different routes
  • changing one option can change the whole recommendation
  • more hops is not always better, but sometimes it is dramatically better
  • a route that looks odd may still be the best route available in the data

Important options

The most important run options are usually:

  • --from
  • --to
  • --hops
  • --jumps-per
  • --avoid
  • --via
  • --start-jumps
  • --end-jumps
  • --age

Rather than duplicate the full option help here, use the current reference page:

Command Line Options

Other useful commands

Once you have data, the other commands most people use regularly are:

  • trade buy
  • trade sell
  • trade direct
  • trade market
  • trade local
  • trade nav
  • trade olddata
  • trade buy --rare

Again, see Command Line Options for the full current option details.

If you prefer a GUI, see Graphical User Interface.

Obtaining Data

In order to do anything useful with Trade Dangerous, you need market data.

Recommended path

For nearly all users, the normal way to get data is:

trade import -P eddblink

That is the recommended everyday import path.

For a fuller refresh, we normally recommend:

trade import -P eddblink -O all,skipvend

skipvend is normally recommended unless you specifically need ship vendor and upgrade vendor data.

Other supported import path

spansh is also fully supported:

trade import -P spansh

but for ordinary users eddblink is usually the better choice.

spansh is more important in the wider TD ecosystem than it is in normal day-to-day user workflows.

More detail

For supported plugins and their options, see:

Plugin Options

Shortcuts

Do I Really Have To Type All This Crap?

Not necessarily.

If you do not want to keep typing long commands, you have several options:

  • use the GUI
  • use fromfiles
  • use .tdrc_<command> defaults

The GUI being the obvious answer:

tradegui

If you prefer to stay in the CLI, fromfiles and .tdrc files still work well.

Fromfiles: Options In A Can

A fromfile is a plain text file containing command-line options.

You specify a fromfile by prefixing the filename with +.

For example:

trade nav +sidewinder.tdf

or, if you are trying to be lazy in the proper spirit of TD:

trade nav +sw

Contents Of A Fromfile

Each line corresponds to one position on the command line.

So this:

--ly-per
20

is equivalent to passing those arguments directly.

Default Defaults: .tdrc Files

Each command automatically looks for a file called:

.tdrc_<command>

For example:

.tdrc_nav

If that file exists, its options are read at the start of the command line.

So if .tdrc_nav contains:

--ly-per
20
-v

and you then run:

trade nav sol waruts -vv --ly-per=21

TD behaves as though you had typed all of it together.

Local Price Data

Some Commanders prefer to maintain their own data rather than using crowd-sourced listings.

That is still possible, but the recommended modern workflow has changed.

Recommended modern approach

The preferred modern approach is:

This lets solo/self-curated players update a TD database directly from their own travels without needing .prices files as an intermediate step.

Legacy .prices workflow

Legacy .prices import still works, but it is now a deprecated workflow rather than the preferred one.

You can still import a .prices file directly:

trade import mystation.prices

and you can still bulk-import them using edmc_batch if you specifically want the old workflow.

See Plugin Options.

For notes on moving older examples and scripts to the current command surface, see v12 to v13 Transition Notes.

Programming

TradeDangerous is organized into modules and is still usable from Python.

Some of the most important top-level objects are:

  • TradeORM
  • TradeEnv
  • TradeException

Minimal example:

import tradedangerous as td

tdenv = td.TradeEnv()
tdb = td.TradeORM(tdenv=tdenv)

That gives you the current ORM-backed database object.

A few useful notes:

  • TradeEnv carries environment/config/debug/detail settings
  • TradeORM is the current database and resolver interface

If you do not need trade data immediately, avoid opening a database handle until you need it.

The codebase is a lot more structured now than in the older documentation, so if you are programming against TD, the current source is the real reference.

Clone this wiki locally