# Import Transfer

### API Overview

This API enables the batch import of transfer 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/transfer`

### 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 Format)

<table><thead><tr><th width="207">Parameter Name</th><th width="91">Type</th><th width="98">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.</td></tr><tr><td>sourceId</td><td>String</td><td>Yes</td><td>The primary key of the source.</td></tr><tr><td>timezone</td><td>String</td><td>No</td><td>Time Zone: If left empty, it will default to the entity’s time zone.<a href="/pages/y9OhaBGBcaBxDW62Inyh">View Details</a></td></tr><tr><td>list</td><td>Array</td><td>Yes</td><td>Transaction record list, containing multiple transaction objects, with a maximum of 1000 records supported per request.</td></tr></tbody></table>

**Elements in the List**

<table><thead><tr><th width="227">Parameter Name</th><th width="93">Type</th><th width="102">Required</th><th>Description</th></tr></thead><tbody><tr><td>direction</td><td>String</td><td>Yes</td><td><code>IN</code> or <code>OUT</code>, representing the direction of the transaction.</td></tr><tr><td>amount</td><td>Number</td><td>Yes</td><td>The transaction amount.</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>transactionID</td><td>String</td><td>No</td><td>A unique identifier for the transaction.</td></tr><tr><td>type</td><td>String</td><td>Yes</td><td>The transaction type, determined by the <code>platform.type</code>.</td></tr><tr><td>datetime</td><td>String</td><td>Yes</td><td>Transaction time, formatted as  <code>YYYY-MM-DD HH:mm:ss</code></td></tr><tr><td>counterpartyAccountNo</td><td>String</td><td>No</td><td>The counterparty’s address or account.</td></tr><tr><td>counterpartyPlatformId</td><td>String</td><td>No</td><td>The counterparty’s platform ID.</td></tr><tr><td>memo</td><td>String</td><td>No</td><td>Additional information or notes for the transaction.</td></tr></tbody></table>

**type Parameter Options**

* For `platform.type = CHAIN`
  * `CHAIN_TRANSFER_IN`
  * `CHAIN_TRANSFER_OUT`
  * `CHAIN_TRANSACTION_FEE`
* For `platform.type = BANK`&#x20;
  * `BANK_DEPOSIT`
  * `BANK_WITHDRAW`
  * `BANK_FEE`
  * `BANK_INCOMING_FX`
  * `BANK_OUTGOING_FX`
* For `platform.type = EXCHANGE`&#x20;
  * `EXCHANGE_DEPOSIT`
  * `EXCHANGE_WITHDRAW`
  * `EXCHANGE_TRADE_IN`
  * `EXCHANGE_TRADE_OUT`
  * `EXCHANGE_FEE`
  * `EXCHANGE_STAKE`
  * `EXCHANGE_UNSTAKE`
  * `EXCHANGE_REWARD`
  * `EXCHANGE_REALIZED_PNL`
  * `EXCHANGE_BORROW`
  * `EXCHANGE_REPAY`
  * `EXCHANGE_FUNDING_FEE`
  * `EXCHANGE_TRANSFER_IN`
  * `EXCHANGE_TRANSFER_OUT`
* For `platform.type = CUSTODY`&#x20;
  * `CUSTODY_DEPOSIT`
  * `CUSTODY_WITHDRAW`
  * `CUSTODY_FEE`
* For `platform.type = PAYMENT`&#x20;
  * `PAYMENT_COMPLETED`
  * `PAYMENT_CHARGE_BACK`
  * `PAYMENT_REFUND`
  * `PAYMENT_FEE`
  * `PAYMENT_PAYOUT`
  * `PAYMENT_INCOMING_FX`
  * `PAYMENT_OUTGOING_FX`

#### Example Request

```json
{
    "entityAccountId": "accountId123",
    "sourceId": "sourceId456",
    "list": [
        {
            "direction": "IN",
            "amount": 10,
            "currency": "BTC",
            "transactionID": "0xaaa",
            "type": "CHAIN_TRANSFER_IN",
            "datetime": "2024-01-01 01:11:11",
            "counterpartyAccountNo": "0xsss",
            "counterpartyPlatformId": "platformId789",
            "memo": "this is memo"
        },
        {
            "direction": "OUT",
            "amount": 5,
            "currency": "ETH",
            "transactionID": "0xbbb",
            "type": "CHAIN_TRANSFER_OUT",
            "datetime": "2024-01-02 02:22:22",
            "counterpartyAccountNo": "0xttt",
            "counterpartyPlatformId": "platformId012",
            "memo": ""
        }
    ]
}
```

### Response Parameters

| Parameter Name | Type    | Description        |
| -------------- | ------- | ------------------ |
| success        | Boolean | Upload Task Status |

#### Example Response

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

### **Notes**

* **Asynchronous Processing:**  This API only imports the transaction data into a pre-processing database. The system processes the data asynchronously, and the imported transactions will appear in the user's transaction list after processing is complete.
* **Record Limit:**  Each request supports importing up to 1000 transaction records. For larger datasets, split them into multiple requests.
* **Data Integrity:**  Ensure the transaction data is complete and accurate to avoid import errors.
* **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.
* **Transaction Type Validation**: The `type` parameter must match the correct options based on the `platform.type`. Mismatched values may result in incorrect transaction classification.


---

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