Skip to main content

2 posts tagged with "perps"

View All Tags

What happens when your order is sent but the exchange never replies?

· 7 min read
BlockTrader365

Most order-handling code is written as if there are two outcomes: the order worked, or it didn't.

There is a third, it is more common than people expect, and it is the one that actually costs money. You send an order. The connection stalls, or the venue returns a shape you don't recognise, or a gateway hands back a 502. You now do not know whether you have a position.

If one leveraged position goes wrong, what happens to the others?

· 7 min read
BlockTrader365

Most explanations of leverage stop at the point where you open one position. The interesting behaviour starts at the second one.

If you are long one market and short another and the first goes badly, what happens to the second? The answer depends entirely on whether your positions share collateral — and on a unified margin account, they do. That is the whole design, and it is rarely spelled out before you use it.