Bourse.RecordedResponseFixtures.Capture (bourse v0.1.0)

Copy Markdown View Source

Live capture profiles for the committed real-response corpus.

Public reads use venue production hosts. Account-scoped reads use only the provisioned testnet or demo environments named by each profile. Error probes deliberately trigger safely-recordable business rejections (unknown symbol, invalid credentials/signature, order-not-found, insufficient funds where no fill is possible) and freeze the scrubbed raw error body. Every body is scrubbed before it leaves this module.

Summary

Functions

Captures and scrubs one configured response fixture.

Returns the capture category for a configured target.

Absolute path for one committed real error recording.

Root directory for committed real error recordings.

Returns stable oracle identity fields for a configured target.

Returns the environment variables required by one capture target.

Returns corpus paths whose sensitive fields are not masked.

Recursively masks credentials, signatures, account identifiers, and addresses.

Returns every configured {venue, method} capture target.

Types

capture_option()

@type capture_option() :: {atom(), term()}

category()

@type category() :: :public | :private | :write | :error

Functions

capture_fixture(exchange_id, method, call_opts \\ [])

@spec capture_fixture(String.t(), atom(), [capture_option()]) ::
  {:ok, map()} | {:error, term()}

Captures and scrubs one configured response fixture.

category(exchange_id, method)

@spec category(String.t(), atom()) :: category() | nil

Returns the capture category for a configured target.

error_fixture_path(exchange_id, method)

@spec error_fixture_path(String.t(), atom()) :: String.t()

Absolute path for one committed real error recording.

error_fixture_root()

@spec error_fixture_root() :: String.t()

Root directory for committed real error recordings.

oracle_identity(exchange_id, method)

@spec oracle_identity(String.t(), atom()) :: map() | nil

Returns stable oracle identity fields for a configured target.

required_credentials(exchange_id, method)

@spec required_credentials(String.t(), atom()) :: [String.t()] | nil

Returns the environment variables required by one capture target.

safety_violations(value)

@spec safety_violations(term()) :: [String.t()]

Returns corpus paths whose sensitive fields are not masked.

scrub(value, credentials \\ nil)

@spec scrub(term(), Bourse.Credentials.t() | nil) :: term()

Recursively masks credentials, signatures, account identifiers, and addresses.

targets()

@spec targets() :: [{String.t(), atom()}]

Returns every configured {venue, method} capture target.