MFX Hub
SDK reference

Python SDK

Generated from mfx-sdk-python 0.9.11·rebuilt on every release

The public surface, by module. Every method is typed; every write takes idempotency_key; execution methods return an ExecutionResult and never raise. Each page lists every method with its parameters, their types and defaults, what it returns, and the notes that matter.

Client and signing

The client signs every request with your private key, applies a retry budget, and opens the stream. Secrets and signing keys render as *** everywhere.

Terminals

Provision, inspect, drain and retire the terminals your key's tenant owns.

Execution

Order entry. Every method returns an ExecutionResult and none raises: a timeout, a transport fault and a broker rejection are all results with a reason.

Accounts and catalogue

What a terminal sees of its account, and what you can point a terminal at.

Market data

Subscriptions to ticks and depth, delivered on the stream.

Stream and live account

One WebSocket, many channels, resumable by sequence number; and a view of an account kept current from it.

Errors

What a read can raise. Execution methods never raise; they return a result.

Conventions

  • Ids are accepted as a string or a UUID.
  • Amounts (volume, price, stops) are a Decimal, a string or an int. A float is refused, because a float cannot hold a price exactly.
  • Keyword-only parameters are marked; pass them by name.
  • Reads may raise an MfxApiError subclass; execution methods never raise.
  • Secrets and signing keys render as *** in every repr, log line and traceback, and cannot be pickled.