Skip to main content

EXANTE CLI

What’s EXANTE CLI?

A terminal client for the EXANTE HTTP API. You type commands, or put them in scripts, to get market data, manage orders and trade from your terminal. Scripts also let you automate repetitive tasks.

Do I need to learn the commands?

No, if you already use Claude or ChatGPT. Describe what you want in plain words, ask the assistant to write the EXANTE CLI command, check it, then run it in your terminal.

If you prefer the command line, write the commands yourself. Type /help to see the commands and the options each one takes.

Does it give me extra permissions?

No. It works within the permissions your account already has.

Getting started

How do I install it?

Run pip install exante-cli, then exante --help to see the commands.

How do I connect my account?

Run exante login. Your browser opens, and the key is stored in the keychain. If you don't want a browser to open, run exante login --no-browser and the CLI prints the URL instead.

Which credentials does the CLI use if I set more than one?

Flags come first, then the keychain, then the config file. You can also write credentials in the [auth] section of ~/.config/exante/config.toml.

How do I log out?

Run exante logout. It clears the stored credentials from the config and both keychain slots.

Settings

How do I switch between demo and live?

Run exante config set --env demo or exante config set --env live. Live is the default. Commands run in the live environment place real orders on your account, so we recommend testing new commands and scripts in demo first. Run exante login again after switching.

Credentials are stored separately for each environment, so logging in to demo does not overwrite live.

How do I set a default account and currency?

Run exante config set --account <ACC> and exante config set --currency EUR. You can combine flags in one call:

exante config set --env demo --account <ACC> --currency EUR

The account is unset by default and the currency is EUR. Both are stored per environment. If you have only one account, the CLI saves it as the default when you log in.

How do I see my current settings?

Run exante config show. It lists your defaults and where the config file is.

Using the commands

What commands are there?

  • Session and account: login, logout, config set, config show, accounts, summary, transactions, repl

  • Trading: buy, sell, orders place, orders modify, orders cancel, orders get, orders active, orders list

  • Market data: quote, market quote, market ohlc, market ticks, market crossrate, market change, xrate, crossrates

  • Symbols: look up a symbol, list symbols by exchange or group, find the nearest expiration, list exchanges, groups, types and currencies, and see a symbol's schedule and order specification

  • Streaming: live quotes, order updates, trade updates and market trades

How do I write a symbol?

As TICKER.EXCHANGE, for example AAPL.NASDAQ.

Where do global options go?

Before the subcommand. They are --output or -o (table or json), --verbose or -v, --api-url, --api-version and the credential flags:

exante -o json quote AAPL.NASDAQ

What does exante repl do?

It opens an interactive shell where you type commands without the exante prefix.

How do I stream live data?

Use stream feed for quotes (it has a level option), stream orders for order updates, stream trades for trade updates and stream market-trades for market trades.

Orders

How do I check my account and buy an instrument?

  1. exante summary shows cash and NAV, so you can see whether there is enough money.

  2. exante quote AAPL.NASDAQ shows the last quote.

  3. exante buy AAPL.NASDAQ 100 limit 150 places a limit buy order for 100 shares at 150.

  4. exante orders get <ID> checks the order status, using the ID from step 3.

How do I place an order with more options?

Use orders place. It needs --symbol, --side (buy or sell) and --qty. Optional flags are --account, --order-type, --limit-price, --stop-price, --tif, --gtt-expiration and --client-tag.

How do I change a working order?

Use orders modify <ID> to change the quantity, limit price or stop price.

How do I cancel an order?

  1. exante orders active lists only working orders. Note the ID of the one you want to cancel.

  2. exante cancel <ID> cancels it. exante orders cancel <ID> does the same.

  3. exante orders get <ID> confirms the status is now cancelled.

Should I check commands an AI assistant wrote for me?

Yes. Review every command before you run it, whether an assistant drafted it or it sits in a script. All orders placed through EXANTE CLI are treated as your instructions.

The instruments, quantities and prices shown are examples only and do not constitute investment advice or a recommendation.

Troubleshooting

A command failed. What do I do first?

Run it again with -v. It prints the exact request sent (method, URL, headers, body) and the full response, so you can see which URL was called, whether authentication was sent and what the server answered:

exante -v quote AAPL.NASDAQ

The output includes your Authorisation header in clear text. Redact it before pasting the output into a ticket or chat.

How do I see the raw API response?

Add -o json. It prints exactly what the API returned, with no table formatting. You can pipe it through jq:

exante -o json symbols get AAPL.NASDAQ | jq .

What do the error messages mean?

Message

Likely cause

What to do

Authentication failed: HTTP 401

Wrong or expired credentials

Run exante login again, or check --app-id and the active slot with exante config show

Authentication failed: HTTP 403

No permission on the instrument, or no subscription

Check your permissions and subscriptions

Validation error: HTTP 404

Wrong symbol ID, or no permissions

Use a fully qualified TICKER.EXCHANGE ID and check your permissions. A 404 does not always mean "not found"

Validation error: HTTP 400 or 422

Malformed request or bad arguments

Check your flags and run with -v. If you think it is a bug in the CLI, write to [email protected]

HTTP 429

Too many requests

Raise the limits in the HTTP API, using the dashboard in the Client's Area

Did this answer your question?