-
Notifications
You must be signed in to change notification settings - Fork 46
User Guide
- Getting Started
- Conventions
- Using Trade Dangerous
- Obtaining Data
- Shortcuts
- Local Price Data
- Programming
For most users, the normal Trade Dangerous commands are:
trade
tradeguitrade 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.
Trade Dangerous is built around sub-commands.
The first thing you type after trade is the sub-command you want, such as:
-
runto calculate trade runs -
localto find nearby systems/stations -
buyto find places selling an item -
sellto find places buying an item -
marketto inspect a station market
For example:
trade local Mokosh/BetheStationSome 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/BetheStationTD also accepts many unambiguous abbreviations, but the full option name is usually clearer and safer.
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.
If you are unsure about a command, ask it for help:
trade local --help
trade run --help
trade import --helpFor the full command reference, see Command Line Options.
For the GUI, see Graphical User Interface.
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.
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
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 ascendingpBut this breaks down when a name could mean more than one thing.
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 phoenixmay be ambiguous if phoenix could match both a system and a station.
If you want to say “this is definitely a system name”, prefix it with @:
trade local @phoenixIf you want to say “this is definitely a station name”, prefix it with /:
trade local /phoenixIf you want to search for a station within a system, use:
trade local chi/phoenor, if you want to force the left-hand side to be treated as a system:
trade local @chi/phoenThis tells TD to find systems matching chi, then search their stations for something matching phoen.
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.
The command most people care about most is run.
A simple example looks like this:
trade run --from "Mokosh/Bethe Station" --credits 20000 --capacity 16 --ly-per 8.56This 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 -vvvThe more detail you ask for, the more TD will tell you about the route, cargo, and profit calculations.
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
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:
Once you have data, the other commands most people use regularly are:
trade buytrade selltrade directtrade markettrade localtrade navtrade olddatatrade buy --rare
Again, see Command Line Options for the full current option details.
If you prefer a GUI, see Graphical User Interface.
In order to do anything useful with Trade Dangerous, you need market data.
For nearly all users, the normal way to get data is:
trade import -P eddblinkThat is the recommended everyday import path.
For a fuller refresh, we normally recommend:
trade import -P eddblink -O all,skipvendskipvend is normally recommended unless you specifically need ship vendor and upgrade vendor data.
spansh is also fully supported:
trade import -P spanshbut 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.
For supported plugins and their options, see:
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:
tradeguiIf you prefer to stay in the CLI, fromfiles and .tdrc files still work well.
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.tdfor, if you are trying to be lazy in the proper spirit of TD:
trade nav +swEach line corresponds to one position on the command line.
So this:
--ly-per
20
is equivalent to passing those arguments directly.
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=21TD behaves as though you had typed all of it together.
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.
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 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.pricesand 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.
TradeDangerous is organized into modules and is still usable from Python.
Some of the most important top-level objects are:
TradeORMTradeEnvTradeException
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:
-
TradeEnvcarries environment/config/debug/detail settings -
TradeORMis 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.
- Windows Python Install
- Install Trade Dangerous
- Running Trade Dangerous
- Get Market Data
- Upgrading
- Python 3.14 Warning
- Solo Stuff
- Mac/Linux
- Virtual Environment Stuff
- Troubleshooting
- Getting Started
- Conventions
- Using Trade Dangerous
- Obtaining Data
- Shortcuts
- Local Price Data
- Programming
- Starting The GUI
- How The GUI Is Laid Out
- Commander Baseline And Ship Profiles
- Workspaces
- Import
- Results And Diagnostics
- Saved State
- Troubleshooting
- Read This First
- Refresh Your Data The Normal Way
- List Stations In A System
- Find Systems Near A System
- Find Trading Stations Near You
- Plan An In-System Trading Tour
- Plan A Route That Comes Back Home
- Compare Two Stations Directly
- Find Somewhere To Buy An Item
- Find Somewhere To Sell An Item
- Inspect One Station Market
- Find Old Data To Refresh
- Find Rare Goods Near A System