CoinStats is a third-party provider that allows you to sync cryptocurrency wallet balances, DeFi positions, exchange portfolios, and transactions into Sure. This integration uses the CoinStats OpenAPI to fetch data from multiple blockchain networks and centralized exchanges.Documentation Index
Fetch the complete documentation index at: https://sure-917046f5-docs-backup-restore-clarity.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
How it works
When you connect a crypto wallet through CoinStats, Sure syncs:- Wallet balances across multiple tokens
- DeFi positions including staking, liquidity pools, and yield farming positions associated with linked wallets
- Exchange portfolios from centralized exchanges
- Transaction history from wallets and exchanges
- Real-time price data for all holdings
Setting up CoinStats
Get an API key
Obtain a CoinStats API key from CoinStats.
Add a connection
In Sure, navigate to account settings and add a new CoinStats connection. Enter your API key.
Connecting a wallet
Link a wallet by providing its address and selecting the blockchain network.- Select Link wallet from the CoinStats connection page
- Choose the blockchain (e.g. Ethereum, Bitcoin, Polygon)
- Enter your wallet address
- Sure fetches token balances and creates an account for each token found
DeFi position discovery
When you link a wallet, Sure also queries the CoinStats DeFi API to discover staking, liquidity pool, and yield farming positions associated with that address. Each DeFi position is tracked as a separate crypto wallet account. DeFi accounts are named using the pattern TOKEN (Protocol Action), for example:ETH (Aave Staking)USDC (Uniswap Rewards)
DeFi discovery runs during every wallet sync. New positions are added automatically and inactive positions are zeroed out.
Connecting an exchange
CoinStats supports syncing portfolios from centralized cryptocurrency exchanges:- Connect your CoinStats account to Sure
- Link your exchange accounts within CoinStats
- Sure will automatically sync:
- Holdings from all connected exchanges
- Transaction history
- Real-time balance updates
- Charts for linked investment accounts are normalized to provide accurate portfolio views
Currency storage approach
All CoinStats accounts are stored in USD and will remain in USD. This design decision ensures data consistency and prevents exchange rate drift.Why USD storage?
There are two possible approaches for storing cryptocurrency values: Option 1: Store in USD (current implementation)- CoinStats data is stored in USD
- Values are converted to your family currency when displayed
- Works the same way as multi-currency accounts already do in Sure
- If you update exchange rates, values automatically update correctly without requiring a sync
- Original USD values are always preserved
- Convert cryptocurrency values to family currency during sync
- Problem: If currency provider is not set up or conversion fails, data is saved with a 1:1 exchange rate
- Once saved incorrectly, you lose the original value and cannot fix it later
- Creates data integrity issues
Benefits of USD storage
- No forex drift: Values are converted only once, preventing cumulative exchange rate errors
- Data integrity: Original values are always preserved
- Automatic updates: When you fix or update exchange rates, all cryptocurrency values update correctly without requiring a sync
- Consistency: Works the same way as other multi-currency accounts in Sure
- Reliability: No dependency on currency provider being available during sync
DeFi positions follow a slightly different path: USD balances from the API are converted to your family currency during sync for consistent portfolio reporting. If the exchange rate is unavailable, the value falls back to USD.
Supported features
| Feature | Wallets | DeFi | Exchanges |
|---|---|---|---|
| Balance syncing | Yes | Yes | Yes |
| Transaction history | Yes | No | Yes |
| Multiple tokens/positions | Yes | Yes | Yes |
| Automatic periodic sync | Yes | Yes | Yes |
| Multiple blockchains | Yes | Yes | N/A |
- Normalized charts: Investment charts are automatically normalized and linked across all CoinStats accounts
Limitations
- CoinStats integration is currently in beta
- Requires a valid CoinStats API key
- Subject to CoinStats API rate limits
- All values are stored in USD (see currency storage approach above)
- DeFi position discovery depends on CoinStats DeFi API coverage for each blockchain and protocol