> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.walletstech.com/llms.txt.
> For full documentation content, see https://docs.walletstech.com/llms-full.txt.

# Get wallet balance

POST https://gateway/balance
Content-Type: application/json

Get the admin wallet balance

#### **Types**

| **ID** | **NAME** |
| --- | --- |
| 1 | BTC |
| 2 | ETH |
| 21 | ETH_USDT |
| 3 | BNB |
| 31 | BNB_USDC |
| 4 | TRX |
| 41 | TRX_USDT |

Reference: https://docs.walletstech.com/api/admin-wallet/get-wallet-balance

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /gateway/balance:
    post:
      operationId: get-wallet-balance
      summary: Get wallet balance
      description: |-
        Get the admin wallet balance

        #### **Types**

        | **ID** | **NAME** |
        | --- | --- |
        | 1 | BTC |
        | 2 | ETH |
        | 21 | ETH_USDT |
        | 3 | BNB |
        | 31 | BNB_USDC |
        | 4 | TRX |
        | 41 | TRX_USDT |
      tags:
        - subpackage_adminWallet
      parameters:
        - name: X-AUTH-TOKEN
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Admin Wallet_Get wallet
                  balance_Response_200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: integer
              required:
                - type
servers:
  - url: https:/
components:
  schemas:
    Admin Wallet_Get wallet balance_Response_200:
      type: object
      properties:
        type:
          type: integer
        address:
          type: string
        balance:
          type: string
      required:
        - type
        - address
        - balance
      title: Admin Wallet_Get wallet balance_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-AUTH-TOKEN

```

## SDK Code Examples

```python Admin Wallet_Get wallet balance_example
import requests

url = "https://https/gateway/balance"

payload = { "type": 1 }
headers = {
    "X-AUTH-TOKEN": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Admin Wallet_Get wallet balance_example
const url = 'https://https/gateway/balance';
const options = {
  method: 'POST',
  headers: {'X-AUTH-TOKEN': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"type":1}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Admin Wallet_Get wallet balance_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://https/gateway/balance"

	payload := strings.NewReader("{\n  \"type\": 1\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-AUTH-TOKEN", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Admin Wallet_Get wallet balance_example
require 'uri'
require 'net/http'

url = URI("https://https/gateway/balance")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-AUTH-TOKEN"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"type\": 1\n}"

response = http.request(request)
puts response.read_body
```

```java Admin Wallet_Get wallet balance_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://https/gateway/balance")
  .header("X-AUTH-TOKEN", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"type\": 1\n}")
  .asString();
```

```php Admin Wallet_Get wallet balance_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://https/gateway/balance', [
  'body' => '{
  "type": 1
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-AUTH-TOKEN' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Admin Wallet_Get wallet balance_example
using RestSharp;

var client = new RestClient("https://https/gateway/balance");
var request = new RestRequest(Method.POST);
request.AddHeader("X-AUTH-TOKEN", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"type\": 1\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Admin Wallet_Get wallet balance_example
import Foundation

let headers = [
  "X-AUTH-TOKEN": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["type": 1] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://https/gateway/balance")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```