Get Related Account Transaction Data
1. Overview & Typical Use
Returns accounts that have transaction records with a specified address, along with transfer amounts and counts in each direction.
- Typical use: analyzing fund flows between accounts, tracking counterparties of large transfers.
- When not to use: to query a single transaction, use the transaction query endpoint; to query account balance, use the account endpoint.
2. Endpoint & Authentication
GET /api/deep/account/relatedAccount
For Base URL and authentication, see Common Network & Authentication.
This endpoint requires an API Key; calls without a Key return 401.
3. Request
Fields
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
address | string | Yes | — | Query address |
txNum | string | No | — | Transaction count range, comma-separated, e.g. 1,10 means 1 to 10 |
txAmount | string | No | — | Transaction amount range, comma-separated, e.g. 100,10000 |
direction | integer | No | 0 | Transfer direction. 0: all, 1: incoming, 2: outgoing |
relatedAddress | string | No | — | Filter by related address |
relatedToken | string | No | — | Filter by related token |
startTime | integer | No | — | Start time in seconds. Maximum interval: 90 days |
endTime | integer | No | Current time | End time in seconds |
sortBy | string | No | amountIn | Sort field: amountIn, amountOut, timesIn, timesOut |
limit | integer | No | 100 | Number of results, maximum 100 |
4. Response
Fields
Top-level
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
total | integer | Required | Total number of related accounts | — |
code | integer | Required | Status code; 0 means success | — |
data | array | Required | List of related accounts | — |
contractMap | object | Required | Map of address → whether it is a contract (boolean) | — |
contractInfo | object | Required | Contract info map; empty object {} when no contracts | — |
data[] element
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
inAmountUsd | number | Required | Total incoming amount (USD) | USD |
outAmountUsd | number | Required | Total outgoing amount (USD) | USD |
address | string | Required | Related account address | — |
addressTag | string | Required | Related account label | — |
outNum | integer | Required | Outgoing transfer count | — |
inNum | integer | Required | Incoming transfer count | — |
5. Errors
For HTTP status codes, see Common Errors. Key points for this endpoint:
- API Key Required: returns 401 if not provided.
- Empty result is not an error: no matches returns
code: 0+data: []as a normal response.
Last updated on: