Get broker price (bid/ask)
get_quoteGet the CURRENT price (bid and ask) of a symbol directly from the broker of one of the user's accounts. This is the price that account actually trades at: market orders fill at it (buy at the ask, sell at the bid) and its stop loss / take profit trigger on it.
Two price sources exist in TraderWAI:
get_ohlc / get_chart: TraderWAI market feed. Same for everyone, with history, for analysis. It can differ slightly from each broker (spread, feed and timing).
get_quote: the broker's own live price for one account. No history.
WHEN TO USE EACH: analyzing → get_ohlc / get_chart. Placing or proposing an order → get_quote first, every time. Rules for orders:
Never take entry, stop loss or take profit levels from the feed price: compute them from this bid/ask (a market BUY fills at the ask, a market SELL at the bid).
A BUY LIMIT must be below the ask and a SELL LIMIT above the bid. On the wrong side the broker fills it immediately at market (or rejects it). If the level the user asked for is on the wrong side, do not send the order: explain it and ask what they meant.
BUY STOP above the ask, SELL STOP below the bid (breakout entries; execute_trade with executionType "STOP" on TradeLocker, cTrader, MetaTrader, Capital.com, Bybit and tastytrade; elsewhere create_conditional_order).
The stop loss of a BUY must be below the bid and the take profit above it (the reverse for a SELL).
There is no single "current price": each broker account has its own. Quote the account you are going to trade; if the user has several accounts and did not say which, ask or quote each one.
Supported on TradeLocker, cTrader, Match-Trader, MetaTrader 4/5, Capital.com, Binance spot, Bybit and tastytrade (futures, *_FUT symbols) accounts. On a platform without live broker prices it returns an error: then use get_ohlc as a reference. The response also includes the latest TraderWAI feed price (traderwaiFeedPrice) so you can see the difference. It connects to the broker in real time and may take a few seconds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Symbol in TraderWAI format (e.g. "EUR_USD", "XAU_USD", "NAS100_USD"); it is mapped to the broker's own symbol name. | |
| brokerAccountId | Yes | The broker account ID (from get_broker_accounts). Prices can differ between brokers. |