# Import Account Balances

### API Overview

This API is used to batch import balance records for accounts, supporting multiple accounts, currencies, and timestamps in a single request.

* **Request Method：**`POST`
* **Request URL：**`https://openapi.elven.com/open/v3/account/treasuryBalance`

### Request Headers

<table><thead><tr><th width="202">Parameter Name</th><th width="90">Type</th><th width="100">Required</th><th>Description</th></tr></thead><tbody><tr><td>elven-api-key</td><td>String</td><td>Yes</td><td>The API key assigned to you</td></tr><tr><td>elven-api-sign</td><td>String</td><td>Yes</td><td>Request signature, used to verify the legitimacy of the request</td></tr><tr><td>elven-api-timestamp</td><td>String</td><td>Yes</td><td>Request timestamp, in milliseconds</td></tr></tbody></table>

[View Details](https://docs.elven.com/v3/~/changes/YkdBoYHdjwadymwIANKf/openapi/obtaining-api-authorization?r=LJbAoiJKFX1i7Py2GCYr)

### Request Parameters

#### Body Parameters (JSON Array)

The request body is a JSON array, where each element is a balance record object.

**Balance Record Object**

<table><thead><tr><th width="187">Parameter Name</th><th width="95">Type</th><th width="104">Required</th><th>Description</th></tr></thead><tbody><tr><td>entityAccountId</td><td>String</td><td>Yes</td><td>The primary key of the account associated with the balance.</td></tr><tr><td>currency</td><td>String</td><td>Yes</td><td><p>Transaction currency, which can be obtained from the currency query API.</p><p>Case-sensitive.</p></td></tr><tr><td>datetime</td><td>String</td><td>Yes</td><td>The timestamp of the balance record in <code>YYYY-MM-DD HH:mm:ss</code> format.</td></tr><tr><td>balance</td><td>Number</td><td>Yes</td><td>The balance amount for the specified account and currency.</td></tr></tbody></table>

#### Example Request

```json
[
    {
        "entityAccountId": "accountId123",
        "currency": "BTC",
        "datetime": "2023-01-01 01:01:01",
        "balance": 10.5
    },
    {
        "entityAccountId": "accountId456",
        "currency": "ETH",
        "datetime": "2023-01-02 02:02:02",
        "balance": 20
    }
]
```

### Response Parameters

<table><thead><tr><th width="184">Parameter Name</th><th width="137">Type</th><th>Description</th></tr></thead><tbody><tr><td>success</td><td>Boolean</td><td> Import Task Status</td></tr></tbody></table>

#### Example Response

```json
{
    "success": true
}
```

### **Notes**

* **Record Limit:** The number of balance records in the request body is limited to 1000 records per request.
* **Datetime Format:** The datetime field must strictly follow the format YYYY-MM-DD HH:mm:ss. Parsing errors may occur if the format is incorrect.
* **Time Zone Alignment:** The imported data will be aligned with the time zone of the associated Entity. If the original data uses a different time zone, it must be adjusted before import.


---

# 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.elven.com/v3/openapi/import-account-balances.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.
