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
Recursive Ledger
Tree
Ancillary
Custom Unit
Entity List
Entry
Global Unit
Global Unit List
Ledger Row
Object
Retrieve
Create
Delete
Session
Side
Tx Version List
Tree Node
Type
User
User List

Price

A Price is the number of units equal in value to a single denominating unit. For example, the price of one U.S. Dollar might be 0.86 Euros. Prices may retrieved in any Global Unit or Custom Unit, and denominated in any Global Unit or Custom Unit. Custom Unit Prices may only be denominated in Custom Units from within the same Entity.

You need not have supplied explicit prices for a given pairing, Amatino will derive prices from available data. For example, you may have supplied price data for Bitcoin in U.S. Dollars, but wish to retrieve the price of a Bitcoin in Euros.

Prices may be created for any Custom Unit. Global Unit prices are constants, and prices may only be retrieved for Global Units. When creating a Custom Unit Price, the Price may be denominated in any Global Unit, or in any Custom Unit for which you have previously supplied at least one Price.

When calculating Prices for retrieval, Amatino looks for the most recent available data less than or equal to the date of the Price. For example, if you supply prices for a Custom Unit on 23 Jan 2018 and 25 Jan 2018, and then request a Price dated at 24 Jan 2018, Amatino will use the 23 Jan 2018 data.

All Global Unit Prices served by Amatino come courtesy of the European Central Bank (ECB).

The Price Object

The Amatino API returns Price objects with the following structure

Root Type

JSON Object

Object Structure

type JSON Number or JSON Null
example 5
source /units/list
key "global_unit_id"
description Integer identifier of the Global Unit this Price describes, or null if this Price describes a Custom Unit.
type JSON Number or JSON Null
example 42
key "custom_unit_id"
description Integer identifier of the Custom Unit this Price describes, or null if this Price describes a Global Unit.
type JSON Number or JSON Null
example 5
source /units/list
key "denomination_global_unit_id"
description Integer identifier of the Global Unit denominating this Price, or null if this Price is denominated by Custom Unit.
type JSON Number or JSON Null
example 42
key "denomination_custom_unit_id"
description Integer identifier of the Custom Unit denominating this Price, or null if this Price is denominated by a Global Unit.
type JSON String
example 42.00
key "magnitude"
description The number of priced units equal in value to one denominating unit
type JSON String
example "2018-05-02_05:01:54.72941"
key "price_time"
description Time at which this Price holds, in the format YYYY-MM-DD_HH24:MI:SS.US
type JSON String
example "2018-05-02_05:01:54.72941"
key "generated_time"
description Time that this Price was computed, in the format YYYY-MM-DD_HH24:MI:SS.US

Retrieve Price

API Path /prices
HTTP Method GET
Description Descr. Retrieve a Price or set of Prices

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 in which you wish to retrieve Prices
Example oB3cjSNKXklkJ4Tb
Repeatable No

Required JSON Data

Root type

JSON Array

Max Array Length

10

Object Structure

type JSON Number or JSON Null
example 5
source /units/list
key "global_unit_id"
description Integer identifier of the Global Unit you wish to price, or null if you wish to wish to price a Custom Unit.
type JSON Number
example 42
key "custom_unit_id"
description Integer identifier of the Custom Unit you wish to price.
type JSON Number or JSON Null
example 42
source /units/list
key "denomination_global_unit_id"
description Integer identifier of the Global Unit denomination you wish to use, or null if you wish to use a Custom Unit.
type JSON Number or JSON Null
example 42
key "denomination_custom_unit_id"
description Integer identifier of the Custom Unit denomination you wish to use, or null if you wish to use a Global Unit.
type JSON String
example "2017-01-17_17:22:16.51245"
key "price_time"
description Time at which the Price should hold, in the format YYYY-MM-DD_HH24:MI:SS.US

Returns

Root Type

JSON Array

Object

Price

Create Price

API Path /prices
HTTP Method POST
Description Descr. Create a new Price or Prices

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 in which you wish to record Prices
Example oB3cjSNKXklkJ4Tb
Repeatable No

Required JSON Data

Root type

JSON Array

Max Array Length

10

Object Structure

type JSON String
example "2017-01-17_17:22:16.51245"
key "price_time"
description Time at which the Price holds, in the format YYYY-MM-DD_HH24:MI:SS.US
type JSON Number
example 42
key "custom_unit_id"
description The ID of the Custom Unit this Price should describe.
type JSON Number or JSON Null
example null
source /custom_units/list
key "denomination_custom_unit_id"
description Integer identifier of the Custom Unit denomination you wish to use, or null if this Price is denominated by a Global Unit.
type JSON Number or JSON Null
example 5
source /units/list
key "denomination_global_unit_id"
description Integer identifier of the Global Unit denomination you wish to use, or null if you wish to use a Custom Unit.

Returns

Root Type

JSON Array

Object

Price

Delete Price

API Path /prices
HTTP Method DELETE
Description Descr. Delete a Price or Prices

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 in which you wish to delete Prices
Example oB3cjSNKXklkJ4Tb
Repeatable No

Required JSON Data

Root type

JSON Array

Max Array Length

10

Object Structure

type JSON Number
example 42
key "custom_unit_id"
description The ID of the Custom Unit for which you wish to delete a Price.
type JSON String
example "2017-01-17_17:22:16.51245"
key "price_time"
description Time of the Price you wish to delete, in the format YYYY-MM-DD_HH24:MI:SS.US

Returns

Root Type

JSON Array

Object

Price