Documentation contents

Trading

Position

A position is tracked by cycles. A cycle is the life of one leg's position in one polarity: from the first non-zero volume until it returns to zero; a new opening is a new cycle. An arbitrage deal is the cycles of leg A and leg B of one pair.

Two tabs of "Binding data":

  • "Arbitrage deals" — a deal as a row with two sub-rows, A above B; pairs of legs only;
  • "Exchange positions" — each cycle of each leg separately, including single-leg ones; the "Status" filter: "All", "Open", "Closed"; "One-sided" and "Imbalance" are included in "Open".

The order is newest to oldest by opening time. The time is when the server recorded the position, in the profile's time zone.

Statuses:

Status When
"Open" the position is open, the legs are balanced
"Closed" all legs are closed
"One-sided" only one leg is open ("Exchange positions")
"Imbalance" the leg volumes in coins differ by more than 1 % of the larger leg

The status changes 10 seconds after the last fill of either leg, so that it does not flicker between the legs of one deal.

Deal columns: arbitrage direction (by the actual sides of the legs), trade direction, last price (perpetual contract — the exchange's mark price, spot — the middle of the book), current volume, margin, liquidation price and the distance to it, PnL, average entry and exit prices and volumes, average entry, exit and realized spreads, funding, exchange fees, "Profit Cloud fee, USD", opening and closing time.

  • Margin, ~USD — the cycle's largest notional divided by the leverage; for spot, the leverage is 1.
  • To liq. price, % — the distance from the last price to the exchange's liquidation price; for spot — "—".
  • Avg entry / exit spread, % — from the legs' average fill prices, on the bundle's A/B axis.
  • Avg realized spread, % — the difference between the entry and exit spreads, signed by leg A's side; before fees.

PnL

  • A cycle's Realized PnL is the result from fills (at the average entry price) minus all exchange fees for the cycle plus the cycle's funding, once funding has been collected in full. It is recalculated on every position update: right after opening, it equals minus the entry fees. Late fees, fills and funding are added even after closing.
  • Unrealized PnL — for a perpetual contract, according to the exchange; for spot — (best bid − average entry price) × volume.
  • A leg's Total PnL is realized plus unrealized. Deal total PnL is the sum of both legs; ROI, % is the deal total PnL relative to the sum of the two legs' margin.

"~USD" is a conversion: USDT and USDC one to one; other fee currencies — by the one-minute candles of their pair against USDT (or USDC) on the same exchange at the time of the event. If a leg's quote currency is not pegged to the dollar, the ~USD columns are empty.

"Profit Cloud fee, USD" is not included in PnL.

Reconciliation with the exchange

The exchange is the source of truth.

  • Perpetual leg — the exchange's position: it arrives via the account stream and is reconciled via REST periodically and right after a fill.
  • Spot leg — there is no position on the exchange: the leg's position is the net of its fills. The server periodically fetches fills from the exchange, including manual ones, and recalculates the position; a remainder below the minimum order is considered zero.

Recent fills, open orders and funding are reconciled together with positions. When the bundle window is closed, positions are reconciled in the background.

  • A zero volume in the stream does not close a perpetual leg's cycle until the fills net to zero; the cycle is closed by reconciliation via REST.
  • If the exchange persistently responds that there is no position while the fills say otherwise, the cycle is closed according to the exchange.
  • A manual trade on the exchange itself on a bundle leg is picked up as an order marked "ext." — the Profit Cloud fee is not charged for it; if several bundles share the leg, the trade is not picked up.

The polarity panel shows the legs' account balances; "Refresh balances" rereads them. The "Liquidation price approach" and "Leg liquidated" notifications are turned on in the settings (see "App → Notifications").