Lighter Get Account logo

Catalog action Lighter

Get Lighter account overview by L1 address or account index: account index(es), USDC collateral, available balance, and open perpetual positions with entry price, size, and PnL. Looks up all sub-accounts of an address in one call; falls back to the connected wallet when no address is given (Lighter account state is public, so any address can be queried). Ideal for: balance gates before trading, position monitoring, PnL alerts, and portfolio dashboards.

At a Glance

FieldValue
Action IDlighter-get-account
CategoryLighter
ConnectorNot required
Requires gasNo
Funds movementNone declared
Tagsperps, positions, balance, portfolio

Payload Schema

FieldTypeRequiredDescription
l1AddressstringNoEthereum L1 address (0x...) whose Lighter account(s) to read. Lighter account state is public, so any address can be queried. Omit to use the connected wallet's address.
accountIndexnumberNoExplicit Lighter account index (e.g. 733136) to read a single account directly. Takes precedence over l1Address and the connected wallet.

Result Schema

FieldTypeRequiredDescription
accountIndexesarrayYesAll Lighter account indexes matched by the lookup (an L1 address can own several sub-accounts). These indexes identify the account in every other Lighter operation.
truncatedbooleanNoTrue if the address has more sub-accounts than could be fetched.
accountsarrayYesMatched Lighter account(s) with balances and open positions

Examples

json
{ "type": "lighter-get-account", "payload": { "l1Address": "0x0000000000000000000000000000000000000000", "accountIndex": 1 }, "children": []}

Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.