đ¤Market Makers
Market makers will likely want to bypass the UI and programmatically interact with the smart contracts.
The code is all open sourced and available in the github repository.
We have also created a basic market maker bot which is also open-sourced at: https://github.com/odexfi/tradingbots/blob/main/odexMarketMaker.js
To view the orderbook we run the following function:
orderbook()
This external view function will return
uint[100] memory bidsAmount;
uint[100] memory bidsPrice;
address[100] memory bidsTrader;
uint[100] memory asksAmount;
uint[100] memory asksPrice;
address[100] memory asksTrader;
(uint[100] memory, uint[100] memory, address[100] memory, uint[100] memory, uint[100] memory, address[100] memory)
For managing bulk orders there are two functions in the contract
cancelOrders(uint[] memory _cBids, uint[] memory _cAsks)
multiTrade(uint[] memory _bidAmounts, uint[] memory _bidPrices, uint[] memory _askAmounts, uint[] memory _askPrices)
This allows for efficient interaction with the orderbook using the least amount of transactions.
There is more technical information in the contract docs
Last updated