Legacy Queries & Mutations
The following queries have been deprecated and may become inaccessible in the future. For guidance on which alternative queries to use instead, please refer to each deprecated query's deprecation description in the API Schema or Sandbox.
Balance Computation
Token and app balances no longer require prior computation on the new portfolioV2
query. This updated endpoint eliminates the need for separate balance computation jobs and provides enhanced functionality. The original portfolio
query will continue to require computation jobs but we recommend migrating to portfolioV2
.
computeTokenBalances
Initiates a job to compute token balances for a wallet.
The input type for both mutations is PortfolioInput
:
input PortfolioInput {
"""The wallet addresses for which to fetch balances"""
addresses: [Address!]!
"""The networks for which to fetch balances"""
networks: [Network!]
"""The app slugs for which to fetch balances"""
appIds: [String!]
flagAsStale: Boolean
}
Example Variables
{
"input": {
"addresses": ["Habp5bncMSsBC3vkChyebepym5dcTNRYeg2LVG464E96"],
"networks": ["BITCOIN_MAINNET", "SOLANA_MAINNET"]
}
}
Example Mutation
mutation ComputeTokenBalances($input: PortfolioInput!) {
computeTokenBalances(input: $input) {
jobId
}
}
Example Response
{
"data": {
"computeTokenBalances": {
"jobId": "38b53084-9e84-46fd-a5fc-e7463baba936"
}
}
}
computeAppBalances
Initiates a job to compute app balances for a wallet.
Example Variables
{
"input": {
"addresses": [
"0x123...", // EVM address being tracked for first time
"Habp5bncMSsBC3vkChyebepym5dcTNRYeg2LVG464E96" // Solana address
],
"networks": ["ETHEREUM_MAINNET", "SOLANA_MAINNET"]
}
}
Example Mutation
mutation ComputeAppBalances($input: PortfolioInput!) {
computeAppBalances(input: $input) {
jobId
}
}
Example Response
{
"data": {
"computeAppBalances": {
"jobId": "176d50a0-c42b-49b1-a263-c1c4a63d8a3c"
}
}
}
balanceJobStatus
Query the status of a balance computation job.
Example Variables
{
"jobId": "176d50a0-c42b-49b1-a263-c1c4a63d8a3c"
}
Example Query
query BalanceJobStatus($jobId: String!) {
balanceJobStatus(jobId: $jobId) {
jobId
status
}
}
Example Response
{
"data": {
"balanceJobStatus": {
"jobId": "176d50a0-c42b-49b1-a263-c1c4a63d8a3c",
"status": "completed"
}
}
}
Response Fields
Field | Description | Type |
---|---|---|
jobId | Unique identifier for the computation job | ID! |
status | Current status of the job | String! |
fungibleTokenBatch
Takes an array of token inputs (address
and network
pairs) and returns detailed information for multiple tokens in a single request. Returns the same data structure as fungibleToken
but for multiple tokens at once.
Example Variables
{
"tokens": [
{
"address": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"network": "BASE_MAINNET"
},
{
"address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
"network": "ETHEREUM_MAINNET"
},
{
"address": "0x00ef6220b7e28e890a5a265d82589e072564cc57",
"network": "BASE_MAINNET"
}
]
}
Arguments
Argument | Description | Type | Required |
---|---|---|---|
address | Token contract address | Address! | Yes |
network | Network where the token exists | Network! | Yes |
currency | Price currency (USD/ETH/BTC) | Currency! | Yes |
timeFrame | Time interval for price data | TimeFrame! | Yes |
first | Number of holders to fetch | Float! | Yes |
Fields
Field | Description | Type |
---|---|---|
id | Unique identifier for the token | ID! |
address | Contract address | Address! |
name | Token name | String! |
symbol | Token symbol | String! |
decimals | Number of decimals | Int! |
totalSupply | Total supply of the token | String |
credibility | Token credibility score | Float |
rank | Token rank | Int |
securityRisk | Security risk assessment | FungibleTokenSecurityRisk |
isHoldersSupported | Whether holder data is available | Boolean! |
imageUrl | Token logo URL | String! |
priceData | Detailed onchain market data | PriceData |
isVerified | Token verification status | Boolean! |
priceData Fields
Field | Description | Type |
---|---|---|
price | Current token price | Float! |
marketCap | Market capitalization | Float |
totalLiquidity | Total liquidity across all pairs | Float! |
totalGasTokenLiquidity | Native token liquidity | Float! |
priceChange5m | 5-minute price change percentage | Float |
priceChange1h | 1-hour price change percentage | Float |
priceChange24h | 24-hour price change percentage | Float |
priceTicks | Historical price data points | [PriceTick!]! |
historicalPrice | Price at a given timestamp | [HistoricalPrice!]! |
Enums
enum TimeFrame {
HOUR
DAY
WEEK
MONTH
YEAR
}
enum Currency {
USD
EUR
GBP
CAD
CNY
KRW
JPY
RUB
AUD
NZD
CHF
SGD
INR
BRL
ETH
BTC
HKD
SEK
NOK
MXN
TRY
}