Coming soon: Need support for this? Email support@dwellir.com and we will enable it for you.
user_transactions
Overview
Query transactions submitted by a specific address.
Query Structure
query GetUserTransactions($address: String!, $limit: Int) {
user_transactions(
where: { sender: { _eq: $address } }
limit: $limit
order_by: { version: desc }
) {
version
hash
success
vm_status
gas_used
}
}
Variables
Name | Type | Required | Description |
---|---|---|---|
address | String | Yes | Account address |
limit | Int | No | Result limit |
Code Examples
TypeScript
const query = `query GetUserTransactions($address: String!, $limit: Int) { user_transactions(where: { sender: { _eq: $address } }, limit: $limit, order_by: { version: desc }) { version hash success vm_status gas_used } }`;
const variables = { address: "0x1", limit: 10 };
await fetch("https://api-aptos-mainnet.n.dwellir.com/YOUR_API_KEY/v1/graphql", { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ query, variables }) });
Python
import requests
query = """query GetUserTransactions($address: String!, $limit: Int) { user_transactions(where: { sender: { _eq: $address } }, limit: $limit, order_by: { version: desc }) { version hash success vm_status gas_used } }"""
variables = {"address": "0x1", "limit": 10}
requests.post("https://api-aptos-mainnet.n.dwellir.com/YOUR_API_KEY/v1/graphql", json={"query": query, "variables": variables})