Users

Get user positions by public key

Retrieves all positions associated with a user's public key.

get

/v0/user/positions/{pubkey}

Path parameters
pubkeystring · min: 64 · max: 66required
  • The user's public key in hexadecimal format.
  • Type: string
  • Description: The public key identifying the user whose positions are being requested.
  • Example: '02a1633caf...e4613f0f0f'
Pattern: ^[0-9a-fA-F]+$
Responses
curl -L \
  --url 'https://indexer-dev.saturnbtc.io/v0/user/positions/{pubkey}'
[
  {
    "estimatedYield": "text",
    "id": "text",
    "pool_pubkey": "text",
    "owner": "text",
    "liquidity": "text",
    "poolStats": {
      "id": "text",
      "tvl_now": "text",
      "tvl_24h_ago": "text",
      "tvl_diff": "text",
      "volume_24h": "text",
      "volume_diff_24h": "text",
      "fees_24h": "text",
      "apy_24h": "text",
      "apy": "text",
      "volume_7d": "text",
      "fees_7d": "text",
      "apy_7d": "text",
      "price": "text",
      "token0Amount": "text",
      "token1Amount": "text",
      "liquidity": "text",
      "fee_rate": 1,
      "token0": {
        "id": "text",
        "name": "text",
        "displayName": "text",
        "symbol": "text",
        "tradeable": true,
        "verified": true,
        "icon": "text",
        "priority": 1,
        "divisibility": 1,
        "supply": "text",
        "batchSize": "text",
        "transactionId": "text",
        "createdAt": "text",
        "type": null
      },
      "token1": {
        "id": "text",
        "name": "text",
        "displayName": "text",
        "symbol": "text",
        "tradeable": true,
        "verified": true,
        "icon": "text",
        "priority": 1,
        "divisibility": 1,
        "supply": "text",
        "batchSize": "text",
        "transactionId": "text",
        "createdAt": "text",
        "type": null
      }
    }
  }
]

Get a user's position by public key and pool ID

Retrieves a specific position for a user by public key and pool ID.

get

/v0/user/position/{pubkey}//{poolId}

Path parameters
pubkeystring · min: 64 · max: 66required
  • The user's public key in hexadecimal format.
  • Type: string
  • Description: The public key identifying the user.
  • Example: '02a1633caf...e4613f0f0f'
Pattern: ^[0-9a-fA-F]+$
poolIdstring · min: 64 · max: 66required
  • The unique identifier of the liquidity pool.
  • Type: string
  • Description: The ID of the liquidity pool for which the user's position is requested.
  • Example: '02a1633caf...e4613f0f0f'
Pattern: ^[0-9a-fA-F]+$
Responses
curl -L \
  --url 'https://indexer-dev.saturnbtc.io/v0/user/position/{pubkey}/{poolId}'
{
  "estimatedYield": "text",
  "id": "text",
  "pool_pubkey": "text",
  "owner": "text",
  "liquidity": "text",
  "poolStats": {
    "id": "text",
    "tvl_now": "text",
    "tvl_24h_ago": "text",
    "tvl_diff": "text",
    "volume_24h": "text",
    "volume_diff_24h": "text",
    "fees_24h": "text",
    "apy_24h": "text",
    "apy": "text",
    "volume_7d": "text",
    "fees_7d": "text",
    "apy_7d": "text",
    "price": "text",
    "token0Amount": "text",
    "token1Amount": "text",
    "liquidity": "text",
    "fee_rate": 1,
    "token0": {
      "id": "text",
      "name": "text",
      "displayName": "text",
      "symbol": "text",
      "tradeable": true,
      "verified": true,
      "icon": "text",
      "priority": 1,
      "divisibility": 1,
      "supply": "text",
      "batchSize": "text",
      "transactionId": "text",
      "createdAt": "text",
      "type": null
    },
    "token1": {
      "id": "text",
      "name": "text",
      "displayName": "text",
      "symbol": "text",
      "tradeable": true,
      "verified": true,
      "icon": "text",
      "priority": 1,
      "divisibility": 1,
      "supply": "text",
      "batchSize": "text",
      "transactionId": "text",
      "createdAt": "text",
      "type": null
    }
  }
}

Get user positions by public key and filter

Retrieves positions associated with a user's public key based on a filter.

post

/v0/user/positions/{pubkey}/by-filter

Path parameters
pubkeystring · min: 64 · max: 66required
  • The user's public key in hexadecimal format.
Pattern: ^[0-9a-fA-F]+$
Body
minLiquidityThe minimum liquidity to filter positionsrequired

The minimum liquidity to filter positions.

limitinteger · min: 1 · max: 100
offsetintegerrequired
nameAn array of token names to filter positionsrequired

An array of token names to filter positions.

sortAn array of sorting fields and directionsrequired

An array of sorting fields and directions.

Responses
curl -L \
  --request POST \
  --url 'https://indexer-dev.saturnbtc.io/v0/user/positions/{pubkey}/by-filter' \
  --header 'Content-Type: application/json' \
  --data '{"minLiquidity":"text","offset":1,"name":[null],"sort":[{"field":null}]}'
{
  "offset": 1,
  "response": [
    {
      "estimatedYield": "text",
      "id": "text",
      "pool_pubkey": "text",
      "owner": "text",
      "liquidity": "text",
      "poolStats": {
        "id": "text",
        "tvl_now": "text",
        "tvl_24h_ago": "text",
        "tvl_diff": "text",
        "volume_24h": "text",
        "volume_diff_24h": "text",
        "fees_24h": "text",
        "apy_24h": "text",
        "apy": "text",
        "volume_7d": "text",
        "fees_7d": "text",
        "apy_7d": "text",
        "price": "text",
        "token0Amount": "text",
        "token1Amount": "text",
        "liquidity": "text",
        "fee_rate": 1,
        "token0": {
          "id": "text",
          "name": "text",
          "displayName": "text",
          "symbol": "text",
          "tradeable": true,
          "verified": true,
          "icon": "text",
          "priority": 1,
          "divisibility": 1,
          "supply": "text",
          "batchSize": "text",
          "transactionId": "text",
          "createdAt": "text",
          "type": null
        },
        "token1": {
          "id": "text",
          "name": "text",
          "displayName": "text",
          "symbol": "text",
          "tradeable": true,
          "verified": true,
          "icon": "text",
          "priority": 1,
          "divisibility": 1,
          "supply": "text",
          "batchSize": "text",
          "transactionId": "text",
          "createdAt": "text",
          "type": null
        }
      }
    }
  ]
}

Last updated