Tai.Venues.Adapter behaviour (tai v0.0.75)
Link to this section Summary
Link to this section Types
Link to this type
account()
Specs
account() :: Tai.Venues.Account.t()
Link to this type
amend_attrs()
Specs
amend_attrs() :: Tai.Orders.Worker.amend_attrs()
Link to this type
amend_bulk_response()
Specs
amend_bulk_response() :: [amend_response()]
Link to this type
amend_order_error_reason()
Specs
amend_order_error_reason() :: shared_error_reason() | :insufficient_balance | :insufficient_position | :not_found | :not_supported
Link to this type
amend_response()
Specs
amend_response() :: Tai.Orders.Responses.AmendAccepted.t()
Link to this type
cancel_order_error_reason()
Specs
cancel_order_error_reason() :: shared_error_reason() | :not_found | :already_closed | :already_queued_for_cancelation
Link to this type
cancel_response()
Specs
cancel_response() :: Tai.Orders.Responses.CancelAccepted.t()
Link to this type
create_order_error_reason()
Specs
create_order_error_reason() :: shared_error_reason() | :size_too_small | :insufficient_balance | :insufficient_position
Link to this type
create_response()
Specs
create_response() :: Tai.Orders.Responses.CreateAccepted.t()
Link to this type
credential_id()
Specs
credential_id() :: Tai.Venue.credential_id()
Link to this type
credentials()
Specs
credentials() :: Tai.Venue.credentials()
Link to this type
order()
Specs
order() :: Tai.Orders.Order.t()
Link to this type
position()
Specs
position() :: Tai.Trading.Position.t()
Link to this type
positions_error_reason()
Specs
positions_error_reason() :: shared_error_reason() | :not_supported
Link to this type
product()
Specs
product() :: Tai.Venues.Product.t()
Specs
t() :: module()
Link to this type
venue_id()
Specs
venue_id() :: Tai.Venue.id()
Link to this section Callbacks
Link to this callback
accounts(venue_id, credential_id, credentials)
Specs
accounts(venue_id(), credential_id(), credentials()) :: {:ok, [account()]} | {:error, shared_error_reason()}
Link to this callback
amend_bulk_orders(list, credentials)
Specs
amend_bulk_orders([{order(), amend_attrs()}], credentials()) :: {:ok, amend_bulk_response()} | {:error, amend_order_error_reason()}
Link to this callback
amend_order(order, amend_attrs, credentials)
Specs
amend_order(order(), amend_attrs(), credentials()) :: {:ok, amend_response()} | {:error, amend_order_error_reason()}
Link to this callback
cancel_order(order, credentials)
Specs
cancel_order(order(), credentials()) :: {:ok, cancel_response()} | {:error, cancel_order_error_reason()}
Link to this callback
create_order(order, credentials)
Specs
create_order(order(), credentials()) :: {:ok, create_response()} | {:error, create_order_error_reason()}
Link to this callback
maker_taker_fees(venue_id, credential_id, credentials)
Specs
maker_taker_fees(venue_id(), credential_id(), credentials()) :: {:ok, {maker :: Decimal.t(), taker :: Decimal.t()} | nil} | {:error, shared_error_reason()}
Link to this callback
positions(venue_id, credential_id, credentials)
Specs
positions(venue_id(), credential_id(), credentials()) :: {:ok, [position()]} | {:error, positions_error_reason()}
Link to this callback
products(venue_id)
Specs
products(venue_id()) :: {:ok, [product()]} | {:error, shared_error_reason()}
Link to this callback
stream_supervisor()
Specs
stream_supervisor() :: module()