Increase Liquidity

Increase Liquidity PSBT

Generates a PSBT for increasing liquidity in an existing position by sending funds to the pool.

post

/v0/pool/increase-liquidity/psbt

Authorizations
Body
token0The first token's identifier. Must be the name of the tokenrequired

The first token's identifier. Must be the name of the token.

token1The second token's identifier. Must be the name of the tokenrequired

The second token's identifier. Must be the name of the token. Usually 'sat'.

amount0The amount of the first token to depositrequired

The amount of the first token to deposit.

Pattern: ^[1-9][0-9]*$
amount1The amount of the second token to depositrequired

The amount of the second token to deposit.

Pattern: ^[1-9][0-9]*$
initializeAccountUtxoA boolean indicating whether to initialize the account UTXOrequired

A boolean indicating whether to initialize the account UTXO. If you're creating a new position, you should set this to true.

feeRateThe fee rate for the transaction (in sats per byte)required

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

runePubkeyThe public key of the rune address of the user initiating the requestrequired

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

Pattern: ^[0-9a-fA-F]+$
paymentPubkeyThe public key of the bitcoin address of the user initiating the request

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]+$
runeAddressThe rune address of the user. It must be a taproot address. (P2TR)required

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.

paymentAddressThe bitcoin address of the user

The bitcoin address of the user.

Responses
curl -L \
  --request POST \
  --url 'https://api-dev.saturnbtc.io/v0/pool/increase-liquidity/psbt' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"token0":"text","token1":"text","amount0":"text","amount1":"text","initializeAccountUtxo":true,"feeRate":1,"runePubkey":"text","runeAddress":"text"}'
{
  "account": {
    "privkey": "text",
    "pubkey": "text",
    "address": "text"
  },
  "mergeUtxoPsbt": {
    "psbt": "text",
    "fee": 1,
    "utxosToSign": [
      {
        "address": "text",
        "sigHash": 1,
        "utxo": "text",
        "signingIndexes": [
          1
        ]
      }
    ]
  },
  "psbt": "text",
  "fee": 1,
  "utxosToSign": [
    {
      "address": "text",
      "sigHash": 1,
      "utxo": "text",
      "signingIndexes": [
        1
      ]
    }
  ]
}

Increase Liquidity Message

Generates a message hash for increasing liquidity in an existing position, which the user should sign.

post

/v0/pool/increase-liquidity/message

Authorizations
Body
positionPubKeyThe pubkey of the positionrequired

The pubkey of the position.

Pattern: ^[0-9a-fA-F]+$
poolIdThe pubkey of the poolrequired

The pubkey of the pool.

Pattern: ^[0-9a-fA-F]+$
feeRateThe fee rate for the transaction (in sats per byte)required

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

signedPsbtThe signed PSBT in base64 formatrequired

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})$
runePubkeyThe public key of the rune address of the user initiating the requestrequired

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

Pattern: ^[0-9a-fA-F]+$
paymentPubkeyThe public key of the bitcoin address of the user initiating the request

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]+$
mergeUtxoPsbtThe merge UTXO PSBT in base64 format

The merge UTXO 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})$
amount0The amount of the first token to depositrequired

The amount of the first token to deposit.

Pattern: ^[1-9][0-9]*$
amount1The amount of the second token to depositrequired

The amount of the second token to deposit.

Pattern: ^[1-9][0-9]*$
runeAddressThe rune address of the user. It must be a taproot address. (P2TR)required

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.

paymentAddressThe bitcoin address of the user

The bitcoin address of the user.

Responses
curl -L \
  --request POST \
  --url 'https://api-dev.saturnbtc.io/v0/pool/increase-liquidity/message' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"positionPubKey":"text","poolId":"text","feeRate":1,"signedPsbt":"text","runePubkey":"text","amount0":"text","amount1":"text","runeAddress":"text"}'
text

Increase Liquidity

Finalizes the increase of liquidity in an existing position by submitting the signed message and executing the transaction on the network.

post

/v0/pool/increase-liquidity

Authorizations
Body
signatureThe user's signature of the increase liquidity messagerequired

The user's signature of the increase liquidity message.

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

The pubkey of the position.

Pattern: ^[0-9a-fA-F]+$
poolIdThe pubkey of the poolrequired

The pubkey of the pool.

Pattern: ^[0-9a-fA-F]+$
feeRateThe fee rate for the transaction (in sats per byte)required

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

signedPsbtThe signed PSBT in base64 formatrequired

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})$
runePubkeyThe public key of the rune address of the user initiating the requestrequired

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

Pattern: ^[0-9a-fA-F]+$
paymentPubkeyThe public key of the bitcoin address of the user initiating the request

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]+$
mergeUtxoPsbtThe merge UTXO PSBT in base64 format

The merge UTXO 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})$
amount0The amount of the first token to depositrequired

The amount of the first token to deposit.

Pattern: ^[1-9][0-9]*$
amount1The amount of the second token to depositrequired

The amount of the second token to deposit.

Pattern: ^[1-9][0-9]*$
runeAddressThe rune address of the user. It must be a taproot address. (P2TR)required

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.

paymentAddressThe bitcoin address of the user

The bitcoin address of the user.

Responses
curl -L \
  --request POST \
  --url 'https://api-dev.saturnbtc.io/v0/pool/increase-liquidity' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"signature":"text","positionPubKey":"text","poolId":"text","feeRate":1,"signedPsbt":"text","runePubkey":"text","amount0":"text","amount1":"text","runeAddress":"text"}'
{
  "archTxId": "text",
  "bitcoinTxIds": [
    "text"
  ]
}

Last updated