Parsed Transaction Structure
Human-readable transaction structures
A parsed transaction response would look as given below
{
"timestamp": "2023-10-27T05:29:00.000Z",
"fee": 0.000005,
"fee_payer": "4HHjBCKQrmpxu7qryDZtRGNJMQpaqPrzdcwxjKpr3pWf",
"signers": [
"4HHjBCKQrmpxu7qryDZtRGNJMQpaqPrzdcwxjKpr3pWf"
],
"signatures": [
"3nkw8uD2ixKzLkqFYqQpcrTfMSBu6vAq9BWpY6pSFLNJmBfwzWxoFx8A4FWxa2xPTySTpTJd39dUpbobkamswpjR"
],
"protocol": {
"address": "JCFRaPv7852ESRwJJGRy2mysUMydXZgVVhrMLmExvmVp",
"name": "FOXY_CITRUS"
},
"type": "FORECLOSE_LOAN",
"status": "Success",
"actions": [
{
"info": {
"lender": "4HHjBCKQrmpxu7qryDZtRGNJMQpaqPrzdcwxjKpr3pWf",
"loan": "Hj9PKtpSGn1RtGupcCh1g6TR5UmvLzn4ufku7quvcDmk",
"nft_address": "7GF6tgaxATctQR7ErE3aAz2dZr5jmo6nWRvRPpkri9gt",
"borrower": "E9sFTMBMuyFzvF2Co5S9FHteZm6NRseh6FPxUzkouXXY",
"borrower_token_account": "4qB7yZcgKLi1ju3yGFvsme9HmVr4UNug5yvQNty2egHf",
"escrow": "",
"escrow_token_account": ""
},
"source_protocol": {
"address": "JCFRaPv7852ESRwJJGRy2mysUMydXZgVVhrMLmExvmVp",
"name": "FOXY_CITRUS"
},
"type": "FORECLOSE_LOAN"
},
{
"info": {
"amount": 1,
"receiver": "4HHjBCKQrmpxu7qryDZtRGNJMQpaqPrzdcwxjKpr3pWf",
"sender": "F9ioRXnptWwc4Gc44Vhf2Q4jJMUunz2xwq2fDNYs5Q48",
"receiver_associated_account": "4qB7yZcgKLi1ju3yGFvsme9HmVr4UNug5yvQNty2egHf",
"nft_address": "8b3cHuW9qZitZnCsmCBhYYnYG3BBNZfGKjezkaDd8srE"
},
"source_protocol": {
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"name": "TOKEN_PROGRAM"
},
"type": "NFT_TRANSFER",
"parent_protocol": "JCFRaPv7852ESRwJJGRy2mysUMydXZgVVhrMLmExvmVp"
}
],
"events": [
{
"data": {
"loanAccount": "Hj9PKtpSGn1RtGupcCh1g6TR5UmvLzn4ufku7quvcDmk",
"lender": "4HHjBCKQrmpxu7qryDZtRGNJMQpaqPrzdcwxjKpr3pWf",
"borrower": "E9sFTMBMuyFzvF2Co5S9FHteZm6NRseh6FPxUzkouXXY",
"mint": "8b3cHuW9qZitZnCsmCBhYYnYG3BBNZfGKjezkaDd8srE",
"collectionConfig": "3tPeaidkJ8eAViN8etdccww7EbM1rE74Px3HZ8Dhc7kK",
"status": {
"defaulted": {}
},
"loanTerms": {
"apyBps": 10000,
"duration": 604800,
"principal": 6150000000
},
"creationTime": 1697739124,
"startTime": 1697755025,
"endTime": 1698384540,
"fox": false,
"tokenAccount": "GqemseGmGa2TzBR9Pxiw1a9j1XoWPhJZCNzeA2WrkPjt",
"rulesAcc": null,
"mortgage": false,
"private": false,
"offerType": {
"global": {}
},
"listingPrice": 0,
"ltvTerms": null,
"pool": false,
"listedLoan": null
},
"name": "LoanUpdate"
}
]
}
Action Response Structures
All the parsed transactions will have an actions array. Each action has two keys info
source_protocol
and type
. type
key represents the performed action. info
represents the action type specific data.
Here is the list of all types of actions along with their response format which are currently supported
MARKETPLACE_WITHDRAW
{
type: 'MARKETPLACE_WITHDRAW',
info: {
currency: string;
marketplace: string;
treasury_account: string;
marketplace_authority: string;
withdrawal_destination_account: string;
amount: number;
}
}
NFT_BID
{
type: 'NFT_BID',
info: {
bidder: string;
currency: string;
marketplace: string;
price: number;
nft_address: string;
}
}
NFT_BURN
{
type: 'NFT_BURN',
info: {
wallet: string;
nft_address: string;
amount: number;
}
}
NFT_LIST_CANCEL
{
type: 'NFT_LIST_CANCEL',
info: {
seller: string;
marketplace: string;
nft_address: string;
price: number;
}
}
NFT_LIST
{
type: 'NFT_LIST',
info: {
seller: string;
marketplace: string;
price: number;
nft_address: string;
}
}
NFT_LIST_UPADTE
{
type: 'NFT_LIST_UPADTE',
info: {
seller: string;
marketplace: string;
nft_address: string;
old_price: number | null;
new_price: number;
}
}
NFT_MINT
{
type: 'NFT_MINT',
info: {
nft_address: string;
amount: number;
amount_raw: number;
owner_associated_account: string;
owner: string;
collection_address: string;
}
}
NFT_SALE
{
type: 'NFT_SALE',
info: {
buyer: string;
seller: string;
nft_address: string;
currency: string;
marketplace: string;
price: number;
}
}
COMPRESSED_NFT_SALE
{
type: 'COMPRESSED_NFT_SALE',
info: {
buyer: string;
seller: string;
currency: string;
list_state: string;
marketplace: string;
merkle_tree: string;
nft_address: string;
price: number;
royalty_percentage: number;
}
}
COMPRESSED_NFT_LIST
{
type: 'COMPRESSED_NFT_LIST',
info: {
seller: string;
merkle_tree: string;
nft_address: string;
currency: string;
price: number;
list_state: string;
marketplace: string;
expire_in_second: number;
private_taker: string;
}
}
COMPRESSED_NFT_LIST_CANCEL
{
type: 'COMPRESSED_NFT_LIST_CANCEL',
info: {
seller: string;
merkle_tree: string;
list_state: string;
nft_address: string;
marketplace: string;
currency: string;
price: number | null;
}
}
COMPRESSED_NFT_LIST_UPDATE
{
type: 'COMPRESSED_NFT_LIST_UPDATE',
info: {
list_state: string;
marketplace: string;
seller: string;
nft_address: string;
currency: string;
new_price: number;
expire_in_second: number;
private_taker: string;
}
}
COMPRESSED_NFT_BID
{
type: 'COMPRESSED_NFT_BID',
info: {
bid_state: string;
bidder: string;
marketplace: string;
target: 'whitelist' | 'assetId';
target_id: string;
price: number;
currency: string;
quantity: number;
expire_in_second: number;
private_taker: string;
}
}
COMPRESSED_NFT_BID_CANCEL
{
type: 'COMPRESSED_NFT_BID_CANCEL',
info: {
bid_state: string;
bidder: string;
marketplace: string;
}
}
COMPRESSED_NFT_TAKE_BID
{
type: 'COMPRESSED_NFT_TAKE_BID',
info: {
seller: string;
merkle_tree: string;
price: number;
currency: string;
marketplace: string;
bid_state: string;
bidder: string;
nft_address: string;
royalty_percentage: number;
}
}
NFT_TRANSFER
{
type: 'NFT_TRANSFER',
info: {
amount: number;
receiver: string;
sender: string;
receiver_associated_account: string;
nft_address: string;
}
}
SOL_TRANSFER
{
type: 'SOL_TRANSFER',
info: {
sender: string;
receiver: string;
amount: number;
}
}
TOKEN_BURN
{
type: 'TOKEN_BURN',
info: {
wallet: string;
amount: number;
token_address: string;
}
}
TOKEN_CREATE
{
type: 'TOKEN_CREATE',
info: {
token_address: string;
}
}
TOKEN_MINT
{
type: 'TOKEN_MINT',
info: {
amount: number;
receiver_address: string;
token_address: string;
}
}
TOKEN_TRANSFER
{
type: 'TOKEN_TRANSFER',
info: {
amount: number | string;
receiver: string;
sender: string;
receiver_associated_account: string;
token_address: string;
}
}
OFFER_LOAN
{
type: 'OFFER_LOAN',
info: {
lender: string;
currency: string;
amount: number;
loan: string;
escrow: string;
escrow_token_account: string;
order_book: string;
borrower: string;
nft_address: string;
apy: number;
loan_duration_seconds: number;
}
}
CANCEL_LOAN
{
type: 'CANCEL_LOAN',
info: {
lender: string;
borrower: string;
currency: string;
amount: number;
loan: string;
escrow: string;
escrow_token_account: string;
reimbursed_to_borrower: number;
}
}
REPAY_LOAN
{
type: 'REPAY_LOAN',
info: {
lender: string;
borrower: string;
loan: string;
currency: string;
amount: number;
fee_paid: number;
nft_address: string;
escrow: string;
escrow_token_account: string;
order_book: string;
admin_payment: number;
payback_to_liq_owner: number;
}
}
REPAY_ESCROW_LOAN
{
type: 'REPAY_ESCROW_LOAN',
info: {
amount: number;
fee_paid: number;
borrower: string;
collateral_mint: string;
currency: string;
escrow: string;
escrow_token_account: string;
lender: string;
loan: string;
}
}
TAKE_LOAN
{
type: 'TAKE_LOAN',
info: {
lender: string;
borrower: string;
currency: string;
amount: number;
nft_address: string;
loan: string;
escrow: string;
escrow_token_account: string;
order_book: string;
apy: number;
loan_duration_seconds: number;
discount: number;
transfer_to_borrower: number;
}
}
EXTEND_LOAN
{
type: 'EXTEND_LOAN',
info: {
old_lender: string;
new_lender: string;
old_loan: string;
new_loan: string;
borrower: string;
currency: string;
amount: number;
nft_address: string;
old_escrow: string;
new_escrow: string;
new_escrow_token_account: string;
order_book: string;
apy: number;
loan_duration_seconds: number;
}
}
EXTEND_ESCROW_LOAN
{
type: 'EXTEND_ESCROW_LOAN',
info: {
old_lender: string;
new_lender: string;
old_loan: string;
new_loan: string;
borrower: string;
currency: string;
amount: number;
collateral_mint: string;
old_escrow: string;
new_escrow: string;
old_escrow_token_account: string;
new_escrow_token_account: string;
order_book: string;
loan_duration_seconds: number;
}
}
REQUEST_LOAN
{
type: 'REQUEST_LOAN',
info: {
loan: string;
borrower: string;
currency: string;
amount: number;
nft_address: string;
apy: number;
loan_duration_seconds: number;
ltv: number;
admin_payment: number;
}
}
CANCEL_REQUEST_LOAN
{
type: 'CANCEL_REQUEST_LOAN',
info: {
loan: string;
borrower: string;
nft_address: string;
}
}
LIQUIDATE_LOAN
{
type: 'LIQUIDATE_LOAN',
info: {
lender: string;
borrower: string;
loan: string;
currency: string;
amount: number;
nft_address: string;
grace_period_seconds: number;
}
}
BUY_NOW_PAY_LATER
{
type: 'BUY_NOW_PAY_LATER',
info: {
loan: string;
lender: string;
borrower: string;
nft_address: string;
currency: string;
amount: number;
apy: number;
loan_duration_seconds: number;
}
}
SWAP
{
type: 'SWAP';
info: {
swapper: string;
tokens_swapped: {
in: {
token_address: string;
name: string;
symbol: string;
image_uri: string;
amount: number;
};
out: {
token_address: string;
name: string;
symbol: string;
image_uri: string;
amount: number;
};
};
swaps: [
{
liquidity_pool_address: string;
name: string;
source: string;
};
];
};
}
CREATE_POOL
{
type: 'CREATE_POOL',
info: {
pool_creator: string;
liquidity_pool_address: string;
token_mint_one: string;
token_mint_two: string;
token_vault_one: string;
token_vault_two: string;
}
}
ADD_LIQUIDITY
{
type: 'ADD_LIQUIDITY',
info: {
liquidity_provider_address: string;
liquidity_pool_address: string;
nft_address: string;
liquidity_added: [
{
token_address: string;
amount: number;
name: string;
symbol: string;
image_uri: string;
}
];
}
}
REMOVE_LIQUIDITY
{
type: 'REMOVE_LIQUIDITY',
info: {
liquidity_provider_address: string;
liquidity_pool_address: string;
nft_address: string;
liquidity_removed: [
{
token_address: string;
amount: number;
name: string;
symbol: string;
image_uri: string;
}
];
}
}
COLLECT_FEES
{
type: 'COLLECT_FEES',
info: {
liquidity_pool_address: string;
liquidity_provider_address: string;
fees_taken: [
{
token_address: string;
amount: number;
name: string;
symbol: string;
image_uri: string;
}
];
}
}
COLLECT_REWARD
{
type: 'COLLECT_REWARD',
info: {
liquidity_pool_address: string;
liquidity_provider_address: string;
reward: {
token_address: string;
amount: number;
name: string;
symbol: string;
image_uri: string;
};
}
}
CREATE_RAFFLE
{
type: 'CREATE_RAFFLE',
info: {
raffle_address: string;
raffle_creator: string;
raffle_token: string;
currency: string;
ticket_price: number;
tickets: number;
start_date: string;
end_date: string;
}
}
UPDATE_RAFFLE
{
type: 'UPDATE_RAFFLE',
info: {
raffle_address: string;
raffle_creator: string;
currency: string;
ticket_price: number;
tickets: number;
}
}
âBUY_TICKETS
{
type: 'BUY_TICKETS',
info: {
raffle_address: string;
currency: string;
ticket_price: number;
tickets: number;
buyer: string;
}
}
âREVEAL_WINNERS
{
type: 'REVEAL_WINNERS',
info: {
raffle_address: string;
raffle_winner: string;
}
}
âCLAIM_PRIZE
{
type: 'CLAIM_PRIZE',
info: {
raffle_address: string;
raffle_winner: string;
raffle_token: string;
}
}
âCLOSE_RAFFLE
{
type: 'CLOSE_RAFFLE',
info: {
raffle_address: string;
raffle_creator: string;
currency: string;
raffle_closure_amount: number;
fee_taker: string;
fee_taken: number;
}
}
âCANCEL_RAFFLE
{
type: 'CANCEL_RAFFLE',
info: {
raffle_address: string;
raffle_creator: string;
raffle_token: string;
}
}
CREATE_TREE
{
type: 'CREATE_TREE',
info: {
tree_authority: string;
merkle_tree: string;
payer: string;
tree_creator: string;
max_depth: number;
max_buffer_size: number;
}
}
COMPRESSED_NFT_MINT
{
type: 'COMPRESSED_NFT_MINT',
info: {
tree_authority: string;
merkle_tree: string;
payer: string;
nft_address: string;
owner: string;
update_authority: string;
nft_metadata: {
name: string;
symbol: string;
uri: string;
sellerFeeBasisPoints: number;
primarySaleHappened: boolean;
isMutable: boolean;
editionNonce: number;
tokenStandard: { nonFungible: Record<string, unknown> } | { fungibleAsset: Record<string, unknown> } | { fungible: Record<string, unknown> } | { nonFungibleEdition: Record<string, unknown> };
collection: {
verified: boolean;
key: string;
},
uses: null,
tokenProgramVersion: { original: Record<string, unknown> } | { token2022: Record<string, unknown> },
creators: [
{
address: string;
verified: boolean;
share: number;
}
]
}
}
}
COMPRESSED_NFT_TRANSFER
{
type: 'COMPRESSED_NFT_TRANSFER',
info: {
tree_authority: string;
merkle_tree: string;
sender: string;
receiver: string;
nft_address: string;
update_authority: string;
}
}
COMPRESSED_NFT_BURN
{
type: 'COMPRESSED_NFT_BURN',
info: {
tree_authority: string;
merkle_tree: string;
owner: string;
nft_address: string;
update_authority: string;
}
}
CREATE_REALM:
{
type: 'CREATE_REALM',
info: {
realm_address: string;
realm_authority: string;
community_token_mint: string;
payer: string;
realm_name: string;
use_council_mint: boolean;
min_community_tokens_to_create_governance: number;
community_mint_max_vote_weight_source: number;
community_token_config: {
use_voter_weight_addin: boolean;
use_max_voter_weight_addin: boolean;
token_type: string;
};
council_token_config: {
use_voter_weight_addin: boolean;
use_max_voter_weight_addin: boolean;
token_type: string;
};
}
}
DEPOSIT_GOVERNING_TOKENS:
{
type: 'DEPOSIT_GOVERNING_TOKENS',
info: {
realm_address: string;
governing_token_source: string;
governing_token_owner: string;
token_owner_record_address: string;
governing_token: string;
payer: string;
realm_config_address: string;
amount: number;
}
}
WITHDRAW_GOVERNING_TOKENS:
{
type: 'WITHDRAW_GOVERNING_TOKENS',
info: {
realm_address: string;
governing_token_destination: string;
governing_token_owner: string;
token_owner_record_address: string;
governing_token: string;
payer: string;
realm_config_address: string;
}
}
SET_GOVERNANCE_DELEGATE:
{
type: 'SET_GOVERNANCE_DELEGATE',
info: {
governance_authority: string;
vote_record_address: string;
new_governance_delegate: string;
}
}
CREATE_GOVERNANCE:
{
type: 'CREATE_GOVERNANCE',
info: {
realm_address: string;
governance_address: string;
governed_account_address: string;
token_owner_record: string;
payer: string;
create_authority: string;
min_community_tokens_to_create_proposal: number;
min_instruction_hold_up_time: number;
base_voting_time: number;
community_vote_tipping: string;
min_council_tokens_to_create_proposal: number;
council_vote_tipping: string;
voting_cool_off_time: number;
deposit_exempt_proposal_count: number;
}
}
CREATE_PROGRAM_GOVERNANCE:
{
type: 'CREATE_PROGRAM_GOVERNANCE',
info: {
realm_address: string;
program_governance_address: string;
governed_program: string;
token_owner_record: string;
payer: string;
create_authority: string;
min_community_tokens_to_create_proposal: number;
min_instruction_hold_up_time: number;
base_voting_time: number;
community_vote_tipping: string;
min_council_tokens_to_create_proposal: number;
council_vote_tipping: string;
voting_cool_off_time: number;
deposit_exempt_proposal_count: number;
is_transfer_upgrade_authority: boolean;
}
}
CREATE_PROPOSAL:
{
type: 'CREATE_PROPOSAL',
info: {
realm_address: string;
proposal_address: string;
governance: string;
proposal_owner_record: string;
governing_token: string;
governance_authority: string;
payer: string;
proposal_name: string;
proposal_description: string;
vote_type: string;
option: string;
use_deny_option: boolean;
proposal_seed: string;
}
}
ADD_SIGNATORY:
{
type: 'ADD_SIGNATORY',
info: {
proposal: string;
token_owner_record: string;
governance_authority: string;
signatory_record_address: string;
payer: string;
signatory: string;
}
}
REMOVE_SIGNATORY:
{
type: 'REMOVE_SIGNATORY',
info: {
proposal: string;
token_owner_record: string;
governance_authority: string;
signatory_record_address: string;
beneficiary: string;
}
}
INSERT_TRANSACTION:
{
type: 'INSERT_TRANSACTION',
info: {
governance: string;
proposal: string;
token_owner_record: string;
governance_authority: string;
proposal_transaction: string;
payer: string;
}
}
REMOVE_TRANSACTION:
{
type: 'REMOVE_TRANSACTION',
info: {
proposal: string;
token_owner_record: string;
governance_authority: string;
proposal_transaction: string;
beneficiary: string;
}
}
CANCEL_PROPOSAL:
{
type: 'CANCEL_PROPOSAL',
info: {
realm_address: string;
governance: string;
proposal: string;
proposal_owner_record: string;
governance_authority: string;
}
}
SIGN_OFF_PROPOSAL:
{
type: 'SIGN_OFF_PROPOSAL',
info: {
realm_address: string;
governance: string;
proposal: string;
signatory: string;
}
}
CAST_VOTE:
{
type: 'CAST_VOTE',
info: {
realm_address: string;
governance: string;
proposal: string;
proposal_owner_record: string;
voter_token_owner_record: string;
governance_authority: string;
vote_record_address: string;
vote_governing_token: string;
payer: string;
vote_type: string;
rank?: number;
weight_percentage?: number;