Track a wallet address
const url = 'https://api.qeychain.xyz/api/wallets/track';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"address":"example","chains":["example"],"label":"example","owned_wallets":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.qeychain.xyz/api/wallets/track \ --header 'Content-Type: application/json' \ --data '{ "address": "example", "chains": [ "example" ], "label": "example", "owned_wallets": [ "example" ] }'Fetches all transactions for a wallet address from Zerion, runs cost basis calculations using FIFO method, and returns a summary with positions and tax information.
This is the main entry point for analyzing a wallet's tax situation.
Request Bodyrequired
Section titled “Request Bodyrequired”Request to track a new wallet address.
object
Wallet address (0x…)
Examplegenerated
{ "address": "example", "chains": [ "example" ], "label": "example", "owned_wallets": [ "example" ]}Responses
Section titled “Responses”Successful Response
Response after tracking a wallet.
object
Tracked wallet address
Number of transactions fetched
Whether all transactions were fetched
Current positions with cost basis
Current position with cost basis data.
object
Token symbol
Blockchain network
Current quantity held
Total cost basis
Average cost per unit
Number of open lots
Number of partially consumed lots
True if this position was detected on-chain (Zerion) but has no matching FIFO engine entry. Cost basis is unknown.
Tax calculation summary
object
Wallet address
Total realized gain/loss
Total short-term capital gains
Total short-term capital losses
Net short-term gain/loss
Total long-term capital gains
Total long-term capital losses
Net long-term gain/loss
Total losses disallowed due to wash sales
Number of wash sale events
Total number of taxable disposals
Total proceeds from disposals
Total cost basis used in disposals
Breakdown of income by type (airdrops, staking rewards, etc.).
object
Total airdrop income at FMV
Total staking reward income at FMV
Total mining reward income at FMV
Total interest income at FMV
Other income at FMV
Total income received (sum of all types)
Example
{ "positions": [ { "open_lots_count": 0, "partial_lots_count": 0, "is_zerion_only": false } ], "tax_summary": { "wash_sale_disallowed": "0", "wash_sale_count": 0, "income": { "airdrop": "0", "staking_reward": "0", "mining_reward": "0", "interest": "0", "other": "0", "total": "0" } }}Bad Request
Not Found
Validation Error
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}Internal Server Error
