API 文档
Dex Api
- WebSocket
- Transaction
- Dex
- Defi
- Trade
- Order
- Token
- DexPool
- Ranking
- Wallet
Dex SDK
- JavaScript
Wallet
钱包 - 余额
Wallet
钱包 - 余额
获取钱包余额信息
GET
/
wallet
/
{chain}
/
{walletAddress}
/
balance
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
支持网络中列出的区块链名称
Available options:
sol
, base
钱包地址
Example:
"MJKqp326RZCHnAAbew9MDdui3iCKWco7fsK9sVuZTX2"
Response
200 - application/json
钱包总价值
Example:
"1000000"
总盈亏(美元)
Example:
"1000000"
钱包余额详情
代币合约地址
Example:
"So11111111111111111111111111111111111111112"
代币数量
Example:
"2675.098457775"
代币美元价值
Example:
"366908.31721324675"
代币名称
Example:
"Solana"
代币符号
Example:
"SOL"
代币图标链接
Example:
"https://solana.com/images/solana-logo.png"
代币价格(单位:SOL)
Example:
"137.15"
代币价格(单位:USD)
Example:
"137.15"
24小时价格变化比率
Example:
"5.23"
未实现盈亏(美元)
Example:
"123.45"
未实现盈亏率
Example:
"12.34"
开仓时间
Example:
"1741780466000"
平仓时间
Example:
"1741780466000"
买入交易次数
Example:
10
买入代币总量
Example:
"1500"
买入总金额(美元)
Example:
"1845"
卖出交易次数
Example:
5
卖出代币总量
Example:
"500"
卖出总金额(美元)
Example:
"615"
平均买入价格
Example:
"1.23"
平均卖出价格
Example:
"1.23"
已实现盈利(美元)
Example:
"1234.56"
已实现盈利比率
Example:
"12.34"
总实现盈亏(美元)
Example:
"169.12"
总实现盈亏率
Example:
"16.91"
此页面对您有帮助吗?
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"
}
]
}