Realized PnL is automatically and instantaneously settled to the margin account in most cases, except when it accumulates through maker fills, in which case it is settled by an automatic crank. Otherwise, the user can choose to settle pnl using settle pnl instruction.