Get wallet balances
curl --request GET \
--url https://flash.definitive.fi/v1/balances/{address} \
--header 'x-definitive-api-key: <api-key>'import requests
url = "https://flash.definitive.fi/v1/balances/{address}"
headers = {"x-definitive-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-definitive-api-key': '<api-key>'}};
fetch('https://flash.definitive.fi/v1/balances/{address}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"balances": [
{
"chain": "ethereum",
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC",
"tokenDecimals": 6,
"balance": "25.5",
"notional": "25.50",
"priceChange24h": "-0.0342",
"imageUrl": "<string>",
"isNative": true
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}Utilities REST
Get wallet balances
Fetch the token balances a wallet holds as a flat array, with chain on every row.
An EVM address returns balances across every EVM chain Flash supports; a Solana address returns Solana balances. Each row’s address and chain feed directly into POST /quote as targetAsset/contraAsset and targetChain/contraChain, and balance is in the same units as qty.
GET
/
balances
/
{address}
Get wallet balances
curl --request GET \
--url https://flash.definitive.fi/v1/balances/{address} \
--header 'x-definitive-api-key: <api-key>'import requests
url = "https://flash.definitive.fi/v1/balances/{address}"
headers = {"x-definitive-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-definitive-api-key': '<api-key>'}};
fetch('https://flash.definitive.fi/v1/balances/{address}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"balances": [
{
"chain": "ethereum",
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC",
"tokenDecimals": 6,
"balance": "25.5",
"notional": "25.50",
"priceChange24h": "-0.0342",
"imageUrl": "<string>",
"isNative": true
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}Authorizations
Your Definitive API key.
Path Parameters
Wallet address to look up. An EVM address returns balances across every EVM chain Flash supports; a Solana address returns Solana balances.
Example:
"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
Response
Balances returned successfully
Token balances across every chain the address covers. Tokens flagged as scams and tokens without a current price are not returned.
Show child attributes
Show child attributes