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
Price
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

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

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

type JSON String or JSON Null
key "balance_time"
example "2017-01-01_17:22:16.40288"
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.
type JSON Number or JSON Null
source /units/list
key "global_unit_denomination"
example 5
description The id of the global unit denomination in which you would like to view the Tree. Specify either global or custom unit denomination.
type JSON Number or JSON Null
source /custom_units/list
key "custom_unit_denomination"
example 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
min value 1
example 3
description The number of levels of Accounts you wish the Position to include. Specify null for full depth.
max value 4096
type JSON Number or JSON Null
key "depth"

Returns

Root Type

JSON Object

Object

Position