Exchange v0.2.1 API Reference

Modules

The best Elixir Exchange supporting limit and market orders. Restful API and fancy dashboard supported soon!

Public API to use the adapter of Exchange.MessageBus, the Event Bus. This module uses the Registry to un/register processes under a event and send messages to the registered processes.

Public API to use the adapter of Exchange.TimeSeries, the Flux. This module uses the InfluxDB to write and query the data To use this adapter is necessary to add the Instream.Connection to the dependencies.

Public API to use the adapter of Exchange.TimeSeries, the Flux. This module uses the InfluxDB to write and query the data

Server that listens for Subscribed Events from EventBus and Dispatches Actions for Flux App

InfluxDB support for Orders

InfluxDB support for Prices

InfluxDB support for Trades

Module used by every adapter to validate configurations and dependencies.

Public API to use the adapter of Exchange.TimeSeries, the InMemoryTimeSeries. This adapter is an approach of an in memory time series database and it keeps state about orders, prices and trades.

A struct representing the payload of :order_cancelled events.

A struct representing the payload of :order_expired events.

A struct representing the payload of :order_placed events.

A struct representing the payload of :order_queued events.

A struct representing the payload of :price_broadcast events.

A struct representing the payload of :trade_executed events.

A struct representing the payload of :trade_processed events.

Public API to use the adapter of Exchange.MessageBus, the RabbitBus. To use this adapter is necessary to add the AMQP to the dependencies.

This module is a server and consumer of events. This server handles the addition and removal of listener processes. It consumes messages from a RabbitMQ queue, decodes the message and then the message is broadcasted to every listener. This module manages the necessary resources to use the RabbitMQ

This module is a server and producer of events. It receives requests through the GenServer API and sends messages to an RabbitMQ exchange. This module manages the necessary resources to use the RabbitMQ

A struct representing the payload of :order_cancelled events.

Public API to use the adapter of Exchange.MessageBus, the Test Event Bus. This is used to test the messages sent by the Matching Engine, therefore, it doesn't send any messages it only stores them in memory. The Agent behaviour is used to encapsulate the messages that are meant to be sent in a real scenario.

This is the core of the Exchange The matching engine is responsible for matching the orders on the order book

Behaviour that a message library adapter must implement in order to communicate with the Exchange

A struct representing an Order to be placed in the Exchange

Order Book Struct

The Order Book is the Exchange main data structure. It holds the Order Book in Memory where the MatchingEngine realizes the matches and register the Trades.

Behaviour that a time series database must implement to be able to communicate with the Exchange.

Placeholder to define trades

Auxiliary functions for Exchange APP

Validations for Data Structures for the Exchange