@somnia-chain/markets-sdk / index
index
Classes
- SomniaMarketsError
- InvalidInputError
- NotConfiguredError
- SignerRequiredError
- IndexerError
- RpcError
- ContractRevertError
- SomniaMarkets
Interfaces
- Erc20Metadata
- BalanceQuery
- GetVaultBalanceParams
- GetOutcomeBalanceParams
- SomniaMarketsAddresses
- PriceFeedConfig
- FixedFees
- ClientConfig
- Span
- DebugCollector
- BinaryOrderQuote
- MarketStats24h
- BinaryPositionPnL
- PnLEvent
- ClaimablePosition
- ClaimableInput
- BinaryCrossingParams
- BinaryStakeQuote
- BinarySellQuote
- EntryTrade
- OutcomePositionMark
- BuilderApprovalRef
- FundingBucketLike
- SetAdapterApprovedParams
- GovernanceAdmin
- DecodedOutcomeId
- SomniaLendClient
- LendWriteOptions
- LendSupplyOptions
- LendWithdrawOptions
- LendRepayOptions
- Lender
- LendAddresses
- LendReserve
- LendPosition
- LendAccount
- WatchHandle
- OracleHubAdminConfig
- OrderBookParams
- CreateMarketCreatorParams
- CreateMarketCreatorResult
- FundMarketCreatorParams
- RegisterSeriesParams
- TriggerRollParams
- SetReactivityGasParamsParams
- ArmFirstRollParams
- ReclaimOracleCreditParams
- MarketCreatorOnchain
- SeriesOnchain
- MarketCreatorAdmin
- MachineryStep
- MarketTypePlugin
- MarketOnchain
- MarketOnchainSources
- ContractMeta
- OperatorAdminConfig
- VenueConfigInput
- RegisterOperatorParams
- RegisterOperatorResult
- UpdateOperatorParams
- SetOperatorEnabledParams
- TransferOperatorOwnershipParams
- AcceptOperatorOwnershipParams
- CreateVenueParams
- CreateVenueResult
- UpdateVenueParams
- SetVenueEnabledParams
- OperatorAdmin
- BinaryVenueParams
- QuestionSourceInput
- QuestionIntervalInput
- ValidAnswersInput
- QuestionDefinitionInput
- HubQuestionState
- HubStatus
- ScheduleQuestionParams
- ScheduleQuestionResult
- WithdrawParams
- WithdrawMyCreditParams
- FundHubParams
- SetHubGasParams
- SetHubDrainParams
- EnableHubReactivityParams
- OracleHubAdmin
- BinaryOrderBook
- BinaryBookParams
- OnchainOrder
- SpotOrderBook
- MarginAccount
- AccountHealth
- PerpRiskParams
- PerpLiquidationPriceInputs
- PerpLeverage
- PerpPositionAnalyticsInputs
- PerpPositionMetrics
- PerpSideHoldersRef
- GetPerpSideHoldersOptions
- PerpSideHolders
- GetBankruptcyPriceOptions
- UnsignedMarginDeposit
- PerpOrderMarginQuoteInputs
- PerpOrderMarginQuote
- PerpStateOnchain
- PerpPosition
- PerpPositionRef
- UnsignedPerpStopOrder
- PerpSystemConfig
- InsuranceFundTier
- InsuranceFundState
- LiquidationEngineConfig
- PoolBindingRecord
- IndexedPool
- PreflightResult
- OperatorPreflightInput
- VenuePreflightInput
- HubPreflightInput
- CreateQuotePreflightInput
- MarketCreatorPreflightInput
- SeriesPreflightInput
- RollPreflightInput
- PriceWatchHandle
- LivePrice
- PricePoint
- PriceCandle
- PriceFeedInfo
- SomniaMarketsClient
- IsGloballyApprovedParams
- IsApprovedForPoolParams
- GetAutoPullRequirementParams
- AutoPullRequirement
- IsOperatorAuthorizedParams
- LockedBalance
- TokenLockBreakdown
- LockedTokenBreakdown
- GetManualVaultModeParams
- TailStatus
- LiveFundingUpdate
- LiveFill
- LiveOrder
- BookLevel
- MarketCreatorInfo
- SystemInfo
- TraderConfig
- TxResult
- OrderFill
- PlaceStopOrderResult
- PlacePerpStopOrderResult
- PlaceOrderResult
- PlaceOrderParams
- ApproveBuilderParams
- CancelOrderParams
- ReduceOrderParams
- CancelExpiredOrdersParams
- SweepExpiredAtLevelParams
- PlaceSpotOrderParams
- SpotOrderRequest
- PlaceSpotOrdersParams
- BatchPlaceOutcome
- PlaceSpotOrdersResult
- CancelOrdersParams
- BatchCancelOutcome
- CancelOrdersResult
- ReduceOrderRequest
- ReduceOrdersParams
- PlacePerpOrderParams
- BatchOrderRequest
- AmendOrdersParams
- AmendOrdersResult
- AmendOrderParams
- AmendOrderResult
- DepositMarginParams
- WithdrawMarginParams
- WithdrawVaultParams
- DepositVaultParams
- DepositVaultNativeParams
- SetManualVaultModeParams
- SetOperatorApprovalGlobalParams
- SetOperatorApprovalForPoolParams
- SetPerpLeverageParams
- PlaceSpotStopOrderParams
- CancelStopOrderParams
- ClaimPerpStopSomiParams
- PerpStopOrderLeg
- PlacePerpStopOrderParams
- LinkPerpStopOrdersParams
- CancelPerpStopOrdersParams
- MintSetParams
- BurnSetParams
- RedeemParams
- RedeemManyParams
- RedeemAuthorization
- SignRedeemAuthParams
- RedeemForParams
- RedeemDirectParams
- ClaimOwedParams
- FinalizeMarketParams
- SyncSettlementParams
- ReleasePoolParams
- PokeOracleParams
- VoidExpiredParams
- SettlementRecord
- Permit2TransferFrom
- RouterMintBase
- MintSetNativeParams
- MintSetPermit2Params
- RedeemNativeParams
- FaucetParams
- ResolveParams
- VoidMarketParams
- Trader
- CreateOrderParams
- PortfolioFlowEvent
- MarkSources
- EquityPoint
- PnlBucket
- PortfolioAnalytics
- PortfolioAnalyticsOptions
- MarketOrderEstimate
- UnifiedMarket
- UnifiedOrderBook
- UnifiedTrade
- UnifiedOrder
- UnifiedStopOrder
- UnifiedBalance
- UnifiedBalances
- UnifiedTicker
- UnifiedFundingRate
- UnifiedPosition
- UnifiedPrice
- Tradable
- YesBookTop
- BinaryOutcomePnl
- BinaryPnl
- BinaryPnlFill
- UnsignedCall
- UnsignedOrder
Type Aliases
- OutcomeBalances
- PortfolioMarket
- PortfolioPosition
- OpenPositionPnL
- PortfolioOrder
- PortfolioTrade
- Portfolio
- PortfolioOptions
- VaultPayoutFallback
- MarketResolutionEvent
- MarketReferenceLink
- OracleAnswer
- Candle
- DebugEvent
- BinaryBuySide
- BinarySellSide
- PositionMarkState
- ProtocolFeeRecord
- BuilderFeeRecord
- SettlementFeeRecord
- BuilderApproval
- FillsOptions
- FillRow
- FundingSeriesBucket
- FundingRateSeries
- OutcomeIdx
- IntervalSource
- LenderConfig
- WatchStatus
- IndexedSeries
- IndexedMarketCreator
- IndexedOracleAdapter
- IndexedMarketCreatorPolicy
- MarketCreatorFilter
- MarketType
- BaseMarket
- SpotMarket
- PerpMarket
- BinaryMarket
- Market
- BinaryMarketFilter
- BinaryMarketOrderBy
- MarketFees
- SpotMarketFilter
- MarketStatusUpdate
- PerpMarketFilter
- LiveBinaryMarketsFilter
- PastBinaryMarketsOptions
- IndexedOperator
- IndexedVenue
- OperatorFilter
- OracleQuestionRecord
- OperatorHubAccountRecord
- OracleBindRecord
- OracleCallbackRecord
- OpenOrder
- OrdersOptions
- OrderRow
- BookTop
- SweepableOrder
- FundingPayment
- MarginEvent
- LiquidationEvent
- FundingRateUpdate
- FundingRateCandle
- PerpFeeRecord
- OpenInterestSnapshot
- MarginStatus
- PerpHealthSnapshot
- PerpPositionAnalytics
- PerpOrderMarginPreview
- PerpMaxOrderSizeLimit
- PerpMaxOrderSize
- PerpLiquidationPreview
- PerpClosePreview
- PerpPortfolioMarket
- PerpPortfolioOrder
- PerpPortfolioTrade
- PerpPortfolio
- TerminalOrderStatus
- PerpOrderHistoryRow
- PerpPoolStatus
- IndexedPerpPosition
- PerpStopDropReason
- PerpStopOrderMarket
- PerpStopOrder
- PerpStopOrderOnChain
- PriceCandleResolution
- PriceFeedStatus
- QueryKeyElement
- ClientQueryKey
- RouterActionKind
- RouterActionRecord
- SpotPortfolioMarket
- SpotPortfolioOrder
- SpotPortfolioTrade
- SpotPortfolio
- StopOrderStatus
- SpotStopOrder
- TailMode
- BinarySide
- BinaryFillKind
- OrderStatus
- BinaryMarketStatus
- LiveMarket
- IndexerSyncStatus
- PerpStopIntent
- SomniaMarketsConfig
- PortfolioTimeframe
- MarkSeries
- UnifiedBookLevels
- QuoteDenomination
- UnifiedMarketType
- UnifiedOrderStatus
- UnifiedStopOrderStatus
- UnifiedOHLCV
Variables
- SOMNIA_TESTNET_ADDRESSES
- SOMNIA_MAINNET_ADDRESSES
- binaryMarketTypePlugin
- CANDLE_INTERVALS
- SOMNIA_TESTNET_PRICE_FEED
- DEFAULT_FEES
- DEFAULT_SLIPPAGE_BPS
- DEFAULT_SLIPPAGE_MIN_TICKS
- orderBookEventsAbi
- FUNDING_PRECISION
- EIGHT_HOURS_SEC
- ONE_HOUR_SEC
- ONE_YEAR_SEC
- SOMNIA_MAINNET_LEND
- SOMNIA_TESTNET_LEND
- lendPoolAbi
- lendUiPoolDataProviderAbi
- lendGatewayAbi
- lendDebtTokenAbi
- RAY
- oracleHubAbi
- oracleHubEventsAbi
- MARKET_TYPE_PLUGINS
- binaryModuleWriteAbi
- binaryModuleReadAbi
- MARKET_TYPE_BINARY_V1
- QUESTION_SOURCE_TYPE
- ANSWER_TYPE
- MARGIN_STATUS
- PERP_POOL_FACTORY_MARKET_STATUS_INTERFACE_ID
- PERP_STOP_DROP_REASON
- ZERO_ADDRESS
- HUB_MIN_FREE_BALANCE_WEI
- MIN_SERIES_INTERVAL_SEC
- PRICE_FEED_DECIMALS
- PRICE_RESOLUTION_SECONDS
- QUERY_KEY_SCOPE
- binarySettlementAbi
- erc6909Abi
- PLACE_ORDER_FOR_SELECTOR
- CANCEL_ORDER_FOR_SELECTOR
- DECIMALS
- ORDER_KIND_SIDE
- ORDER_TYPE
- SELF_MATCHING_OPTION
- binaryPoolWriteAbi
- spotPoolWriteAbi
- perpPoolWriteAbi
- DEFAULT_CEX_RATE_BPS
- TIMEFRAMES
- NATIVE_TOKEN_SENTINEL
- ORDER_KIND
Functions
- consoleDebugSink
- debugCollector
- quoteBinaryOrderOverBook
- marketStats24hFromCandles
- pnlEventsFor
- computePositionPnL
- estPayoutFor
- claimableFrom
- slippageForCrossing
- quoteBinaryStakeOverBook
- quoteBinarySellOverBook
- midYesPrice
- averageEntryPrice
- outcomeMarkPrice
- markOutcomePosition
- positionMarkState
- normalizeFundingRate
- fundingRate8h
- fundingRate1h
- fundingRatePerInterval
- annualizedFundingRate
- intervalsPerWindow
- realizedFundingPerBase
- isFundingStale
- densifyFundingBuckets
- buildFundingRateSeries
- outcomeId
- decodeOutcomeId
- marketKey
- resolveIntervalSec
- snapIntervalSec
- formatIntervalLabel
- marketIntervalLabel
- rayMul
- accrueLinear
- accrueCompounded
- lendRayRateToApy
- getMarketTypePlugin
- listMarketTypePlugins
- isBinaryMarket
- isSpotMarket
- isPerpMarket
- decodeBinaryVenueFeeParams
- perpMarkForPnl
- decodePerpStopOrderIds
- preflightOperator
- preflightVenue
- preflightHub
- preflightCreateQuote
- preflightMarketCreator
- preflightSeries
- preflightRoll
- preflightChain
- isLocalPrecompileUnavailable
- marketsKey
- portfolioKey
- candlesKey
- marketFeesKey
- operatorsKey
- marketCreatorsKey
- oracleAdaptersKey
- syncStatusKey
- maxVenueFeeBpsKey
- marketOnchainKey
- sideOfKind
- fillKind
- computePortfolioAnalytics
- estimateMarketOrder
- bookMidPrice
- fillsWithinSlippage
- toHuman
- toHumanString
- fromHuman
- priceToProbability
- probabilityToPrice
- markYesPrice
- binaryFillsFor
- binaryFillsFromPortfolio
- computeBinaryPnl
- balanceFloor
- floorRawBalance
- ceilRawAmount
- upProbability
- upPercent
References
GovernanceAdminConfig
Renames and re-exports OracleHubAdminConfig
MarketCreatorAdminConfig
Renames and re-exports OracleHubAdminConfig