Skip to main content
Facet #9: Borrowing Fees and open interests

constructor

setBorrowingPairParams

Updates borrowing pair params of a pair

Parameters

setBorrowingPairParamsArray

Updates borrowing pair params of multiple pairs

Parameters

setBorrowingGroupParams

Updates borrowing group params of a group

Parameters

setBorrowingGroupParamsArray

Updates borrowing group params of multiple groups

Parameters

handleTradeBorrowingCallback

Callback after a trade is opened/closed to store pending borrowing fees and adjust open interests

Parameters

resetTradeBorrowingFees

Resets a trade borrowing fee to 0 (useful when new trade opened or when partial trade executed)

Parameters

getBorrowingPairPendingAccFees

Returns the pending acc borrowing fees for a pair on both sides

Parameters

Return Values

getBorrowingGroupPendingAccFees

Returns the pending acc borrowing fees for a borrowing group on both sides

Parameters

Return Values

getTradeBorrowingFee

Returns the borrowing fee for a trade

Parameters

Return Values

getTradeLiquidationPrice

Returns the liquidation price for a trade

Parameters

getPairOisCollateral

Returns the open interests for a pair

Parameters

Return Values

getBorrowingPairGroupIndex

Returns the borrowing group index for a pair

Parameters

Return Values

getPairOiCollateral

Returns the open interest in collateral tokens for a pair on one side

Parameters

withinMaxBorrowingGroupOi

Returns whether a trade is within the max group borrowing open interest

Parameters

getBorrowingGroup

Returns a borrowing group’s data

Parameters

getBorrowingGroupOi

Returns a borrowing group’s oi data

Parameters

getBorrowingPair

Returns a borrowing pair’s data

Parameters

getBorrowingPairOi

Returns a borrowing pair’s oi data

Parameters

getBorrowingPairGroups

Returns a borrowing pair’s oi data

Parameters

getAllBorrowingPairs

Returns all borrowing pairs’ borrowing data, oi data, and pair groups data

Parameters

getBorrowingGroups

Returns borrowing groups’ data and oi data

Parameters

getBorrowingInitialAccFees

Returns borrowing groups’ data

Parameters

getPairMaxOi

Returns the max open interest for a pair

Parameters

getPairMaxOiCollateral

Returns the max open interest in collateral tokens for a pair

Parameters