Warning! Construction underway! Amatino is in an 'alpha' state. Not all features are operational. See roadmap

Primary
Account
Entity
Transaction
Derived
Balance
Ledger
Performance
Object
Retrieve
Recursive Balance
Recursive Ledger
Tree
Ancillary
Custom Unit
Entry
Global Unit
Global Unit List
Ledger Row
Session
Side
Tx Version List
Tree Node
Type
User

Position

Positions are hierarchical collections of Account balances describing the financial position of an Entity at a point in time. They are generic representations of popular accounting constructs better known as a 'Balance Sheet', 'Statement of Financial Position', or 'Statements of Assets, Liabilities and Owner's Equity

Positions are jurisdiction agnostic, and obey simple double-entry accounting rules. They list asset, liability, and equity Accounts, each nesting its own children.

You can retrieve Positions denominated in arbitrary Global Unit or Custom Unit. When a particular denomination gives rise to an unrealised gain or loss, Amatino will automatically calculate that gain or loss and include it as a top-level account in the returned Position.

Positions may also be retrieved to an arbitrary depth. Depth in the Position context is the number of levels down the Account hierarchy Amatino should go when retrieving the Position. For example, if a top-level Account has child accounts three layers deep, then specifying a depth of three will retrieve all those children.

Regardless of the depth you specify, Amatino will calculate recursive balances for all Accounts at full depth.

The Position Object

Position objects are returned with the following structure

Root Type

JSON Object

Object Structure

description The identifer of the Entity this Performance describes
key "entity_id"
example "oB3cjSNKXklkJ4Tb"
type JSON String
description Time of the Tree balance, in the format YYYY-MM-DD_HH24:MI:SS.US, in UTC.
key "balance_time"
example "2017-01-01_17:22:16.40288"
type JSON String or JSON
description Time that this Position was computed, in the format YYYY-MM-DD_HH24:MI:SS.US, in UTC
key "generated_time"
example "2018-05-02_05:01:54.72941"
type JSON String
description The id of the global unit in which this Tree Balance is denominated, if applicable
key "global_unit_denomination"
example 5
type JSON Number or JSON Null
description The id of the custom unit in which this Tree is denominated, if applicable.
key "custom_unit_denomination"
example null
type JSON Number or JSON Null
example See Tree Nodes
description A list of Tree Node objects representing asset Accounts
key "assets"
list objects Tree Node
type JSON Array
example See Tree Nodes
description A list of Tree Node objects representing liability Accounts
key "liabilities"
list objects Tree Node
type JSON Array
example See Tree Nodes
description A list of Tree Node objects representing equity Accounts
key "equities"
list objects Tree Node
type JSON Array
description The maximum Account depth to which this Position recurses
key "depth"
example 3
type JSON Number

Retrieve Position

API Path /positions
HTTP Method GET
Description Descr. Retrieve a Position

Required Headers

Key X-Signature
Value Your Session signature
Example "yxATCPRKAAXHNiPctNQPHEGGVJF"...
Key X-Session-ID
Value An an integer Session ID
Example 7449059267091272858

Required URL Parameters

Key entity_id
Type string
Description Descr. The entity id of the Entity for which you wish to retrieve a Position
Example oB3cjSNKXklkJ4Tb
Repeatable No

Required JSON Data

Root type

Object Structure

description Time of the Tree balance, in the format YYYY-MM-DD_HH24:MI:SS.US, in UTC. Specify null for balance at request time.
key "balance_time"
example "2017-01-01_17:22:16.40288"
type JSON String or JSON Null
description The id of the global unit denomination in which you would like to view the Tree. Specify either global or custom unit denomination.
key "global_unit_denomination"
example 5
source /units/list
type JSON Number or JSON Null
description The id of the custom unit in which you would like to view the Ledger, if desired. Specify either global or custom unit denomination
key "custom_unit_denomination"
example null
source /custom_units/list
type JSON Number or JSON Null
description The number of levels of Accounts you wish the Position to include. Specify null for full depth.
example 3
max value 4096
key "depth"
min value 1
type JSON Number or JSON Null

Returns

Root Type

JSON Object

Object

Position