Equity PAPER + Alpaca native paper should route to paper-api (not local pt_orders)
Summary
On Equity with UI trading mode = PAPER and a broker that has native paper (Alpaca PK keys → paper-api.alpaca.markets), Fincept currently routes orders through the local paper engine (pt_place_order / pt_orders / OrderMatcher) instead of the broker adapter. The result is that a "paper" ticket never hits Alpaca's paper REST API, so the blotter and the broker disagree.
Expected
When BrokerProfile.has_native_paper == true and the account is in PAPER mode, place / cancel / cancel-all / blotter should use the broker adapter (Alpaca → https://paper-api.alpaca.markets), while keeping the UI mode tag as paper. Local pt_* simulation should remain only for brokers without native paper.
Actual
- Equity PAPER →
UnifiedTrading::place_paper_order_for_account→pt_place_orderonly has_native_paperis set on Alpaca (and others) but ignored for placement- Live REST path (
AlpacaBroker::place_order+trading_url) is only used when UI mode is live
Proposed fix (minimal, one logical change)
UnifiedTrading::place_paper_order_for_account: ifhas_native_paper→place_live_order_for_account, stamp responsemode = "paper"- Equity
on_order_submitted/ cancel: thin native-paper path through UnifiedTrading - Blotter / Streams: for native-paper, use broker
get_orders(and related) instead ofpt_get_orders* AlpacaBroker::trading_url/place_order: hard guard — PK /additional_data=papernever useapi.alpaca.markets
Proof (paper only)
After building with the patch on Windows:
- Fincept EQUITY · Alpaca focused · UI PAPER
- BUY 1 SPY LMT well below market
- Order appeared on Alpaca paper REST (
GET /v2/orders) with Finceptclient_order_idprefixfin… - No new local
pt_ordersrow for that submit - Canceled via paper-api
Happy to open a topic-branch PR once this issue has scope:approved / help-wanted / good-first-issue per .github/CONTRIBUTING.md.
Platform
Windows (MSVC + Qt 6.8.3), Fincept Terminal 4.5.0 tree.
Source: Fincept-Corporation/FinceptTerminal