# Records

This page documents record-related APIs for single-sided pools, including current assets/status and historical records.

## API Scope

* Manage single-sided pool pairs: `/api/pool/single/manage_list`
* Single-sided pool total assets: `/api/pool/single/total_assets`
* Current pool list and status: `/api/pool/single/pool_list`
* Single-sided pool operation history: `/api/pool/single/pool_history`
* Single-sided pool swap history: `/api/pool/single/swap_history`

## Current Assets and Status

## POST /api/pool/single/manage\_list

> Managed Liquidity Pool List

```json
{"openapi":"3.0.1","info":{"title":"Default Module","version":"1.0.0"},"servers":[{"url":"http://127.0.0.1:8090","description":"Local"}],"security":[],"paths":{"/api/pool/single/manage_list":{"post":{"summary":"Managed Liquidity Pool List","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"payer_address":{"type":"object","properties":{"address":{"type":"string"},"public_key":{"type":"string"}},"required":["address","public_key"]},"payer_asset_address":{"type":"object","properties":{"address":{"type":"string"},"public_key":{"type":"string"}},"required":["address","public_key"]},"apy_metric":{"type":"string"}},"required":["payer_address","payer_asset_address","apy_metric"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"msg":{"type":"string"},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"token":{"$ref":"#/components/schemas/tick","description":"Deposited token details"},"tick1":{"$ref":"#/components/schemas/tick","description":"Tick1 details"},"tick2":{"$ref":"#/components/schemas/tick","description":"Tick2 details"},"tick1_amount":{"type":"number","description":"Amount of Tick A in pool"},"tick2_amount":{"type":"number","description":"Amount of Tick B in pool"},"total_tick1_fee_income":{"type":"number","description":"Total fee income of Tick A"},"total_tick2_fee_income":{"type":"number","description":"Total fee income of Tick B"},"apr":{"type":"number","description":"Annualized yield"},"address":{"type":"string","description":"Address of the token"}},"required":["token","tick2","tick1","tick1_amount","tick2_amount","total_tick1_fee_income","total_tick2_fee_income","apr","address"]}},"total":{"type":"number"}},"required":["items","total"]}},"required":["code","msg","data"]}}},"headers":{}}}}}},"components":{"schemas":{"tick":{"type":"object","properties":{"tick":{"type":"string"},"token_id":{"type":"string"},"coin_type":{"type":"string"}},"required":["tick","coin_type"]}}}}
```

## POST /api/pool/single/total\_assets

> Trade Settlement Total Assets

```json
{"openapi":"3.0.1","info":{"title":"Default Module","version":"1.0.0"},"servers":[{"url":"http://127.0.0.1:8090","description":"Local"}],"security":[],"paths":{"/api/pool/single/total_assets":{"post":{"summary":"Trade Settlement Total Assets","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"payer_address":{"type":"object","properties":{"address":{"type":"string"},"public_key":{"type":"string"}},"required":["address","public_key"]},"payer_asset_address":{"type":"object","properties":{"address":{"type":"string"},"public_key":{"type":"string"}},"required":["address","public_key"]}},"required":["payer_address","payer_asset_address"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"msg":{"type":"string"},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"tick":{"$ref":"#/components/schemas/tick","description":"Tick details"},"wallet_balance":{"type":"integer","description":"Wallet balance"},"market_maker_balance":{"type":"string","description":"Market-making balance"},"wallet_balance_stat_points":{"type":"array","items":{"type":"object","properties":{"balance":{"type":"integer"},"record_time":{"type":"string"}},"required":["balance","record_time"]},"description":"Wallet balance trend"}},"required":["tick","wallet_balance","market_maker_balance","wallet_balance_stat_points"]}},"total":{"type":"number"}},"required":["items","total"]}},"required":["code","msg","data"]}}},"headers":{}}}}}},"components":{"schemas":{"tick":{"type":"object","properties":{"tick":{"type":"string"},"token_id":{"type":"string"},"coin_type":{"type":"string"}},"required":["tick","coin_type"]}}}}
```

## POST /api/pool/single/pool\_list

> Joint Market-Making Pool List

```json
{"openapi":"3.0.1","info":{"title":"Default Module","version":"1.0.0"},"servers":[{"url":"http://127.0.0.1:8090","description":"Local"}],"security":[],"paths":{"/api/pool/single/pool_list":{"post":{"summary":"Joint Market-Making Pool List","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"payer_address":{"type":"object","properties":{"address":{"type":"string"},"public_key":{"type":"string"}},"required":["address","public_key"]},"payer_asset_address":{"type":"object","properties":{"address":{"type":"string"},"public_key":{"type":"string"}},"required":["address","public_key"]}},"required":["payer_address","payer_asset_address"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"msg":{"type":"string"},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"token":{"$ref":"#/components/schemas/tick","description":"Deposited token"},"tick1":{"$ref":"#/components/schemas/tick","description":"Tick1 details"},"tick2":{"$ref":"#/components/schemas/tick","description":"Tick2 details"},"tick1_amount":{"type":"number","description":"Amount of Tick 1 in pool"},"tick2_amount":{"type":"number","description":"Amount of Tick 2 in pool"},"lp_fee_per":{"type":"string","description":"LP fee percentage"},"dotswap_fee_per":{"type":"string","description":"DotSwap service fee percentage"},"total_tick1_fee_income":{"type":"number","description":"Total fee income of Tick 1"},"total_tick2_fee_income":{"type":"number","description":"Total fee income of Tick 2"},"apy":{"type":"number","description":"Annualized yield"},"apr_1d":{"type":"string"},"apr_7d":{"type":"string"},"apr_30d":{"type":"string"},"status":{"type":"string","description":"Status: MATCHING | MATCHED | MATCHING_ONCHAIN | REMOVING_LIQUIDITY | REMOVED","enum":["MATCHING","MATCHED","MATCHING_ONCHAIN","REMOVING_LIQUIDITY","REMOVED"]},"time_ms":{"type":"number","description":"Timestamp"},"min_amount":{"type":"number","description":"Minimum amount"},"max_amount":{"type":"number","description":"Maximum amount"},"min_fee_rate":{"type":"number","description":"Minimum fee rate"},"pool_id":{"type":"string","description":"pool id"},"tx_id":{"type":"string","description":"tx id "},"price_tick_lower":{"type":"number","description":"Minimum price"},"price_tick_upper":{"type":"number","description":"Maximum price"},"unit_tick":{"type":"string","description":"Tick unit"},"matched_price_tick_lower":{"type":"number","description":"Matched minimum price"},"matched_price_tick_upper":{"type":"number","description":"Matched maximum price"}},"required":["token","tick2_amount","tick2","tick1","tick1_amount","total_tick1_fee_income","dotswap_fee_per","lp_fee_per","total_tick2_fee_income","time_ms","status","apy","min_amount","max_amount","min_fee_rate","pool_id","tx_id","apr_30d","apr_7d","apr_1d","matched_price_tick_upper","matched_price_tick_lower","unit_tick","price_tick_upper","price_tick_lower"]}},"total":{"type":"number"}},"required":["items","total"]}},"required":["code","msg","data"]}}},"headers":{}}}}}},"components":{"schemas":{"tick":{"type":"object","properties":{"tick":{"type":"string"},"token_id":{"type":"string"},"coin_type":{"type":"string"}},"required":["tick","coin_type"]}}}}
```

## Historical Records

## POST /api/pool/single/pool\_history

> Pool History

```json
{"openapi":"3.0.1","info":{"title":"Default Module","version":"1.0.0"},"servers":[{"url":"http://127.0.0.1:8090","description":"Local"}],"security":[],"paths":{"/api/pool/single/pool_history":{"post":{"summary":"Pool History","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"page_size":{"type":"integer"},"type":{"type":"string","description":"Operation type"},"status":{"type":"string","description":"Status (Pending | Success | Failed | Rollback)"},"start_time":{"type":"integer"},"end_time":{"type":"integer"},"pool_id":{"type":"string"}},"required":["page","page_size","type","status","start_time","end_time","pool_id"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"msg":{"type":"string"},"data":{"type":"object","properties":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"pool_id":{"type":"string"},"type":{"type":"string","description":"Operation type: ADD | REMOVE | STOP_MATCHING | POOL_FEE_CHARGED"},"token":{"$ref":"#/components/schemas/tick","description":"Token type"},"tick1":{"$ref":"#/components/schemas/tick","description":"tick1"},"tick2":{"$ref":"#/components/schemas/tick","description":"tick2"},"lp_buy_fee_per":{"type":"string","description":"Effective fee rate a->b"},"lp_sell_fee_per":{"type":"string","description":"Effective fee rate b->a"},"btc_price":{"type":"string","description":"BTC price (USD)"},"wallet_balance_before_a":{"type":"string","description":"Wallet token A balance before operation"},"wallet_balance_before_b":{"type":"string","description":"Wallet token B balance before operation"},"wallet_balance_after_a":{"type":"string","description":"Wallet token A balance after operation"},"wallet_balance_after_b":{"type":"string","description":"Wallet token B balance after operation"},"pool_tokens_before_a":{"type":"string","description":"Pool token A balance before operation"},"pool_tokens_before_b":{"type":"string","description":"Pool token B balance before operation"},"pool_tokens_after_a":{"type":"string","description":"Pool token A balance after operation"},"pool_tokens_after_b":{"type":"string","description":"Pool token B balance after operation"},"your_pool_tokens_before_a":{"type":"string","description":"Your pool token A balance before operation"},"your_pool_tokens_before_b":{"type":"string","description":"Your pool token B balance before operation"},"your_pool_tokens_after_a":{"type":"string","description":"Your pool token A balance after operation"},"your_pool_tokens_after_b":{"type":"string","description":"Your pool token B balance after operation"},"status":{"type":"string","description":"Status"},"time_ms":{"type":"number","description":"Timestamp"},"tx_id":{"type":"string"},"order_address":{"type":"string","description":"Transaction address"},"min_amount":{"type":"number","description":"Minimum amount"},"max_amount":{"type":"number","description":"Maximum amount"},"min_fee_rate":{"type":"number","description":"Configured fee rate"},"price_tick_lower":{"type":"number","description":"Minimum price"},"price_tick_upper":{"type":"number","description":"Maximum price"},"unit_tick":{"type":"string","description":"Tick unit"},"matched_price_tick_lower":{"type":"number","description":"Matched minimum price"},"matched_price_tick_upper":{"type":"number","description":"Matched maximum price"}},"required":["pool_id","tick2","tick1","type","wallet_balance_before_a","btc_price","lp_buy_fee_per","wallet_balance_after_b","wallet_balance_after_a","wallet_balance_before_b","pool_tokens_after_a","pool_tokens_before_b","pool_tokens_before_a","time_ms","status","pool_tokens_after_b","your_pool_tokens_after_a","your_pool_tokens_before_b","your_pool_tokens_before_a","your_pool_tokens_after_b","order_address","tx_id","token","min_amount","max_amount","min_fee_rate","lp_sell_fee_per","matched_price_tick_upper","matched_price_tick_lower","unit_tick","price_tick_upper","price_tick_lower"]}}},"required":["total","items"]}},"required":["code","msg","data"]}}},"headers":{}}}}}},"components":{"schemas":{"tick":{"type":"object","properties":{"tick":{"type":"string"},"token_id":{"type":"string"},"coin_type":{"type":"string"}},"required":["tick","coin_type"]}}}}
```

## POST /api/pool/single/swap\_history

> Trade History

```json
{"openapi":"3.0.1","info":{"title":"Default Module","version":"1.0.0"},"servers":[{"url":"http://127.0.0.1:8090","description":"Local"}],"security":[],"paths":{"/api/pool/single/swap_history":{"post":{"summary":"Trade History","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"page_size":{"type":"integer"},"channel":{"type":"string","description":"Channel"},"status":{"type":"string","description":"Status (Pending | Success | Failed | Rollback)"},"start_time":{"type":"integer"},"end_time":{"type":"integer"},"pool_id":{"type":"integer"}},"required":["page","page_size","channel","status","start_time","end_time"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"msg":{"type":"string"},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"settle_method":{"type":"string","description":"Settlement method","enum":["wallet","simple_lighting"]},"protocol":{"type":"string","description":"Type"},"op":{"type":"string","description":"Swap operation"},"tick1":{"type":"string","description":"Token 1"},"tick1_amount":{"type":"string"},"tick1_order_total_amount":{"type":"string","description":"Total order amount"},"tick2":{"type":"string","description":"Token 2"},"tick2_amount":{"type":"string"},"tick2_order_total_amount":{"type":"string","description":"Total order amount"},"time_ms":{"type":"string","description":"Timestamp (ms)"},"status":{"type":"string","description":"Status","enum":["Pending","Success","Failed","Rollback"]},"revenue":{"type":"string","description":"Pool revenue"},"channel":{"type":"string","description":"Channel"},"average_price":{"type":"string"},"platform_fee":{"type":"string"},"btc_price_usd":{"type":"string"},"benchmark_token":{"type":"string"},"settlement_address":{"type":"string"},"taker_fee":{"type":"string"},"tvl_before_swap":{"type":"string","description":"TVL before swap"},"tvl_after_swap":{"type":"string","description":"TVL after swap"},"single_side_from_balance_before_swap":{"type":"string","description":"Single-sided from account change before swap"},"single_side_to_balance_before_swap":{"type":"string","description":"Single-sided to account change before swap"},"single_side_from_balance_after_swap":{"type":"string","description":"Single-sided from account change after swap"},"single_side_to_balance_after_swap":{"type":"string","description":"Single-sided to account change after swap"},"single_side_tick_a_fee_income":{"type":"string","description":"Single-sided TickA fee income"},"single_side_tick_b_fee_income":{"type":"string","description":"Single-sided TickB fee income"},"from_balance_before_swap":{"type":"string","description":"From balance before swap"},"to_balance_before_swap":{"type":"string","description":"To balance before swap"},"from_balance_after_swap":{"type":"string","description":"From balance after swap"},"to_balance_after_swap":{"type":"string","description":"To balance after swap"},"address":{"type":"string","description":"Transaction address"},"pool_id":{"type":"string","description":"Poolid"}},"required":["op","tick1","tick2","time_ms","status","tick1_amount","tick2_amount","protocol","tick1_order_total_amount","tick2_order_total_amount","revenue","channel","settle_method","average_price","platform_fee","benchmark_token","btc_price_usd","settlement_address","taker_fee","tvl_before_swap","tvl_after_swap","single_side_from_balance_before_swap","single_side_to_balance_before_swap","single_side_from_balance_after_swap","single_side_to_balance_after_swap","single_side_tick_a_fee_income","single_side_tick_b_fee_income","from_balance_before_swap","to_balance_before_swap","from_balance_after_swap","to_balance_after_swap","address","pool_id"]}},"total":{"type":"integer"}},"required":["items","total"]}},"required":["code","msg","data"]}}},"headers":{}}}}}}}
```


---

# 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/nexus-protocol/maker/single-sided-pool/records.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.
