issues
search
zetamarkets
/
sdk
SDK for accessing the Zeta program
Other
85
stars
29
forks
source link
getMaxTradeSize(), getLiquidationPrice() and uPnL overhaul
#252
Closed
filipzeta
closed
1 year ago
filipzeta
commented
1 year ago
getMaxTradeSize() - figures out the maximum size you can trade based on if you're closing or opening a position.
getLiquidationPrice() - figures out at what price your position will get liquidated.
Split uPnL calcs into estimateRealizedPnl() and calculateUnrealizedPnl()
checkLiquidity() - finds the best price to execute an order at
filipzeta
commented
1 year ago
[x] Split uPnL calc with executionPrices into a separate function for estimated realized PnL