Preparing your design workspace

Loading the problem and your latest saved attempt…

Extend a Forex Platform with Bitcoin Trading

Add Bitcoin orders to an existing foreign-exchange platform while preserving its current API and safely handling uncertain venue outcomes.

Problem statement

For this exercise, assume an existing foreign-exchange platform is adding Bitcoin trading. An eligible user discovers BTC/USD, sees an indicative price with its timestamp, submits a market order and follows its outcome.

Existing authenticated accounts, risk checks, position accounting and FX execution are available services. Explain how the new feature integrates with them without changing current FX request/response behavior or the units existing clients use.

A Bitcoin quantity is a positive integer number of satoshis; one Bitcoin is 100,000,000 satoshis. The external venue accepts a stable client-order ID, deduplicates repeated submissions with that ID and supports outcome lookup by that ID.

For this exercise, a venue order ultimately completes in full or is rejected; partial fills and cancellation are outside scope. An execution timeout may mean that the venue accepted the order. The platform must not report such an order as rejected or create another execution under a new identity.

Propose the smallest first release and its architecture, including a business/technical rollout and a justified work split. New BTC admissions must be limited to an enabled eligible cohort.

Authenticated owners retrying an already accepted key receive that existing order before new-admission eligibility, flag or risk checks; a different payload conflicts. Disabling the feature or changing cohort eligibility must still allow accepted orders to be replayed, viewed, completed and reconciled.

Quotes are indicative rather than guaranteed execution prices. Funding, custody, blockchain transfers, derivatives, matching engines and rebuilding the existing risk or accounting services are outside scope.

What to build

  1. Enabled eligible users can discover BTC/USD and read an indicative quote with its timestamp and stale state.
  2. Accept a BTC market order durably using an idempotency key and explicit satoshi units, without changing existing FX API behavior.
  3. Users can view a pending, completed or rejected order; uncertain venue outcomes remain pending and are reconciled under the same stable execution identity.

At scale

  • For this exercise, assume 100 new BTC orders per second and 1,000 BTC quote/status reads per second; the existing FX path already handles 1,000 orders per second.
  • Target a durable BTC admission response below 300 ms at p95 in healthy operation, excluding venue execution time. An admission response is not an execution confirmation.
  • Mark indicative quotes older than 2 seconds as stale. When the venue is reachable, reconcile an uncertain order within 30 seconds; do not invent a terminal result while it remains unreachable.