Saturn Documentation
Launch App
  • Saturn
  • Traders
    • Trading in Saturn
    • How to Swap
    • How Saturn Protects Your Trades from MEV Risks
  • Liquidity Providers
    • Open a position in a Liquidity Pool
    • Managing your Portfolio on Saturn
  • Token Creators
    • How to Create a Pool on Saturn
  • Builders
    • Saturn API
      • Pool API
        • Initialize pool
        • Add Shards
        • Open position
        • Increase Liquidity
        • Remove Liquidity
        • Swap
        • Swap Quotes
        • Boost Transaction
        • Wallet
      • Indexer API
        • Collections
        • Pools
        • Prices
        • Positions
        • Transactions
        • Charts
        • Stats
    • Liquidity Pool SDK
  • Saturn V1
    • Overview
    • How-To-Links
      • Setting up Trading Account
        • Withdrawing from Trading account
      • Swap
      • Orderbook
        • Your Profile
          • Trade History
        • How to place a sell order
        • How to place a buy order
        • Positions
      • Collect
      • Charts
      • Tutorial videos
        • Setting up a Trading Account (v3) and preparing for Rings Airdrops
        • Trading on Saturn
    • FAQs
      • What are Satoshi's, Rare SATs, and Rings?
        • More on Rare SATs
      • What is a UTXO
      • What is a PSBT
      • Why are there batch sizes?
      • Compatible Wallets
      • Why is my Available balance different than my Total balance?
Powered by GitBook
On this page
  1. Builders
  2. Saturn API
  3. Indexer API

Positions

PreviousPricesNextTransactions

Last updated 1 month ago

get

Get details for a user's position in the specified pool

Path parameters
pubkeystringRequired

User's pubkey as hex string

pool_idstringRequired

Pool ID as a hex string

Responses
200
List of positions
application/json
400
Invalid pubkey format
application/json
404
Position not found for specified pool
text/plain
get
GET /position/{pubkey}/{pool_id} HTTP/1.1
Host: 127.0.0.1:3000
Accept: */*
{
  "position": {
    "id": "text",
    "invalid": true,
    "poolId": "text",
    "owner": "text"
  },
  "state": {
    "positionId": "text",
    "blockHeight": "text",
    "liquidity": "text",
    "incrementToken0Amount": 1,
    "incrementToken1Amount": 1
  },
  "estimateYield": "text",
  "totalIncrementToken0Amount": 1,
  "totalIncrementToken1Amount": 1
}
get

Get a list of positions owned by the user

Path parameters
pubkeystringRequired

User's pubkey as hex string

Responses
200
List of positions
application/json
400
Invalid pubkey format
get
GET /positions/{pubkey} HTTP/1.1
Host: 127.0.0.1:3000
Accept: */*
[
  {
    "position": {
      "id": "text",
      "invalid": true,
      "poolId": "text",
      "owner": "text"
    },
    "state": {
      "positionId": "text",
      "blockHeight": "text",
      "liquidity": "text",
      "incrementToken0Amount": 1,
      "incrementToken1Amount": 1
    },
    "estimateYield": "text",
    "totalIncrementToken0Amount": 1,
    "totalIncrementToken1Amount": 1
  }
]
  • POST/positions/{pubkey}/by-filter
  • GET/position/{id}
  • GET/position/{pubkey}/{pool_id}
  • GET/positions/{pubkey}
get

Get position details

Path parameters
idstringRequired

Position pubkey as hex string

Responses
200
Position details
application/json
400
Invalid pubkey format
application/json
404
Position not found
text/plain
get
GET /position/{id} HTTP/1.1
Host: 127.0.0.1:3000
Accept: */*
{
  "position": {
    "id": "text",
    "invalid": true,
    "poolId": "text",
    "owner": "text"
  },
  "state": {
    "positionId": "text",
    "blockHeight": "text",
    "liquidity": "text",
    "incrementToken0Amount": 1,
    "incrementToken1Amount": 1
  }
}
post

Get paginated positions for a user that match the specified filter

Path parameters
pubkeystringRequired

User's pubkey as hex string

Body
namearray | nullOptional
min_liquidityinteger | nullOptional
offsetinteger | nullOptional
limitinteger | nullOptional
Responses
200
Paginated positions
application/json
400
Invalid pubkey format
post
POST /positions/{pubkey}/by-filter HTTP/1.1
Host: 127.0.0.1:3000
Content-Type: application/json
Accept: */*
Content-Length: 65

{
  "name": [
    "text"
  ],
  "min_liquidity": null,
  "offset": null,
  "limit": null
}
{
  "response": [
    {
      "position": {
        "id": "text",
        "invalid": true,
        "poolId": "text",
        "owner": "text"
      },
      "state": {
        "positionId": "text",
        "blockHeight": "text",
        "liquidity": "text",
        "incrementToken0Amount": 1,
        "incrementToken1Amount": 1
      },
      "estimateYield": "text",
      "totalIncrementToken0Amount": 1,
      "totalIncrementToken1Amount": 1
    }
  ],
  "offset": 1
}