What you will learn
- Rejected order response
- Lost connection with an open position
- Duplicate-submit prevention
- Verify server state after reconnecting
Rejected order response
A rejected order should produce a reason that can be investigated: invalid size, unavailable market, insufficient funds or another documented condition. Do not automatically increase size, remove protection or switch accounts to bypass a rejection.
Lost connection with an open position
A lost connection affects observation and control but does not necessarily close positions. Orders may remain active on the server. After reconnecting, retrieve current state and reconcile it against the last known state before acting.
Duplicate-submit prevention
Duplicate-submit prevention uses a clear pending state and, where supported, stable client identifiers. The interface should acknowledge a request without inviting repeated clicks. A retry policy must account for a request that succeeded but whose reply was lost.
Verify server state after reconnecting
Recovery begins with the authoritative account state, not a cached local display. Compare open positions, working orders and recent fills. Escalate unresolved discrepancies through the provider's official support or documented recovery process.
Worked example
An execution succeeds, but the response is lost during a connection failure. Retrying the same trade as a new request could create a second position. The missing response is uncertainty about state, not proof of failure.
Try it yourself
Write a recovery sequence for that incident with no assumption that the account is flat. Include what information must be retrieved first.
Show the worked solution
Stop new submissions, reconnect through the normal channel, retrieve open positions, working orders and recent executions, match identifiers, and only then decide whether any action remains necessary. Preserve the incident record.
Apply this to your course project
Record market, limit and stop-order exercises with cancelled and rejected examples.
Keep the calculation inputs, assumptions and decisions with your work. Practical exercises are self-reviewed; the scored knowledge checks assess the questions shown, not an independent certification of practical competence.