Forex trade unlock¶
These extensions manage credentials for explicit Forex accounts. They require trade:unlock; restricted keys must also allow FX and every requested account. Neither acc:read nor trade:real is implicitly required.
| REST POST | MCP | CLI |
|---|---|---|
/api/trd/begin-forex-unlock |
futu_begin_forex_unlock |
begin-forex-unlock |
/api/trd/complete-forex-unlock |
futu_complete_forex_unlock |
complete-forex-unlock |
/api/trd/lock-forex-trade |
futu_lock_forex_trade |
lock-forex-trade |
/api/trd/forex-unlock-status |
futu_get_forex_unlock_status |
get-forex-unlock-status |
Every request supplies broker_id, a nonempty list of unique account_ids, and extension_version: 1. Network authentication is disabled by default and requires --enable-desktop-phase2-writes. Local lock and status operations do not require that network option.
Begin additionally requires intent_key and a 32-character lowercase hexadecimal pwd_md5. Complete requires a new intent_key, the returned challenge_id, and nonempty otp. MCP takes the C2S JSON in a c2s_json string and an optional caller api_key.
All four CLI commands read C2S JSON from standard input using --c2s-stdin, with --rest-url or --rest-port. Credentials are not command-line arguments. REST takes a JSON body; native and gRPC transports use the corresponding protobuf request.
Reusing an intent for the same caller joins or returns the original attempt; it does not authenticate a replacement secret. Broker, phase and account set must match. A new credential needs a new intent. After a timeout, inspect the original intent before retrying. An uncertain attempt is never automatically resent. Restarting does not restore credentials or challenges.
Generated Rust request types hide credentials in Debug and ordinary JSON Serialize. Use protobuf encoding for native calls. REST/MCP callers must construct explicit request JSON rather than sending that redacted serialization.
accounts describes current in-memory credentials; attempt is a safe historical summary. current_effect is applied, suppressed, historical, or local_only. Historical success does not prove current unlock, and partial grants do not unlock every target. A nonzero result may still include safe status or a challenge.
credential_present means a credential is held; qualification_available means current qualification data exists. Neither promises that an order is permitted. Raw expiry and validity fields preserve presence and values. A zero local auto-lock time does not mean permanent backend validity. Lock clears local modern Forex credentials only.
Real-device verification remains outstanding. Local structured tests do not establish backend availability or release acceptance.