Check whether each child account currently MATCHES its master, and if not, what it
would take to make it match.
This is not a listing of connections — use get_connections for that. It compares live
positions between each master and child and computes the drift. **DISABLED
connections are skipped entirely**, so a paused one is invisible here rather than
reported as out of sync.
**Everything it returns is a proposed plan, not something that has happened.** They
are counter-orders that WOULD bring the child into line. Nothing places them. Show
them to the user and ask before acting; never feed them to place_order on your own
initiative.
It returns a dict keyed by CHILD nickname:
{child_nickname: {"is_sync": bool,
"data": [{"master_nickname": str,
"orders": [...], "orders_full": [...]}]}}
**Both lists are executable MARKET orders and BOTH are part of the plan.** `orders`
fixes positions the master holds and the child does not match; `orders_full` exits
positions the CHILD holds that the master does not. Each carries tradingsymbol,
quantity (absolute), transaction_type (BUY/SELL), order_type ("MARKET"), product,
exchange, token, price (0) and tag.
`is_sync` is computed from `orders` ALONE. It can be true while `orders_full` is
non-empty, meaning the child holds something the master does not. Never report a
child as matching without checking both lists.
When a child copies more than one master, `data` still holds a single entry, its
`master_nickname` is an empty string, and only the last master processed is
represented. Do not attribute those orders to a named master.
An empty dict means there is nothing to report: either no connections exist, or
every one of them is DISABLED. It does NOT mean everything is in sync — check
get_connections before telling the user they have no copy trading set up.
ConnectorOAuth