# Get a User's Native Token Balance

Use this method to get User's Native Balance (like BNB, ETH, MATIC)&#x20;

### Usage in your script

```csharp
GetUserBalance
  .Initialize(destroyAtEnd: true)
  .SetParameters(
    chainId: "97",
    userAddress: "0x01dw4...",
  )
  .OnError(error => Debug.Log(error))
  .OnComplete(result => Debug.Log(result.balance))
  .Run();
```

#### Member Functions

**`.Initialize()`**

<table><thead><tr><th width="193">Parameter</th><th width="80">Type</th><th width="105">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>destroyAtEnd</code></td><td><strong>bool</strong></td><td><strong>Optional</strong></td><td>defines if this component will be destroyed after <code>.Run()</code></td></tr></tbody></table>

**`.SetParameters()`**

<table><thead><tr><th width="193.33333333333331">Parameter</th><th width="88">Type</th><th width="109">Required</th><th>Description</th></tr></thead><tbody><tr><td>chainId</td><td><strong>String</strong></td><td><strong>Yes</strong></td><td>The chain id</td></tr><tr><td>userAddress</td><td><strong>String</strong></td><td><strong>Yes</strong></td><td>address of the user</td></tr></tbody></table>

**`.onError()`**

*Action on Error: returns error information.*

**`.onComplete()`**

*Action on successful: returns balance of user.*

**`.Run()`**

*Runs the API call and fills the corresponding model in the component on success.*


---

# 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.altura.com/altura-documentation/unity-sdk-reference/get-methods/get-a-users-native-token-balance.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.
