API Documentation
Dex Api
- WebSocket
- Transaction
- Dex
- Defi
- Trade
- Order
- Token
- DexPool
- Ranking
- Wallet
Dex SDK
- JavaScript
Wallet - Balances
Get wallet balance information
curl --request GET \
--url https://api-dex.chainstream.io/wallet/{chain}/{walletAddress}/balance \
--header 'Authorization: Bearer <token>'
{
"totalBalancesInUsd": "1000000",
"totalProfitInUsd": "1000000",
"balances": [
{
"tokenAddress": "So11111111111111111111111111111111111111112",
"amount": "2675.098457775",
"valueInUsd": "366908.31721324675",
"name": "Solana",
"symbol": "SOL",
"imageUrl": "https://solana.com/images/solana-logo.png",
"priceInSol": "137.15",
"priceInUsd": "137.15",
"priceChangeRatioInUsd24h": "5.23",
"unrealizedProfitInUsd": "123.45",
"unrealizedProfitRatio": "12.34",
"openTime": "1741780466000",
"closeTime": "1741780466000",
"buys": 10,
"buyAmount": "1500",
"buyAmountInUsd": "1845",
"sells": 5,
"sellAmount": "500",
"sellAmountInUsd": "615",
"averageBuyPrice": "1.23",
"averageSellPrice": "1.23",
"realizedProfitInUsd": "1234.56",
"realizedProfitRatio": "12.34",
"totalRealizedProfitInUsd": "169.12",
"totalRealizedProfitRatio": "16.91"
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
A chain name listed in supported networks
sol
, base
An address of a wallet
"MJKqp326RZCHnAAbew9MDdui3iCKWco7fsK9sVuZTX2"
Response
Total wallet value
"1000000"
Total profit in USD
"1000000"
Wallet balance details
Token contract address
"So11111111111111111111111111111111111111112"
Token amount
"2675.098457775"
Token amount in USD
"366908.31721324675"
Token name
"Solana"
Token symbol
"SOL"
Token logo iamgeUrl
"https://solana.com/images/solana-logo.png"
Price in SOL
"137.15"
Price in USD
"137.15"
24h price change ratio
"5.23"
Unrealized profit in USD
"123.45"
Unrealized profit ratio
"12.34"
Position opening time
"1741780466000"
Position closing time
"1741780466000"
Number of buy transactions
10
Total amount of tokens bought
"1500"
Total value of tokens bought in USD
"1845"
Number of sell transactions
5
Total amount of tokens sold
"500"
Total value of tokens sold in USD
"615"
Average buying price
"1.23"
Average selling price
"1.23"
Realized profit in USD
"1234.56"
Realized profit ratio
"12.34"
Total realized profit in USD
"169.12"
Total realized profit ratio
"16.91"
Was this page helpful?
curl --request GET \
--url https://api-dex.chainstream.io/wallet/{chain}/{walletAddress}/balance \
--header 'Authorization: Bearer <token>'
{
"totalBalancesInUsd": "1000000",
"totalProfitInUsd": "1000000",
"balances": [
{
"tokenAddress": "So11111111111111111111111111111111111111112",
"amount": "2675.098457775",
"valueInUsd": "366908.31721324675",
"name": "Solana",
"symbol": "SOL",
"imageUrl": "https://solana.com/images/solana-logo.png",
"priceInSol": "137.15",
"priceInUsd": "137.15",
"priceChangeRatioInUsd24h": "5.23",
"unrealizedProfitInUsd": "123.45",
"unrealizedProfitRatio": "12.34",
"openTime": "1741780466000",
"closeTime": "1741780466000",
"buys": 10,
"buyAmount": "1500",
"buyAmountInUsd": "1845",
"sells": 5,
"sellAmount": "500",
"sellAmountInUsd": "615",
"averageBuyPrice": "1.23",
"averageSellPrice": "1.23",
"realizedProfitInUsd": "1234.56",
"realizedProfitRatio": "12.34",
"totalRealizedProfitInUsd": "169.12",
"totalRealizedProfitRatio": "16.91"
}
]
}