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. Pool API

Initialize pool

PreviousPool APINextAdd Shards

Last updated 1 month ago

  • POSTInitialize Pool PSBT
  • POSTInitialize Pool Message
  • POSTInitialize Pool

Initialize Pool PSBT

post

Generates a partially signed Bitcoin transaction (PSBT) for creating the needed UTXOs for creating the accounts for a pool.

The request body containing details for creating accounts PSBT.

Authorizations
Body
feeRateinteger · min: 1Required

The fee rate for the transaction (in sats per byte).

shardsLengthnumberRequired

The number of accounts to create. Maximum is 10.

token0stringRequired

The first token's identifier.

token1stringRequired

The second token's identifier.

feeTiernumberRequired

The fee tier for the pool.

runePubkeystring · min: 64 · max: 66Required

The public key of the rune address of the user initiating the request.

Pattern: ^[0-9a-fA-F]+$
paymentPubkeystring · min: 64 · max: 66Optional

The public key of the bitcoin address of the user initiating the request. If the user doesn't have a bitcoin address, the runePubkey will be used

Pattern: ^[0-9a-fA-F]+$
runeAddressstringRequired

The rune address of the user. It must be a taproot address. (P2TR). If no bitcoin address is provided, the rune address will be used for bitcoin too.

paymentAddressstringOptional

The bitcoin address of the user.

Responses
201
An object containing the PSBT, fee, utxos to sign, and the created accounts.
application/json
400
Pool error
application/json
401
Unauthorized
application/json
403
User not found
application/json
500
Internal Server Error
application/json
post
POST /v0/pool/initialize-pool/psbt HTTP/1.1
Host: api-dev.saturnbtc.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 162

{
  "feeRate": 1,
  "shardsLength": 1,
  "token0": "text",
  "token1": "text",
  "feeTier": 1,
  "runePubkey": "text",
  "paymentPubkey": "text",
  "runeAddress": "text",
  "paymentAddress": "text"
}
{
  "psbt": "text",
  "fee": 1,
  "utxosToSign": [
    {
      "address": "text",
      "signingIndexes": [
        1
      ],
      "sigHash": 1,
      "utxo": "text"
    }
  ]
}

Initialize Pool Message

post

Generates a message hash required to initialize a pool.

Authorizations
Body
token0stringRequired

The first token's identifier.

token1stringRequired

The second token's identifier.

feeTiernumberRequired

The fee tier for the pool.

shardsLengthnumberRequired

The number of accounts to create. Maximum is 10.

feeRateinteger · min: 1Required

The fee rate for the transaction (in sats per byte).

signedPsbtstringRequired

The signed PSBT in base64 format.

Pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}={2})$
runePubkeystring · min: 64 · max: 66Required

The public key of the rune address of the user initiating the request.

Pattern: ^[0-9a-fA-F]+$
paymentPubkeystring · min: 64 · max: 66Optional

The public key of the bitcoin address of the user initiating the request. If the user doesn't have a bitcoin address, the runePubkey will be used

Pattern: ^[0-9a-fA-F]+$
runeAddressstringRequired

The rune address of the user. It must be a taproot address. (P2TR). If no bitcoin address is provided, the rune address will be used for bitcoin too.

paymentAddressstringOptional

The bitcoin address of the user.

Responses
201
A hexadecimal string representing the hash of the initialization message.
application/json
Responsestring
400
Pool error
application/json
401
Unauthorized
application/json
403
User not found
application/json
500
Internal Server Error
application/json
post
POST /v0/pool/initialize-pool/message HTTP/1.1
Host: api-dev.saturnbtc.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 182

{
  "token0": "text",
  "token1": "text",
  "feeTier": 1,
  "shardsLength": 1,
  "feeRate": 1,
  "signedPsbt": "text",
  "runePubkey": "text",
  "paymentPubkey": "text",
  "runeAddress": "text",
  "paymentAddress": "text"
}
text

Initialize Pool

post

Finalizes the pool initialization process.

Authorizations
Body
signaturestringRequired

The user's signature of the initialization message.

Pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}={2})$
token0stringRequired

The first token's identifier.

token1stringRequired

The second token's identifier.

feeTiernumberRequired

The fee tier for the pool.

shardsLengthnumberRequired

The number of accounts to create. Maximum is 10.

feeRateinteger · min: 1Required

The fee rate for the transaction (in sats per byte).

signedPsbtstringRequired

The signed PSBT in base64 format.

Pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}={2})$
runePubkeystring · min: 64 · max: 66Required

The public key of the rune address of the user initiating the request.

Pattern: ^[0-9a-fA-F]+$
paymentPubkeystring · min: 64 · max: 66Optional

The public key of the bitcoin address of the user initiating the request. If the user doesn't have a bitcoin address, the runePubkey will be used

Pattern: ^[0-9a-fA-F]+$
runeAddressstringRequired

The rune address of the user. It must be a taproot address. (P2TR). If no bitcoin address is provided, the rune address will be used for bitcoin too.

paymentAddressstringOptional

The bitcoin address of the user.

Responses
201
The Arch Network transaction ID of the pool creation.
application/json
400
Pool error
application/json
401
Unauthorized
application/json
403
User not found
application/json
500
Internal Server Error
application/json
post
POST /v0/pool/initialize-pool HTTP/1.1
Host: api-dev.saturnbtc.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 201

{
  "signature": "text",
  "token0": "text",
  "token1": "text",
  "feeTier": 1,
  "shardsLength": 1,
  "feeRate": 1,
  "signedPsbt": "text",
  "runePubkey": "text",
  "paymentPubkey": "text",
  "runeAddress": "text",
  "paymentAddress": "text"
}
{
  "archTxId": "text",
  "bitcoinTxIds": [
    "text"
  ]
}