Skip to main content

User Balance

Fetch the current balance of an authenticated user.

Endpoint

GET https://api.metafide.io/v1/surge/games/user-balance

Query Parameters

ParameterTypeRequiredDescription
currencystringYesThe currency to fetch the balance for (e.g. USDC)
networkstringYesThe network to query (e.g. mainnet)

Headers

HeaderValue
Accept*/*
x-api-keyYour Metafide API key

Example Request

// Node 18+ has native fetch — no import needed

const url = 'https://api.metafide.io/v1/surge/games/user-balance?currency=USDC&network=mainnet';

const options = {
method: 'GET',
headers: {
'Accept': '*/*',
'x-api-key': 'metafide_11111111111111111111111111111',
},
};

try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}

Response

{
"userId": 1,
"balance": "1000",
"withdrawal_req": "none"
}

Response Fields

FieldTypeDescription
userIdnumberThe unique identifier of the authenticated user
balancestringThe current available balance in the requested currency
withdrawal_reqstringStatus of any ongoing withdrawal request. Returns none if there is no active withdrawal