Session Keep Alive

To maintain an active WebSocket connection it is imperative to either be subscribed to a channel that pushes data at least once per minute (Depth) or periodically send a text “ping” (without the quotation mark) to the server within an minute and then the server will reply text “pong” (without quotation mark) to you.

Self Trade Prevention Modes

Self trade prevention (STP) helps traders avoid costly self-matching within an account and between subaccounts. There are 4 STP modes available to traders NONE, EXPIRE_MAKER, EXPIRE_TAKER, EXPIRE_BOTH.

NONE - has no protection meaning self-matching is possible.

EXPIRE_MAKER - cancels the resting (would-be maker) order regardless of its STP mode, the aggressing order continues to match and/or is placed into the book.

EXPIRE_TAKER - cancels the aggressing order to avoid self-matching, acts similar to an IOC that is cancelled in the event of a self-match.

EXPIRE_BOTH - cancels both the agressing order and the resting (would-be maker) order regardless of the resting order's STP mode.

Note that the STP system uses the aggressing (would-be taker) order to decide which action to take, for example:

Placing an EXPIRE_TAKER order which collides with a resting EXPIRE_MAKER order causes the aggressing EXPIRE_TAKER order to be cancelled, while the EXPIRE_MAKER order will remain.

Last updated