API Flows
Paradigm creates Strategies, comprised of one or more Instruments.
- 1.Subscribed to
strategy_state.{venue}.{kind}
WS Channel. - 2.Receives WS messages with
state
==ACTIVE
.
Upon a Strategy Instrument's expiration, the underlying venue settles the contract.
- 1.Subscribed to
strategy_state.{venue}.{kind}
WS Channel. - 2.Receives WS messages with
state
==SETTLED
.
Paradigm may choose to expire a Strategy from being available to trade.
- 1.Subscribed to
strategy_state.{venue}.{kind}
WS Channel. - 2.Receives WS messages with
state
==EXPIRED
.
For a Trade to occur, two Orders must cross upon a Strategy's Order Book.
From the WS Channel
orders.{venue}.{kind}.{strategy_id}
, the state
key indicates if the Order has reached finality. If state
== OPEN
, then the Order still has available amount
which can be actioned by the creator or another user. If state
== CLOSED
, the Order no longer has any actions available by the creator or another user. If state
== CLOSED
, the Order will be either canceled, pending clearing & settlement on the underlying venue or has already reached finality at clearing.You should closely follow the values from the following keys
amount
, pending_fill_amount
, filled_amount
, canceled_amount
.- 1.Subscribed to
orders.{venue}.{kind}.{strategy_id}
WS Channel. - 2.Taker submits a crossing Order and receives WS message with
state
==OPEN
. - 3.If the Order is consumed in entirety, the user(s) receives a message with
state
==CLOSED
.
- 1.Subscribed to
trades.{venue}.{kind}.{strategy_id}
WS Channel. - 2.An executed Trade reaches finality after clearing & settlement on the underlying exchange. Receives a WS Message with
state
==FILLED
for successfully cleared trades,state
==REJECTED
for unsuccessful trade clearing.
Last modified 4mo ago