Skip to Content
Symmio Trading-SDK — the SDK surface for builders on HyperEVM
CoreUnified QuotesUnifiedQuote

UnifiedQuote

A single quote/position row merged from every source — on-chain reads, pending instant-opens, pending instant-closes, and notifications — into one stable, de-duplicated shape. This is the primary abstraction quote and position UIs build against; every other function in this module reads or produces it.

All amount and price fields are 18-decimal-wei bigint, matching the on-chain Quote. Off-chain hedger amounts are normalized to wei before they reach this type. The key is a stable identity for React lists and the removal ledger; it migrates from temp:<tempId> to onchain:<id> when a row anchors, but the row’s identity is preserved. raw carries the untouched source rows for advanced use.

import type { UnifiedQuote } from "@symmio/trading-core";

Fields

keystring
Stable identity for this row (onchain:<id> or temp:<tempId>). Survives the temp → on-chain anchor transition.
Source the row was reconciled from.
Current lifecycle stage.
quoteIdbigint
On-chain quote id, once anchored. Absent while the row is still off-chain.
tempQuoteIdnumber
Hedger-local temp id, before the on-chain id exists (negative).
partyAAddress
Sub-account (partyA) that owns the row.
partyBAddress
PartyB (hedger/solver) that locked/opened the quote, when known.
vaAddressAddress
Solver-assigned Virtual Account address (lowcap), when known.
symbolIdbigint
Market identifier (symbolId).
positionTypePositionType
Long or short.
orderTypeOrderType
Limit or market order.
quoteStatusQuoteStatus
On-chain status, when the row is anchored on-chain.
requestedOpenPricebigint
Price partyA requested to open at (wei).
openedPricebigint
Price partyB actually opened at (wei), when known.
initialOpenedPricebigint
Initial price partyB opened at before any edits (wei), when known.
avgClosedPricebigint
Average price across executed closes (wei), when known.
requestedClosePricebigint
Requested limit price for a pending close (wei), when known.
marketPricebigint
Market price snapshot at last state change (wei), when known.
quantitybigint
Total requested quantity (wei) — fixed for the life of the position; partial closes do not shrink it.
closedAmountbigint
Quantity already closed (wei), when known.
openQuantitybigint
Remaining open size (wei): quantity − closedAmount, the live quantity still on the position (the figure a UI shows as “position size”); 0 once fully closed.
quantityToClosebigint
Quantity targeted by a pending close (wei), when closing.
lockedValuesLockedValues
Margin locked against the row (wei) — CVA, LF, and the two maintenance-margin legs.
initialLockedValuesLockedValues
Margin locked at open time — basis for leverage (wei), when known.
maxFundingRatebigint
Maximum funding rate partyA accepts, when known.
accumulatedPaidFundingbigint
Net funding paid (positive) or received (negative) over the position’s life (wei), when known.
lastFundingPaymentTimestampbigint
Block timestamp funding was last applied, when known.
deadlinebigint
Quote deadline (expiry) timestamp, when known.
tradingFeebigint
Trading fee charged on the quote (wei), when known.
closeFeebigint
Fee charged on close (wei), when known.
affiliateAddress
Affiliate address attributed to the quote, when known.
partyBsWhiteListreadonly Address[]
PartyB addresses allowed to fill this quote (empty means any), when known.
parentIdbigint
Parent quote id for a partially-opened child, when known.
dataHex
Opaque per-quote data, when known.
createTimestampbigint
Block timestamp the quote was created, when known.
statusModifyTimestampbigint
Block timestamp of the last status change (the reconciler’s sort key), when known.
raw{ onchain?; instantOpen?; instantClose? }
Untouched source rows this was reconciled from: the on-chain Quote (onchain), the PendingInstantOpen (instantOpen), and/or the PendingInstantClose (instantClose) it was merged from.
Last updated on