Archived
init commit.
This commit is contained in:
commit
c24decd482
17 files changed
+2211
No files matched your search
@@ -0,0 +1,52 @@
|
||||
id: 1
|
||||
version: 1
|
||||
description: Voluntas engineering challenge orderbook update schema.
|
||||
|
||||
messages:
|
||||
Snapshot:
|
||||
id: 1
|
||||
description: A full snapshot of the orderbook
|
||||
fields:
|
||||
received_at: { id: 1, type: timestamp }
|
||||
exchange_timestamp: { id: 2, type: timestamp }
|
||||
bids:
|
||||
id: 4
|
||||
description: Bid price levels
|
||||
fields:
|
||||
price_level:
|
||||
id: 5
|
||||
type: int64
|
||||
description: The price level, in fixed point; 1_000_000 = 1 USDC
|
||||
quantity:
|
||||
id: 6
|
||||
type: int64
|
||||
description: The absolute available quantity, in fixed point; 1_000_000 = 1 share/contract
|
||||
asks:
|
||||
id: 7
|
||||
description: Ask price levels
|
||||
fields:
|
||||
price_level:
|
||||
id: 8
|
||||
type: int64
|
||||
description: The price level, in fixed point; 1_000_000 = 1 USDC
|
||||
quantity:
|
||||
id: 9
|
||||
type: int64
|
||||
description: The absolute available quantity, in fixed point; 1_000_000 = 1 share/contract
|
||||
symbol: { id: 3, type: string }
|
||||
|
||||
PriceLevelUpdate:
|
||||
id: 2
|
||||
description: An update to a single price level, on a single orderbook
|
||||
fields:
|
||||
backtest_timestamp: { id: 1, type: timestamp }
|
||||
exchange_timestamp: { id: 2, type: timestamp }
|
||||
price_level:
|
||||
id: 4
|
||||
type: int64
|
||||
description: The price level being updated, in fixed point; 1_000_000 = 1 USDC
|
||||
quantity:
|
||||
id: 5
|
||||
type: int64
|
||||
description: The absolute available quantity, in fixed point; 1_000_000 = 1 share/contract
|
||||
symbol: { id: 3, type: string }
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Shared SBE wire encodings. These definitions are included by every schema so
|
||||
message files contain only schema-specific types and message declarations.
|
||||
|
||||
Changing an existing encoding changes every schema that uses it. Add a new
|
||||
named encoding instead when a different wire representation is required.
|
||||
-->
|
||||
<types>
|
||||
<!-- Standard 8-byte SBE message header. These names are required by the tooling. -->
|
||||
<composite name="messageHeader" description="Message identifiers and length of message root">
|
||||
<type name="blockLength" primitiveType="uint16"/>
|
||||
<type name="templateId" primitiveType="uint16"/>
|
||||
<type name="schemaId" primitiveType="uint16"/>
|
||||
<type name="version" primitiveType="uint16"/>
|
||||
</composite>
|
||||
|
||||
<!-- Repeating-group dimensions written before each group instance. -->
|
||||
<composite name="groupSizeEncoding" description="Repeating group dimensions">
|
||||
<type name="blockLength" primitiveType="uint16"/>
|
||||
<type name="numInGroup" primitiveType="uint16"/>
|
||||
</composite>
|
||||
|
||||
<!-- Variable-length UTF-8 string with a uint32 byte-length prefix. -->
|
||||
<composite name="varStringEncoding" description="Variable-length UTF-8 string">
|
||||
<type name="length" primitiveType="uint32" maxValue="1073741824"/>
|
||||
<type name="varData" primitiveType="uint8" length="0" characterEncoding="UTF-8"/>
|
||||
</composite>
|
||||
|
||||
<!-- UTC microseconds since the UNIX epoch; the constant unit occupies no wire bytes. -->
|
||||
<composite name="UTCTimestampMicrosEncoding" semanticType="UTCTimestamp"
|
||||
description="UTC microseconds since the UNIX epoch">
|
||||
<type name="time" primitiveType="uint64"/>
|
||||
<type name="unit" primitiveType="uint8" presence="constant">6</type>
|
||||
</composite>
|
||||
|
||||
<!-- Same 8 bytes, but u64::MAX is reserved to mean "unknown". SBE has no
|
||||
presence="optional" for a composite as a whole, so the nullability rides
|
||||
on `time` and you test that member — the pattern real-logic points at in
|
||||
issue #509. Picked by `type: timestamp, optional: true` in the yaml. -->
|
||||
<composite name="UTCTimestampMicrosNullableEncoding" semanticType="UTCTimestamp"
|
||||
description="UTC microseconds since the UNIX epoch, or null">
|
||||
<type name="time" primitiveType="uint64" presence="optional"/>
|
||||
<type name="unit" primitiveType="uint8" presence="constant">6</type>
|
||||
</composite>
|
||||
|
||||
<type name="bytes32" primitiveType="uint8" length="32"/>
|
||||
<type name="address" primitiveType="uint8" length="20"/>
|
||||
|
||||
<!-- FIX-standard boolean: one byte on the wire. -->
|
||||
<enum name="BooleanType" encodingType="uint8">
|
||||
<validValue name="False">0</validValue>
|
||||
<validValue name="True">1</validValue>
|
||||
</enum>
|
||||
</types>
|
||||
Reference in new issue
Block a user