# Import Price

### API Overview

This API enables the batch import of price records into the system, supporting the import of multiple data entries in a single request.

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

### 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](/v3/openapi/obtaining-api-authorization.md)

### Request Parameters

#### Body Parameters (JSON Format)

<table><thead><tr><th width="177">Parameter Name</th><th width="98">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>priceProviderId</td><td>String</td><td>Yes</td><td>The primary key ID of the price source.</td></tr><tr><td>list</td><td>Array</td><td>Yes</td><td>An array containing multiple price records (up to 5000 records per request).</td></tr></tbody></table>

**Elements in the List**

<table><thead><tr><th width="184">Parameter Name</th><th width="101">Type</th><th width="106">Required</th><th>Description</th></tr></thead><tbody><tr><td><strong>asset</strong></td><td>String</td><td>Yes</td><td>The currency, case-sensitive. Supported currencies can be obtained from the currency inquiry API.</td></tr><tr><td><strong>datetime</strong></td><td>String</td><td>Yes</td><td>The time, in the format <code>YYYY-MM-DD HH:mm:ss</code>.</td></tr><tr><td><strong>price</strong></td><td>Number</td><td>Yes</td><td>The price.</td></tr></tbody></table>

#### Example Request

```json
{
    "priceProviderId": "priceProviderId91",
    "list": [
        {
            "asset": "BTC",
            "datetime": "2024-11-18 00:00:00",
            "price": 10
        },
        {
            "asset": "ETH",
            "datetime": "2024-11-18 01:00:00",
            "price": 2000
        }
    ]
}

```

### Response Parameters

<table><thead><tr><th width="204">Parameter Name</th><th width="141"> Type</th><th>Description</th></tr></thead><tbody><tr><td>success</td><td>String</td><td>Request status (e.g., <code>success</code>).</td></tr><tr><td>data</td><td>Boolean</td><td>Request result (e.g., <code>true</code> indicates success).</td></tr></tbody></table>

#### Example Response

```json
{
    "status": "success",
    "data": true
}
```

### **Notes**

* **Record Limit:** Each request supports importing up to 5,000 price records.
* **Time Format:** The `datetime` parameter must strictly follow the `YYYY-MM-DD HH:mm:ss` format; otherwise, it may cause parsing errors.
* **Case Sensitivity for Currencies:** The `asset` parameter must match the standards returned by the currency query API, and it is case-sensitive.
* **Time Zone Instructions:** The timestamps of price records will be processed according to the system's configured time zone. If there are time zone differences, please adjust the data before importing.
* **Data Integrity:** Ensure that each price record is complete and accurate to avoid import failures caused by invalid data.
* **Price Precision:** The precision of the `price` parameter should align with actual business requirements and must not exceed the system's supported range.


---

# 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-price.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.
