Exchange v0.2.4 Exchange View Source
The best Elixir Exchange supporting limit and market orders. Restful API and fancy dashboard supported soon!
Link to this section Summary
Functions
Cancels an order on the Exchange
Returns the trade with trade_id
Returns all the completed trades
Returns a list of completed trades where the trader is one of the participants
Returns the sum of all active sell order's size
Returns the highest price of all buy orders
Returns the sum of all active buy order's size
Returns the lastest price from a side of an Exchange
Returns the lastest size from a side of an Exchange
Returns the lowest price of all sell orders
Returns a list of all active orders
Returns an order by id.
Returns a list of active orders placed by the trader
Places an order on the Exchange
Returns the difference between the lowest sell order and the highest buy order
Returns the number of active buy orders
Returns the number of active sell orders
Link to this section Functions
Specs
Cancels an order on the Exchange
Parameters
- order_id: String that represents the id of the order to cancel
- ticker: Atom that represents on which market the order should be canceled
Specs
Returns the trade with trade_id
Parameters
- ticker: Atom that represents on which market the query should made
- trade_id: Id of the requested trade
Specs
Returns all the completed trades
Parameters
- ticker: Atom that represents on which market the query should made
Specs
Returns a list of completed trades where the trader is one of the participants
Parameters
- ticker: Atom that represents on which market the query should be made
- trader_id: String that represents the id of the trader
Specs
Returns the sum of all active sell order's size
Parameters
- ticker: Atom that represents on which market the query should be placed
Specs
Returns the highest price of all buy orders
Parameters
- ticker: Atom that represents on which market the query should be placed
Specs
Returns the sum of all active buy order's size
Parameters
- ticker: Atom that represents on which market the query should be placed
Specs
Returns the lastest price from a side of an Exchange
Parameters
- ticker: Exchange identifier
- side: Atom to decide which side of the book is used
Specs
Returns the lastest size from a side of an Exchange
Parameters
- ticker: Exchange identifier
- side: Atom to decide which side of the book is used
Specs
Returns the lowest price of all sell orders
Parameters
- ticker: Atom that represents on which market the query should be placed
Specs
Returns a list of all active orders
Parameters
- ticker: Atom that represents on which market the query should be placed
Specs
open_orders_by_id(ticker :: atom(), order_id :: String.t()) :: {atom(), Exchange.Order.order()}
Returns an order by id.
Parameters
- ticker: Atom that represents on which market the query should be placed
- order_id: String that represents the id of the order to cancel
Specs
Returns a list of active orders placed by the trader
Parameters
- ticker: Atom that represents on which market the query should be made
- trader_id: String that represents the id of the traderd
Specs
Places an order on the Exchange
Parameters
- order_params: Map that represents the parameters of the order to be placed
- ticker: Atom that represents on which market the order should be placed
Specs
Returns the difference between the lowest sell order and the highest buy order
Parameters
- ticker: Atom that represents on which market the order should be canceled
Specs
Returns the number of active buy orders
Parameters
- ticker: Atom that represents on which market the query should made
Specs
Returns the number of active sell orders
Parameters
- ticker: Atom that represents on which market the query should made