Open position

Open Position PSBT

post
/v0/pool/open-position/psbt

Generates a PSBT for opening a new liquidity position by sending funds to the pool.

Authorizations
x-api-keystringRequired
Body
poolIdstring · min: 64 · max: 66Required

The pool's identifier.

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

The amount of the first token to deposit.

Pattern: ^[1-9][0-9]*$
amount1stringRequired

The amount of the second token to deposit.

Pattern: ^[1-9][0-9]*$
initializeAccountUtxobooleanRequired

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

feeRateinteger · min: 1Required

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

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
post
/v0/pool/open-position/psbt

Open Position Message

post
/v0/pool/open-position/message

Generates a message hash for opening a new liquidity position, which the user should sign.

Authorizations
x-api-keystringRequired
Body
poolIdstring · min: 64 · max: 66Required

The pubkey of the pool.

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

The amount of the first token to deposit.

Pattern: ^[1-9][0-9]*$
amount1stringRequired

The amount of the second token to deposit.

Pattern: ^[1-9][0-9]*$
maxAmount0stringRequired

The maximum amount of the first token to deposit.

Pattern: ^[0-9][0-9]*$
maxAmount1stringRequired

The maximum amount of the second token to deposit.

Pattern: ^[0-9][0-9]*$
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})$
recentBlockhashstringRequired

The recent blockhash of the transaction.

mergeUtxoPsbtstringOptional

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})$
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
post
/v0/pool/open-position/message

Open Position

post
/v0/pool/open-position

Finalizes the opening of a new liquidity position by submitting the signed message and executing the transaction on the network.

Authorizations
x-api-keystringRequired
Body
signaturestringRequired

The user's signature of the open position message.

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

The pubkey of the pool.

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

The amount of the first token to deposit.

Pattern: ^[1-9][0-9]*$
amount1stringRequired

The amount of the second token to deposit.

Pattern: ^[1-9][0-9]*$
maxAmount0stringRequired

The maximum amount of the first token to deposit.

Pattern: ^[0-9][0-9]*$
maxAmount1stringRequired

The maximum amount of the second token to deposit.

Pattern: ^[0-9][0-9]*$
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})$
recentBlockhashstringRequired

The recent blockhash of the transaction.

mergeUtxoPsbtstringOptional

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})$
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
post
/v0/pool/open-position

Last updated