Skip to main content

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.

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.

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
The integration supports multiple blockchain networks including Ethereum, Bitcoin, and many others available through CoinStats.

Setting up CoinStats

1

Get an API key

Obtain a CoinStats API key from CoinStats.
2

Add a connection

In Sure, navigate to account settings and add a new CoinStats connection. Enter your API key.
3

Link your assets

Choose one of the connection methods below to start syncing.

Connecting a wallet

Link a wallet by providing its address and selecting the blockchain network.
  1. Select Link wallet from the CoinStats connection page
  2. Choose the blockchain (e.g. Ethereum, Bitcoin, Polygon)
  3. Enter your wallet address
  4. Sure fetches token balances and creates an account for each token found
Once linked, Sure automatically syncs wallet balances on a recurring schedule.

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)
If a DeFi position is fully unstaked or no longer returned by the API, its balance is automatically set to zero.
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:
  1. Connect your CoinStats account to Sure
  2. Link your exchange accounts within CoinStats
  3. Sure will automatically sync:
    • Holdings from all connected exchanges
    • Transaction history
    • Real-time balance updates
  4. Charts for linked investment accounts are normalized to provide accurate portfolio views
The credential fields vary by exchange. Sure dynamically renders the required fields based on the exchange you select. Sensitive fields like secrets and passphrases use masked input.

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
Option 2: Store in family currency
  • 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

  1. No forex drift: Values are converted only once, preventing cumulative exchange rate errors
  2. Data integrity: Original values are always preserved
  3. Automatic updates: When you fix or update exchange rates, all cryptocurrency values update correctly without requiring a sync
  4. Consistency: Works the same way as other multi-currency accounts in Sure
  5. 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.
This is why USD storage is the preferred approach and will remain the standard for CoinStats integration.

Supported features

FeatureWalletsDeFiExchanges
Balance syncingYesYesYes
Transaction historyYesNoYes
Multiple tokens/positionsYesYesYes
Automatic periodic syncYesYesYes
Multiple blockchainsYesYesN/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