create_temp_order
ChatGPTCreate a draft (temp) limit order for the current user, to be reviewed and confirmed in the mobile app. Only BUY_LIMIT and SELL_LIMIT are supported — no market orders. For a sell order, custodianId and settlementType are required (call get_portfolio_details first to find the custodian holding the ISIN). For a buy order, custodianId/custodianName/custodianShortName should reflect the custodian the user wants to fund from, if known. Sell orders with T+0 or T+1 settlement are day orders: their validity is always GOOD_TILL_TODAY (any validityOption/validTill you pass is ignored for them), and they are rejected while the market session is closed — only create them during trading hours.
get_active_orders
ChatGPTGet the full live order book for an EGX symbol by ISIN: all active bid orders (highest price first) and ask orders (lowest price first), each with price, quantity, order number, market, and timestamps. Use this for market/depth analysis of ONE symbol — reading spread, liquidity, or where size sits in the book. It always returns the entire current book (no paging, no date filter, no multi-symbol). For just the top of book, use get_best_bid_ask. To browse/filter orders by date range or across multiple symbols instead of analyzing depth, use list_active_orders.
get_best_bid_ask
ChatGPTGet the best bid and best ask (top of the live order book) for an EGX symbol by ISIN. A lightweight alternative to get_active_orders when you only need the top of book; check hasBid/hasAsk before reading the prices.
get_category_symbols
ChatGPTList the ticker symbols belonging to one of EGX's listing categories (A/B/C/D), optionally narrowed by a partial symbol match, paged. Categories are EGX's own tiering of listed companies. The response includes pageSize, pageNumber, and returnedCount; when returnedCount equals pageSize, another page may exist. This tells you WHICH symbols are in a category, nothing about price or trading activity. This is NOT for finding a company by name, ticker guess, or ISIN lookup — use search_symbols for that. Use get_category_symbols only when the user explicitly asks about a listing category (e.g. 'what symbols are in category A' or 'is EGS60121C018 in category B').
get_market_activity
ChatGPTGet the EGX market breadth for the current (latest) trading session. Returns one row each for ADVANCED, DECLINED and UNCHANGED stocks plus a TOTAL row, each with the number of trades, traded volume, traded value in EGP and number of symbols traded. Use this for whole-market questions such as how many stocks rose or fell today or the total market turnover. Takes no arguments.
get_order_book_history
ChatGPTGet the historical stream of order-book events for an EGX symbol (orders opened, matched, withdrawn, expired). Supports change-data-capture paging via lastRecSerial/nextRecSerial to incrementally pull new events. This is order-by-order event history, not daily price bars — use get_symbol_history for prices.
get_portfolio_details
ChatGPTRetrieve detailed holdings information for the current user, optionally filtered by a list of ISINs. Returns structured data per holding: ISIN, total units, average cost in EGP, last updated timestamp, and a per-custodian breakdown (custodian id, custodian name, total units, settled units, settlement cycles). Each custodian's custodianId is the value to pass to create_temp_order as custodianId when placing a sell order for that holding. Each custodian's settlementCycles lists the settlement cycles with their availableUnits; a cycle's type is the value to pass to create_temp_order as settlementType. Only pick a cycle whose availableUnits covers the quantity you want to sell — never guess a settlement type. When presenting results to the user, format each holding clearly: show the ISIN, units, average cost, and list custodians with their settled vs total units.
get_stock_quote
ChatGPTGet the latest live MDF price quote for an EGX-listed stock by ISIN. Returns the last trade price plus the day's high, low, close and reference prices, cumulative traded volume and value, and number of transactions. Use this for a current price snapshot; for historical daily prices use get_symbol_history instead.
get_stock_quotes
ChatGPTGet the latest live MDF price quotes for several EGX-listed stocks in one call. Returns one item per ISIN in request order, with the same fields as get_stock_quote, plus notFound: the ISINs that have no quote. Prefer this over repeated get_stock_quote calls when comparing stocks or pricing a watchlist or portfolio.
get_symbol_history
ChatGPTGet daily historical price bars for an EGX symbol over a date range: per-day open, high, low, close, traded volume, traded value, and trade count. Requires fromDate and toDate as epoch milliseconds. For the current live price use get_stock_quote instead.
get_wallet_balance
ChatGPTRetrieve the current user's brokerage wallet in EGP: balance, withdrawableBalance, settledBalance, underSettlementBalance, frozenBalance, underPaymentBalance, purchasePower (cash available to buy, across the trading and fund accounts) and sellDuringTheDay, plus isActive. This is a snapshot saved the last time the user opened their wallet in the Halan app, not a live value: lastUpdatedAt (epoch milliseconds) says when it was taken — always tell the user that time, and suggest reopening the app if it is old. Use purchasePower to check whether a buy order is affordable before calling create_temp_order. Fails if the user has never opened their wallet in the app. Takes no parameters.
is_market_open
ChatGPTCheck whether the EGX (Egyptian Exchange) is currently open for trading. Returns the current open/closed state as of now (isOpen, timestamp in epoch milliseconds), plus, when the market service reports them: willOpenAt (next open time, if currently closed), willCloseAt (next close time, if currently open), and lastClosedAt — all epoch milliseconds, omitted when not available. Use this before advising on order timing, explaining why an order might not execute immediately, or answering any 'is the market open/closed right now' question. Takes no parameters.
list_active_orders
ChatGPTBrowse/audit active EGX orders as a flat, paged list — optionally filtered by ISIN and/or a date range (epoch milliseconds), and able to span multiple symbols at once. Each item includes price, quantity, order number, market, and timestamps. This is NOT for market/depth analysis: results are not split into bids/asks and are not price-sorted (sorted by timestamp descending), so you cannot read spread or top-of-book from this. For that, use get_active_orders (single-symbol order book, bid/ask split, price-sorted) or get_best_bid_ask (top of book only). Results are paged; the response includes pageSize, pageNumber, and returnedCount. When returnedCount equals pageSize, another page may exist.
list_bulletins
ChatGPTList EGX company bulletins (corporate disclosures categorized by type), optionally filtered by symbol ISIN, bulletin type code, and a date range (epoch milliseconds). Results are paged and may not be exhaustive. The response includes pageSize, pageNumber, and returnedCount; when returnedCount equals pageSize, another page may exist. Each item includes the heading and full content in both English and Arabic, the bulletin type, and a source URL.
list_index_history
ChatGPTList daily open/high/low/close values of an EGX market index, newest first. Use this for index performance and trend questions (e.g. how EGX30 moved this month); for a single stock's daily prices use get_symbol_history instead. Each item's date is a Unix timestamp in milliseconds at 00:00 UTC of the trading day. Results are paged; the response includes pageSize, pageNumber, and returnedCount. When returnedCount equals pageSize, another page may exist. An unknown index code returns an empty list.
list_market_trades
ChatGPTList the trades executed on the EGX for one stock, newest first: the exchange-wide time and sales tape. Each item has the execution time, price, volume, value, market code, ticket number and the buy and sell order numbers. This is anonymous market data covering all brokers; it does NOT show the user's own trades — use list_my_orders with status EXECUTED for those. Without a date range it starts from the latest trades; pass fromDate/toDate to read one session or time window. Earlier sessions are available only from when trade recording began, so an empty result for an old date means no recorded data; use get_symbol_history (daily bars) for older history. Results are paged; the response includes pageSize, pageNumber, and returnedCount. When returnedCount equals pageSize, another page may exist.
list_my_orders
ChatGPTList the signed-in user's own orders and the status of each, as shown on the Orders screen of the Halan app. status picks the tab: OPEN (default; submitted, partially filled, held or pending cancellation), EXECUTED (filled) or CANCELLED (cancelled, expired, rejected or failed). Each order has its raw status and activityStatus, stock (stockName, stockIsin, reuterCode), orderType/orderMethod, price, quantity, executedQuantity, remainingQuantity, orderValue, total and fees in EGP (actual values once executed, otherwise estimates), createdAt/executedAt/orderExpiryTime in epoch milliseconds, and availableActions (e.g. CANCEL, MODIFY — these can only be done in the app). totalCount is across all pages. This is not the market order book — use get_active_orders for that.
list_news
ChatGPTList EGX disclosures and news, optionally filtered by symbol ISIN, news section, and a date range (epoch milliseconds). Results are paged and may not be exhaustive — narrow with the filters or use pageNumber. The response includes pageSize, pageNumber, and returnedCount; when returnedCount equals pageSize, another page may exist. Each item includes the headline, section, company name, and full content in both English and Arabic.
search_symbols
ChatGPTSearch EGX-listed symbols by company name (English or Arabic), ISIN, Reuters code, or symbol code. Returns matching symbols with their identifying fields and current live price, paged. The response includes pageSize, pageNumber, and returnedCount; when returnedCount equals pageSize, another page may exist. Results may not be exhaustive — narrow the query, or increase pageNumber, if the page returned looks incomplete. Call this first to resolve a company name or ticker into an ISIN, which the quote, history, news, and order-book tools all require.