Price Store

Pricestore API contains endpoints that provide the latest price of a token as well as historical price of the tokens, these tokens can also be LP tokens. Tokens supported from ETH/BSC/Matic chains These api's also provide top losers and gainers.

Price by Symbol

This API provides the price of the token by taking the symbol of the token(ticker) as a parameter which will give the latest price.

unmarshal.PriceStore
    .getPriceBySymbol("marsh")
    .then(({data}) => console.log(data))

NOTE: This endpoint gives live prices for all coingecko supported symbols, however historical prices are supported only for Ethereum, BSC, Matic and Arbitrum. Timestamp can also be provided as a query param to get historical data.

Request
Security:
path Parameters
symbol
required
string
Default: "marsh"

Valid token ticker on Ethereum / BSC / Polygon / Arbitrum

query Parameters
timestamp
string

Provide unix timestamp to fetch historical price (supported only for ethereum, bsc, matic, arbitrum)

Responses
200

Example response

401
get/v1/pricestore/{symbol}
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v1/pricestore/:symbol?timestamp=string&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    },
  • {
    }
]

Price by Address

This API provides the price of a token by the contract address of the token in any chain.

unmarshal.PriceStore
    .getPriceByAddress(Chain.ethereum, "token-address")
    .then(({data}) => console.log(data))

NOTE: This endpoint live prices for contracts which are listed in coingecko, however historical prices are supported only for Ethereum. Timestamp can be provided as a query parameter to view historical data.

Request
Security:
path Parameters
priceStoreChains
required
string

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

Enum: "ethereum" "bsc" "matic" "arbitrum"
Example: bsc
address
required
string

Any valid token address

query Parameters
timestamp
string

Provide unix timestamp to fetch historical price (supported only for ethereum, bsc, matic, arbitrum)

24change
string

Specify param to fetch 24h change in price

alternateChain
string

Set true to fetch from other chains if not found in current chain

Responses
200

Example response

401
get/v1/pricestore/chain/{priceStoreChains}/{address}
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v1/pricestore/chain/:priceStoreChains/:address?timestamp=string&24change=string&alternateChain=string&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "tokenId": "0x5a666c7d92e5fa7edcb6390e4efd6d0cdd69cf37",
  • "timestamp": "1637922456",
  • "price": "1.2107928183"
}

Price for Tokens in bulk

This API takes multiple contract addresses to provide price data at once. Multiple contracts must be separated by commas (,).

unmarshal.PriceStore
    .getMultipleTokenPrice(Chain.ethereum, ["token address 1", "token address 2"])
    .then(({data}) => console.log(data))

Note: This endpoint works only for Ethereum, Bsc, Matic and Arbitrum.

Request
Security:
path Parameters
priceStoreChains
required
string

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

Enum: "ethereum" "bsc" "matic" "arbitrum"
Example: bsc
query Parameters
tokens
string

List of comma separated token contracts

Responses
200

Example response

401
get/v1/pricestore/chain/{priceStoreChains}/tokens
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v1/pricestore/chain/:priceStoreChains/tokens?tokens=string&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    },
  • {
    }
]

Top Gainers

This API provides a list of the top gainers in a particular chain. Data for the last 24 hours contains the biggest gainers.

unmarshal.PriceStore
    .getTopGainers(Chain.ethereum)
    .then(({data}) => console.log(data))
Request
Security:
path Parameters
priceStoreChains
required
string

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

Enum: "ethereum" "bsc" "matic" "arbitrum"
Example: bsc
query Parameters
price
string

Result for price greater than given value

Responses
200

Example response

401
get/v1/pricestore/chain/{priceStoreChains}/gainers
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v1/pricestore/chain/:priceStoreChains/gainers?price=string&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
[]

Top Losers

This API provides a list of the top losers in a particular chain. Data for the last 24 hours contains the biggest losers.

unmarshal.PriceStore
    .getTopLosers(Chain.ethereum)
    .then(({data}) => console.log(data))
Request
Security:
path Parameters
priceStoreChains
required
string

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

Enum: "ethereum" "bsc" "matic" "arbitrum"
Example: bsc
query Parameters
price
string

Result for price greater than given value

Responses
200

Example response

401
get/v1/pricestore/chain/{priceStoreChains}/losers
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v1/pricestore/chain/:priceStoreChains/losers?price=string&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
[]

LP Tokens Price

This api provides the price for LP tokens by taking in the address of the Lp tokens.

NOTE: This endpoint is supported only for Ethereum.

Request
Security:
path Parameters
priceStoreChains
required
string

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

Enum: "ethereum" "bsc" "matic" "arbitrum"
Example: bsc
query Parameters
lptokens
required
string

Any valid LP token address

Responses
200

Example response

401
get/v1/pricestore/chain/{priceStoreChains}/lptokens
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v1/pricestore/chain/:priceStoreChains/lptokens?lptokens=string&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]