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

toUnifiedQuoteFromOnchain

Build a UnifiedQuote from an on-chain Quote, without merging. Useful for a single-row projection of a raw on-chain read.

The lifecycle is derived from the quote’s QuoteStatus — open and pending statuses stay ONCHAIN, a pending close becomes CLOSING, a closed/cancelled/expired quote becomes CLOSED, and a liquidated quote becomes FAILED. Every amount is already 18-decimal wei on the on-chain struct, so it carries through untouched.

import { toUnifiedQuoteFromOnchain } from "@symmio/trading-core"; const row = toUnifiedQuoteFromOnchain(quote);

Parameters

quoteQuoterequired

The on-chain quote/position struct (from getQuote / getPartyAOpenPositions).

Returns

The unified row, origin: "onchain", keyed onchain:<id>, with raw.onchain carrying the source struct.

Last updated on