tai v0.0.47 Tai.Venues.Adapter behaviour
Link to this section Summary
Link to this section Types
Link to this type
amend_order_error_reason()
amend_order_error_reason() :: shared_error_reason() | :insufficient_balance | :insufficient_position | :not_found | :not_supported
Link to this type
cancel_order_error_reason()
cancel_order_error_reason() :: shared_error_reason() | :not_found
Link to this type
cancel_response()
cancel_response() :: Tai.Trading.OrderResponses.Cancel.t() | Tai.Trading.OrderResponses.CancelAccepted.t()
Link to this type
create_order_error_reason()
create_order_error_reason() :: shared_error_reason() | :insufficient_balance | :insufficient_position
Link to this type
create_response()
create_response() :: Tai.Trading.OrderResponses.Create.t() | Tai.Trading.OrderResponses.CreateAccepted.t()
Link to this type
positions_error_reason()
positions_error_reason() :: shared_error_reason() | :not_supported
Link to this section Callbacks
Link to this callback
accounts(venue_id, credential_id, credentials)
accounts(venue_id(), credential_id(), credentials()) :: {:ok, [account()]} | {:error, shared_error_reason()}
Link to this callback
amend_bulk_orders(list, credentials)
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)
amend_order(order(), amend_attrs(), credentials()) :: {:ok, amend_response()} | {:error, amend_order_error_reason()}
Link to this callback
cancel_order(order, credentials)
cancel_order(order(), credentials()) :: {:ok, cancel_response()} | {:error, cancel_order_error_reason()}
Link to this callback
create_order(order, credentials)
create_order(order(), credentials()) :: {:ok, create_response()} | {:error, create_order_error_reason()}
Link to this callback
maker_taker_fees(venue_id, credential_id, credentials)
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)
positions(venue_id(), credential_id(), credentials()) :: {:ok, [position()]} | {:error, positions_error_reason()}
Link to this callback
products(venue_id)
products(venue_id()) :: {:ok, [product()]} | {:error, shared_error_reason()}