Transaction APIs

Transaction History for Address

The transaction History by Address API allows you to retrieve a list of all transactions associated with a wallet address. The transactions are returned in reverse chronological order, with the most recent transactions appearing first. Additionally, the API includes decrypt log events in the response.

Filters:

  • Get Transactions for an address from a specified block till a specified block: Block Filtering, returns transactions within specified Block Numbers (fromBlock specifies from which block transactions should be picked, toBlock specifies till which block).
  • Get Transactions of an address for a specified contract address: Contract Filtering, returns all the transactions made by an address for the specified contract.
  • Get transactions along with price at the time of transaction: Get all transactions along with prices of tokens which are involved
    unmarshal.WalletApi
     .getTokenTransactionHistoryWithoutTotalCount(Chain.ethereum, "token address")
     .then(({data}) => console.log(data))
    

Note* Valid query paramaters for solana are before, pageSize, until and contract, For pagination use before and until instead of page

Request
Security:
path Parameters
chain
required
string

Chain name (example: bsc, ethereum, matic...)

Enum: "ethereum" "bsc" "matic" "celo" "kadena" "klaytn" "cronos" "velas" "arbitrum" "avalanche" "xinfin" "zilliqa" "solana" "fantom" "fuse" "aurora" "bsc-testnet" "matic-testnet" "rinkeby-testnet"
Example: bsc
address
required
string
Default: "demo.eth"

Any valid address or ENS

Example: 0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de
query Parameters
page
number >= 1
Default: 1

Page you want to query

pageSize
number
Default: 25

Number of records to be fetched per page

Example: pageSize=5
contract
string

Valid contract address

fromBlock
number
Default: 14870135

Starting block from which the transactions should be considered

Example: fromBlock=14870135
toBlock
number
Default: 14870140

End block till which the transactions should be considered

Example: toBlock=14870140
price
boolean

Flag to enable price of tokens at the time of transaction

Enum: "true" "false"
Example: price=false
before
string

Equates to search until the following transaction ID (only for solana)

until
string

Search from before this transaction ID (only for solana)

Responses
200
401
get/v3/{chain}/address/{address}/transactions
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v3/:chain/address/:address/transactions?page=1&pageSize=5&contract=string&fromBlock=14870135&toBlock=14870140&price=false&before=string&until=string&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "page": 1,
  • "items_on_page": 25,
  • "has_next": true,
  • "transactions": [
    ]
}

History by address with price

This API returns total transactions count and total pages of a wallet address with Prices included.

Filters:

  • Get Transactions for an address from a specified block till a specified block: Block Filtering, returns transactions within specified Block Numbers (fromBlock specifies from which block transactions should be picked, toBlock specifies till which block).
  • Get Transactions of an address for a specified contract address: Contract Filtering, returns all the transactions made by an address for the specified contract.
  • Get transactions along with price at the time of transaction: Get all transactions along with prices of tokens which are involved
    unmarshal.WalletApi
     .getTokenTransactionHistoryWithoutTotalCount(Chain.ethereum, "token address")
     .then(({data}) => console.log(data))
    
Request
Security:
path Parameters
chain
required
string

Chain name (example: bsc, ethereum, matic...)

Enum: "ethereum" "bsc" "matic" "celo" "kadena" "klaytn" "cronos" "velas" "arbitrum" "avalanche" "xinfin" "zilliqa" "solana" "fantom" "fuse" "aurora" "bsc-testnet" "matic-testnet" "rinkeby-testnet"
Example: bsc
address
required
string
Default: "demo.eth"

Any valid address or ENS

Example: 0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de
query Parameters
page
number >= 1
Default: 1

Page you want to query

pageSize
number
Default: 25

Number of records to be fetched per page

Example: pageSize=5
contract
string

Valid contract address

fromBlock
number
Default: 14870135

Starting block from which the transactions should be considered

Example: fromBlock=14870135
toBlock
number
Default: 14870140

End block till which the transactions should be considered

Example: toBlock=14870140
Responses
200
401
get/v2/{chain}/address/{address}/transactions
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v2/:chain/address/:address/transactions?page=1&pageSize=5&contract=string&fromBlock=14870135&toBlock=14870140&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "page": 1,
  • "total_pages": 410,
  • "items_on_page": 2,
  • "total_txs": 818,
  • "transactions": [
    ]
}

History by Address with transaction count

The API returns the total transactions count and pages of a wallet address without prices.

Filters:

  • Get Transactions for an address from a specified block till a specified block: Block Filtering, returns transactions within specified Block Numbers (fromBlock specifies from which block transactions should be picked, toBlock specifies till which block).
  • Get Transactions of an address for a specified contract address: Contract Filtering, returns all the transactions made by an address for the specified contract. (contract query parameter accepts any valid contract address)
    unmarshal.WalletApi
     .getTransactionHistory(Chain.ethereum, "demo.eth")
     .then(({data}) => console.log(data))
    
Request
Security:
path Parameters
chain
required
string

Chain name (example: bsc, ethereum, matic...)

Enum: "ethereum" "bsc" "matic" "kadena" "celo" "klaytn" "cronos" "velas" "arbitrum" "avalanche" "xinfin" "zilliqa" "solana" "fantom" "fuse" "aurora" "bsc-testnet" "matic-testnet" "rinkeby-testnet"
Example: bsc
address
required
string
Default: "demo.eth"

Any valid address or ENS

Example: demo.eth
query Parameters
page
number >= 1
Default: 1

Page you want to query

pageSize
number
Default: 25

Number of records to be fetched per page

Example: pageSize=5
contract
string

Valid contract address

fromBlock
number
Default: 14870135

Starting block from which the transactions should be considered

Example: fromBlock=14870135
toBlock
number
Default: 14870140

End block till which the transactions should be considered

Example: toBlock=14870140
chainId
string
Default: "false"

Return details for requested chain id (For Kadena chain)

Responses
200
401
get/v1/{chain}/address/{address}/transactions
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v1/:chain/address/:address/transactions?page=1&pageSize=5&contract=string&fromBlock=14870135&toBlock=14870140&chainId=false&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "page": 1,
  • "total_pages": 178,
  • "items_on_page": 1,
  • "total_txs": 355,
  • "transactions": [
    ]
}

Token Transactions

This API provides all the transactions of a token address.

Filters:

  • Get Transactions for an address from a specified block till a specified block: Block Filtering, returns transactions within specified Block Numbers (fromBlock specifies from which block transactions should be picked, toBlock specifies till which block).
    unmarshal.WalletApi
     .getTokenTransactionHistoryWithoutTotalCount(Chain.ethereum, "token address")
     .then(({data}) => console.log(data))
    

Note* Valid query paramaters for solana are before, pageSize and until, For pagination use before and until instead of page

Request
Security:
path Parameters
chain
required
string

Chain name (example: bsc, ethereum, matic...)

Enum: "ethereum" "bsc" "matic" "celo" "kadena" "klaytn" "cronos" "velas" "arbitrum" "avalanche" "xinfin" "zilliqa" "solana" "fantom" "fuse" "aurora" "bsc-testnet" "matic-testnet" "rinkeby-testnet"
Example: bsc
address
required
string
Default: "0x2FA5dAF6Fe0708fBD63b1A7D1592577284f52256"

And valid contract address

Example: 0x2FA5dAF6Fe0708fBD63b1A7D1592577284f52256
query Parameters
page
number >= 1
Default: 1

Page you want to query

pageSize
number
Default: 25

Number of records to be fetched per page

Example: pageSize=5
fromBlock
number
Default: 14870135

Starting block from which the transactions should be considered

Example: fromBlock=14870135
toBlock
number
Default: 14870140

End block till which the transactions should be considered

Example: toBlock=14870140
before
string

Equates to search until the following transaction ID (only for solana)

until
string

Search from before this transaction ID (only for solana)

Responses
200
401
get/v2/{chain}/token/{address}/transactions
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v2/:chain/token/:address/transactions?page=1&pageSize=5&fromBlock=14870135&toBlock=14870140&before=string&until=string&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "page": 1,
  • "total_pages": 178,
  • "items_on_page": 1,
  • "total_txs": 355,
  • "transactions": [
    ]
}

Transaction Details

This API gives all the details for a specific transaction on a particular chain.

unmarshal.WalletApi
    .getTransactionDetails(Chain.ethereum, "transaction-hash")
    .then(({data}) => console.log(data))
Request
Security:
path Parameters
chain
required
string

Chain name (example: bsc, ethereum, matic...)

Enum: "ethereum" "bsc" "matic" "kadena" "celo" "klaytn" "cronos" "velas" "arbitrum" "avalanche" "xinfin" "zilliqa" "solana" "fantom" "fuse" "aurora" "bsc-testnet" "matic-testnet" "rinkeby-testnet"
Example: bsc
transactionHash
required
string
Default: "0x8e1337b81ff3c1a7e3796c74c9dc084566b6e043cd69968e9b1d2336cd3d8e64"

Any valid transaction hash

query Parameters
chainId
string
Default: "false"

Return details for requested chain id (For Kadena chain)

Responses
200
401
get/v1/{chain}/transactions/{transactionHash}
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v1/:chain/transactions/:transactionHash?chainId=false&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "id": "string",
  • "from": "string",
  • "to": "string",
  • "fee": "string",
  • "date": 0,
  • "status": "string",
  • "type": "string",
  • "block": 0,
  • "value": "string",
  • "nonce": 0,
  • "description": "string",
  • "sent": [],
  • "received": [],
  • "others": []
}

Token Transactions with count

This API provides total transaction count and total pages for all token transactions.

Filters:

  • Get Transactions for an address from a specified block till a specified block: Block Filtering, returns transactions within specified Block Numbers (fromBlock specifies from which block transactions should be picked, toBlock specifies till which block).
    unmarshal.WalletApi
     .getTokenTransactionHistory(Chain.ethereum, "token address")
     .then(({data}) => console.log(data))
    
Request
Security:
path Parameters
chain
required
string

Chain name (example: bsc, ethereum, matic...)

Enum: "ethereum" "bsc" "matic" "kadena" "celo" "klaytn" "cronos" "velas" "arbitrum" "avalanche" "xinfin" "zilliqa" "solana" "fantom" "fuse" "aurora" "bsc-testnet" "matic-testnet" "rinkeby-testnet"
Example: bsc
address
required
string
Default: "0x2FA5dAF6Fe0708fBD63b1A7D1592577284f52256"

And valid contract address

Example: 0x2FA5dAF6Fe0708fBD63b1A7D1592577284f52256
query Parameters
page
number >= 1
Default: 1

Page you want to query

pageSize
number
Default: 25

Number of records to be fetched per page

Example: pageSize=5
chainId
string
Default: "false"

Return details for requested chain id (For Kadena chain)

Responses
200
401
get/v1/{chain}/token/{address}/transactions
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v1/:chain/token/:address/transactions?page=1&pageSize=5&chainId=false&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "page": 1,
  • "total_pages": 178,
  • "items_on_page": 1,
  • "total_txs": 355,
  • "transactions": [
    ]
}

Wallet Transaction Count

This endpoint allows you to retrieve the transaction count for a given address

unmarshal.WalletApi
    .getTotalTransactionCount(Chain.ethereum, "demo.eth")
    .then(({data}) => console.log(data))
Request
Security:
path Parameters
chain
required
string

Chain name (example: bsc, ethereum, matic...)

Enum: "ethereum" "bsc" "matic" "celo" "arbitrum" "avalanche" "xinfin" "cronos" "velas" "zilliqa" "fantom" "fuse" "aurora" "bsc-testnet" "matic-testnet" "rinkeby-testnet"
Example: bsc
address
required
string
Default: "demo.eth"

Any valid address or ENS

Example: demo.eth
Responses
200
401
get/v1/{chain}/address/{address}/transactions/count
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v1/:chain/address/:address/transactions/count?auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "total_transaction_count": "445"
}