Get User Positions

GET https://illumigate.swivel.exchange/v1/users/:address/positions?type=t&status=s

This endpoint allows you to request a list of user lending and pooling positions.

Path Parameters

NameTypeDescription

address

string

User public address in hex.

Query Parameters

NameTypeDescription

type

string

Positions type: lending or pooling. If not specified, both lending and pooling positions will be returned.

status

string

Market status: active or matured. If not specified, only positions for active markets will be returned.

{
  "id": "0xD83F3CE852bcC65231054099A2270642700ADADD",
  "lending": {
    "0x07865c6E87B9F70255377e024ace6630C1Eaa37F": {
      "1688085200": {
        "totalSpent": "707882988",
        "totalReturned": "719523434",
        "costBasis": "0.983822",
        "lastPrice": "0.984748",
        "interestEarned": "11640446"
      },
      "1696115940": {
        "totalSpent": "120000000",
        "totalReturned": "119880000",
        "costBasis": "1.001001",
        "lastPrice": "1.001001",
        "interestEarned": "-120000"
      }
    }
  },
  "pooling": {
    "0x07865c6E87B9F70255377e024ace6630C1Eaa37F": {
      "1688085200": {
        "created": "1673380691"
      }
    },
    "0x2899a03ffDab5C90BADc5920b4f53B0884EB13cC": {
      "1688086200": {
        "created": "1674069975"
      }
    }
  }
}

Last updated