diff --git a/how-to/get-balance.md b/how-to/get-balance.md index 61c258d..318e1ac 100644 --- a/how-to/get-balance.md +++ b/how-to/get-balance.md @@ -18,30 +18,36 @@ Users can check their account balance with the given command. It returns the dat {% tabs %} {% tab title="JS SDK" %} + ```javascript -const getBalance = async() => { +const getBalance = async () => { /* @param {string} apiKey - your api key. */ - const apiKey = 'YOUR_API_KEY'; + const apiKey = "YOUR_API_KEY"; const balance = await lighthouse.getBalance(apiKey); - + /* Sample Response (Unit is Bytes) {data: { dataLimit: 687194767360, dataUsed: 7012827847 }} */ -} +}; ``` + {% endtab %} {% tab title="API" %} + ```bash -curl https://api.lighthouse.storage/api/user/user_data_usage?publicKey= +curl -H 'Authorization: Bearer API_KEY' https://api.lighthouse.storage/api/user/user_data_usage ``` + {% endtab %} {% tab title="CLI" %} + ```bash lighthouse-web3 balance ``` + {% endtab %} {% endtabs %}