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

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

Recursive Ledger

A Recursive Ledger is a list of Transactions from the perspective of a particular Account, and all the Transactions party to all child Accounts of that Account. Recursive Ledgers are ordered by Transaction time, and include a running Account Balance for every line.

If you request a Recursive Ledger in a unit other than the target Account native unit, or if child Accounts feature heterogenous units, Amatino will compute and return unrealised gains and losses. Find out more in the Unrealised Gains and Losses article

Amatino will return a maximum total of 1,000 Ledger Rows per retrieval request. If the Ledger you define spans more than 1,000 rows, it will be broken into pages you can retrieve seperately.

The Recursive Ledger Object

The Amatino API returns Recursive Ledger objects with the following structure

Root Type

JSON Object

Object Structure

description An integer identifier of the Account this Ledger describes
key "account_id"
example 42
type JSON Number
description Time at which the ledger window starts, in the format YYYY-MM-DD_HH24:MI:SS.US
key "start_time"
example "2017-01-01_17:22:16.00000"
type JSON String
description Time at which the ledger window ends, in the format YYYY-MM-DD_HH24:MI:SS.US
key "end_time"
example "2018-02-07_17:22:16.51245"
type JSON String
description A bool asserting that this is a Recursive Ledger. Always true
key "recursive"
example True
type JSON Boolean
description Time that this Ledger was computed, in the format YYYY-MM-DD_HH24:MI:SS.US
key "generated_time"
example "2018-05-02_05:01:54.72941"
type JSON String
description The id of the Global Unit in which this Ledger 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 Ledger is denominated, if applicable.
key "custom_unit_denomination"
example null
type JSON Number or JSON Null
description The page number covered by this ledger object
key "page"
example 2
type JSON Number
description The number of pages this Ledger covers, in total
key "number_of_pages"
example 3
type JSON Number
description True of the ledger presents oldest transactions first, false if newest first
key "ordered_oldest_first"
example true
type JSON Bool
example See Ledger Rows
description A list of Ledger Row objects
key "ledger_rows"
list objects Ledger Row
type JSON Array

Retrieve Recursive Ledger

API Path /accounts/ledger/recursive
HTTP Method GET
Description Descr. Retrieve a Recursive Ledger for an account or accounts

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 from which you wish to retrieve a Ledger
Example oB3cjSNKXklkJ4Tb
Repeatable No

Required JSON Data

Root type

JSON Array

Max Array Length

10

Object Structure

description The unique integer identifier of the Account for which you would like to retrieve a Recursive Ledger
key "account_id"
example 42
type JSON Number
description The time at which the Recursive Ledger will start. Specify JSON Null to start at the first Transaction
key "start_time"
example "2018-01-01_00:00:00.00000"
type JSON String or JSON Null
description The time at which the Recursive Ledger will end. Specify JSON Null to end at the last Transaction
key "end_time"
example "2018-12-31_00:00:00.00000"
type JSON String or JSON Null
description The page to retrieve. Specify JSON Null to retrieve the first page.
key "page"
example 2
type JSON Number or JSON Null
description The id of the Global Unit in which you would like to denominate the Recursive Ledger, if desired. Specify JSON Null both here and in the custom unit to retrieve the transaction in the target Account's native unit.
key "global_unit_denomination"
example 5
source /units/list
type JSON Number or JSON Null
description The id of the custom unit denomination in which you would like to view the Ledger, if desired. Specify JSON Null both here and in the custom unit to retrieve the Ledger in the target Account's native unit.
key "custom_unit_denomination"
example null
source /custom_units/list
type JSON Number or JSON Null
description Specify true to order the ledger oldest first, false to reverse.
key "order_oldest_first"
example false
type JSON Bool

Returns

Root Type

JSON Array

Object

Recursive Ledger