accountByAddress
Look up an account (G…) or contract (C…) by address. A contract’s history holds the operations it authorised and the state changes applied to it. Any valid address returns an Account, even one with no indexed activity; its connections are then empty.
accountByAddress(address: String!): AccountArguments
Account strkey (G...) or contract strkey (C...). Any other value, including a muxed address (M...), returns an INVALID_ADDRESS error.
Returns
The account's public key (G...) or contract address (C...).
All token balances held by this account: native XLM, classic trustlines, SAC, SEP-41, and liquidity-pool shares. Edges come in a fixed order by token type: native, trustlines, SEP-41, then liquidity pools for a G-address; SAC, then SEP-41 for a C-address.
Return up to this many edges from the start of the list, or after after. Default 50 when neither first nor last is set. Maximum 100. Cannot be combined with last or before.
Cursor from a previous page. Returns the edges after it. Requires first; ignored without it.
Return up to this many edges from the end of the list, or before before. Maximum 100. Cannot be combined with first or after.
Cursor from a previous page. Returns the edges before it. Requires last; ignored without it.
Transactions this account participated in, oldest first. Set since/until to bound the ledger close time; bounded queries on long histories run faster.
Only include items whose ledger close time is at or after this time.
Only include items whose ledger close time is at or before this time. Must not be earlier than since.
Return up to this many edges from the start of the list, or after after. Default 50 when neither first nor last is set. Maximum 100. Cannot be combined with last or before.
Cursor from a previous page. Returns the edges after it. Requires first; ignored without it.
Return up to this many edges from the end of the list, or before before. Maximum 100. Cannot be combined with first or after.
Cursor from a previous page. Returns the edges before it. Requires last; ignored without it.
Operations this account participated in, oldest first. Set since/until to bound the ledger close time; bounded queries on long histories run faster.
Only include items whose ledger close time is at or after this time.
Only include items whose ledger close time is at or before this time. Must not be earlier than since.
Return up to this many edges from the start of the list, or after after. Default 50 when neither first nor last is set. Maximum 100. Cannot be combined with last or before.
Cursor from a previous page. Returns the edges after it. Requires first; ignored without it.
Return up to this many edges from the end of the list, or before before. Maximum 100. Cannot be combined with first or after.
Cursor from a previous page. Returns the edges before it. Requires last; ignored without it.
State changes affecting this account, oldest first, optionally filtered. Set since/until to bound the ledger close time; bounded queries on long histories run faster.
Conditions the state changes must match; all are ANDed. Omit for no filtering.
Only include items whose ledger close time is at or after this time.
Only include items whose ledger close time is at or before this time. Must not be earlier than since.
Return up to this many edges from the start of the list, or after after. Default 50 when neither first nor last is set. Maximum 100. Cannot be combined with last or before.
Cursor from a previous page. Returns the edges after it. Requires first; ignored without it.
Return up to this many edges from the end of the list, or before before. Maximum 100. Cannot be combined with first or after.
Cursor from a previous page. Returns the edges before it. Requires last; ignored without it.
Active SEP-41 allowances granted by this account (as token holder), ordered by spender. Allowances whose expiration ledger is below the latest ingested ledger are filtered out server-side.
Return up to this many edges from the start of the list, or after after. Default 50 when neither first nor last is set. Maximum 100. Cannot be combined with last or before.
Cursor from a previous page. Returns the edges after it. Requires first; ignored without it.
Return up to this many edges from the end of the list, or before before. Maximum 100. Cannot be combined with first or after.
Cursor from a previous page. Returns the edges before it. Requires last; ignored without it.
query AccountByAddress($address: String!) {
accountByAddress(address: $address) {
address
balances {
edges {
node {
__typename
}
cursor
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
transactions {
edges {
node {
__typename
}
cursor
operations {
__typename
}
stateChanges {
__typename
}
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
operations {
edges {
node {
__typename
}
cursor
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
stateChanges {
edges {
node {
__typename
}
cursor
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
sep41Allowances {
edges {
node {
__typename
}
cursor
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
}
}{
"address": "string"
}{
"data": {
"accountByAddress": {
"address": "string",
"balances": {
"edges": [
{
"node": {
"__typename": "Balance"
},
"cursor": "string"
}
],
"pageInfo": {
"startCursor": "string",
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true
}
},
"transactions": {
"edges": [
{
"node": {
"__typename": "Transaction"
},
"cursor": "string",
"operations": [
{
"__typename": "Operation"
}
],
"stateChanges": [
{
"__typename": "BaseStateChange"
}
]
}
],
"pageInfo": {
"startCursor": "string",
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true
}
},
"operations": {
"edges": [
{
"node": {
"__typename": "Operation"
},
"cursor": "string"
}
],
"pageInfo": {
"startCursor": "string",
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true
}
},
"stateChanges": {
"edges": [
{
"node": {
"__typename": "BaseStateChange"
},
"cursor": "string"
}
],
"pageInfo": {
"startCursor": "string",
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true
}
},
"sep41Allowances": {
"edges": [
{
"node": {
"__typename": "SEP41Allowance"
},
"cursor": "string"
}
],
"pageInfo": {
"startCursor": "string",
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true
}
}
}
}
}query AccountByAddress($address: String!) {
accountByAddress(address: $address) {
address
balances {
edges {
node {
__typename
}
cursor
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
transactions {
edges {
node {
__typename
}
cursor
operations {
__typename
}
stateChanges {
__typename
}
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
operations {
edges {
node {
__typename
}
cursor
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
stateChanges {
edges {
node {
__typename
}
cursor
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
sep41Allowances {
edges {
node {
__typename
}
cursor
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
}
}{
"address": "string"
}{
"data": {
"accountByAddress": {
"address": "string",
"balances": {
"edges": [
{
"node": {
"__typename": "Balance"
},
"cursor": "string"
}
],
"pageInfo": {
"startCursor": "string",
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true
}
},
"transactions": {
"edges": [
{
"node": {
"__typename": "Transaction"
},
"cursor": "string",
"operations": [
{
"__typename": "Operation"
}
],
"stateChanges": [
{
"__typename": "BaseStateChange"
}
]
}
],
"pageInfo": {
"startCursor": "string",
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true
}
},
"operations": {
"edges": [
{
"node": {
"__typename": "Operation"
},
"cursor": "string"
}
],
"pageInfo": {
"startCursor": "string",
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true
}
},
"stateChanges": {
"edges": [
{
"node": {
"__typename": "BaseStateChange"
},
"cursor": "string"
}
],
"pageInfo": {
"startCursor": "string",
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true
}
},
"sep41Allowances": {
"edges": [
{
"node": {
"__typename": "SEP41Allowance"
},
"cursor": "string"
}
],
"pageInfo": {
"startCursor": "string",
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true
}
}
}
}
}