Get your wallet balance
curl --request GET \
--url https://api.staging.blackbird.xyz/flynet/v1/balanceconst options = {method: 'GET'};
fetch('https://api.staging.blackbird.xyz/flynet/v1/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET'};
fetch('https://api.staging.blackbird.xyz/flynet/v1/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Rewards
Get your wallet balance
GET
/
balance
Get your wallet balance
curl --request GET \
--url https://api.staging.blackbird.xyz/flynet/v1/balanceconst options = {method: 'GET'};
fetch('https://api.staging.blackbird.xyz/flynet/v1/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET'};
fetch('https://api.staging.blackbird.xyz/flynet/v1/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Returns your app’s own FLY wallet balance — the wallet that
POST /issue_reward draws from — alongside its
USD equivalent. Check it before issuing rewards to make sure the wallet is
funded.
Auth: API key in X-API-Key. The key must carry the read:balance scope.
Example
curl "https://api.staging.blackbird.xyz/flynet/v1/balance" \
-H "X-API-Key: $API_KEY"
Response
{
"id": "3f1c6d8e-0f12-4a5b-8c9d-1e2f3a4b5c6d",
"object": "account_balance",
"owner_id": "2c8f0e5a-1d4b-4c9e-9f2a-7b3c6d8e0f12",
"owner_type": "flynet_merchant",
"balance": { "value": "2500000000000000000", "currency": "fly" },
"balance_usd": { "value": 250, "currency": "usd" }
}
Tasting note —
balance.value is a big-integer string in FLY’s smallest
unit. Parse it with a big-integer type, never a float, or you will silently
lose precision. balance_usd.value is integer cents (250 = $2.50).| Field | Type | Notes |
|---|---|---|
balance | object | FLY balance: value (smallest-unit big-integer string) and currency. |
balance_usd | object | USD equivalent: value (integer cents) and currency. |
owner_id | UUID | The owning wallet — your flynet_merchant_id. |
owner_type | string | flynet_merchant for an app wallet. |