Silverfin

The Silverfin Developer Hub

Welcome to the Silverfin developer hub. You'll find comprehensive guides and documentation to help you start working with Silverfin as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

Methods

Method

Return type

Description

starred
assets
liabilities
revenues
expenses
income
equities

accounts drop

Filters the accounts and returns a new accounts drop with only these accounts

count

integer

the amount of account drops in the accounts drop

credit_value

decimal

The sum of all credit values for all accounts in this accounts drop for this period

debet_value

decimal

The sum of all debet values for all accounts in this accounts drop for this period

details (deprecated)

details drop

A details drop of all details of all selected accounts

first

account drop

returns the first account drop of the accounts drop

include_zeros

accounts drop

By default an accounts drop doesn't include accounts with a zero balance. Calling include_zeros returns an accounts drop that includes all accounts

name

string

Returns the name of the first account in this drop

opening_value

decimal

The sum of all opening values for all accounts in this accounts drop for this period

return_values_in_millions

accounts drop

The values of the account drops in the created accounts drop will be shown in millions

return_values_in_ones

accounts drop

The values of the account drops in the created accounts drop will be shown in ones

return_values_in_thousands

accounts drop

The values of the account drops in the created accounts drop will be shown in thousands

value

decimal

The sum of all values for all accounts in this accounts drop for this period

Starred, assets, liabilities, revenues, expenses, income, equities

Create accounts drop with group of accounts:

{% for account in period.accounts.expenses %}
{{ account.number }}
{{ account.asset_or_expense }}
{{ account.id }}
...
{% endfor %}

Create string with group of accounts:

{{ period.accounts.expenses | map:"number" | join:"," }}
Output
Create accounts drop with group of accounts: 

61120 
true 
19327110  

61140  
true  
19327111 

…  

Create string with group of accounts: 

61120,61140,61300,61320,61321,61520,618001,618002,61810,61900,61910,61920,61930,61940,63000,65900,694000 

count, credit value, debet value

Show sum of all requested accounts: 

{{ period.accounts.count }}
{{ period.accounts.credit_value }}
{{ period.accounts.debet_value }}

Show all requested accounts separately : 

{% for account in period.accounts %}
{{ account.credit_value }}
{% endfor %}
Output
Show sum of all requested accounts:

Count 		: 34
Credit value 	: -1328589.47
Debet value	: 1328589.47

Show value of the requested accounts separately :

-18600.0
-500.0
-1000.0

Return values in thousands, return_values_in_ones, return_values_in_thousands

{% capture header %}|-----|-----|-----:{% newline %}{% endcapture %}
{% assign accounts = #619 %}

{% stripnewlines %}
{{ header }}
{% for account in accounts.return_values_in_millions  %}
|{{ account.number }}
|{{ account.name }}
|{{ account.value | currency }}{% newline %}
{% endfor %}

{{ header }}
{% for account in accounts.return_values_in_ones %}
|{{ account.number }}
|{{ account.name }}
|{{ account.value | currency }}{% newline %}
{% endfor %}

{{ header }}
{% for account in accounts.return_values_in_thousands  %}
|{{ account.number }}
|{{ account.name }}
|{{ account.value | currency }}{% newline %}
{% endfor %}

{% endstripnewlines %}

Special method: range

It's possible to add any given range of account numbers to created a new accounts drop with only those accounts.

For example:

period.accounts.6 will return an accounts drop with only the accounts that have an account number starting with a 6

Updated about a year ago

Accounts


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.