End-to-end integration steps
I. Interacting with DBOE Relayer
1) Download DBOE Order Book Configurations such as minimum order notional for LMT orders, maximum time in effect and etc.
2) Download the details of the price spread: how many levels, and the spread value for each level.
For example, the current spread settings are as below:
3) Download all Options instruments including its Order Book Smart Contract Address.
Sample data returned
4) Pull Order Book data from DBOE Relayer (can do via Smart Contract alternatively)
To pull Level 1 Order Book for the whole expiry:
To pull Order Book for one particular Option Series:
II. Interacting with DBOE Smart Contract
With DBOE Smart Contract addresses found in step 3 above (e.g. clearing_house or ob_address)
5) Granting Spending Limit (both USDT and Long & Short Option) to Clearing House in order to start trading
Usual approve() on USDT
For Options, Users can either do one by one as regular ERC20 tokens or call function enableTrading(bytes32 _und, uint256 _exp) on the clearing house smart contract. Two input parameters are underlying and expiry.
6) To submit prices, there are two methods, one for MKT order and one for LMT orders:
LMT order: toPrice(bytes32 optionSeries, bool buySell, uint256 amount, uint256 priceLevel, uint256 validPeriodSecs). Please note: parameter priceLevel starting with 1 as the lowest level rather than 0.
MKT order:
i) toTrade(bytes32 optionSeries, bool buySell, uint256 notional)
ii) toTradeByQty(bytes32 optionSeries, bool buySell, uint256 amount)
7) To cancel order: toCancel(bytes32 optionSeries, bool buySell, uint256 priceLevel, uint256 orderSubmissionTime)
8) Pull order book from DBOE Order Book Smart Contract (address with property name ob_address): obDepth(bytes32 optionSeries, bool buySell)
9) To get the reference price of a given Option: refInfo(bytes32 optionSeries)
Last updated