DocsFQL syntax reference
On this page

Account and wallet reference

Look up account, currency, wallet and transaction values.

Before you begin: Data roots reference.

Auth Data

Use $auth for the current user:

FQL state configuration

Add this configuration inside your page’s {STATE} declaration. Inspect state shows its configuration; live queries and saved data run against your local site. Try a complete FQL page →

$auth contains the system-managed account envelope created by Frontbacked.signUp() and refreshed by Frontbacked.signIn(). System fields such as id, createdOn, and updatedOn are at the root. Custom user data saved by Frontbacked.updateUserData() is under $auth.data, such as $auth.data.phone and $auth.data.country.

Currency Data

Use $currency.value to read the site owner's selected platform currency. If no currency has been selected yet, it resolves to USD.

index.html

Wallet Data

Use $wallet for the signed-in user's wallet balances. $wallet.default reads the balance for the current platform currency, so a site using NGN can render the user's NGN balance without hardcoding the currency key.

index.html

If the user has no stored balance yet, missing wallet values resolve to 0.

Transaction Data

Use $transactions to render the current user's site transactions:

index.html

Use requestedAmount and requestedCurrency for the amount the site asked the user to pay. Use paidAmount and paidCurrency for the actual method amount after conversion, including crypto payments.

Transaction list selectors use special state keys such as $list, $where, $order, $limit, and $page.

Continue with Selectors and aggregates reference.