curl --request GET \
--url https://api.example.com/{EP_STATEMENT_AVAILABLE_TOKEN}{
"data": {
"currency": {
"id": "<string>",
"name": "<string>",
"decimals": 123,
"allowTransfers": true,
"disabled": true,
"priority": 123
},
"quoteCurrency": {},
"amount": "<string>",
"estPrice": "<string>",
"estValue": "<string>"
},
"status": 123
}Retrieve detailed statement information for a specific token
curl --request GET \
--url https://api.example.com/{EP_STATEMENT_AVAILABLE_TOKEN}{
"data": {
"currency": {
"id": "<string>",
"name": "<string>",
"decimals": 123,
"allowTransfers": true,
"disabled": true,
"priority": 123
},
"quoteCurrency": {},
"amount": "<string>",
"estPrice": "<string>",
"estValue": "<string>"
},
"status": 123
}Retrieve detailed statement information for a specific cryptocurrency or token. This endpoint provides the available balance, current price, and estimated value for an individual token.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Crocantefinancial/crocante-pitch-frontend/llms.txt
Use this file to discover all available pages before exploring further.
{EP_STATEMENT_AVAILABLE_TOKEN}
%TOKEN placeholder in the endpoint URL is replaced with the specific token symbol (e.g., BTC, ETH, USDT).
"BTC", "ETH", "USDT", "SOL"pollIntervalMs parameterpollIntervalMs > 0Show Available Token Data
Show Currency
"BTC""Bitcoin"8"0.0083506""91141.05""761.08"200# Get Bitcoin statement
GET {EP_STATEMENT_AVAILABLE_TOKEN}/BTC
# Get Ethereum statement
GET {EP_STATEMENT_AVAILABLE_TOKEN}/ETH
# Get USDT statement
GET {EP_STATEMENT_AVAILABLE_TOKEN}/USDT
{
"data": {
"currency": {
"id": "BTC",
"name": "Bitcoin",
"decimals": 8,
"allowTransfers": true,
"disabled": false,
"priority": 3
},
"quoteCurrency": {
"id": "USDT",
"name": "Tether",
"decimals": 2,
"allowTransfers": true,
"disabled": false,
"priority": 3
},
"amount": "0.0083506",
"estPrice": "91141.05",
"estValue": "761.08"
},
"status": 200
}
{
"data": {
"currency": {
"id": "ETH",
"name": "Ethereum",
"decimals": 8,
"allowTransfers": true,
"disabled": false,
"priority": 2
},
"quoteCurrency": {
"id": "USDT",
"name": "Tether",
"decimals": 2,
"allowTransfers": true,
"disabled": false,
"priority": 3
},
"amount": "0.04256646",
"estPrice": "3143.105",
"estValue": "133.79"
},
"status": 200
}
import { z } from "zod";
import { AvailableTokenDataSchema } from "./availables-data";
export type AvailableTokenData = z.infer<typeof AvailableTokenDataSchema>;
export const availableTokenDataResponseSchema = z.object({
data: AvailableTokenDataSchema,
status: z.number(),
});
export type AvailableTokenDataResponse = z.infer<
typeof availableTokenDataResponseSchema
>;
// Formatted UI type
export type AvailablesDataItemUI = {
id: string;
name: string;
amount: string;
value: string;
};
import { useAvailableToken } from '@/services/hooks/use-available-token';
function TokenStatementComponent({ tokenSymbol }: { tokenSymbol: string }) {
const userId = "user-123";
const pollInterval = 30000; // Poll every 30 seconds
const { data: tokenData, isLoading, error } = useAvailableToken(
userId,
tokenSymbol,
pollInterval
);
if (isLoading) return <div>Loading {tokenSymbol} balance...</div>;
if (error) return <div>Error loading {tokenSymbol} balance</div>;
return (
<div>
<h1>{tokenData?.name} Statement</h1>
<p>Symbol: {tokenData?.id}</p>
<p>Amount: {tokenData?.amount}</p>
<p>Value: ${tokenData?.value}</p>
</div>
);
}
// Usage
<TokenStatementComponent tokenSymbol="BTC" />
<TokenStatementComponent tokenSymbol="ETH" />
// Raw API response is transformed to:
{
id: "BTC", // currency.id
name: "Bitcoin", // currency.name
amount: "0.0083506", // amount
value: "761.08" // estValue
}
Error: Available token not found for token: INVALID
function BitcoinBalance() {
const { data } = useAvailableToken(userId, "BTC", 30000);
return <div>BTC Balance: {data?.amount}</div>;
}
function TokenComparison() {
const { data: btc } = useAvailableToken(userId, "BTC", 30000);
const { data: eth } = useAvailableToken(userId, "ETH", 30000);
return (
<div>
<h2>Portfolio Comparison</h2>
<p>BTC Value: ${btc?.value}</p>
<p>ETH Value: ${eth?.value}</p>
</div>
);
}
import { useEffect } from 'react';
function BalanceMonitor({ token }: { token: string }) {
const { data } = useAvailableToken(userId, token, 5000); // Poll every 5s
useEffect(() => {
if (data) {
console.log(`${token} balance updated:`, data.amount);
// Trigger notifications or alerts based on balance changes
}
}, [data, token]);
return <div>{token}: {data?.amount}</div>;
}