Unmarshal Generic APIs

(Sandbox)

Fiddle around with our APIs

Unmarshal is trying to help developers in the DeFi space to make simple things easy and the hard things possible, by making data accessible, quick, and meaningful.

We would like to demonstrate how we make it happen, so we are releasing some of Unmarshal APIs for you to interpret how the data can be retrieved in any attainable format.

The sandbox environment currently supports Ethereum, Binance Smart Chain, Heco, Algorand, Polkadot, Zilliqa, Stafi, Edgeware blockchains, and supports tokens balances, transactions, and transaction details APIs.

get
Get Token Balances

https://stg-api.unmarshal.io/v1/:coin/address/:address/assets
Description This endpoint allows you to retrieve balance tied to a particular address. The response of this API will include everything you need to make sense of your assets. You can see what is the current value of each token, and how much your assets are worth in fiat currency. We also have built a CDN for logos. Eg: Fetch balances by address for Ethereum https://stg-api.unmarshal.io/v1/ethereum/address/0xb13943b4CC5B8F03A2e2872842C7E4118abdAe6F/assets?auth_key=VGVtcEtleQ%3D%3D
Request
Response
Request
Path Parameters
coin
required
string
Supported coins: ethereum, bsc, polkadot, stafi, edgeware, zilliqa, algorand, heco
address
required
string
Any valid address or ENS
Query Parameters
auth_key
required
string
Demo key: VGVtcEtleQ==
Response
200: OK
Cake successfully retrieved.
[
{
"contract_name": "Ethereum Token",
"contract_ticker_symbol": "ETH",
"contract_decimals": 18,
"contract_address": "0x2170Ed0880ac9A755fd29B2688956BD959F933F8",
"coin": 10000714,
"type": "BEP20",
"balance": "36148414869104961",
"quote": 51.57938611728892,
"quote_rate": 1426.878227,
"logo_url": "https://exchange.pancakeswap.finance/images/coins/ETH.png"
},
{
"contract_name": "Binance Smart Chain",
"contract_ticker_symbol": "BNB",
"contract_decimals": 18,
"contract_address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"coin": 10000714,
"type": "BEP20",
"balance": "7480280000000000",
"quote": 0.3793998016,
"quote_rate": 50.72,
"logo_url": "https://exchange.pancakeswap.finance/images/coins/BNB.png"
}
]
404: Not Found
Could not find a cake matching this query.
{ "message": "Address Missing" }

get
Get Token Transactions

https://stg-api.unmarshal.io/v1/:coin/address/:address/transactions?page=1&pageSize=2
Description Retrieves all transactions of the particular address. Unmarshal has the best in class decoders to extract the meaning out of just a function call to the smart contract. Our decoder decodes the transaction into Send, Receive, Approve, Stake, UnStake, Add Liquidity, Remove Liquidity, etc. Want to build the next Etherscan? All you have to do is build the UI. Unmarshal takes care of everything else. Optional Query Parameters: -> page: specifies the page of returned transaction, starting from 1. -> pageSize: Number of transaction returned by api call (by default 1000), returns in the order of recent transactions Eg: Fetch all transactions by address for Ethereum https://stg-api.unmarshal.io/v1/ethereum/address/0xb13943b4CC5B8F03A2e2872842C7E4118abdAe6F/transactions?page=1&pageSize=2&auth_key=VGVtcEtleQ%3D%3D
Request
Response
Request
Path Parameters
coin
required
string
Supported coins: ethereum, bsc, polkadot, stafi, edgeware, zilliqa, algorand
address
required
string
Any valid address
Query Parameters
auth_key
required
string
Demo key: VGVtcEtleQ==
Response
200: OK
{
"transactions": [
{
"id": "0xb304487e151661037085776b15ab136753c339238aa34188edeb0a02e67e7a70",
"from": "0x16E85BAEFb73c244BFA6c70dF9DC8e7603a79ACa",
"to": "0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F",
"fee": "2519720000000000",
"date": 1612187134,
"status": "completed",
"type": "swap",
"value": "987113380000000000",
"received": [
{
"name": "Ethereum Token",
"symbol": "ETH",
"token_id": "0x2170Ed0880ac9A755fd29B2688956BD959F933F8",
"decimals": 18,
"value": "36148414869104961"
}
],
"sent": [
{
"name": "Wrapped BNB",
"symbol": "WBNB",
"token_id": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"decimals": 18,
"value": "987113380000000000"
}
]
}
]
}

get
Get Transaction Detail

https://stg-api.unmarshal.io/v1/:coin/transactions/:txID
Description Get the details of a single transaction through transaction hash. Eg: Fetch particular transaction details by transaction Hash from Ethereum https://stg-api.unmarshal.io/v1/ethereum/transactions/0x90242feaa21a0630cbef7098b6ede5329b7623f5dff5a444f3fc48f1bb51665f?auth_key=VGVtcEtleQ%3D%3D
Request
Response
Request
Path Parameters
coin
optional
string
Supported coins: ethereum, bsc, polkadot, stafi, edgeware
txID
required
string
Any valid transaction-id
Query Parameters
auth_key
required
string
Demo key: VGVtcEtleQ==
Response
200: OK
{
"id": "0xb304487e151661037085776b15ab136753c339238aa34188edeb0a02e67e7a70",
"from": "0x16E85BAEFb73c244BFA6c70dF9DC8e7603a79ACa",
"to": "0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F",
"fee": "2519720000000000",
"date": 1612187134,
"status": "completed",
"type": "contract_execution",
"value": "987113380000000000"
}

Try out here -> https://stg-api.unmarshal.io/swagger/index.html