Skip to content

Accounts & live trading ​

Select an account, check positions, review and submit trade requests, then verify the final order status.

Accounts and positions ​

Run futu account list first and use an Account ID from its output. Replace the placeholders below with your actual account or order information.

bash
# List accounts and select an Account ID
futu account list

# Get account funds
futu account funds --account "YOUR_ACCOUNT_ID" --currency USD

# Get positions
futu position --account "YOUR_ACCOUNT_ID" --format json

# Get open US orders
futu order list --account "YOUR_ACCOUNT_ID" --market US

# Get today's fills
futu deal --account "YOUR_ACCOUNT_ID" --market US

Position query options ​

Get positions for a single symbol:

bash
futu position --account "YOUR_ACCOUNT_ID" --symbol US.AAPL --format json
OptionDescription
--account / -aAccount ID; falls back to default_account when omitted; returns an error if neither is set
--symbolOptional filter by security symbol
--pl-ratio-minOptional minimum profit/loss ratio; -0.1 means -10%
--pl-ratio-maxOptional maximum profit/loss ratio; 0.2 means +20%

The table columns Qty, Can Sell, Cost Price, Mkt Value, P/L, and Currency show quantity, sellable quantity, cost price, market value, profit/loss, and currency. Unavailable cost or profit/loss values appear as -; do not treat them as zero.

Default account ​

Set a default securities account to use when --account is omitted:

bash
futu config set default_account "YOUR_ACCOUNT_ID"

Preview and submit a trade ​

WARNING

Live securities and crypto order placement, modification, and cancellation first return a preview and a three-digit confirmation code. No trading action is submitted at this stage. Check the account, symbol, side, quantity, and price. Then keep the original arguments unchanged and add --execute with the returned code.

bash
# Step 1: preview a limit buy and read the structured preview
futu order buy US.AAPL 1 --account "YOUR_ACCOUNT_ID" --type limit --price 180 --format json

The preview JSON includes these status fields (illustrative excerpt):

json
{
  "dry_run": true,
  "submitted": false
}

The full response also includes preview and confirmation_code. submitted: false means the request has not been submitted. Use the code from this response, not a fixed number copied from an example.

bash
# Step 2: after reviewing the preview, submit with the code from step 1
futu order buy US.AAPL 1 --account "YOUR_ACCOUNT_ID" --type limit --price 180 --format json --execute "YOUR_CONFIRMATION_CODE"

--price 180 only illustrates the parameter. Use futu order sell to sell. Use futu order modify with --qty and --exchange to modify an order, or futu order cancel with --exchange to cancel one. The confirmation code controls request submission; check the trading API response and order queries for the final result.

TIP

After submission, the broker may require additional confirmation. The CLI displays the prompt and waits for y/n input; --format json does not disable this interaction. When an AI tool calls the CLI, pass this prompt to the user.

Check an order after submission ​

Query details using the order ID from the submission result. Successful submission does not mean the order has filled:

bash
futu order detail "YOUR_ORDER_ID" --account "YOUR_ACCOUNT_ID" --exchange US --format json

You can also query open orders. Filled or cancelled orders may no longer appear in that list, so verify them through order details and history:

bash
futu order list --account "YOUR_ACCOUNT_ID" --market US --format json
futu order history --account "YOUR_ACCOUNT_ID" --market US --format json

A successful live securities cancellation currently returns Order cancelled: … as text, even with --format json. See JSON output conventions for other parsing considerations.