IOrderBook
AddLiquidityParams
RemoveLiquidityParams
AddLiquidityResponse
RemoveLiquidityResponse
ReplaySwapParams
ReplaySwapResponse
MintCallbackData
Functions
addLiquidity
Add liquidity logic
Only used by ClearingHouse
contract
Parameters:
Return Values:
removeLiquidity
Remove liquidity logic, only used by ClearingHouse
contract
Parameters:
Return Values:
updateFundingGrowthAndLiquidityCoefficientInFundingPayment
This is the non-view version of getLiquidityCoefficientInFundingPayment()
, only can be called by Exchange
contract
Parameters:
Return Values:
replaySwap
Replay the swap and get the swap result (price impact and swap fee), only can be called by Exchange
contract;
ReplaySwapResponse.insuranceFundFee = fee * insuranceFundFeeRatio
Parameters:
Return Values:
updateOrderDebt
getOpenOrderIds
Get open order ids of a trader in the given market
Parameters:
Return Values:
getOpenOrderById
Get open order info by given order id
Parameters:
Return Values:
getOpenOrder
Get open order info by given base token, upper tick and lower tick
Parameters:
Return Values:
hasOrder
Check if the specified trader has order in given markets
Parameters:
Return Values:
getTotalQuoteBalanceAndPendingFee
Get the total quote token amount and pending fees of all orders in given markets
Parameters:
Return Values:
getTotalTokenAmountInPoolAndPendingFee
Get the total token amount (quote or base) and pending fees of all orders in the given market
Parameters:
Return Values:
getTotalOrderDebt
Get the total debt token amount (base or quote) of all orders in the given market
Parameters:
Return Values:
getLiquidityCoefficientInFundingPayment
Get the pending funding payment of all orders in the given market
This is the view version of updateFundingGrowthAndLiquidityCoefficientInFundingPayment()
, so only part of the funding payment will be returned. Use it with caution because it does not return all the pending funding payment of orders. Normally you won't need to use this function
Return Values:
getPendingFee
Get the pending fees of a order
Parameters:
Return Values:
getExchange
Get Exchange
contract address
Return Values:
Events
ExchangeChanged
Emitted when the Exchange
contract address changed
Parameters:
Last updated