Ticks

Molecule supports intraday pricing. In other words, the system can store multiple prices of the same mark level, posted throughout the day. In Molecule terms, these are called Ticks. You don't have to use the Ticks model directly to benefit from its functionality.

How it works

Molecule's Marks API supports an attribute, effective_at, that, when included in the payload of a POST request or a query parameter in a GET request, will trigger the use of the intraday pricing model. Let's look at some examples below.

Examples

Making POST requests to /api/v2/marketdata/marks (see API Documentation) with the example payloads below would result in each of these marks getting saved separately, even though they are marks for the same product, as_of, and contract.

## First POST
{
'product': 'GBTC',
'as_of': '2022-05-04',
'contract': '2022-05-04',
'value': 38783.38,
'effective_at': '2022-05-04 15:00:00'
}

## Second POST
{
'product': 'GBTC',
'as_of': '2022-05-04',
'contract': '2022-05-04',
'value': 38759.38,
'effective_at': '2022-05-04 15:15:00'
}

## Third POST
{
'product': 'GBTC',
'as_of': '2022-05-04',
'contract': '2022-05-04',
'value': 38772.128,
'effective_at': '2022-05-04 15:30:00'
}

## Fourth POST
{
'product': 'GBTC',
'as_of': '2022-05-04',
'contract': '2022-05-04',
'value': 38899.78,
'effective_at': '2022-05-04 15:45:00'
}

These intraday marks can be created by including the query parameter effective_at in a GET request to the same URL.  For products flagged as spot products, the request will have special handling that will return the mark nearest to the effective_at query parameter.


How did we do?