Tai.Trading.OrderStore (tai v0.0.59)
Track and manage the local state of orders with a swappable backend
Link to this section Summary
Functions
Return a list of all orders currently stored in the backend
Returns a specification to start this module under a supervisor.
Return the number of orders currently stored in the backend
Enqueue an order from the submission by adding it into the backend
Return the order from the backend that matches the given client_id
Callback implementation for GenServer.handle_continue/2
.
Callback implementation for GenServer.init/1
.
Update the state of the order from the actions params
Link to this section Types
action()
Specs
action() :: Tai.Trading.OrderStore.Action.t()
client_id()
Specs
client_id() :: Tai.Trading.Order.client_id()
order()
Specs
order() :: Tai.Trading.Order.t()
status()
Specs
status() :: Tai.Trading.Order.status()
store_id()
Specs
store_id() :: atom()
submission()
Specs
submission() :: Tai.Trading.OrderSubmissions.Factory.submission()
Link to this section Functions
all(store_id \\ :default)
Return a list of all orders currently stored in the backend
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
count(store_id \\ :default)
Return the number of orders currently stored in the backend
enqueue(submission, store_id \\ :default)
Enqueue an order from the submission by adding it into the backend
find_by_client_id(client_id, store_id \\ :default)
Return the order from the backend that matches the given client_id
handle_continue(atom, state)
Callback implementation for GenServer.handle_continue/2
.
init(state)
Callback implementation for GenServer.init/1
.
start_link(args)
to_name(store_id)
Specs
update(action, store_id \\ :default)
Update the state of the order from the actions params