listAddressTransactions Query
Paramètres
adresse
chaîne de caractères
OBLIGATOIRE
Chargement en cours...
Retours
données
objet
Chargement en cours...
transactionsByOwner
objet
Chargement en cours...
nodes
tableau
Chargement en cours...
id
chaîne de caractères
Chargement en cours...
inputs
tableau
Chargement en cours...
__typename
chaîne de caractères
Chargement en cours...
owner
chaîne de caractères
Chargement en cours...
utxoId
chaîne de caractères
Chargement en cours...
montant
chaîne de caractères
Chargement en cours...
assetId
chaîne de caractères
Chargement en cours...
outputs
tableau
Chargement en cours...
__typename
chaîne de caractères
Chargement en cours...
à
chaîne de caractères
Chargement en cours...
montant
chaîne de caractères
Chargement en cours...
assetId
chaîne de caractères
Chargement en cours...
statut
objet
Chargement en cours...
__typename
chaîne de caractères
Chargement en cours...
Demande
1curl --location 'https://docs-demo.fuel-mainnet.quiknode.pro/v1/graphql' \2--header 'Accept: application/json' \3--en-tête 'Content-Type: application/json' \4--données '{5"query": "query Transactions($address: Address) { transactionsByOwner(owner: $address, first: 5) { nodes { id inputs { __typename ... on InputCoin { owner utxoId amount assetId } ... on InputContract { utxoId contractId } ... on InputMessage { sender recipient amount data } } outputs { __typename ... on CoinOutput { to amount assetId } ... on ContractOutput { inputIndex balanceRoot stateRoot } ... on ChangeOutput { to amount assetId } ... on VariableOutput { to amount assetId } ... on ContractCreated { contract stateRoot } } status { __typename ... on FailureStatus { reason programState { returnType } } } } } }",6"variables": {7"address": "0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871"8}9}'
1curl --location 'https://docs-demo.fuel-mainnet.quiknode.pro/v1/graphql' \2--header 'Accept: application/json' \3--en-tête 'Content-Type: application/json' \4--données '{5"query": "query Transactions($address: Address) { transactionsByOwner(owner: $address, first: 5) { nodes { id inputs { __typename ... on InputCoin { owner utxoId amount assetId } ... on InputContract { utxoId contractId } ... on InputMessage { sender recipient amount data } } outputs { __typename ... on CoinOutput { to amount assetId } ... on ContractOutput { inputIndex balanceRoot stateRoot } ... on ChangeOutput { to amount assetId } ... on VariableOutput { to amount assetId } ... on ContractCreated { contract stateRoot } } status { __typename ... on FailureStatus { reason programState { returnType } } } } } }",6"variables": {7"address": "0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871"8}9}'
1const TRANSACTIONS_QUERY = `2query Transactions($address: Address) {3transactionsByOwner(owner: $address, first: 5) {4nodes {5id6inputs {7__typename8... on InputCoin {9owner10utxoId11montant12assetId13}14... on InputContract {15utxoId16contractId17}18... on InputMessage {19sender20recipient21montant22données23}24}25outputs {26__typename27... on CoinOutput {28à29montant30assetId31}32... on ContractOutput {33inputIndex34balanceRoot35stateRoot36}37... on ChangeOutput {38à39montant40assetId41}42... on VariableOutput {43à44montant45assetId46}47... on ContractCreated {48contrat49stateRoot50}51}52status {53__typename54... on FailureStatus {55reason56programState {57returnType58}59}60}61}62}63}64`;6566const TRANSACTIONS_VARS = {67address: '0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871',68};6970const fetchTransactions = async () => {71essayer {72const response = await fetch('https://docs-demo.fuel-mainnet.quiknode.pro/v1/graphql', {73method: 'POST',74headers: {75'Accept': 'application/json',76'Content-Type': 'application/json',77},78body: JSON.stringify({79query: TRANSACTIONS_QUERY,80variables: TRANSACTIONS_VARS,81}),82});8384if (!response.ok) {85throw new Error(`HTTP error! status: ${response.status}`);86}8788const result = await response.json();89console.log('Transactions:', result.data.transactionsByOwner.nodes);90} catch (erreur) {91console.error('Error fetching transactions:', error);92}93};9495fetchTransactions();96
1const TRANSACTIONS_QUERY = `2query Transactions($address: Address) {3transactionsByOwner(owner: $address, first: 5) {4nodes {5id6inputs {7__typename8... on InputCoin {9owner10utxoId11montant12assetId13}14... on InputContract {15utxoId16contractId17}18... on InputMessage {19sender20recipient21montant22données23}24}25outputs {26__typename27... on CoinOutput {28à29montant30assetId31}32... on ContractOutput {33inputIndex34balanceRoot35stateRoot36}37... on ChangeOutput {38à39montant40assetId41}42... on VariableOutput {43à44montant45assetId46}47... on ContractCreated {48contrat49stateRoot50}51}52status {53__typename54... on FailureStatus {55reason56programState {57returnType58}59}60}61}62}63}64`;6566const TRANSACTIONS_VARS = {67address: '0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871',68};6970const fetchTransactions = async () => {71essayer {72const response = await fetch('https://docs-demo.fuel-mainnet.quiknode.pro/v1/graphql', {73method: 'POST',74headers: {75'Accept': 'application/json',76'Content-Type': 'application/json',77},78body: JSON.stringify({79query: TRANSACTIONS_QUERY,80variables: TRANSACTIONS_VARS,81}),82});8384if (!response.ok) {85throw new Error(`HTTP error! status: ${response.status}`);86}8788const result = await response.json();89console.log('Transactions:', result.data.transactionsByOwner.nodes);90} catch (erreur) {91console.error('Error fetching transactions:', error);92}93};9495fetchTransactions();96
1const myHeaders = new Headers();2myHeaders.append("Accept", "application/json");3myHeaders.ajouter(« Content-Type », « application/json »);45const brut = JSON.stringify({6"query": "query Transactions($address: Address) { transactionsByOwner(owner: $address, first: 5) { nodes { id inputs { __typename ... on InputCoin { owner utxoId amount assetId } ... on InputContract { utxoId contractId } ... on InputMessage { sender recipient amount data } } outputs { __typename ... on CoinOutput { to amount assetId } ... on ContractOutput { inputIndex balanceRoot stateRoot } ... on ChangeOutput { to amount assetId } ... on VariableOutput { to amount assetId } ... on ContractCreated { contract stateRoot } } status { __typename ... on FailureStatus { reason programState { returnType } } } } } }",7"variables": {8"address": "0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871"9}10});1112const requestOptions = {13méthode: « POST »,14en-têtes: myHeaders,15corps: brut,16redirection: « suivre »17};1819fetch("https://docs-demo.fuel-mainnet.quiknode.pro/v1/graphql", requestOptions)20.puis((réponse) => réponse.texte())21.puis((résultat) => console.log(résultat))22.catch((erreur) => console.erreur(erreur));
1const myHeaders = new Headers();2myHeaders.append("Accept", "application/json");3myHeaders.ajouter(« Content-Type », « application/json »);45const brut = JSON.stringify({6"query": "query Transactions($address: Address) { transactionsByOwner(owner: $address, first: 5) { nodes { id inputs { __typename ... on InputCoin { owner utxoId amount assetId } ... on InputContract { utxoId contractId } ... on InputMessage { sender recipient amount data } } outputs { __typename ... on CoinOutput { to amount assetId } ... on ContractOutput { inputIndex balanceRoot stateRoot } ... on ChangeOutput { to amount assetId } ... on VariableOutput { to amount assetId } ... on ContractCreated { contract stateRoot } } status { __typename ... on FailureStatus { reason programState { returnType } } } } } }",7"variables": {8"address": "0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871"9}10});1112const requestOptions = {13méthode: « POST »,14en-têtes: myHeaders,15corps: brut,16redirection: « suivre »17};1819fetch("https://docs-demo.fuel-mainnet.quiknode.pro/v1/graphql", requestOptions)20.puis((réponse) => réponse.texte())21.puis((résultat) => console.log(résultat))22.catch((erreur) => console.erreur(erreur));
1const { ApolloClient, InMemoryCache, gql } = require('@apollo/client/core');2const fetch = require('cross-fetch');34const client = new ApolloClient({5uri: 'https://docs-demo.fuel-mainnet.quiknode.pro/v1/graphql',6cache: new InMemoryCache(),7fetch: fetch,8headers: {9'Accept': 'application/json',10'Content-Type': 'application/json'11}12});1314const TRANSACTIONS_BY_OWNER_QUERY = gql`15query Transactions($address: Address) {16transactionsByOwner(owner: $address, first: 5) {17nodes {18id19inputs {20__typename21... on InputCoin {22owner23utxoId24montant25assetId26}27... on InputContract {28utxoId29contractId30}31... on InputMessage {32sender33recipient34montant35données36}37}38outputs {39__typename40... on CoinOutput {41à42montant43assetId44}45... on ContractOutput {46inputIndex47balanceRoot48stateRoot49}50... on ChangeOutput {51à52montant53assetId54}55... on VariableOutput {56à57montant58assetId59}60... on ContractCreated {61contrat62stateRoot63}64}65status {66__typename67... on FailureStatus {68reason69programState {70returnType71}72}73}74}75}76}77`;7879const variables = {80address: "0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871"81};8283client.query({84query: TRANSACTIONS_BY_OWNER_QUERY,85variables: variables86})87.then(result => {88console.log('Transactions by Owner:', JSON.stringify(result.data, null, 2));89})90.catch(error => console.error('Error:', error));
1const { ApolloClient, InMemoryCache, gql } = require('@apollo/client/core');2const fetch = require('cross-fetch');34const client = new ApolloClient({5uri: 'https://docs-demo.fuel-mainnet.quiknode.pro/v1/graphql',6cache: new InMemoryCache(),7fetch: fetch,8headers: {9'Accept': 'application/json',10'Content-Type': 'application/json'11}12});1314const TRANSACTIONS_BY_OWNER_QUERY = gql`15query Transactions($address: Address) {16transactionsByOwner(owner: $address, first: 5) {17nodes {18id19inputs {20__typename21... on InputCoin {22owner23utxoId24montant25assetId26}27... on InputContract {28utxoId29contractId30}31... on InputMessage {32sender33recipient34montant35données36}37}38outputs {39__typename40... on CoinOutput {41à42montant43assetId44}45... on ContractOutput {46inputIndex47balanceRoot48stateRoot49}50... on ChangeOutput {51à52montant53assetId54}55... on VariableOutput {56à57montant58assetId59}60... on ContractCreated {61contrat62stateRoot63}64}65status {66__typename67... on FailureStatus {68reason69programState {70returnType71}72}73}74}75}76}77`;7879const variables = {80address: "0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871"81};8283client.query({84query: TRANSACTIONS_BY_OWNER_QUERY,85variables: variables86})87.then(result => {88console.log('Transactions by Owner:', JSON.stringify(result.data, null, 2));89})90.catch(error => console.error('Error:', error));
1import demandes2import json34url = "https://docs-demo.fuel-mainnet.quiknode.pro/v1/graphql"56charge utile = json.dumps({7"query": "query Transactions($address: Address) { transactionsByOwner(owner: $address, first: 5) { nodes { id inputs { __typename ... on InputCoin { owner utxoId amount assetId } ... on InputContract { utxoId contractId } ... on InputMessage { sender recipient amount data } } outputs { __typename ... on CoinOutput { to amount assetId } ... on ContractOutput { inputIndex balanceRoot stateRoot } ... on ChangeOutput { to amount assetId } ... on VariableOutput { to amount assetId } ... on ContractCreated { contract stateRoot } } status { __typename ... on FailureStatus { reason programState { returnType } } } } } }",8"variables": {9"address": "0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871"10}11})12en-têtes = {13'Accept': 'application/json',14« Content-Type »: 'application/json'15}1617réponse = demandes.demande(« POST », url, en-têtes=en-têtes, données=charge utile)1819imprimer(réponse.texte)20
1import demandes2import json34url = "https://docs-demo.fuel-mainnet.quiknode.pro/v1/graphql"56charge utile = json.dumps({7"query": "query Transactions($address: Address) { transactionsByOwner(owner: $address, first: 5) { nodes { id inputs { __typename ... on InputCoin { owner utxoId amount assetId } ... on InputContract { utxoId contractId } ... on InputMessage { sender recipient amount data } } outputs { __typename ... on CoinOutput { to amount assetId } ... on ContractOutput { inputIndex balanceRoot stateRoot } ... on ChangeOutput { to amount assetId } ... on VariableOutput { to amount assetId } ... on ContractCreated { contract stateRoot } } status { __typename ... on FailureStatus { reason programState { returnType } } } } } }",8"variables": {9"address": "0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871"10}11})12en-têtes = {13'Accept': 'application/json',14« Content-Type »: 'application/json'15}1617réponse = demandes.demande(« POST », url, en-têtes=en-têtes, données=charge utile)1819imprimer(réponse.texte)20
1nécessite « uri »2require « json »3nécessite « net/http »45url = URI("https://docs-demo.fuel-mainnet.quiknode.pro/v1/graphql")67https = Net::HTTP.new(url.serveur, url.port)8https.use_ssl = true910demande = Net::HTTP::POST.nouveau(URL)11demande[« Accepter »] = « application/json »12demande[« Content-Type »] = « application/json »13demande.corps = JSON.dump({14"query": "query Transactions(\$address: Address) { transactionsByOwner(owner: \$address, first: 5) { nodes { id inputs { __typename ... on InputCoin { owner utxoId amount assetId } ... on InputContract { utxoId contractId } ... on InputMessage { sender recipient amount data } } outputs { __typename ... on CoinOutput { to amount assetId } ... on ContractOutput { inputIndex balanceRoot stateRoot } ... on ChangeOutput { to amount assetId } ... on VariableOutput { to amount assetId } ... on ContractCreated { contract stateRoot } } status { __typename ... on FailureStatus { reason programState { returnType } } } } } }",15"variables": {16"address": "0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871"17}18})1920réponse = https.requête(requête)21affiche la réponse.read_body22
1nécessite « uri »2require « json »3nécessite « net/http »45url = URI("https://docs-demo.fuel-mainnet.quiknode.pro/v1/graphql")67https = Net::HTTP.new(url.serveur, url.port)8https.use_ssl = true910demande = Net::HTTP::POST.nouveau(URL)11demande[« Accepter »] = « application/json »12demande[« Content-Type »] = « application/json »13demande.corps = JSON.dump({14"query": "query Transactions(\$address: Address) { transactionsByOwner(owner: \$address, first: 5) { nodes { id inputs { __typename ... on InputCoin { owner utxoId amount assetId } ... on InputContract { utxoId contractId } ... on InputMessage { sender recipient amount data } } outputs { __typename ... on CoinOutput { to amount assetId } ... on ContractOutput { inputIndex balanceRoot stateRoot } ... on ChangeOutput { to amount assetId } ... on VariableOutput { to amount assetId } ... on ContractCreated { contract stateRoot } } status { __typename ... on FailureStatus { reason programState { returnType } } } } } }",15"variables": {16"address": "0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871"17}18})1920réponse = https.requête(requête)21affiche la réponse.read_body22
Vous n'avez pas encore de compte ?
Créez votreendpoint Quicknode endpoint quelques secondes et commencez à développer
Commencez gratuitement