getPositionCapInfoList
The getPositionCapInfoList
function retrieves a list of position cap information for a given owner address.
Function Signature
Parameters
owner
: A string representing the owner's address.
Return Value
Returns a Promise
that resolves to an array of IPositionCapInfo
objects. Each IPositionCapInfo
object has the following structure:
positionCapId
: The ID of the position cap.symbol0
: The first symbol in the trading pair.symbol1
: The second symbol in the trading pair.long
: A boolean indicating whether the position is long (true) or short (false).
Description
This function fetches all position caps owned by the specified address. It filters for objects of type PositionCap
and extracts relevant information from each position cap.
Usage Example
Last updated