Skip to content

Commit 62fd24f

Browse files
authored
Merge pull request #97 from donmendelson/issue95
Single-byte character set #95
2 parents 4968c17 + 74b5435 commit 62fd24f

File tree

13 files changed

+3886
-0
lines changed

13 files changed

+3886
-0
lines changed

v2-0-RC2/doc/00Contents.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Contents
2+
========
3+
4+
[Title](00Title.md)
5+
6+
[1. Introduction](01Introduction.md)
7+
8+
[2. Field Encoding](02FieldEncoding.md)
9+
10+
[3. Message Structure](03MessageStructure.md)
11+
12+
[4. Message Schema](04MessageSchema.md)
13+
14+
[5. Schema Extension Mechanism](05SchemaExtensionMechanism.md)
15+
16+
[6. Usage Guidelines](06UsageGuidelines.md)
17+
18+
[7. Examples](07Examples.md)
19+
20+
[8. Release Notes](08ReleaseNotes.md)

v2-0-RC2/doc/00Title.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
![](./media/image1.jpeg)
2+
3+
FIX Simple Binary Encoding
4+
==========================
5+
6+
## Technical Specification
7+
8+
Version 2.0 Release Candidate 2
9+
10+
**THIS DOCUMENT IS A RELEASE CANDIDATE FOR A PROPOSED FIX TECHNICAL
11+
STANDARD. A RELEASE CANDIDATE HAS BEEN APPROVED BY THE GLOBAL TECHNICAL
12+
COMMITTEE AS AN INITIAL STEP IN CREATING A NEW FIX TECHNICAL STANDARD.
13+
POTENTIAL ADOPTERS ARE STRONGLY ENCOURAGED TO BEGIN WORKING WITH THE
14+
RELEASE CANDIDATE AND TO PROVIDE FEEDBACK TO THE GLOBAL TECHNICAL
15+
COMMITTEE AND THE WORKING GROUP THAT SUBMITTED THE PROPOSAL. THE
16+
FEEDBACK TO THE RELEASE CANDIDATE WILL DETERMINE IF ANOTHER REVISION AND
17+
RELEASE CANDIDATE IS NECESSARY OR IF THE RELEASE CANDIDATE CAN BE
18+
PROMOTED TO BECOME A FIX TECHNICAL STANDARD DRAFT.**
19+
20+
**© Copyright 2015-2019 FIX Protocol Limited**

v2-0-RC2/doc/01Introduction.md

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
Introduction
2+
=========================================================================================================================================================
3+
4+
FIX Simple Binary Encoding (SBE) targets high performance trading
5+
systems. It is optimized for low latency of encoding and decoding while
6+
keeping bandwidth utilization reasonably small. For compatibility, it is
7+
intended to represent all FIX semantics.
8+
9+
This encoding specification describes the wire protocol for messages.
10+
Thus, it provides a standard for interoperability between communicating
11+
parties. Users are free to implement the standard in a way that best
12+
suits their needs. Implementers may use the most appropriate techniques and idioms of programming languages to access data off the wire and manipulate it in applications.
13+
14+
The encoding standard is complimentary to other FIX standards for
15+
session protocol and application level behavior.
16+
17+
Binary type system
18+
----------------------------------------------------------------------------------------------------------------
19+
20+
In order to support traditional FIX semantics, all the documented field
21+
types are supported. However, instead of printable character
22+
representations of tag-value encoding, the type system binds to native
23+
binary data types, and defines derived types as needed.
24+
25+
The binary type system has been enhanced in these ways:
26+
27+
- Provides a means to specify precision of decimal numbers and
28+
timestamps, as well as valid ranges of numbers.
29+
30+
- Differentiates fixed-length character arrays from variable-length
31+
strings. Allows a way to specify the minimum and maximum length of
32+
strings that an application can accept.
33+
34+
- Provides a consistent system of enumerations, Boolean switches and
35+
multiple-choice fields.
36+
37+
Design principles
38+
---------------------------------------------------------------------------------------------------------------
39+
40+
The message design strives for direct data access without complex
41+
transformations or conditional logic. This is achieved by:
42+
43+
- Usage of native binary data types and simple types derived from
44+
native binaries, such as prices and timestamps.
45+
46+
- Preference for fixed positions and fixed length fields, supporting
47+
direct access to data and avoiding the need for management of heaps
48+
of variable-length elements which must be sequentially processed.
49+
50+
Message schema
51+
------------------------------------------------------------------------------------------------------------
52+
53+
This standard describes how fields are encoded and the general structure
54+
of messages. The content of a message type is specified by a message
55+
schema. A message schema tells which fields belong to a message and
56+
their location within a message. Additionally, the metadata describes
57+
valid value ranges and information that need not be sent on the wire,
58+
such as constant values.
59+
60+
Message schemas may be based on standard FIX message specifications, or
61+
may be customized as needed by agreement between counterparties.
62+
63+
Glossary
64+
------------------------------------------------------------------------------------------------------
65+
66+
**Character set** - A mapping between a sequence of octets and a sequence of characters.
67+
68+
**Data type** - A field type with its associated encoding attributes,
69+
including backing primitive types and valid values or range. Some types
70+
have additional attributes, e.g. epoch of a date.
71+
72+
**Encoding** - a message format for interchange. The term is commonly used
73+
to mean the conversion of one data format to another, such as text to
74+
binary. However, Simple Binary Encoding strives to use native binary
75+
data types in order to make conversion unnecessary, or at least trivial.
76+
Encoding also refers to the act of formatting a message, as opposed to
77+
decoding.
78+
79+
**Message schema** - metadata that specifies messages and their data
80+
types and identifiers. Message schemas may be disseminated out of band.
81+
For Simple Binary Encoding, message schemas are expressed as an XML
82+
document that conforms to an XML schema that is published as part of
83+
this standard.
84+
85+
**Message template** - metadata that specifies the fields that belong to
86+
one particular message type. A message template is contained by a
87+
message schema.
88+
89+
**Session protocol** - a protocol concerned with the reliable delivery of
90+
messages over a transport. FIX protocol makes a distinction between
91+
session protocol and the encoding of a message payload, as described by
92+
this document. See the specifications section of FIX protocol web site
93+
for supported protocols. The original FIX session protocol is known as
94+
FIXT.
95+
96+
**XML schema** - defines the elements and attributes that may appear in an
97+
XML document. The SBE message schema is defined in W3C (XSD) schema
98+
language since it is the most widely adopted format for XML schemas.
99+
100+
Documentation
101+
-----------------------------------------------------------------------------------------------------------
102+
103+
This document explains:
104+
105+
- The binary type system for field encoding
106+
107+
- Message structure, including field arrangement, repeating groups,
108+
and relationship to a message header that may be provided by a
109+
session protocol.
110+
111+
- The Simple Binary Encoding message schema.
112+
113+
### Specification terms
114+
115+
These key words in this document are to be interpreted as described in
116+
[Internet Engineering Task Force RFC2119](http://www.apps.ietf.org/rfc/rfc2119.html). These terms indicate
117+
an absolute requirement for implementations of the standard: "**must**",
118+
or "**required**".
119+
120+
This term indicates an absolute prohibition: "**must not**".
121+
122+
These terms indicate that a feature is allowed by the standard but not
123+
required: "**may**", "**optional**". An implementation that does not
124+
provide an optional feature must be prepared to interoperate with one
125+
that does.
126+
127+
These terms give guidance, recommendation or best practices:
128+
"**should**" or "**recommended**". A recommended choice among
129+
alternatives is described as "**preferred**".
130+
131+
These terms give guidance that a practice is not recommended: "**should not**"
132+
or "**not recommended**".
133+
134+
### Document format
135+
136+
In this document, these formats are used for technical specifications
137+
and data examples.
138+
139+
This is a sample encoding specification
140+
141+
```xml
142+
<type name="short" primitiveType="int16"/>
143+
```
144+
145+
This is sample data as it would be transmitted on the wire
146+
147+
`10270000`
148+
149+
References
150+
-------------------------------------------------------------------------------------------------------------------------------------------------------
151+
152+
### Related FIX Standards
153+
154+
[Simple Open Framing Header](https://www.fixtrading.org/packages/fix-simple-open-framing-header-draft-standard-1-0)
155+
FIX Protocol, Limited. Version 1.0 Draft Standard
156+
157+
[FIX 5.0 Service Pack 2](https://www.fixtrading.org/standards/fix-5-0-sp-2/)
158+
FIX semantics with Extension Packs.
159+
160+
### Dependencies on other standards
161+
162+
SBE is dependent on several industry standards. Implementations must
163+
conform to these standards to interoperate. Therefore, they are
164+
normative for SBE.
165+
166+
[IEEE 754-2008](http://ieeexplore.ieee.org/servlet/opac?punumber=4610933) A
167+
Standard for Binary Floating-Point Arithmetic
168+
169+
[IETF RFC 2978](https://tools.ietf.org/html/rfc2978)
170+
IANA Charset Registration Procedures. See [Character Sets](https://www.iana.org/assignments/character-sets/character-sets.xml)
171+
172+
[ISO 639-1:2002](http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=22109)
173+
Codes for the representation of names of languages - Part 1: Alpha-2
174+
code
175+
176+
[ISO 3166-1:2013](http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=63545)
177+
Codes for the representation of names of countries and their
178+
subdivisions - Part 1: Country codes
179+
180+
[ISO 4217:2015](https://www.iso.org/standard/64758.html)
181+
Codes for the representation of currencies and funds
182+
183+
[ISO 8601:2004](http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=40874)
184+
Data elements and interchange formats - Information interchange -
185+
Representation of dates and times
186+
187+
[ISO/IEC 8859-1:1998](https://www.iso.org/standard/28245.html)
188+
8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1
189+
190+
[ISO 10383:2012](http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=61067)
191+
Securities and related financial instruments - Codes for exchanges and
192+
market identification (MIC)
193+
194+
[W3C XML Schema version 1.1](https://www.w3.org/TR/2006/REC-xml11-20060816/)

0 commit comments

Comments
 (0)