Skip to main content

Module cid

Module cid 

Source
Expand description

The client order id codec: the mapping between the library’s ClientOrderId and the form a broker accepts.

You generate a ClientOrderId (a UUID v4) for every order. A broker may take a different form in its own field: a shorter string, other characters. A CidCodec is the pure function pair that converts one to the other, so an order seen in a broker’s answer or stream can be tied back to your cid. A connector owns its codec. Most callers never use this module directly. It is public for connector authors and for tools that read a broker’s raw data.

Structs§

CidCaps
What the broker’s client order id field can hold, declared by a CidCodec.
HexUuidCodec
A lossless codec: the UUID as 32 lowercase hex digits, no hyphens.
NativeCid
The form of a client order id as the broker sees it: a string in the broker’s own field.

Enums§

Charset
The characters a broker accepts in its client order id field.
CidError
Why a CidCodec cannot encode or accept a cid.

Traits§

CidCodec
A pure, stateless mapping between ClientOrderId and the broker’s NativeCid.