Skip to content

Shared types

A number, an amount of currency, and where a change sits in a store's record. This is its data dictionary today: one entry for every field of its messages a plugin meets, saying what the field is for, what a value means and does not mean, what empty means, who fills it, its bounds and the operations a write must carry it on. Each entry is anchored by its name, the name a refusal's path resolves to and a declaration names, which never changes.

Its messages are declared in meridian/v1/amounts.proto, meridian/v1/journal.proto. A field's entry is the same whatever carries it: a typed operation's parameters take the entries of the message they are made from.

Decimal

meridian.v1.Decimal, a message.

high

integer · stable

Carries the upper half of a number's integer.

  • Means: the integer's upper 64 bits, signed: negative for a negative value; the integer is high times 2^64 plus low
  • Does not mean: a number on its own: high, low and scale are read together, never apart
  • Empty: 0 for a value whose integer fits in the lower 64 bits
  • Filled: as-reported
  • Unit: none: the upper 64 bits of the value's integer

low

integer · stable

Carries the lower half of a number's integer.

  • Means: the integer's lower 64 bits, unsigned
  • Does not mean: a number on its own, or a signed one
  • Empty: 0 is a value: the lower half of an integer that ends in it
  • Filled: as-reported
  • Unit: none: the lower 64 bits of the value's integer

scale

integer · stable

Says how many decimal places the integer carries.

  • Means: the places the value was stated with: the value is the integer times 10 to the minus scale, so 1.50 is 150 at scale 2 and stays 1.50; a value of more than 18 places is refused, never rounded
  • Does not mean: a precision the platform chose: nothing normalises it, and 1.5 and 1.50 are both kept as stated
  • Empty: 0 for a whole number
  • Filled: as-reported
  • Unit: decimal places
  • Bounds: from 0 to 18; past it, refused

Money

meridian.v1.Money, a message.

amount

Decimal · stable

Carries an amount of currency.

  • Means: the amount in the currency's major unit, whatever the source counted in: an amount read in cents is converted before it is sent
  • Does not mean: an amount in minor units, or one without its currency
  • Empty: never unset in an amount that is set: the amount is the Money
  • Filled: as-reported
  • Unit: the currency's major unit
  • Bounds: 0 to 18 decimal places; at most 38 significant digits; past it, refused
  • Required on: RecordHolding; RecordHoldingsStatement; RecordOpeningBalance; RecordBreak; RecordAccountFigures; ResolveBreak; RecordActivity; RecordPrices; RecordBars; RecordTrades; RecordQuotes; ProposeOrder; RecordOrder; RequestOrderChange; CreatePlacement; RequestPlacementChange; ReportPlacement; ReportExecution; ReportCharge; RecordOutcomes; BookOrder; CorrectBooking; RecordSleeveCross; RunJob; AnswerPriceBatch; RecordRates; ReportPlacementQuote; ProposeLifecycleEvents; RecordCorporateActions; RecordHoldings; RecordLifecycleEvent; RecordReportedFacts; RecordDerivedSeries; ResolveIdentifier

currency_code

text · stable

Names the currency an amount is in, where it has an ISO 4217 code.

  • Means: the ISO 4217 code, USD; from v18 a plugin may name a fiat currency by it alone, and core resolves it, dated, to the currency's cash instrument
  • Does not mean: a symbol or a currency's name; a pseudo-currency a source reports for an account's base, which a plugin converts to the base's code; a token's code (USDC, USDT), which is refused here
  • Empty: never empty on an amount that is set, before v18; from v18 empty for an asset with no ISO 4217 code, which instrument_id alone names
  • Filled: as-reported

instrument_id

identifier instrument · preview

Names the cash instrument an amount is in.

  • Means: the deployment's own ID for the asset's cash instrument, fiat and tokens alike: a USDT amount names USDT's instrument and is never a USD amount; both set must name the same asset, and neither set is refused
  • Does not mean: the instrument an amount prices: a price's subject is the row's
  • Empty: empty from a plugin that named a fiat currency by currency_code alone, which core resolves; never empty on what core keeps and answers
  • Filled: as-reported

UnitValue

meridian.v1.UnitValue, a message.

value

Decimal · preview

Carries a number that is not money.

  • Means: the number as the source stated it, in the unit beside it
  • Does not mean: a fraction where the unit is a percent: 3.87 percent is never 0.0387; an amount of currency, which is a Money
  • Empty: never unset in a value that is set: the number is the value
  • Filled: as-reported
  • Unit: the unit named by unit, in base units: 3.87 percent is 3.87
  • Bounds: 0 to 18 decimal places; at most 38 significant digits; past it, refused
  • Required on: RecordRates; RecordDerivedSeries; RecordHoldings; RecordReportedFacts; RecordStatistics; ProposeOrder; RecordPrices; RecordQuotes; RecordTrades; ReportExecution

unit

enum ValueUnit · preview

Says what a value counts, from a closed list.

  • Means: the value's unit
  • Does not mean: a currency: an amount of currency is a Money, never a UnitValue
  • Empty: unspecified is refused
  • Filled: as-reported
Value Means
VALUE_UNIT_UNSPECIFIED refused
VALUE_UNIT_PERCENT per cent: 3.87 is 3.87 per cent
VALUE_UNIT_BASIS_POINTS basis points, hundredths of a per cent
VALUE_UNIT_SHARES shares
VALUE_UNIT_CONTRACTS contracts
VALUE_UNIT_PRINCIPAL a face amount, in its currency's major unit
VALUE_UNIT_RATIO a ratio of two quantities, as stated
VALUE_UNIT_COUNT a count of things
VALUE_UNIT_DAYS days
VALUE_UNIT_INDEX an index level, its base period in index_base
VALUE_UNIT_UCUM a physical unit, named by ucum_code

index_base

text · preview

Says an index level's base period.

  • Means: the base period as its publisher states it: 2015=100
  • Does not mean: the index's name, which its subject's record holds
  • Empty: empty unless the unit is an index
  • Filled: as-reported

ucum_code

text · preview

Names a physical unit.

  • Means: the unit's UCUM code: Cel, [bbl_us]
  • Does not mean: a free-text unit, or one of the closed list's units
  • Empty: empty unless the unit is a physical unit
  • Filled: as-reported

JournalRef

meridian.v1.JournalRef, a message.

partition

text · stable

Names the partition a change was numbered in.

  • Means: the street store's partition, or one of the book's
  • Does not mean: an account: one partition numbers many accounts' changes
  • Empty: never empty on a change a store numbered
  • Filled: decided

sequence

integer · stable

Numbers a change in its partition.

  • Means: the partition's next number, taken in the change's own transaction, so the numbers have no holes
  • Does not mean: a count of one account's changes, or a time
  • Empty: never 0 on a change a store numbered
  • Filled: decided
  • Unit: changes in the partition

previous_sequence

integer · stable

Lets a reader of some accounts see a gap in its own.

  • Means: the number of the previous change the same row made for the same account
  • Does not mean: the partition's previous number, which another account's change may hold
  • Empty: 0 for the first change the row made for the account
  • Filled: decided
  • Unit: changes in the partition

ChangeCause

meridian.v1.ChangeCause, a message.

instance_id

identifier instance · stable

Names the plugin instance whose command caused a change.

  • Means: the instance that sent the command, as its sidecar stamped it
  • Does not mean: the person the command was sent for
  • Empty: empty for a change a store made of its own accord
  • Filled: decided

acting_for_subject

text · stable

Names the person a change was made for.

  • Means: the deployment-local subject the command was sent for (W4.9)
  • Does not mean: an email address or a display name
  • Empty: empty when the plugin acted as itself
  • Filled: decided

correlation_id

identifier message · stable

Ties a change to the work it was part of.

  • Means: the command's correlation identifier, as its envelope carried it
  • Does not mean: the change's own identifier
  • Empty: empty where the command carried none
  • Filled: decided

causation_id

identifier message · stable

Names the message that caused a change.

  • Means: the command's message identifier
  • Does not mean: a message the store published
  • Empty: empty for a change a store made of its own accord
  • Filled: decided

committed_at_ns

moment · stable

Records when a change committed.

  • Means: the deployment's clock when the store committed the change
  • Does not mean: when the command was sent, or the business date the change stands for
  • Empty: never 0
  • Filled: decided
  • Unit: nanoseconds since the epoch

Watermark

meridian.v1.Watermark, a message.

partitions

repeated message PartitionSequence · stable

Names a point in a store's record.

  • Means: a sequence per partition: what a read answers it was read at, and what a read of changes since takes
  • Does not mean: a time
  • Empty: empty for no point at all: a read since an empty watermark reads everything
  • Filled: decided

PartitionSequence

meridian.v1.PartitionSequence, a message.

partition

text · stable

Names a partition within a watermark.

  • Means: a partition of the store that answered
  • Does not mean: an account
  • Empty: never empty
  • Filled: decided

sequence

integer · stable

Says how far into a partition a watermark reaches.

  • Means: the number of the last change of the partition the point includes
  • Does not mean: a count of changes read
  • Empty: 0 for a partition nothing has been read from
  • Filled: decided
  • Unit: changes in the partition

AsReported

meridian.v1.AsReported, a message.

scheme

text · stable

Says whose vocabulary a value as reported is in.

  • Means: the sending plugin's registry name and, where its source has several code sets, which: plugin:code-set
  • Does not mean: an identifier scheme of the instrument store, or anything the platform defines
  • Empty: never empty on a value as reported that is sent
  • Filled: as-reported
  • Bounds: 1 to 64 characters; past it, refused
  • Required on: ReportExternalAccounts; ReportMissingInstrument; RecordActivity

code

text · stable

Carries the source's code that did not convert.

  • Means: the code exactly as the source sent it, for a person to map; sent only beside the field's not-known value
  • Does not mean: a value of the contract, or one any reader may act on: nothing past the plugin interprets it
  • Empty: never empty on a value as reported that is sent
  • Filled: as-reported
  • Bounds: 1 to 128 characters; past it, refused
  • Required on: ReportExternalAccounts; ReportMissingInstrument; RecordActivity

text

text · stable

Carries the source's own words for the code.

  • Means: the source's description of the code, as sent
  • Does not mean: a translation, or the plugin's own words
  • Empty: never empty on a value as reported that is sent: the code again where the source gives no words
  • Filled: as-reported
  • Bounds: 1 to 256 characters; past it, refused
  • Required on: ReportExternalAccounts; ReportMissingInstrument; RecordActivity

RawRecordRef

meridian.v1.RawRecordRef, a message.

instance_id

identifier instance · stable

Names the plugin whose storage holds the raw record.

  • Means: the instance that wrote the row and keeps the record it was converted from
  • Does not mean: a plugin any reader may ask for the record: only the owning plugin's page shows it
  • Empty: empty only where no reference is sent; the plugin's SDK sets it, and the sidecar refuses one naming another instance
  • Filled: derived, by custody

key

text · stable

Names the raw record a row was converted from, in its plugin's own key.

  • Means: opaque: the owning plugin's key for a record it keeps as received, which a person follows on that plugin's page; a record the plugin archived resolves to archived, restorable, and one deleted past its window says the record is gone, and the row stands
  • Does not mean: a location any other plugin or core may read: no plugin's storage is a channel to another
  • Empty: never empty on a reference that is sent
  • Filled: as-reported, by custody
  • Bounds: 1 to 512 characters; past it, refused
  • Required on: RecordHolding; RecordHoldingsStatement; RecordActivity

Provenance

meridian.v1.Provenance, a message.

field

text · stable

Names the value a provenance is for.

  • Means: the value's path in its message, as a refusal names a field: quantity, settle_date_quantity, pending, market_value.currency_code, institution
  • Does not mean: a field of another message, or of the source's record
  • Empty: never empty on a provenance that is sent
  • Filled: as-reported, by custody
  • Bounds: 1 to 200 characters; past it, refused
  • Required on: RecordHolding; RecordHoldingsStatement; RecordActivity

kind

enum ProvenanceKind · stable

Says how a value the plugin closed came to be.

  • Means: one of four kinds, the same meanings as an instrument value's source, and from v22 a value core computed; a closed value is never presented as the vendor's
  • Does not mean: how reliable the value is: a derived value may be exact, and a reported one wrong
  • Empty: unspecified is refused
  • Filled: as-reported, by custody
  • Required on: RecordHolding; RecordHoldingsStatement; RecordActivity
Value Means
PROVENANCE_KIND_UNSPECIFIED not said; refused
PROVENANCE_KIND_REPORTED reported by the vendor, from a raw record other than the message's own
PROVENANCE_KIND_SECOND_SOURCE from a second source of the plugin's own, never another plugin's storage
PROVENANCE_KIND_SUPPLIED supplied by a named person on the plugin's page
PROVENANCE_KIND_DERIVED derived by a named rule in the plugin's code from what the source did send
PROVENANCE_KIND_COMPUTED computed by core, with its basis (date_basis): a date the date read worked out from the settlement calendars, since it is not the plugin's own rule (W3.20)

raw_record

message RawRecordRef · stable

References the raw record a reported or second-source value came from.

  • Means: the record in the plugin's own storage, where it is not the message's own
  • Does not mean: the record a derived value was derived from: the message's own reference says that
  • Empty: unset on a value supplied or derived: it never carries a raw record as though the vendor had sent it
  • Filled: as-reported, by custody

source

text · stable

Names the second source a value came from.

  • Means: the source as the plugin names it to a person
  • Does not mean: another plugin: a second source is the plugin's own connection
  • Empty: empty unless the kind is a second source
  • Filled: as-reported, by custody
  • Bounds: at most 200 characters; past it, refused

person

text · stable

Names the person who supplied a value.

  • Means: the person as the plugin's page knew them when they supplied it
  • Does not mean: the person a command was sent for, which the envelope says
  • Empty: empty unless the kind is supplied
  • Filled: as-reported, by custody
  • Bounds: at most 200 characters; past it, refused

rule

text · stable

Names the rule that derived a value.

  • Means: the rule as the plugin documents it, so a person can say what was done: cash net of money market funds the custodian counts in cash
  • Does not mean: a rule of the platform's, or one any reader applies
  • Empty: empty unless the kind is derived
  • Filled: as-reported, by custody
  • Bounds: at most 200 characters; past it, refused

date_basis

message DateBasis · preview

Says what a date core computed was worked out on (W3.20).

  • Means: the rule and each calendar, with their versions, the date read used; never on another kind
  • Does not mean: the plugin's own rule, which the derived kind names
  • Empty: unset unless the kind is computed
  • Filled: derived, by instrument

Backfill

meridian.v1.Backfill, a message.

contract_version

text · stable

Names the contract version that added the field a backfill fills.

  • Means: v and the version's number, as the version's register names it; the amendment's cause
  • Does not mean: the version the plugin was built against
  • Empty: never empty on a backfill that is sent
  • Filled: as-reported, by custody
  • Bounds: 2 to 8 characters; past it, refused
  • Required on: RecordHolding

field

text · stable

Names the field a backfill fills.

  • Means: its path in the message, as a provenance names one; the amendment carries that field and nothing else
  • Does not mean: a correction of a value already recorded: a backfill fills only what the row did not carry
  • Empty: never empty on a backfill that is sent
  • Filled: as-reported, by custody
  • Bounds: 1 to 200 characters; past it, refused
  • Required on: RecordHolding

RateConvention

meridian.v1.RateConvention, a message.

day_count

enum DayCount · preview

Says the day count a rate accrues by, and from v29 an instrument's accrual basis (Bond.day_count and its siblings).

  • Means: the day count as the source states it; from v29 FIX CouponDayCount (1950)'s list, each mapped to CDM's DayCountFractionEnum where it has the value (ruling 678)
  • Does not mean: a day count the plugin assumed; on an instrument's terms, ACT_ACT or THIRTY_360 with no variant, which are refused there
  • Empty: unspecified: the source does not state it
  • Filled: as-reported, by data
Value Means
DAY_COUNT_UNSPECIFIED not stated by the source; refused on an instrument's terms; from v30 accepted on a QuotedYield's convention, the yield kept as quoted and never computed with (433)
DAY_COUNT_ACT_360 actual days over 360 (FIX CouponDayCount 1950 = 6; CDM ACT/360)
DAY_COUNT_ACT_365_FIXED actual days over 365 (1950 = 7; CDM ACT/365.FIXED)
DAY_COUNT_ACT_ACT actual/actual as a rate's source states it, no variant named (v27's meaning kept for rates; 678); refused on an instrument's terms
DAY_COUNT_THIRTY_360 30/360 as a rate's source states it, no variant named (v27's meaning kept for rates; 678); refused on an instrument's terms
DAY_COUNT_BUS_252 business days over 252 (1950 = 12; CDM has CAL/252, not BUS/252)
DAY_COUNT_ONE_ONE 1/1 (1950 = 0; CDM 1/1)
DAY_COUNT_THIRTY_360_BOND_BASIS 30/360, 30U/360 or bond basis (1950 = 1; CDM 30/360): a US corporate's or agency's
DAY_COUNT_THIRTY_360_SIA 30/360 (SIA), with SIFMA's end-of-February rule (1950 = 2; no CDM value: held more)
DAY_COUNT_THIRTY_360_M 30/360M (1950 = 3; no CDM value)
DAY_COUNT_THIRTY_E_360 30E/360, the Eurobond basis (1950 = 4; CDM 30E/360)
DAY_COUNT_THIRTY_E_360_ISDA 30E/360 (ISDA) (1950 = 5; CDM 30E/360.ISDA)
DAY_COUNT_ACT_ACT_AFB actual/actual (AFB) (1950 = 8; CDM ACT/ACT.AFB)
DAY_COUNT_ACT_ACT_ICMA actual/actual (ICMA) on the coupon period (1950 = 9; CDM ACT/ACT.ICMA): a Treasury note's or bond's (31 CFR 356, Appendix B)
DAY_COUNT_ACT_ACT_ICMA_ULTIMO actual/actual (ICMA ultimo) (1950 = 10; no CDM value)
DAY_COUNT_ACT_ACT_ISDA actual/actual (ISDA) (1950 = 11; CDM ACT/ACT.ISDA)
DAY_COUNT_THIRTY_E_PLUS_360 30E+/360 (1950 = 13; no CDM value)
DAY_COUNT_ACT_365_L actual/365L (1950 = 14; CDM ACT/365L)
DAY_COUNT_NL_365 NL/365, leap days left out (1950 = 15; no CDM value)
DAY_COUNT_NL_360 NL/360 (1950 = 16; no CDM value)
DAY_COUNT_ACT_364 actual/364 (1950 = 17; CDM ACT/364)

compounding

enum Compounding · preview

Says how a rate compounds.

  • Means: simple, compounded with its periods a year, continuous or discount
  • Does not mean: the rate's kind
  • Empty: unspecified is refused
  • Filled: as-reported, by data
Value Means
COMPOUNDING_UNSPECIFIED refused
COMPOUNDING_SIMPLE simple interest
COMPOUNDING_COMPOUNDED compounded, periods_per_year times a year
COMPOUNDING_CONTINUOUS continuously compounded
COMPOUNDING_DISCOUNT a discount rate, quoted off the face amount

periods_per_year

integer · preview

Says how often a compounded rate compounds.

  • Means: the periods a year, 2 for a semi-annual bond-equivalent yield
  • Does not mean: a payment frequency
  • Empty: 0 unless the compounding is compounded
  • Filled: as-reported, by data
  • Unit: compounding periods a year

QuotedYield

meridian.v1.QuotedYield, a message.

value

message UnitValue · preview

Carries the yield with its unit.

  • Means: a percent: 4.312 percent is 4.312, never 0.04312
  • Does not mean: a price, or a spread
  • Empty: never unset
  • Filled: as-reported, by data

convention

message RateConvention · preview

Says how the yield compounds and accrues.

  • Means: semi-annual bond-equivalent for a US Treasury, corporate or agency; its day count the instrument's, or from v30 unspecified where the source states none, the yield then kept as quoted and never computed with (433)
  • Does not mean: a convention the plugin converted to
  • Empty: never unset
  • Filled: as-reported, by data

kind

enum YieldKind · preview

Says which yield it is (FIX YieldType, 235).

  • Means: to maturity, call, put or worst, current, or discount
  • Does not mean: a rate's kind on a curve
  • Empty: unspecified is refused
  • Filled: as-reported, by data
Value Means
YIELD_KIND_UNSPECIFIED refused
YIELD_KIND_TO_MATURITY to maturity (FIX YieldType 235 MATURITY)
YIELD_KIND_TO_CALL to the call date in to_date (CALL)
YIELD_KIND_TO_PUT to the put date in to_date (PUT)
YIELD_KIND_TO_WORST to the lower of call and maturity, MSRB G-15's disclosed yield (WORST)
YIELD_KIND_CURRENT the coupon over the price (CURRENT)
YIELD_KIND_DISCOUNT a bill's bank-discount rate (a Treasury bill's quote)

to_date

date · preview

States the date a yield to a call or put is to.

  • Means: a plain date
  • Does not mean: the maturity, which the instrument states
  • Empty: empty unless the kind is to call or to put, or to worst where worst is a call
  • Filled: as-reported, by data

Generated from boundaries/fields.json in meridian-schema at 9f396f9.