# Runes

## POST /brc20swap/v2/create\_add\_liquid\_psbt2

> Build the PSBT for adding liquidity

```json
{"openapi":"3.0.1","info":{"title":"Backend API","version":"1.0.0"},"servers":[{"url":"https://api-testnet4.dotswap.app","description":"Swap test"},{"url":"https://api.dotswap.app","description":"Swap official"}],"security":[],"paths":{"/brc20swap/v2/create_add_liquid_psbt2":{"post":{"summary":"Build the PSBT for adding liquidity","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tick1":{"type":"string"},"tick2":{"type":"string"},"amount_1":{"type":"string"},"amount_2":{"type":"string"},"slipper":{"type":"string"},"payer_ord_addr":{"type":"string"},"fee_rate":{"type":"string"},"payer_btc_addr":{"type":"string"},"payer_pub_key":{"type":"string"},"coin_type_1":{"type":"string"},"coin_type_2":{"type":"string"},"token":{"type":"string"}},"required":["tick1","coin_type_1","amount_1","tick2","coin_type_2","amount_2","fee_rate","slipper","token","payer_ord_addr","payer_btc_addr","payer_pub_key"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"msg":{"type":"string"},"data":{"type":"object","properties":{"psbt":{"type":"string","title":"PSBT base64"},"ToSignInputs":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"type":{"type":"string"}},"required":["index","type"]}},"check_sum":{"type":"string"},"tx_size":{"type":"integer"},"usr_cnt":{"type":"integer"},"vins":{"type":"null"},"check_sign_only":{"type":"boolean"}},"required":["ToSignInputs","psbt","check_sum","tx_size","usr_cnt","vins","check_sign_only"]},"req_id":{"type":"string"}},"required":["code","msg","data","req_id"]}}},"headers":{}}}}}}}
```

## Important Notest

{% hint style="info" %}

1. Use the same address for both `payer_ord_addr` and `payer_btc_addr`.
   {% endhint %}

## POST /brc20swap/v2/add\_liquid\_by\_psbt

> Add liquidity

```json
{"openapi":"3.0.1","info":{"title":"Backend API","version":"1.0.0"},"servers":[{"url":"https://api-testnet4.dotswap.app","description":"Swap test"},{"url":"https://api.dotswap.app","description":"Swap official"}],"security":[],"paths":{"/brc20swap/v2/add_liquid_by_psbt":{"post":{"summary":"Add liquidity","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"psbt":{"type":"string","title":"PSBT base64"},"tick1":{"type":"string"},"tick2":{"type":"string"},"amount_1":{"type":"string"},"amount_2":{"type":"string"},"slipper":{"type":"string"},"payer_ord_addr":{"type":"string"},"fee_rate":{"type":"string"},"payer_btc_addr":{"type":"string"},"payer_pub_key":{"type":"string"},"check_sum":{"type":"string"},"chl":{"type":"string"},"coin_type_1":{"type":"string"},"coin_type_2":{"type":"string"},"token":{"type":"string"}},"required":["tick1","coin_type_1","amount_1","tick2","coin_type_2","amount_2","fee_rate","slipper","token","payer_ord_addr","payer_btc_addr","payer_pub_key","psbt"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"msg":{"type":"string"},"data":{"type":"object","properties":{"order_id":{"type":"string","title":"Order number"}},"required":["order_id"]},"req_id":{"type":"string"}},"required":["code","msg","data","req_id"]}}},"headers":{}}}}}}}
```

Finally, send the signed PSBT. If the response indicates success, the liquidity has been added/created successfully.

{% hint style="info" %}
The request parameters of the previous interface are inherited, and an additional psbt is passed. export interface SendPoolPsbtBody extends PoolPsbtBody { psbt: string; }
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.on.nexus/dotswap/developers/l1-swap-and-liquidity-apis/liquidity-management/runes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
