Skip to main content

The Account Object

When Horizon returns information about an account, it uses the following format:

  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • idstring

    A unique identifier for this account.

  • account_idstring

    This account's public key encoded in a base32 string representation.

  • sequencenumber

    This account's current sequence number. For use when submitting this account's next transaction.

  • sequence_ledgernumber

    The unsigned 32-bit ledger number of the sequence number's age.

  • sequence_timestring

    The unsigned 64-bit UNIX timestamp of the sequence number's age.

  • subentry_countnumber

    The number of subentries on this account.

  • home_domainstring

    The domain that hosts this account's stellar.toml file.

  • last_modified_ledgernumber

    The ID of the last ledger that included changes to this account.

  • num_sponsoringnumber

    The number of reserves sponsored by this account.

  • num_sponsorednumber

    The number of reserves sponsored for this account.

  • sponsorstring (optional)

    The account ID of the sponsor who is paying the reserves for this account.

  • thresholdsobject

    Operations have varying levels of access. This field specifies thresholds for different access levels, as well as the weight of the master key.

    Show child attributes
    • low_thresholdnumber

      The weight required for a valid transaction including the Allow Trust and Bump Sequence operations.

    • med_thresholdnumber

      The weight required for a valid transaction including the Create Account, Payment, Path Payment, Manage Buy Offer, Manage Sell Offer, Create Passive Sell Offer, Change Trust, Inflation, and Manage Data operations.

    • high_thresholdnumber

      The weight required for a valid transaction including the Account Merge and Set Options operations.

  • flagsobject

    Flags denote the enabling/disabling of certain asset issuer privileges.

    Show child attributes
    • auth_immutableboolean

      If set to true, none of the following flags can be changed.

    • auth_requiredboolean

      If set to true, anyone who wants to hold an asset issued by this account must first be approved by this account.

    • auth_revocableboolean

      If set to true, this account can freeze the balance of a holder of an asset issued by this account.

    • auth_clawback_enabledboolean

      If set to true, trustlines created for assets issued by this account have clawbacks enabled.

  • balancesobject

    The assets this account holds.

    Show child attributes
    • balancestring

      The number of units of an asset held by this account.

    • buying_liabilitiesstring (optional)

      The sum of all buy offers owned by this account for this asset.

    • selling_liabilitiesstring (optional)

      The sum of all sell offers owned by this account for this asset.

    • limitnumber (optional)

      The maximum amount of this asset that this account is willing to accept. Specified when opening a trustline.

    • asset_typestring

      Either native, credit_alphanum4, credit_alphanum12, or liquidity_pool_shares.

    • asset_codestring (optional)

      The code for this asset.

    • asset_issuerstring (optional)

      The Stellar address of this asset's issuer.

    • sponsorstring (optional)

      The account ID of the sponsor who is paying the reserves for this trustline.

  • signersarray of objects

    The public keys and associated weights that can be used to authorize transactions for this account. Used for multi-sig.

    Show child attributes
    • public_keystring

      REMOVED in 0.17.0: USE key INSTEAD.

    • weightnumber

      The numerical weight of a signer. Used to determine if a transaction meets the threshold requirements.

    • sponsorstring (optional)

      The account ID of the sponsor who is paying the reserves for this signer.

    • keystring

      A hash of characters dependent on the signer type.

    • typestring

      The type of hash for this signer.

      Show child attributes
      • ed25519_public_key

        A normal Stellar public key.

      • sha256_hash

        The SHA256 hash of some arbitrary x. Adding a signature of this type allows anyone who knows x to sign a transaction from this account. Note: Once this transaction is broadcast, x will be known publicly.

      • preauth_tx

        The hash of a pre-authorized transaction. This signer is automatically removed from the account when a matching transaction is properly applied.

  • dataobject

    An array of account data fields.