www.asagaia.com
  • Welcome to Asagaia documentation!
  • 1xMM Project
    • Introduction
    • Mini-game Manual
      • Position Management
        • Open a position
        • Reduce or Close a position
        • Position results
        • Profit and Loss computation
        • Penalty
      • Bonuses
        • !!Bonus limitations!!
      • Tapping
      • Position Details
      • User Profile
      • Levels and Benefits
    • Perpetual Constant Maturity Option
    • API
      • 1XMM Token
        • Public Methods
          • Read
          • Write
        • Events
        • Errors
      • 1xMM Pools
        • Public Methods
          • Read
          • Write
    • The 1xMM Pool for 1XMM tokens
Powered by GitBook
On this page
  1. 1xMM Project
  2. API
  3. 1xMM Pools
  4. Public Methods

Read

getLastRateIndices
getLastRateIndices() returns(int64[] long, int64[] short)

Gets the last rate indices, by term, for Long and Short sides. A rate index corresponds to the sum of past accruals.

Terms are: 1-day, 1-week, 2-weeks, 3-weeks, 1-month, 2-months and 3-months

getMissedFixings
getMissedFixings() returns(uint[])

Gets the timestamp of fixings which were not properly updated.

If the layer 2 misses an update, the smart contract will identify that a fixing has been missed. The timestamp of missed fixings are stored so that these missed fixings can be later updated.

Note: by default, when a fixing is missed, the last fixing value is copied for the missed fixing. Then, when a missed fixing is updated, all rate indices following the missed fixing will therefore be updated to keep index consistency.

getPoolPendingPositionsForTerm
getPoolPendingPositionsForTerm(Terms term) returns(uint128 long, uint128 short)

Gets the position amounts, on Long and Short sides, which are pending to be added to the pool.

getPoolPositionsForTerm
getPoolPositionsForTerm(Terms term) returns(uint128 long, uint128 short)

Gets the alive Long and Short positions for a given term.

getPosition
getPosition(uint32 positionIndex) returns(Position)

Returns user's position at index positionIndex.

If there is no position at the specified index, the function will return an error.

getPositions
getPositions() returns(Position[])

Returns all the positions of a user.

PreviousPublic MethodsNextWrite

Last updated 1 month ago