yarn install
to install node modules, including lyrafinance/lyra-js
:onTrade
listener which passes TradeEvent
entities to a handler function. To get the position from a trade event, simply fetch its position
edge. From a position,y ou can calculate its realized and unrealized profit and loss.