Skip to content

Rosetta account/balance API does not return the correct balance #2214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
crustywhale opened this issue Jan 30, 2025 · 0 comments
Closed

Rosetta account/balance API does not return the correct balance #2214

crustywhale opened this issue Jan 30, 2025 · 0 comments

Comments

@crustywhale
Copy link

crustywhale commented Jan 30, 2025

See a couple examples below, and compare to the explorer on testnet.


curl --location 'https://<testnet>/rosetta/v1/account/balance?network_identifier=testnet&blockchain=stacks' --header 'Content-Type: application/json' --data '{
  "account_identifier": {
    "address": "ST2TFVBMRPS5SSNP98DQKQ5JNB2B6NZM91C4K3P7B"
  }
}'
Response:
{
    "block_identifier": {
        "index": 118712,
        "hash": "0xd548e71172a56ac8833b66b9c6c48eb2f298292329aacb9fddf751bd9e64ca84"
    },
    "balances": [
        {
            "value": "-10716000",
            "currency": {
                "symbol": "STX",
                "decimals": 6
            }
        }
    ],
    "metadata": {
        "sequence_number": 36252
    }
}

curl --location 'https://<testnet>/rosetta/v1/account/balance?network_identifier=testnet&blockchain=stacks' --header 'Content-Type: application/json' --data '{
  "account_identifier": {
    "address": "ST119XW0ZKZFM2QQNDA2EJTTMQN87N08EC3J9KGKV"
  }
}'

Response:

{
    "block_identifier": {
        "index": 118714,
        "hash": "0x1966821be68325030ec9a39632d2fbf2a9e0c6f517c01d6b9cdf23fa84a445d9"
    },
    "balances": [
        {
            "value": "0",
            "currency": {
                "symbol": "STX",
                "decimals": 6
            }
        }
    ],
    "metadata": {
        "sequence_number": 0
    }
}
@github-project-automation github-project-automation bot moved this to 🆕 New in API Board Jan 30, 2025
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in API Board Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant