💱 The power of FTX meets the power of the command line.
🆓 Free: no ads, no trackers, no paid licences, no subscriptions, no added fees.
📖 Open source: 'not your (API) keys, not your coins'.
🔐 Self-hosted: no intermediary servers and no extra downtime; you're in control.
⚡ Fast: place complex orders in the heat of the moment.
🔌 Powerful: try scheduled commands, new advanced orders, auto-compounding lending, and more.
🎨 Customisable: configure the UI and collate exchange data to create custom interfaces.
👨💻 Extensible: combine input, output, or behaviour with other CLIs or custom scripts.
🌍 Global: FTX, with or without the US.
👤 Multiple accounts: switch account and subaccount on the fly.
Node.js v14.13.0+ is required. Run the following command to display your installed Node.js version:
node --version
If you are running Node.js v14.13.0 or later, run the following command to install FTX CLI:
npm install -g ftx-cli
If you are running an older version of Node.js and aren't sure how to update, or don't have it installed, please follow the instructions for your operating system below.
Once you have installed FTX CLI, run the following command to verify:
ftx --version
ℹ️ Please follow these instructions if you are running any Unix-like environment (e.g. Linux, macOS, Windows Subsystem for Linux, Git Bash, Cygwin).
Run the following command block to install nvm, latest Node.js LTS, and FTX CLI:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash &&
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" &&
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" &&
nvm install --lts &&
npm install -g ftx-cli
Download and follow the latest Node.js LTS Windows installer and then run the following command to install FTX CLI:
npm install -g ftx-cli
Advanced users may want to try one of the alternative installation methods.
ℹ️ Planning on using FTX CLI purely for displaying exchange data? You can ignore this section for now; API credentials (key and secret) are only required for authenticated, account-related parts of the platform, such as trading and lending.
- If you don't have an FTX account yet, create one (click here for FTX US)
- Select 'Main Account' (account-wide) or the specific subaccount that FTX CLI can access:
- Subaccounts → 'CREATE SUBACCOUNT' or 'Select Account'
- If you want to margin trade or lend, make sure to enable spot margin trading:
- Settings → Margin → 'ENABLE SPOT MARGIN TRADING'
- Create your API key and secret:
- Settings → Api → 'CREATE API KEY'
⚠️ If your machine is shared or unsecure, it is recommended that you save your API credentials elsewhere instead of using thelogin
command.ℹ️ API credentials and subaccount names are case-sensitive, as they are used to authenticate with the FTX platform. API credentials can be copy and pasted after you create them, and subaccount names from the subaccounts page.
# Account-wide access (requires API credentials not linked to a specific subaccount).
ftx login --key YOUR_API_KEY --secret YOUR_API_SECRET
# Subaccount-only access.
ftx login --key YOUR_API_KEY --secret YOUR_API_SECRET --subaccount YOUR_SUBACCOUNT
Here are some best practices for keeping your API credentials secure:
- Edit API key permissions to the minimum required for FTX CLI to function properly:
- Disable 'Read-only'
- Disable 'Withdrawals enabled'
- Disable 'Internal transfers enabled'
- If you know the static IP address(es) you will be using, you can further improve security by whitelisting them:
- 'WHITELIST IP'
- You don't need to learn all of the commands and options immediately: start by running some of the simple examples and build your way up
- Most documented examples are fully expanded to aid understanding: there are many features to make things quicker and easier once you are comfortable
You can include these options with any command to modify its behaviour.
-v, --version Output the version number.
--[no-]interactive Toggle interactive mode. When enabled, if the command supports interactive mode, prompts will guide you through its usage. Other inline options will be ignored [default: disabled].
--output (table | json) Output format [default: table].
--[no-]colour Toggle coloured output [default: enabled].
--[no-]update-notifications Toggle update notifications. When enabled, in table output mode, and an update is available: a notification will appear after command execution at most once a day [default: enabled].
-e, --exchange (ftx | ftx-us) FTX exchange platform [default: ftx].
-k, --key <key> FTX API key.
-x, --secret <secret> FTX API secret.
-a, --subaccount (main | <subaccount>) FTX subaccount name [default: main].
--schedule <schedule> Schedule command to run at a future date and time or periodically, according to a given interval, until manually aborted.
-h, --help Display help for command.
ℹ️ Inline options take priority over saved credentials (saved via
login
) and configuration (saved viaconfig
), meaning you can set your defaults and then override them on a per-command basis where necessary.
Visit the documentation for a topic to learn more about related commands:
🔐 Authentication required
💬 Supports interactive mode
- Power users: features aimed at increasing efficiency
- Scheduled commands: for when now is not the time
- Troubleshooting: common issues and fixes
- You can utilise subaccounts to isolate margin, manage risk, and restrict FTX CLI's access to your account
See for yourself! TL;DR: FTX CLI only communicates with FTX or FTX US, and your API credentials will be stored on your machine if you decide to login
.
It is possible to hit FTX's rate limits if you attempt to execute large amounts of commands in a short period of time. Slow down!
We use a custom theme on Carbon to replicate our favourite terminal: Hyper with Fira Code (font ligatures enabled).
Please feel free to create a GitHub issue or join our Discord server to report bugs, suggest features, or ask questions.
Share the project with your friends and followers (here's a free tweet!).
Create an FTX or FTX US account using our referral links – as a bonus, you will receive 5% off your trading fees.
BTC: bc1q5f323q4399s3plle9t33j7czv5knj90ujyg3ys
ETH/ERC-20: 0x07324D924CA0C9Fbe933AE7E958e47Dd7d040C4d
SOL/SPL: 32Jwe936XEN5NEvbWusapYeqwFcuPQkSgCuzduQEkfCV
FTX CLI is not affiliated with FTX. Your account(s) and funds are your responsibility. Trading involves a high degree of risk and is not suitable for all persons. FTX CLI is an FTX External Referral Program; we may receive a fraction of the trading fees that are generated by the software (this does not affect the trading fees that you pay).