Token Approvals
getApprovals
Scans ERC-20 allowances for known DeFi spenders against common tokens per chain. Does not scan all approvals.
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "getApprovals",
"params": {
"chain": "ethereum",
"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"blockHeight": 19834521
},
"id": 1
}'import { Spectrum } from '@spectrumnodes/sdk';
const spectrum = new Spectrum({ api: 'https://your-endpoint.simplystaking.xyz/YOUR_API_KEY/' });
const result = await spectrum.defi.getApprovals('ethereum', '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045');
console.log(result);{
"jsonrpc": "2.0",
"result": {
"data": {
"chain": "ethereum",
"address": "0xd8dA6BF...",
"blockHeight": 19834521,
"approvals": [
{
"token": {
"symbol": "USDC",
"address": "0xA0b8..."
},
"spender": {
"name": "Uniswap V3 Router",
"address": "0x68b3..."
},
"allowance": "unlimited",
"isUnlimited": true
}
]
}
},
"id": 1
}Spenders
Uniswap V3 RouterUniswap V4 Universal RouterAave V3 PoolAave V2 Lending Pool1inch V6 Router
Tokens Checked
USDCUSDTDAIWETHWBTCLINK
Parameters
| Name | Required | Description |
|---|---|---|
| chain | yes | Network slug |
| address | yes | Wallet address to scan e.g. 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 |
| blockHeight | no | Historical EVM block number (archive nodes only) e.g. 19834521 |
Response Fields
| Field | Type |
|---|---|
data | object |
chain | string |
address | string |
blockHeight | integer |
approvals | object[] |
token | object |
symbol | string |
address | string |
spender | object |
name | string |
address | string |
allowance | string |
isUnlimited | boolean |
Supported Networks
EthereumPolygonBNB ChainOptimismBaseAvalancheArbitrumGnosisMoonbeamLineaHyperliquidBerachainMonadScrollPlasmaX Layer
getApprovalsRevoke
Returns an unsigned ERC-20 approve(spender, 0) transaction to revoke a specific token approval. Does not broadcast.
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "getApprovalsRevoke",
"params": {
"chain": "ethereum",
"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"spender": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"
},
"id": 1
}'import { Spectrum } from '@spectrumnodes/sdk';
const spectrum = new Spectrum({ api: 'https://your-endpoint.simplystaking.xyz/YOUR_API_KEY/' });
const result = await spectrum.defi.getRevokeTransaction('ethereum', '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', {
token: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
spender: '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45'
});
console.log(result);{
"jsonrpc": "2.0",
"result": {
"data": {
"to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"from": "0xd8dA6BF...",
"data": "0x095ea7b3...0000",
"value": "0x0"
}
},
"id": 1
}Parameters
| Name | Required | Description |
|---|---|---|
| chain | yes | Network slug |
| address | yes | Wallet address (tx.from) e.g. 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 |
| token | yes | Token contract address e.g. 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
| spender | yes | Spender contract address to revoke e.g. 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45 |
Response Fields
| Field | Type |
|---|---|
data | object |
to | string |
from | string |
data | string |
value | string |
Supported Networks
EthereumPolygonBNB ChainOptimismBaseAvalancheArbitrumGnosisMoonbeamLineaHyperliquidBerachainMonadScrollPlasmaX Layer