> 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 AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.walletstech.com/_mcp/server.

# Get wallet info

POST https://your-endpoint.example.com/info
Content-Type: application/json

What a wallet screen needs, in one round-trip. Balance and history are fetched concurrently; if the history provider fails, `transactions` comes back `[]` rather than failing the call. A balance failure *is* an error.

Reference: https://docs.walletstech.com/api-reference/balances/get-wallet-info

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Blockchain Wallet Service
  version: 1.0.0
paths:
  /info:
    post:
      operationId: getWalletInfo
      summary: Get wallet info
      description: >-
        What a wallet screen needs, in one round-trip. Balance and history are
        fetched concurrently; if the history provider fails, `transactions`
        comes back `[]` rather than failing the call. A balance failure *is* an
        error.
      tags:
        - balances
      parameters:
        - name: Authorization
          in: header
          description: >-
            A 15-minute token from `/auth`. Required on every endpoint except
            `/auth`.
          required: true
          schema:
            type: string
        - name: X-Request-Id
          in: header
          description: >-
            Correlation id. Generated if omitted, echoed on every response, and
            written to the audit log.
          required: false
          schema:
            type: string
        - name: X-USER-ID
          in: header
          description: >-
            Sent by the trusted gateway. When present it **overrides** any
            `userId` in the body.
          required: false
          schema:
            $ref: '#/components/schemas/UserId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Balances_getWalletInfo_Response_200'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            Service Unavailable — this deployment is not configured for that
            chain. Permanent, not a transient outage: do not retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                userId:
                  $ref: '#/components/schemas/UserId'
                assetId:
                  $ref: '#/components/schemas/AssetId'
              required:
                - userId
                - assetId
servers:
  - url: https://your-endpoint.example.com
    description: >-
      Placeholder. Each client is issued its own base URL — there is no shared
      public host. Replace this with the endpoint you were given.
components:
  schemas:
    UserId:
      type: string
      description: 24-character hex id, returned by `/create`.
      title: UserId
    AssetId:
      type: string
      enum:
        - '1'
        - '2'
        - '21'
        - '22'
        - '3'
        - '31'
        - '32'
        - '4'
        - '41'
        - '42'
        - '5'
        - '51'
        - '52'
        - '6'
        - '61'
        - '62'
      description: >-
        Primary asset selector. An all-digit string (`"21"`) is accepted and
        normalised to an integer.


        - `1` — BITCOIN BTC (native, 8 decimals)

        - `2` — ETHEREUM ETH (native, 18 decimals)

        - `21` — ETHEREUM USDT (ERC20, 6 decimals)

        - `22` — ETHEREUM USDC (ERC20, 6 decimals)

        - `3` — BNB BNB (native, 18 decimals)

        - `31` — BNB USDT (BEP20, 18 decimals)

        - `32` — BNB USDC (BEP20, 18 decimals)

        - `4` — TRON TRX (native, 6 decimals)

        - `41` — TRON USDT (TRC20, 6 decimals)

        - `42` — TRON USDC (TRC20, 6 decimals)

        - `5` — POLYGON POL (native, 18 decimals)

        - `51` — POLYGON USDT (ERC20, 6 decimals) — mainnet only

        - `52` — POLYGON USDC (ERC20, 6 decimals)

        - `6` — SOLANA SOL (native, 9 decimals)

        - `61` — SOLANA USDT (SPL, 6 decimals) — mainnet only

        - `62` — SOLANA USDC (SPL, 6 decimals)
      title: AssetId
    TransactionType:
      type: string
      enum:
        - send
        - receive
      description: >-
        Direction relative to this user. `null` on EVM token lookups when the
        receipt carries no matching Transfer log.
      title: TransactionType
    TransactionStatus:
      type: string
      enum:
        - pending
        - success
        - failed
      title: TransactionStatus
    Transaction:
      type: object
      properties:
        hash:
          type: string
        type:
          $ref: '#/components/schemas/TransactionType'
          description: >-
            Direction relative to this user. `null` on EVM token lookups when
            the receipt carries no matching Transfer log.
        amount:
          type:
            - string
            - 'null'
          description: >-
            Amount denominated in the asset. `null` on EVM token lookups when
            the receipt carries no matching Transfer log.
        fee:
          type: string
          description: Fee denominated in the chain's **native** currency.
        status:
          $ref: '#/components/schemas/TransactionStatus'
        date:
          type:
            - string
            - 'null'
          format: date-time
          description: Block time. `null` while the transaction is unconfirmed.
      required:
        - hash
        - type
        - amount
        - fee
        - status
        - date
      description: >-
        A chain-agnostic transaction row. Every chain is normalised to this
        shape.
      title: Transaction
    InfoPostResponsesContentApplicationJsonSchemaResult:
      type: object
      properties:
        address:
          type: string
          description: The user's address on the asset's chain.
        balance:
          type: string
          description: Balance in the asset.
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/Transaction'
          description: Recent history. `[]` when the history provider is unavailable.
      required:
        - address
        - balance
        - transactions
      title: InfoPostResponsesContentApplicationJsonSchemaResult
    RequestId:
      type: string
      description: Echo of the inbound `X-Request-Id`, or a generated one.
      title: RequestId
    Balances_getWalletInfo_Response_200:
      type: object
      properties:
        result:
          $ref: >-
            #/components/schemas/InfoPostResponsesContentApplicationJsonSchemaResult
        requestId:
          $ref: '#/components/schemas/RequestId'
      required:
        - result
        - requestId
      title: Balances_getWalletInfo_Response_200
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: Safe, client-facing message. Internal detail never leaks here.
        error:
          type: string
          description: The HTTP status code, as a string.
        requestId:
          $ref: '#/components/schemas/RequestId'
      required:
        - message
        - error
        - requestId
      title: ErrorResponse
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A 15-minute token from `/auth`. Required on every endpoint except
        `/auth`.

```

## Examples



**Request**

```json
{
  "userId": "66b1f0c23d4e4a5b9c6d7e8f",
  "assetId": 2
}
```

**Response**

```json
{
  "result": {
    "address": "0xc0c548339ee2af89c078200cabd1b7c7b47d911a",
    "balance": "1.234567891234567891",
    "transactions": [
      {
        "hash": "0x614719f0004870115fbb95130e0d1faa6df6c19f28298facb1135701326d2e1e",
        "type": "send",
        "amount": "0.05",
        "fee": "0.000315",
        "status": "success",
        "date": "2026-07-11T09:14:22.000Z"
      },
      {
        "hash": "0x614719f0004870115fbb95130e0d1faa6df6c19f28298facb1135701326d2e1e",
        "type": "receive",
        "amount": "0.05",
        "fee": "0.000315",
        "status": "success",
        "date": "2026-07-11T09:14:22.000Z"
      }
    ]
  },
  "requestId": "b7a1f0c2-3d4e-4a5b-9c6d-7e8f90a1b2c3"
}
```

**SDK Code**

```python Wallet info
import requests

url = "https://your-endpoint.example.com/info"

payload = {
    "userId": "66b1f0c23d4e4a5b9c6d7e8f",
    "assetId": 2
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Wallet info
const url = 'https://your-endpoint.example.com/info';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"userId":"66b1f0c23d4e4a5b9c6d7e8f","assetId":2}'
};

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

```go Wallet info
package main

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

func main() {

	url := "https://your-endpoint.example.com/info"

	payload := strings.NewReader("{\n  \"userId\": \"66b1f0c23d4e4a5b9c6d7e8f\",\n  \"assetId\": 2\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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 Wallet info
require 'uri'
require 'net/http'

url = URI("https://your-endpoint.example.com/info")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"userId\": \"66b1f0c23d4e4a5b9c6d7e8f\",\n  \"assetId\": 2\n}"

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

```java Wallet info
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://your-endpoint.example.com/info")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"userId\": \"66b1f0c23d4e4a5b9c6d7e8f\",\n  \"assetId\": 2\n}")
  .asString();
```

```php Wallet info
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://your-endpoint.example.com/info', [
  'body' => '{
  "userId": "66b1f0c23d4e4a5b9c6d7e8f",
  "assetId": 2
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Wallet info
using RestSharp;

var client = new RestClient("https://your-endpoint.example.com/info");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"userId\": \"66b1f0c23d4e4a5b9c6d7e8f\",\n  \"assetId\": 2\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Wallet info
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "userId": "66b1f0c23d4e4a5b9c6d7e8f",
  "assetId": 2
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://your-endpoint.example.com/info")! 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()
```