Skip to main content

Module cid

Module cid 

Expand description

The client order id codec: Bybit keeps a client order id (orderLinkId) of up to 36 characters on every order, and a full hyphenated UUID is exactly 36.

Structs§

BybitCidCodec
The cid is written into the orderLinkId of the order as a hyphenated UUID (lossless, 128-bit, 36 characters of digits, letters and dashes, which the exchange allows). The exchange returns it in the order list, in the order stream and in the fills, which is how a cid comes back. The exchange refuses a second order with the same id while the first one is working, which is what makes a repeated place visible.

Functions§

cid_from_link_id
The cid in the orderLinkId of an order: a whole UUID, else none (an order placed in the app of the exchange, or by another program).
foreign_cid
Stable cid for an order of this account that this connector did not place: the same order number always gives the same cid, so it can be told apart from ours and found again.