> For the complete documentation index, see [llms.txt](https://docs.bbscoin.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bbscoin.org/development-integration/wallet-api/wallet-container/estimatefusion.md).

# estimateFusion

### Input

| Argument  | Mandatory | Description                                                                                                                                       | Format |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |
| threshold | Yes       | Value that determines which outputs will be optimized. Only the outputs less than the threshold value will be included into a fusion transaction. | uint64 |
| addresses | No        | Array of strings, where each string is an address to take the funds from.                                                                         | array  |

### Output

| Argument         | Description                                                 | Format |
| ---------------- | ----------------------------------------------------------- | ------ |
| totalOutputCount | Total number of unspent outputs of the specified addresses. | uint64 |
| fusionReadyCount | Number of outputs that can be optimized.                    | uint64 |

### Usage

Replace "your\_password" and "TA4yACzMYuFYq7V6xVAWYHeS39jQ8w4mKRowpY6NskGuS1rZpjcWuCpdeCypwUCJrK9mGqVW9o1pY2EG3HW7BZkR2YRcc4YNa" in examples with real values from wallet daemon. Password is specified on command-line of wallet daemon, it is not returned by any API method for security reasons. You can get list of valid wallet addresses using getAddresses method.

#### cURL

```bash
curl -X POST http://ip_address:port/json_rpc -H 'Content-Type: application/json-rpc' -d '{"jsonrpc": "2.0", "method": "estimateFusion", "password": "your_password", "params": {"addresses": ["TA4yACzMYuFYq7V6xVAWYHeS39jQ8w4mKRowpY6NskGuS1rZpjcWuCpdeCypwUCJrK9mGqVW9o1pY2EG3HW7BZkR2YRcc4YNa"], "threshold" : 100000000}, "id": "1"}'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.bbscoin.org/development-integration/wallet-api/wallet-container/estimatefusion.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
