Tai.TestSupport.Mock (tai v0.0.75)

Link to this section Summary

Link to this section Types

Specs

Specs

balance() :: Decimal.t() | number() | String.t()
Link to this type

credential_id()

Specs

credential_id() :: Tai.Venue.credential_id()

Specs

fee_info() :: Tai.Venues.FeeInfo.t()

Specs

location() :: Tai.Markets.Location.t()

Specs

product() :: Tai.Venues.Product.t()

Specs

record() :: Stored.Backend.record()
Link to this type

record_key()

Specs

record_key() :: Stored.Backend.key()

Specs

venue() :: Tai.Venue.t()

Specs

venue_id() :: Tai.Venue.id()

Link to this section Functions

Link to this function

mock_account(venue_id, credential_id, asset, free, locked)

Specs

mock_account(venue_id(), credential_id(), asset(), balance(), balance()) ::
  {:ok, {record_key(), record()}}
Link to this function

mock_advisor_config(attrs)

Specs

mock_advisor_config(map()) :: {:ok, {record_key(), record()}}
Link to this function

mock_fee_info(fee_info)

Specs

mock_fee_info(fee_info() | map()) :: :ok
Link to this function

mock_fleet_config(attrs)

Specs

mock_fleet_config(map()) :: {:ok, {record_key(), record()}}
Link to this function

mock_product(product)

Specs

mock_product(product() | map() | [{atom(), term()}]) :: :ok
Link to this function

mock_venue(venue)

Specs

mock_venue(venue() | map() | [{atom(), term()}]) ::
  {:ok, {key :: term(), resource :: struct()}}
Link to this function

push_market_data_snapshot(location, bids, asks)

This function is deprecated. Use Tai.TestSupport.Mock.push_order_book_snapshot/3 instead..

Specs

push_market_data_snapshot(location(), bids, asks) :: no_return()
when bids: map(), asks: map()
Link to this function

push_order_book_snapshot(location, bids, asks)

Specs

push_order_book_snapshot(location(), bids, asks) :: no_return()
when bids: map(), asks: map()
Link to this function

push_order_update(venue_id, attrs)

Specs

push_order_update(venue_id(), map()) :: no_return()
Link to this function

push_trade(trade)

Specs

push_trade(Tai.Markets.Trade.t()) :: no_return()