Transaction APIs

History by address

The transactions API fetches the list of all transactions in wallet address

Our Bank statements often let us understand the financial positions of a bank account. Similarly for a Crypto wallet, the transactions gives the wallet holder a detailed analysis of the inbound and out bound transfers thereby keeping the wallet apprised of all the happenings in their wallet.

Unmarshal Transaction APIs are smart enough to differentiate the kind of operation a particular transaction was made for. It will let a user understand if the transaction was was for a send or receive or the amount was staked or un-staked , or if the transactions was for adding or removing liquidity .

This Endpoint allows contract filtering, where it returns all the transactions made by an address for that contract.

This Endpoint does not provide total transaction count for an address which inturn does not provide total pages, but instead it will returns a boolean value which specifies whether transaction are present in next page

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" "klaytn" "cronos" "velas" "arbitrum" "avalanche" "xinfin" "zilliqa" "solana" "fantom" "fuse" "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

The transactions API fetches the list of all transactions in wallet address

Our Bank statements often let us understand the financial positions of a bank account. Similarly for a Crypto wallet, the transactions gives the wallet holder a detailed analysis of the inbound and out bound transfers thereby keeping the wallet apprised of all the happenings in their wallet.

Unmarshal Transaction APIs are smart enough to differentiate the kind of operation a particular transaction was made for. It will let a user understand if the transaction was was for a send or receive or the amount was staked or un-staked , or if the transactions was for adding or removing liquidity .

This Endpoint allows contract filtering, where it returns all the transactions made by an address for that contract.

This Endpoint does not provide total transaction count for an address which inturn does not provide total pages, but instead it will returns a boolean value which specifies whether transaction are present in next page

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" "klaytn" "cronos" "velas" "arbitrum" "avalanche" "xinfin" "zilliqa" "solana" "fantom" "fuse" "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 transactions API fetches the list of all transactions in wallet address

Our Bank statements often let us understand the financial positions of a bank account. Similarly for a Crypto wallet , the transactions gives the wallet holder a detailed analysis of the inbound and out bound transfers thereby keeping the wallet apprised of all the happenings in their wallet.

Unmarshal Transaction APIs are smart enough to differentiate the kind of operation a particular transaction was made for. It will let a user understand if the transaction was was for a send or receive or the amount was staked or un-staked , or if the transactions wa Note: This API will be slower compared to the v3 API which doesn't fetch transaction count.

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)

  •    Get Transactions for requested chain
    

    Chain Id Filtering for kadena chain, Returns transactions available on a particular chain (0-19), All other filters will also applies for kadena chain.

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" "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 Endpoint provides all the transactions of a token address irrespective of wallet address.

This Endpoint does not provide total transaction count for an address which inturn does not provide total pages, but instead it will returns a boolean value which specifies whether transaction are present in next page.

All of the transactions that the contract was involved in are returned by the api. The response also includes transactional information (Including non-contract specific interactions).

Unmarshal Transaction APIs are smart enough to differentiate the kind of operation a particular transaction was made for. It will let a user understand if the transaction was was for a send or receive or the amount was staked or un-staked , or if the transactions was for adding or removing liquidity .

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" "klaytn" "cronos" "velas" "arbitrum" "avalanche" "xinfin" "zilliqa" "solana" "fantom" "fuse" "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": [
    ]
}

Token Transactions with count

This Endpoint provides all the transactions of a token address irrespective of wallet address

All of the transactions that the contract was involved in are returned by the api. The response also includes transactional information (Including non-contract specific interactions). The count also contains the total transaction count of the contract involved in.

Unmarshal Transaction APIs are smart enough to differentiate the kind of operation a particular transaction was made for. It will let a user understand if the transaction was was for a send or receive or the amount was staked or un-staked , or if the transactions was for adding or removing liquidity. Note: This API will be slower compared to the v3 API which doesn't fetch transaction count.

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 for requested chain
    

    Chain Id Filtering for kadena chain, Returns transactions available on a particular chain (0-19), All other filters will also applies for kadena chain.

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" "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": [
    ]
}

Transaction Details

The transaction detail API is one such End Point which gives as much details possible for a specific transaction on a specific given chain.

All we need is the transaction hash and the entire history of the transaction is presented to anyone looking for all minor details pertaining to the particular transaction

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" "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": []
}

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" "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
{
  • "token_holders_count": "3367"
}