Parse Transaction(s)
Parse individual Solana transactions.
Last updated
Was this helpful?
Parse individual Solana transactions.
Last updated
Was this helpful?
Enhanced Transaction API V1 won't be updated while we work on V2.
Mainnet โ https://api.helius.xyz/v0/transactions
Devnet โ https://api-devnet.helius.xyz/v0/transactions
Returns an array of enriched, human-readable transactions of the given transaction signatures. For a full list of Transaction Types and Sources, please see . The maximum number of transactions you can pass into this endpoint is 100.
We only parse NFT actions, Jupiter swaps, and SPL-related transactions. Do not rely on these parsers for DeFi or non-NFT, Jupiter, and SPL transactions.
const url = "https://api.helius.xyz/v0/transactions/?api-key=<your-key>";
const parseTransaction = async () => {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
transactions: ["your-txn-id-here"],
}),
});
const data = await response.json();
console.log("parsed transaction: ", data);
};
parseTransaction();
The api key.
How finalized a block must be to be included in the search. If not provided, will default to "finalized" commitment. Note that "processed" level commitment is not supported.
The transaction IDs/signatures to parse for.
POST /v0/transactions HTTP/1.1
Host: api.helius.xyz
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 25
{
"transactions": [
"text"
]
}
[
{
"description": "Human readable interpretation of the transaction",
"type": "UNKNOWN",
"source": "FORM_FUNCTION",
"fee": 5000,
"feePayer": "8cRrU1NzNpjL3k2BwjW3VixAcX6VFc29KHr4KZg8cs2Y",
"signature": "yy5BT9benHhx8fGCvhcAfTtLEHAtRJ3hRTzVL16bdrTCWm63t2vapfrZQZLJC3RcuagekaXjSs2zUGQvbcto8DK",
"slot": 148277128,
"timestamp": 1656442333,
"nativeTransfers": [
{
"fromUserAccount": "text",
"toUserAccount": "text",
"amount": 1
}
],
"tokenTransfers": [
{
"fromUserAccount": "text",
"toUserAccount": "text",
"fromTokenAccount": "text",
"toTokenAccount": "text",
"tokenAmount": 1,
"mint": "DsfCsbbPH77p6yeLS1i4ag9UA5gP9xWSvdCx72FJjLsx"
}
],
"accountData": [
{
"account": "text",
"nativeBalanceChange": 1,
"tokenBalanceChanges": [
{
"userAccount": "F54ZGuxyb2gA7vRjzWKLWEMQqCfJxDY1whtqtjdq4CJ",
"tokenAccount": "2kvmbRybhrcptDnwyNv6oiFGFEnRVv7MvVyqsxkirgdn",
"mint": "DUSTawucrTsGU8hcqRdHDCbuYhCPADMLM2VcCb8VnFnQ",
"rawTokenAmount": {
"tokenAmount": "text",
"decimals": 1
}
}
]
}
],
"transactionError": {
"error": "text"
},
"instructions": [
{
"accounts": [
"8uX6yiUuH4UjUb1gMGJAdkXorSuKshqsFGDCFShcK88B"
],
"data": "kdL8HQJrbbvQRGXmoadaja1Qvs",
"programId": "MEisE1HzehtrDpAAT8PnLHjpSSkRYakotTuJRPjTpo8",
"innerInstructions": [
{
"accounts": [
"text"
],
"data": "text",
"programId": "text"
}
]
}
],
"events": {
"nft": {
"description": "text",
"type": "NFT_BID",
"source": "FORM_FUNCTION",
"amount": 1000000,
"fee": 5000,
"feePayer": "8cRrU1NzNpjL3k2BwjW3VixAcX6VFc29KHr4KZg8cs2Y",
"signature": "4jzQxVTaJ4Fe4Fct9y1aaT9hmVyEjpCqE2bL8JMnuLZbzHZwaL4kZZvNEZ6bEj6fGmiAdCPjmNQHCf8v994PAgDf",
"slot": 148277128,
"timestamp": 1656442333,
"saleType": "AUCTION",
"buyer": "text",
"seller": "text",
"staker": "text",
"nfts": [
{
"mint": "DsfCsbbPH77p6yeLS1i4ag9UA5gP9xWSvdCx72FJjLsx",
"tokenStandard": "NonFungible"
}
]
},
"swap": {
"nativeInput": {
"account": "2uySTNgvGT2kwqpfgLiSgeBLR3wQyye1i1A2iQWoPiFr",
"amount": "100000000"
},
"nativeOutput": {
"account": "2uySTNgvGT2kwqpfgLiSgeBLR3wQyye1i1A2iQWoPiFr",
"amount": "100000000"
},
"tokenInputs": [
{
"userAccount": "F54ZGuxyb2gA7vRjzWKLWEMQqCfJxDY1whtqtjdq4CJ",
"tokenAccount": "2kvmbRybhrcptDnwyNv6oiFGFEnRVv7MvVyqsxkirgdn",
"mint": "DUSTawucrTsGU8hcqRdHDCbuYhCPADMLM2VcCb8VnFnQ",
"rawTokenAmount": {
"tokenAmount": "text",
"decimals": 1
}
}
],
"tokenOutputs": [
{
"userAccount": "F54ZGuxyb2gA7vRjzWKLWEMQqCfJxDY1whtqtjdq4CJ",
"tokenAccount": "2kvmbRybhrcptDnwyNv6oiFGFEnRVv7MvVyqsxkirgdn",
"mint": "DUSTawucrTsGU8hcqRdHDCbuYhCPADMLM2VcCb8VnFnQ",
"rawTokenAmount": {
"tokenAmount": "text",
"decimals": 1
}
}
],
"tokenFees": [
{
"userAccount": "F54ZGuxyb2gA7vRjzWKLWEMQqCfJxDY1whtqtjdq4CJ",
"tokenAccount": "2kvmbRybhrcptDnwyNv6oiFGFEnRVv7MvVyqsxkirgdn",
"mint": "DUSTawucrTsGU8hcqRdHDCbuYhCPADMLM2VcCb8VnFnQ",
"rawTokenAmount": {
"tokenAmount": "text",
"decimals": 1
}
}
],
"nativeFees": [
{
"account": "2uySTNgvGT2kwqpfgLiSgeBLR3wQyye1i1A2iQWoPiFr",
"amount": "100000000"
}
],
"innerSwaps": [
{
"tokenInputs": [
{
"fromUserAccount": "text",
"toUserAccount": "text",
"fromTokenAccount": "text",
"toTokenAccount": "text",
"tokenAmount": 1,
"mint": "DsfCsbbPH77p6yeLS1i4ag9UA5gP9xWSvdCx72FJjLsx"
}
],
"tokenOutputs": [
{
"fromUserAccount": "text",
"toUserAccount": "text",
"fromTokenAccount": "text",
"toTokenAccount": "text",
"tokenAmount": 1,
"mint": "DsfCsbbPH77p6yeLS1i4ag9UA5gP9xWSvdCx72FJjLsx"
}
],
"tokenFees": [
{
"fromUserAccount": "text",
"toUserAccount": "text",
"fromTokenAccount": "text",
"toTokenAccount": "text",
"tokenAmount": 1,
"mint": "DsfCsbbPH77p6yeLS1i4ag9UA5gP9xWSvdCx72FJjLsx"
}
],
"nativeFees": [
{
"fromUserAccount": "text",
"toUserAccount": "text",
"amount": 1
}
],
"programInfo": {
"source": "ORCA",
"account": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",
"programName": "ORCA_WHIRLPOOLS",
"instructionName": "whirlpoolSwap"
}
}
]
},
"compressed": {
"type": "COMPRESSED_NFT_MINT",
"treeId": "text",
"assetId": "text",
"leafIndex": 1,
"instructionIndex": 1,
"innerInstructionIndex": 1,
"newLeafOwner": "text",
"oldLeafOwner": "text"
},
"distributeCompressionRewards": {
"amount": 1
},
"setAuthority": {
"account": "text",
"from": "text",
"to": "text",
"instructionIndex": 1,
"innerInstructionIndex": 1
}
}
}
]