Token Management API
Get Specific Token
Retrieves details for a specific token by ID.
Endpoint
http
GET /api/wallet/{wallet}/token/{token}Parameters
wallet(integer): Wallet IDtoken(integer): Token ID
Response
json
{
"status": "success",
"message": "Wallet token fetched successfully",
"data": {
"id": 1,
"name": "Ethereum",
"symbol": "ETH",
"decimals": 18,
"is_native": true,
"is_active": true,
"is_testnet": false,
"contract": "0x0000000000000000000000000000000000000000",
"balance": "1.23456789",
"last_balance": "1.23456789",
"created_at": "2024-01-01 00:00:00",
"updated_at": "2024-01-01 00:00:00"
}
}Example Request
bash
curl -H "Authorization: Bearer {token}" \
https://zafira-app.vratts.com/api/wallet/1/token/1Token Model Details
Fields
id(integer): Unique token identifiername(string): Token display namesymbol(string): Token symbol (e.g., ETH, USDC)decimals(integer): Token decimal placesis_native(boolean): Whether token is native to the networkis_active(boolean): Whether token is activeis_testnet(boolean): Whether token is for testnetcontract(string): Token contract addresscreated_at(datetime): Token creation timestampupdated_at(datetime): Last update timestamp
Hidden Fields (for security)
wallet_id: Associated wallet ID
Special Notes
contractdefaults to0x0000000000000000000000000000000000000000for native tokensbalanceandlast_balancefields come from theWalletBalancemodel- Token information is automatically fetched from blockchain when added
Error Handling
Common Errors
Token Not Found (404)
json
{
"status": "error",
"message": "Token not found",
"data": null
}Unauthorized Access (401)
json
{
"status": "error",
"message": "Unauthenticated",
"data": null
}Next Steps
- Wallet Management - Return to wallet management
- Transaction Management - Handle token transactions
- Charge Management - Create charges with tokens