LogoLogo
  • Overview
    • Introduction
    • Table of Contents
  • Token Information
    • Symmio Foundation
  • Protocol Architecture
    • Protocol Introduction
    • Technical Documentation
      • Building an Application with SYMM
        • Introduction and Diamond Explainer
        • Querying Info from the SYMM Diamond
        • MultiAccount
        • Creating an Account and Depositing Funds
        • Sending a Quote
        • Closing a Quote
        • Instant Trading
          • Instant Login (EOA)
          • Instant Login (Account Abstraction)
          • Sending a Quote (Instant Open)
          • Sending a Quote (Instant Close)
        • Frequently Used Queries
      • Solver Docs
        • Solver Docs (github)
        • Solver Implementation Guide (High Level Overview)
        • Building a Solver on SYMMIO
          • 1. Intent Creation
          • 2. Seeing the Intent
          • 3. Hedging Off-Chain
          • 4. Opening/Closing a Position On-Chain
          • Creating the APIs
            • GET Contract Symbols
            • GET Open Interest
            • GET Notional Cap
            • GET Price Range
            • GET Error Codes
            • GET Get Locked Params
            • GET Get Funding Info
            • POST Position State
          • Solver Flow Summary Example
          • Recommended Architecture for Solvers
          • Glossary
        • Conditional Orders Handler
        • Rasa Solver TP/SL Implementation
        • Instant Trading
          • Instant Trading (Solvers)
          • Rasa Instant Trading Implementation
          • Instant Trading Condition Checks
        • Fetching Gas Prices Script
        • How to Add a Market as a Solver
        • Verifying Account Abstracted Instant Actions (ERC-4337)
      • Frontend Docs
        • Setting up a Frontend with SYMMIO
        • Frontend SDK Setup Guide
        • MultiAccount Deployment Guide
        • Instant Trading (Frontends)
          • Account Abstracted Instant Actions (Frontends)
        • Implement a Trading Bot on Symmio (OLD)
          • Setup
          • Creating a Sub-Account
          • Minting Collateral Tokens (Optional)
          • Depositing and Allocating Tokens
          • Obtaining Muon Signatures
          • Sending a Quote
          • Monitoring Price for Execution
      • Contract Docs
        • SYMMIO CORE v0.82
        • Contracts Documentation 0.8.2
          • Main Flow
          • The SYMM Diamond
          • Facets
            • Account Facet
            • Control Facet
            • Funding Rate Facet
            • PartyA Facet
            • PartyB Facet
            • Liquidation Facet
            • View Facet
          • MultiAccount
            • PartyA
            • PartyB
          • SYMM App (Muon)
            • LibMuon
            • MuonStorage
        • Contracts Documentation 0.8.3
          • Facets
            • Control Facet
            • Account Facet
            • PartyA Facet
            • PartyB Facet
            • View Facet
            • Bridge Facet
            • Liquidation Facet (Implementation)
          • Modified Events
          • New Events
          • MuonStorage
        • Contracts Documentation 0.8.4
          • Main Flow (0.8.4)
          • The SYMM Diamond (0.8.4)
          • Facets
            • Account Facet (0.8.4)
            • Bridge Facet (0.8.4)
            • Control Facet (0.8.4)
            • Force Actions Facet (0.8.4)
            • Funding Rate Facet (0.8.4)
            • Liquidations Facet (0.8.4)
            • PartyA Facet (0.8.4)
            • PartyB Group Actions Facet (0.8.4)
            • PartyB Quote Actions Facet (0.8.4)
            • PartyB Position Actions Facet (0.8.4)
            • Settlement Facet (0.8.4)
            • View Facet (0.8.4)
          • MultiAccount (0.8.4)
            • SymmioPartyA
            • SymmioPartyB
          • SYMM App (Muon)
            • LibMuon (0.8.4)
            • MuonStorage (0.8.4)
      • Contract Addresses / Solver Endpoints
        • Mantle
        • Mode
        • IOTA
        • Base
        • BSC
        • Arbitrum
        • Polygon
        • Berachain
        • Solver Endpoints and Addresses
          • Perps Hub
          • Rasa Capital
          • Rasa Capital (Zero Spread)
          • Zenith
      • How to Query our Contracts
      • Muon API Queries
      • Solver Error Codes
      • Interacting with SYMMIO Contracts
    • Protocol higher level architecture
      • 12-Hour Fraud Proof Window
      • PartyB
      • Solver Settings
      • Max Leverage
      • Maintenance Margin (CVA) Calculations
    • Symmio Whitepaper
  • Building on Symmio
    • Builders introduction
    • Solving for Symmio
      • Solver documentation
      • Solver - Example Flow
    • Trading Fees
      • Perps - Settlement Costs
      • Pair Trading - Settlement costs
    • Exchanges (Frontends)
      • Frontend Introduction
      • SDK - SYMM client
      • Trade on Symmio
  • Legal & Brand & Security
    • Security (Audits / Bugbounty)
      • Bug bounty / Coverage
        • How to contact ?
      • Audits
        • SYMM - V0.8 - 0.81
          • Sherlock Audit - Jun 15, 2023
          • Smart State - Jul 2, 2023
        • SYMM - 0.82
          • Sherlock Audit -Aug 30, 2023
        • SYMM - 0.83
          • Sherlock Audit - Jun 17, 2024
        • SYMM - 0.84
          • Sherlock Audit - Oct 3, 2024
        • Vaults
          • Sherlock Audit - Jan 2, 2024
    • Terms of Service & Licensing
      • TRADEMARK & COPYRIGHT NOTICE
      • CONTACT US
      • TERMS OF SERVICE
      • FRONTEND LICENSE
        • Frontend Modifications
        • Frontend Use Grants
      • CONTRACT LICENSE
        • Contract Use Grants
        • Contract Modifications
    • Brand - Assets Logos
Powered by GitBook
LogoLogo

All rights to the people (c) 2023 Symmetry Labs A.G.

On this page
  • Introduction
  • Overview of the Muon API
  • API Query Endpoints
  • [GET] uPnl_A
  • [GET] partyA_overview
  • [GET] uPnl_A_withSymbolPrice
  • [GET] uPnl_B
  • [GET] uPnl
  • [GET] uPnlWithSymbolPrice
  • [GET] price
  • [GET] settle_upnl
  1. Protocol Architecture
  2. Technical Documentation

Muon API Queries

PreviousHow to Query our ContractsNextSolver Error Codes

Last updated 24 days ago

Introduction

The Muon API is a decentralized, off-chain oracle service that provides cryptographic signatures used by both solvers and 3rd party frontends for price validations, solvency checks, and liquidation dispute resolutions. Muon signatures are appended to contract calls like sendQuote() and openPosition(), then verified on-chain before execution, ensuring that only validated data triggers on-chain actions.

The signatures returned by the Muon API confirm that the quoted price has been validated by the Muon network and that both counterparties meet the platform’s solvency requirements. These endpoints return structured JSON payloads.

Overview of the Muon API

The Muon API provides a suite of off‑chain services for critical trading operations. Its main capabilities include:

  • Price Validation for a Symbol: Retrieve signed price data for any supported asset symbol, ensuring the price is authenticated by the Muon network.

  • Unrealized Profit and Loss (uPnL) Calculation: Compute uPnL for individual parties (partyAor partyB) or for combined positions.

  • Verification for Settling Prices: Used to settle unrealized PnL, resolve price disputes, and trigger liquidation or settlement functions securely.

API Query Endpoints

The Muon app can be queried using these URLs on all supported chains, if one is unresponsive please try another.

Polygon Chain URL:

[GET] uPnl_A

Request URL Example:

https://muon-oracle4.rasa.capital/v1/?app=symmio&method=uPnl_A&params[partyA]=0x33D689034225A67454980c9D91E35C03a4765B30&params[chainId]=42161&params[symmio]=0x8F06459f184553e5d04F07F868720BDaCAB39395

Parameters:

  • partyA (address): The address of partyA.

  • chainId (uint): The chain id.

  • symmio (address): The address of the Symmio diamond contract.

Returns:

  • chainId (string): The chain identifier.

  • partyA (address): The address of partyA.

  • symmio (address): Address of the Symmio diamond contract.

  • uPnl (string): The verified unrealized PnL value for partyA.

  • notionalValueSum (string): Sum of notional values for all positions.

  • nonce (string): Unique nonce or address used for replay protection (init.nonceAddress).

  • timestamp (uint): The block timestamp at which the data was generated.

  • symbolIds (string[]): List of symbol IDs involved in the calculation.

  • symbols (string[]): Corresponding asset symbols.

  • symbolIdsPrices (string[]): Price values indexed by symbolIds.

  • quoteIds (string[]): IDs of the quotes used.

  • signature (bytes): Muon-generated signature (signatures[0].signature).

  • owner (address): Address of the signer (signatures[0].owner).

  • nodeSignature (bytes): Gateway signature appended on contracts (signatures[0].nodeSignature).

Output Schema:

{
    "success": true,
    "result": {
        "reqId": "0xaac5f0d67661b82592e1cc348821627e4113072cf0d809ddaea569b1bd93db8b",
        "app": "symmio",
        "appId": "67095677696457568621176602095256212877581942797155816526660337292193161013107",
        "method": "uPnl_A",
        "data": {
            "params": {
                "partyA": "0x33D689034225A67454980c9D91E35C03a4765B30",
                "chainId": "42161",
                "symmio": "0x8F06459f184553e5d04F07F868720BDaCAB39395"
            },
            "timestamp": 1745187906,
            "uid": "1ipaks9dcduq98o",
            "result": {
                "chainId": "42161",
                "partyA": "0x33D689034225A67454980c9D91E35C03a4765B30",
                "symmio": "0x8F06459f184553e5d04F07F868720BDaCAB39395",
                "liquidationId": "0x24e881fb2e2a3c86de559c9b181c2687240abb56d36d768c14ce12f1147c4b75",
                "latestBlockNumber": "328484529",
                "uPnl": "434926000148088858",
                "loss": "0",
                "notionalValueSum": "12127366419851911141",
                "nonce": "45",
                "pricesMap": {
                    "AUCTIONUSDT_BYBIT": "11087000000000000000",
                    "SIRENUSDT_BYBIT": "60880000000000000",
                    "UNIUSDT_BYBIT": "5209000000000000000",
                    "HPOS10IUSDT_BYBIT": "46950000000000000",
                    "BTCUSDT-26DEC25_BYBIT": "88773910000000000000000",
                    "ETHUSDT-27MAR26_BYBIT": "1661560000000000000000",
                    //...
                },
                "symbolIds": [
                    "340"
                ],
                "symbols": [
                    "XRPUSDT"
                ],
                "symbolIdsPrices": [
                    "2059392200000000000"
                ],
                "prices": [
                    "2059392200000000000"
                ],
                "quoteIds": [
                    "31742"
                ],
                "markPrices": {
                    "binance": {
                        "AUCTIONUSDT_BYBIT": "11087000000000000000",
                        "SIRENUSDT_BYBIT": "60880000000000000"
                      //...
                        }
                },
                "maxLeverages": {},
                "partyBs": [
                    "0x00c069d68bc7420740460DBC3cc3fFF9b3742421"
                ]
            },
            "signParams": [
                {
                    "name": "appId",
                    "type": "uint256",
                    "value": "67095677696457568621176602095256212877581942797155816526660337292193161013107"
                },
                {
                    "name": "reqId",
                    "type": "bytes",
                    "value": "0xaac5f0d67661b82592e1cc348821627e4113072cf0d809ddaea569b1bd93db8b"
                },
                {
                    "type": "address",
                    "value": "0x8F06459f184553e5d04F07F868720BDaCAB39395"
                },
                {
                    "type": "address",
                    "value": "0x33D689034225A67454980c9D91E35C03a4765B30"
                },
                {
                    "type": "uint256",
                    "value": "45"
                },
                {
                    "type": "int256",
                    "value": "434926000148088858"
                },
                {
                    "type": "uint256",
                    "value": 1745187906
                },
                {
                    "type": "uint256",
                    "value": "42161"
                }
            ],
            "resultHash": "0xd4c85326971cb16d5b454719b2524146c823140b69e09f4513d319c948cfea30",
            "init": {
                "nonceAddress": "0x7Ef0951eC563cA029F433B0Ef94696BB1444ACce"
            }
        },
        "signatures": [
            {
                "owner": "0x8a59b05281ac699321D93974A228E7EC0A2c9357",
                "ownerPubKey": {
                    "x": "0x3fb5a506c907e2f6984e4f7207fc445d3c847474d056adfd4718f17548b72136",
                    "yParity": "0"
                },
                "signature": "0xa0d78b6eef8101e2f655101c6e005f8193d699fc842e308c0555979f44206ac6"
            }
        ],
        "gwAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldSignature": "0xb52cd057e31e2bd96a39f2bf03fc65b6d56ed4862edb9c9989ba131ce03d8adc71340ad397f9cd3cd0e96a0015cf2ac245a11e1ba138c2cbaefdd09f7e5c4a121c",
        "nodeSignature": "0xb52cd057e31e2bd96a39f2bf03fc65b6d56ed4862edb9c9989ba131ce03d8adc71340ad397f9cd3cd0e96a0015cf2ac245a11e1ba138c2cbaefdd09f7e5c4a121c",
        "confirmed": true
    }
}

[GET] partyA_overview

Request URL Example:

https://muon-oracle4.rasa.capital/v1/?app=symmio&method=partyA_overview&params[partyA]=0x33D689034225A67454980c9D91E35C03a4765B30&params[chainId]=42161&params[symmio]=0x8F06459f184553e5d04F07F868720BDaCAB39395

Parameters:

  • partyA (address): The address of partyA.

  • chainId (uint): The chain id.

  • symmio (address): The address of the Symmio diamond contract.

Returns :

  • chainId, partyA, symmio, uPnl, notionalValueSum, nonce, timestamp, symbolIds, symbols, symbolIdsPrices, quoteIds (same as uPnl_A).

  • signature (bytes): Muon-generated signature for liquidation (signatures[0].signature).

  • owner (address): Address of the signer (signatures[0].owner).

  • nodeSignature (bytes): Gateway signature appended on contracts.

Example API Query

https://muon-oracle4.rasa.capital/v1/?app=symmio&method=partyA_overview&params[partyA]=0x33D689034225A67454980c9D91E35C03a4765B30&params[chainId]=42161&params[symmio]=0x8F06459f184553e5d04F07F868720BDaCAB39395

Example Response

{
    "success": true,
    "result": {
        "reqId": "0x1444f044ea93ebd50ff0498df313adb550aa4e7089b32c41158061f58d8ef4ce",
        "app": "symmio",
        "appId": "67095677696457568621176602095256212877581942797155816526660337292193161013107",
        "method": "partyA_overview",
        "data": {
            "params": {
                "partyA": "0x33D689034225A67454980c9D91E35C03a4765B30",
                "chainId": "42161",
                "symmio": "0x8F06459f184553e5d04F07F868720BDaCAB39395"
            },
            "timestamp": 1745189827,
            "uid": "1ipammt0j6fqdc7",
            "result": {
                "chainId": "42161",
                "partyA": "0x33D689034225A67454980c9D91E35C03a4765B30",
                "symmio": "0x8F06459f184553e5d04F07F868720BDaCAB39395",
                "liquidationId": "0x9ab63fa5515201ab6f7b054e5486e827be192414cf80ab8d6fd313931c46c0c4",
                "latestBlockNumber": "328492046",
                "uPnl": "488043580148088858",
                "loss": "0",
                "notionalValueSum": "12127366419851911141",
                "nonce": "45",
                "pricesMap": {
                    "AUCTIONUSDT_BYBIT": "11166000000000000000",
                    "SIRENUSDT_BYBIT": "61720000000000000",
                    "UNIUSDT_BYBIT": "5223000000000000000",
                    "HPOS10IUSDT_BYBIT": "46930000000000000",
                    //...
                },
                "symbolIds": [
                    "340"
                ],
                "symbols": [
                    "XRPUSDT"
                ],
                "symbolIdsPrices": [
                    "2068100000000000000"
                ],
                "prices": [
                    "2068100000000000000"
                ],
                "quoteIds": [
                    "31742"
                ],
                "markPrices": {
                    "binance": {
                        "AUCTIONUSDT_BYBIT": "11166000000000000000",
                        "SIRENUSDT_BYBIT": "61720000000000000",
                        "UNIUSDT_BYBIT": "5223000000000000000",
                        "HPOS10IUSDT_BYBIT": "46930000000000000",
                        "BTCUSDT-26DEC25_BYBIT": "88929110000000000000000",
                        //...
                    }
                },
                "maxLeverages": {},
                "partyBs": [
                    "0x00c069d68bc7420740460DBC3cc3fFF9b3742421"
                ]
            },
            "signParams": [
                {
                    "name": "appId",
                    "type": "uint256",
                    "value": "67095677696457568621176602095256212877581942797155816526660337292193161013107"
                },
                {
                    "name": "reqId",
                    "type": "bytes",
                    "value": "0x1444f044ea93ebd50ff0498df313adb550aa4e7089b32c41158061f58d8ef4ce"
                },
                {
                    "type": "bytes",
                    "value": "0x9ab63fa5515201ab6f7b054e5486e827be192414cf80ab8d6fd313931c46c0c4"
                },
                {
                    "type": "address",
                    "value": "0x8F06459f184553e5d04F07F868720BDaCAB39395"
                },
                {
                    "type": "string",
                    "value": "verifyLiquidationSig"
                },
                {
                    "type": "address",
                    "value": "0x33D689034225A67454980c9D91E35C03a4765B30"
                },
                {
                    "type": "uint256",
                    "value": "45"
                },
                {
                    "type": "int256",
                    "value": "488043580148088858"
                },
                {
                    "type": "int256",
                    "value": "0"
                },
                {
                    "type": "uint256[]",
                    "value": [
                        "340"
                    ]
                },
                {
                    "type": "uint256[]",
                    "value": [
                        "2068100000000000000"
                    ]
                },
                {
                    "type": "uint256",
                    "value": 1745189827
                },
                {
                    "type": "uint256",
                    "value": "42161"
                }
            ],
            "resultHash": "0xcd6d018dcc61448c2edd19d819ca6c1b215a77ddc9af261a038d05cdcf3ca294",
            "init": {
                "nonceAddress": "0x587C97dA79E26dd1ee902f5846e8e8b37cc67e67"
            }
        },
        "signatures": [
            {
                "owner": "0x8a59b05281ac699321D93974A228E7EC0A2c9357",
                "ownerPubKey": {
                    "x": "0x3fb5a506c907e2f6984e4f7207fc445d3c847474d056adfd4718f17548b72136",
                    "yParity": "0"
                },
                "signature": "0x0c5204c1d436dae334968359f94fb5e93b12ab13d8816fb8d86e556e639a0458"
            }
        ],
        "gwAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldSignature": "0x5aac29fc1f7987fdd275c4e6ae9f7a38b60f6dd051beaa8543849bc0ce05009472479171aaef906936c012266f3d27210a6eb34927f9110e0a3b65deaab6912e1c",
        "nodeSignature": "0x5aac29fc1f7987fdd275c4e6ae9f7a38b60f6dd051beaa8543849bc0ce05009472479171aaef906936c012266f3d27210a6eb34927f9110e0a3b65deaab6912e1c",
        "confirmed": true
    }
}

[GET] uPnl_A_withSymbolPrice

Request URL Example:

https://muon-oracle4.rasa.capital/v1/?app=symmio&method=uPnl_A_withSymbolPrice&params[partyA]=0x33D689034225A67454980c9D91E35C03a4765B30&params[chainId]=42161&params[symbolId]=4&params[symmio]=0x8F06459f184553e5d04F07F868720BDaCAB39395

Parameters:

  • partyA (address): The address of partyA.

  • chainId (uint): The chain id.

  • symbolId (uint): The ID of the asset symbol to fetch the price for.

  • symmio (address): The address of the Symmio diamond contract.

Returns:

  • chainId (string): The chain identifier.

  • partyA (address): The address of partyA.

  • symbolId (string): The requested symbol ID.

  • price (string): The signed price value for the requested symbol.

  • uPnl (string): The verified unrealized PnL value for partyA.

  • notionalValueSum (string): Sum of notional values for all positions.

  • nonce (string): Unique nonce or address used for replay protection.

  • timestamp (uint): The block timestamp at which the data was generated.

  • symbolIds (string[]): List of all symbol IDs involved in the position.

  • symbols (string[]): Corresponding asset symbols.

  • symbolIdsPrices (string[]): Price values indexed by symbolIds.

  • quoteIds (string[]): IDs of the quotes used.

  • signature (bytes): Muon-generated signature (signatures[0].signature).

  • owner (address): Address of the signer (signatures[0].owner).

  • nodeSignature (bytes): Gateway signature appended on contracts, verified on-chain before execution.

Example Response:

{
    "success": true,
    "result": {
        "reqId": "0xf18addb4dcb95a789848f74566950e7bfdab0f33382a5d635af3604294b534f1",
        "app": "symmio",
        "appId": "67095677696457568621176602095256212877581942797155816526660337292193161013107",
        "method": "uPnl_A_withSymbolPrice",
        "data": {
            "params": {
                "partyA": "0x33D689034225A67454980c9D91E35C03a4765B30",
                "chainId": "42161",
                "symbolId": "4",
                "symmio": "0x8F06459f184553e5d04F07F868720BDaCAB39395"
            },
            "timestamp": 1745192081,
            "uid": "1ipaormab65g838",
            "result": {
                "chainId": "42161",
                "partyA": "0x33D689034225A67454980c9D91E35C03a4765B30",
                "symbolId": "4",
                "price": "2069300000000000000",
                "symmio": "0x8F06459f184553e5d04F07F868720BDaCAB39395",
                "latestBlockNumber": "328500917",
                "uPnl": "495363580148088858",
                "loss": "0",
                "notionalValueSum": "12127366419851911141",
                "nonce": "45",
                "pricesMap": {
                    "AUCTIONUSDT_BYBIT": "11229000000000000000",
                    "SIRENUSDT_BYBIT": "60980000000000000",
                    "UNIUSDT_BYBIT": "5233000000000000000",
                    "HPOS10IUSDT_BYBIT": "47020000000000000",
                    "BTCUSDT-26DEC25_BYBIT": "89132620000000000000000",
                                            //...
                },
                "symbolIds": [
                    "340"
                ],
                "symbols": [
                    "XRPUSDT"
                ],
                "symbolIdsPrices": [
                    "2069300000000000000"
                ],
                "prices": [
                    "2069300000000000000"
                ],
                "quoteIds": [
                    "31742"
                ],
                "markPrices": {
                    "binance": {
                        "AUCTIONUSDT_BYBIT": "11229000000000000000",
                        "SIRENUSDT_BYBIT": "60980000000000000",
                        "UNIUSDT_BYBIT": "5233000000000000000",
                        "HPOS10IUSDT_BYBIT": "47020000000000000",
                                           //...
                    }
                },
                "maxLeverages": {},
                "partyBs": [
                    "0x00c069d68bc7420740460DBC3cc3fFF9b3742421"
                ]
            },
            "signParams": [
                {
                    "name": "appId",
                    "type": "uint256",
                    "value": "67095677696457568621176602095256212877581942797155816526660337292193161013107"
                },
                {
                    "name": "reqId",
                    "type": "bytes",
                    "value": "0xf18addb4dcb95a789848f74566950e7bfdab0f33382a5d635af3604294b534f1"
                },
                {
                    "type": "address",
                    "value": "0x8F06459f184553e5d04F07F868720BDaCAB39395"
                },
                {
                    "type": "address",
                    "value": "0x33D689034225A67454980c9D91E35C03a4765B30"
                },
                {
                    "type": "uint256",
                    "value": "45"
                },
                {
                    "type": "int256",
                    "value": "495363580148088858"
                },
                {
                    "type": "uint256",
                    "value": "4"
                },
                {
                    "type": "uint256",
                    "value": "2069300000000000000"
                },
                {
                    "type": "uint256",
                    "value": 1745192081
                },
                {
                    "type": "uint256",
                    "value": "42161"
                }
            ],
            "resultHash": "0xa9ef52e352135f76e45de5ba98707620eed0aa5558e371d9f11db4ec2eff0f6b",
            "init": {
                "nonceAddress": "0x185d3c71a3383Bb213D175539680087525c2bf75"
            }
        },
        "signatures": [
            {
                "owner": "0x8a59b05281ac699321D93974A228E7EC0A2c9357",
                "ownerPubKey": {
                    "x": "0x3fb5a506c907e2f6984e4f7207fc445d3c847474d056adfd4718f17548b72136",
                    "yParity": "0"
                },
                "signature": "0x6e2c26bd5fe0c183288848a15af25cb5490a1522f449adbd99e4cf1b2f266c41"
            }
        ],
        "gwAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldSignature": "0x9578961837f44c85076d49d8def17350d532a7601e37a0e1fb36aad3ec57ddf82d2be44c584d68f9b13c461f2b06a4d97e4ee365d18b4a8bbb3275754940a9231c",
        "nodeSignature": "0x9578961837f44c85076d49d8def17350d532a7601e37a0e1fb36aad3ec57ddf82d2be44c584d68f9b13c461f2b06a4d97e4ee365d18b4a8bbb3275754940a9231c",
        "confirmed": true
    }
}

[GET] uPnl_B

Parameters:

  • partyB (address): The Ethereum address of partyB.

  • partyA (address): The Ethereum address of partyA (counterparty).

  • chainId (uint): The chain id.

  • symmio (address): The address of the Symmio diamond contract.

Returns:

  • chainId (string): The chain identifier.

  • partyB (address): The address of partyB.

  • partyA (address): The address of partyA.

  • symmio (address): Address of the Symmio diamond contract.

  • uPnl (string): The verified unrealized PnL value for partyB.

  • notionalValueSum (string): Sum of notional values for all positions.

  • nonce (string): Unique nonce or address used for replay protection.

  • timestamp (uint): The block timestamp at which the data was generated.

  • prices (string[]): Array of price values corresponding to active symbols.

  • quoteIds (string[]): IDs of the quotes used.

  • signature (bytes): Muon-generated signature (signatures[0].signature).

  • owner (address): Address of the signer (signatures[0].owner).

  • nodeSignature (bytes): Gateway signature appended on contracts, verified on-chain before execution.

Example API Query

https://muon-oracle4.rasa.capital/v1/?app=symmio&method=uPnl_B&params[partyB]=0x00c069d68bc7420740460DBC3cc3fFF9b3742421&params[partyA]=0x33D689034225A67454980c9D91E35C03a4765B30&params[chainId]=42161&params[symmio]=0x8F06459f184553e5d04F07F868720BDaCAB39395

Example Response:

{
    "success": true,
    "result": {
        "reqId": "0x0e03c1c879ca6c85b159bd34a46145ffc99a0c19b9782ccd7e88d13365114ebf",
        "app": "symmio",
        "appId": "67095677696457568621176602095256212877581942797155816526660337292193161013107",
        "method": "uPnl_B",
        "data": {
            "params": {
                "partyB": "0x00c069d68bc7420740460DBC3cc3fFF9b3742421",
                "partyA": "0x33D689034225A67454980c9D91E35C03a4765B30",
                "chainId": "42161",
                "symmio": "0x8F06459f184553e5d04F07F868720BDaCAB39395"
            },
            "timestamp": 1745192711,
            "uid": "1ipapesuim2pusg",
            "result": {
                "chainId": "42161",
                "partyB": "0x00c069d68bc7420740460DBC3cc3fFF9b3742421",
                "partyA": "0x33D689034225A67454980c9D91E35C03a4765B30",
                "symmio": "0x8F06459f184553e5d04F07F868720BDaCAB39395",
                "latestBlockNumber": "328503367",
                "uPnl": "-527693580148088858",
                "notionalValueSum": "12127366419851911141",
                "nonce": "45",
                "pricesMap": {
                    "AUCTIONUSDT_BYBIT": "11259000000000000000",
                    "SIRENUSDT_BYBIT": "60990000000000000",
                    "UNIUSDT_BYBIT": "5238000000000000000",
                    "HPOS10IUSDT_BYBIT": "47140000000000000",
                    "BTCUSDT-26DEC25_BYBIT": "89252190000000000000000",
                    "ETHUSDT-27MAR26_BYBIT": "1671870000000000000000",
                    //...
                },
                "prices": [
                    "2074600000000000000"
                ],
                "quoteIds": [
                    "31742"
                ],
                "markPrices": {
                    "binance": {
                        "AUCTIONUSDT_BYBIT": "11259000000000000000",
                        "SIRENUSDT_BYBIT": "60990000000000000",
                        "UNIUSDT_BYBIT": "5238000000000000000",
                        "HPOS10IUSDT_BYBIT": "47140000000000000",
                        "BTCUSDT-26DEC25_BYBIT": "89252190000000000000000",
                        "ETHUSDT-27MAR26_BYBIT": "1671870000000000000000",
                        //...
                    }
                }
            },
            "signParams": [
                {
                    "name": "appId",
                    "type": "uint256",
                    "value": "67095677696457568621176602095256212877581942797155816526660337292193161013107"
                },
                {
                    "name": "reqId",
                    "type": "bytes",
                    "value": "0x0e03c1c879ca6c85b159bd34a46145ffc99a0c19b9782ccd7e88d13365114ebf"
                },
                {
                    "type": "address",
                    "value": "0x8F06459f184553e5d04F07F868720BDaCAB39395"
                },
                {
                    "type": "address",
                    "value": "0x00c069d68bc7420740460DBC3cc3fFF9b3742421"
                },
                {
                    "type": "address",
                    "value": "0x33D689034225A67454980c9D91E35C03a4765B30"
                },
                {
                    "type": "uint256",
                    "value": "45"
                },
                {
                    "type": "int256",
                    "value": "-527693580148088858"
                },
                {
                    "type": "uint256",
                    "value": 1745192711
                },
                {
                    "type": "uint256",
                    "value": "42161"
                }
            ],
            "resultHash": "0x9aaf1dd77f5164d40955c0b6c8bf52cf8eaaf7135af7a6216933d158eaa36c10",
            "init": {
                "nonceAddress": "0x270A26B37d77DcFce322F8105fCD1720816ef156"
            }
        },
        "signatures": [
            {
                "owner": "0x8a59b05281ac699321D93974A228E7EC0A2c9357",
                "ownerPubKey": {
                    "x": "0x3fb5a506c907e2f6984e4f7207fc445d3c847474d056adfd4718f17548b72136",
                    "yParity": "0"
                },
                "signature": "0x2f8057fef7af7d7c478c8cef9f5edd09e67700fd61b44125c3a92d018a5356a1"
            }
        ],
        "gwAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldSignature": "0xdea7f1d31591519792d6137903d2bc5f7df8a8966f09bb5cb1ff55accfabb1b04e0d7d9f16909efd58be54da9aca0426c1c94af9924e292d4a585296d58433761b",
        "nodeSignature": "0xdea7f1d31591519792d6137903d2bc5f7df8a8966f09bb5cb1ff55accfabb1b04e0d7d9f16909efd58be54da9aca0426c1c94af9924e292d4a585296d58433761b",
        "confirmed": true
    }
}

[GET] uPnl

This endpoint calculates and returns combined unrealized profit and loss (uPnL) data for both parties in a trade, along with individual breakdowns.

Parameters:

  • partyB (address): The address of partyB.

  • partyA (address): The address of partyA.

  • chainId (uint): The chain id.

  • symmio (address): The address of the Symmio diamond contract.

Returns (inside result.data.result):

  • chainId (string): The chain identifier.

  • partyB (address): The address of partyB.

  • partyA (address): The address of partyA.

  • symmio (address): Address of the Symmio diamond contract.

  • uPnlB (string): The verified unrealized PnL value for partyB.

  • uPnlA (string): The verified unrealized PnL value for partyA.

  • notionalValueSumB (string): Sum of notional values for partyB’s positions.

  • notionalValueSumA (string): Sum of notional values for partyA’s positions.

  • nonceB (string): Nonce or address used for replay protection for partyB.

  • nonceA (string): Nonce or address used for replay protection for partyA (same field).

  • timestamp (uint): The block timestamp at which the data was generated.

  • pricesMap (object): Map of all symbol price feed values.

  • markPrices (object): Exchange-specific mark prices.

  • pricesB (string[]): Array of price values for partyB.

  • pricesA (string[]): Array of price values for partyA.

  • quoteIdsB (string[]): Quote IDs used for partyB.

  • quoteIdsA (string[]): Quote IDs used for partyA.

  • signature (bytes): Muon-generated signature (signatures[0].signature).

  • owner (address): Address of the signer (signatures[0].owner).

  • nodeSignature (bytes): Gateway signature appended on contracts, verified on-chain before execution.

Example API Query

https://muon-oracle1.rasa.capital/v1/?app=symmio&method=uPnl&params[partyB]=0x9206D9d8F7F1B212A4183827D20De32AF3A23c59&params[partyA]=0x3B5aC601c7bB74999AB3135fa43cbDBc6aB74570&params[chainId]=8453&params[symmio]=0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43

Example Response:

{
    "success": true,
    "result": {
        "reqId": "0xeacebfbc6b01dd2e5438826c4b193b0274ef3898c4e234a60247950aea1fd0ed",
        "app": "symmio",
        "appId": "67095677696457568621176602095256212877581942797155816526660337292193161013107",
        "method": "uPnl",
        "data": {
            "params": {
                "partyB": "0x9206D9d8F7F1B212A4183827D20De32AF3A23c59",
                "partyA": "0x3B5aC601c7bB74999AB3135fa43cbDBc6aB74570",
                "chainId": "8453",
                "symmio": "0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43"
            },
            "timestamp": 1745193175,
            "uid": "1ipapt23eqpui5i",
            "result": {
                "chainId": "8453",
                "partyB": "0x9206D9d8F7F1B212A4183827D20De32AF3A23c59",
                "partyA": "0x3B5aC601c7bB74999AB3135fa43cbDBc6aB74570",
                "symmio": "0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43",
                "latestBlockNumber": "29201913",
                "uPnlB": "0",
                "uPnlA": "0",
                "notionalValueSumB": "0",
                "notionalValueSumA": "0",
                "nonceB": "0",
                "nonceA": "0",
                "pricesMap": {
                    "VANRYUSDT_BYBIT": "25370000000000000",
                    "MAXUSDT_BYBIT": "39640000000000000",
                    "1000PEPEUSDT_BYBIT": "7517200000000000",
                    "CRVUSDT_BYBIT": "600800000000000000",
                    "XTERUSDT_BYBIT": "312200000000000000",
                    "10000SATSUSDT_BYBIT": "414500000000000",
                    "DOGSUSDT_BYBIT": "119700000000000",
                    //...
                },
                "maxLeverages": {},
                "markPrices": {
                    "binance": {
                        "VANRYUSDT_BYBIT": "25370000000000000",
                        "MAXUSDT_BYBIT": "39640000000000000",
                        "1000PEPEUSDT_BYBIT": "7517200000000000",
                        "CRVUSDT_BYBIT": "600800000000000000",
                        "XTERUSDT_BYBIT": "312200000000000000",
                        "10000SATSUSDT_BYBIT": "414500000000000",
                        //...
                    }
                },
                "pricesB": [],
                "pricesA": [],
                "quoteIdsB": [],
                "quoteIdsA": []
            },
            "signParams": [
                {
                    "name": "appId",
                    "type": "uint256",
                    "value": "67095677696457568621176602095256212877581942797155816526660337292193161013107"
                },
                {
                    "name": "reqId",
                    "type": "bytes",
                    "value": "0xeacebfbc6b01dd2e5438826c4b193b0274ef3898c4e234a60247950aea1fd0ed"
                },
                {
                    "type": "address",
                    "value": "0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43"
                },
                {
                    "type": "address",
                    "value": "0x9206D9d8F7F1B212A4183827D20De32AF3A23c59"
                },
                {
                    "type": "address",
                    "value": "0x3B5aC601c7bB74999AB3135fa43cbDBc6aB74570"
                },
                {
                    "type": "uint256",
                    "value": "0"
                },
                {
                    "type": "uint256",
                    "value": "0"
                },
                {
                    "type": "int256",
                    "value": "0"
                },
                {
                    "type": "int256",
                    "value": "0"
                },
                {
                    "type": "uint256",
                    "value": 1745193175
                },
                {
                    "type": "uint256",
                    "value": "8453"
                }
            ],
            "resultHash": "0xc4d234d74949cf04101e79ece159f551b599cdd495364fd338eca5a936914297",
            "init": {
                "nonceAddress": "0xCB5294feF14831E1BF7ac28E527D9EFB06E99B0c"
            }
        },
        "signatures": [
            {
                "owner": "0x8a59b05281ac699321D93974A228E7EC0A2c9357",
                "ownerPubKey": {
                    "x": "0x3fb5a506c907e2f6984e4f7207fc445d3c847474d056adfd4718f17548b72136",
                    "yParity": "0"
                },
                "signature": "0x2c5e4c568638b2289a64fcb76ca8f53002f1050bc662609745794ea108c5beac"
            }
        ],
        "gwAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldSignature": "0x1f2e752e8fcd1d630218ef0c824f1f69602f4bfb8adc07511052b99e268a415f033a0ac1676759d4791e6c449bad1ef6cbffa76654034c9b7da466d4cafe10dd1c",
        "nodeSignature": "0x1f2e752e8fcd1d630218ef0c824f1f69602f4bfb8adc07511052b99e268a415f033a0ac1676759d4791e6c449bad1ef6cbffa76654034c9b7da466d4cafe10dd1c",
        "confirmed": true
    }
}

[GET] uPnlWithSymbolPrice

Parameters:

  • partyB (address): The address of partyB.

  • partyA (address): The address of partyA.

  • chainId (uint): The blockchain network identifier.

  • symmio (address): The address of the Symmio diamond contract.

  • symbolId (uint): The ID of the asset symbol for which to retrieve the price.

Returns:

  • chainId (string): The chain identifier.

  • partyB (address): The address of partyB.

  • partyA (address): The address of partyA.

  • symbolId (string): The requested symbol ID.

  • price (string): The signed price value for the requested symbol.

  • uPnlA (string): The verified unrealized PnL value for partyA.

  • uPnlB (string): The verified unrealized PnL value for partyB.

  • notionalValueSumA (string): Sum of notional values for partyA’s positions.

  • notionalValueSumB (string): Sum of notional values for partyB’s positions.

  • nonceA (string): Nonce or address used for replay protection for partyA .

  • nonceB (string): Nonce or address used for replay protection for partyB (same field).

  • timestamp (uint): The block timestamp at which the data was generated.

  • pricesMap (object): Map of all symbol price feed values.

  • markPrices (object): Exchange-specific mark prices.

  • pricesA (string[]): Array of active price values for partyA.

  • pricesB (string[]): Array of active price values for partyB.

  • quoteIdsA (string[]): Quote IDs used for partyA.

  • quoteIdsB (string[]): Quote IDs used for partyB.

  • signature (bytes): Muon-generated signature (signatures[0].signature).

  • owner (address): Address of the signer (signatures[0].owner).

  • nodeSignature (bytes): Gateway signature appended on contracts, verified on-chain before execution.

Example API Query

https://muon-oracle1.rasa.capital/v1/?app=symmio&method=uPnlWithSymbolPrice&params[partyB]=0x9206D9d8F7F1B212A4183827D20De32AF3A23c59&params[partyA]=0x3B5aC601c7bB74999AB3135fa43cbDBc6aB74570&params[chainId]=8453&params[symmio]=0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43&params[symbolId]=4

Example Response

{
    "success": true,
    "result": {
        "reqId": "0xac5c6ed705cab31fb58c60af0f1a9012ca786decf22bc8a27e3cf40a56e3e263",
        "app": "symmio",
        "appId": "67095677696457568621176602095256212877581942797155816526660337292193161013107",
        "method": "uPnlWithSymbolPrice",
        "data": {
            "params": {
                "partyB": "0x9206D9d8F7F1B212A4183827D20De32AF3A23c59",
                "partyA": "0x3B5aC601c7bB74999AB3135fa43cbDBc6aB74570",
                "chainId": "8453",
                "symmio": "0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43",
                "symbolId": "4"
            },
            "timestamp": 1745193997,
            "uid": "1ipaqm4ptnsfj6u",
            "result": {
                "chainId": "8453",
                "partyB": "0x9206D9d8F7F1B212A4183827D20De32AF3A23c59",
                "partyA": "0x3B5aC601c7bB74999AB3135fa43cbDBc6aB74570",
                "symbolId": "4",
                "price": "2082468540000000000",
                "symmio": "0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43",
                "latestBlockNumber": "29202324",
                "uPnlB": "0",
                "uPnlA": "0",
                "notionalValueSumB": "0",
                "notionalValueSumA": "0",
                "nonceB": "0",
                "nonceA": "0",
                "pricesMap": {
                    "VANRYUSDT_BYBIT": "25600000000000000",
                    "HIVEUSDT_BYBIT": "237400000000000000",
                    "1000PEPEUSDT_BYBIT": "7548000000000000",
                    "CRVUSDT_BYBIT": "605000000000000000",
                    "XTERUSDT_BYBIT": "312500000000000000",
                    "10000SATSUSDT_BYBIT": "414200000000000",
                    "DOGSUSDT_BYBIT": "120000000000000",
                    //...
                },
                "maxLeverages": {},
                "markPrices": {
                    "binance": {
                        "VANRYUSDT_BYBIT": "25600000000000000",
                        "HIVEUSDT_BYBIT": "237400000000000000",
                        "1000PEPEUSDT_BYBIT": "7548000000000000",
                        "CRVUSDT_BYBIT": "605000000000000000",
                        "XTERUSDT_BYBIT": "312500000000000000",
                        "10000SATSUSDT_BYBIT": "414200000000000",
                        //...
                    }
                },
                "pricesB": [],
                "pricesA": [],
                "quoteIdsB": [],
                "quoteIdsA": []
            },
            "signParams": [
                {
                    "name": "appId",
                    "type": "uint256",
                    "value": "67095677696457568621176602095256212877581942797155816526660337292193161013107"
                },
                {
                    "name": "reqId",
                    "type": "bytes",
                    "value": "0xac5c6ed705cab31fb58c60af0f1a9012ca786decf22bc8a27e3cf40a56e3e263"
                },
                {
                    "type": "address",
                    "value": "0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43"
                },
                {
                    "type": "address",
                    "value": "0x9206D9d8F7F1B212A4183827D20De32AF3A23c59"
                },
                {
                    "type": "address",
                    "value": "0x3B5aC601c7bB74999AB3135fa43cbDBc6aB74570"
                },
                {
                    "type": "uint256",
                    "value": "0"
                },
                {
                    "type": "uint256",
                    "value": "0"
                },
                {
                    "type": "int256",
                    "value": "0"
                },
                {
                    "type": "int256",
                    "value": "0"
                },
                {
                    "type": "uint256",
                    "value": "4"
                },
                {
                    "type": "uint256",
                    "value": "2082468540000000000"
                },
                {
                    "type": "uint256",
                    "value": 1745193997
                },
                {
                    "type": "uint256",
                    "value": "8453"
                }
            ],
            "resultHash": "0xe1c3ceaf76d5e86d82a75a02bda4fc17c8bd12b59f76d73bd19b77fcac64a36c",
            "init": {
                "nonceAddress": "0x43D18Bac62a74933c62b7293b970c3706B3d3995"
            }
        },
        "signatures": [
            {
                "owner": "0x8a59b05281ac699321D93974A228E7EC0A2c9357",
                "ownerPubKey": {
                    "x": "0x3fb5a506c907e2f6984e4f7207fc445d3c847474d056adfd4718f17548b72136",
                    "yParity": "0"
                },
                "signature": "0xfac03111e8a2141f7695dd4473581dff86bb44bdad4c27aa5673c02174fddff2"
            }
        ],
        "gwAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldSignature": "0xdb9edc2f67728222f905ea07451098e749d3e63f74f466d3f41c98b5c41df1e564bfe0303144b115f2a1fce9f74a37dc7dc5fcbbec30475ef64cb06fcc9f3fee1c",
        "nodeSignature": "0xdb9edc2f67728222f905ea07451098e749d3e63f74f466d3f41c98b5c41df1e564bfe0303144b115f2a1fce9f74a37dc7dc5fcbbec30475ef64cb06fcc9f3fee1c",
        "confirmed": true
    }
}

[GET] price

This endpoint retrieves signed price data and related metadata for specified quote IDs.

Parameters:

  • quoteIds (uint[]): Array of quote identifiers to fetch prices for.

  • chainId (uint): The blockchain network identifier.

  • symmio (address): The address of the Symmio diamond contract.

Returns:

  • chainId (string): The chain identifier.

  • quoteIds (number[]): The array of requested quote IDs.

  • symmio (address): Address of the Symmio diamond contract.

  • symbols (string[]): The asset symbols corresponding to each quote.

  • prices (string[]): Signed price values for each requested quote.

  • pricesMap (object): Map of all symbol price feed values.

  • markPrices (object): Exchange-specific mark prices.

  • maxLeverages (object): Maximum leverage settings per symbol (if any).

  • signature (bytes): Muon-generated signature (signatures[0].signature).

  • owner (address): Address of the signer (signatures[0].owner).

  • nodeSignature (bytes): Gateway signature appended on contracts, verified on-chain before execution.

Example API Query

https://muon-oracle4.rasa.capital/v1/?app=symmio&method=price&params[quoteIds]=[130830]&params[chainId]=8453&params[symmio]=0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43

Example Response:

{
    "success": true,
    "result": {
        "reqId": "0x45f355e6cb583b890a4d1b5766c0c381360516a46ab4c3754be3c3932ab273ae",
        "app": "symmio",
        "appId": "67095677696457568621176602095256212877581942797155816526660337292193161013107",
        "method": "price",
        "data": {
            "params": {
                "quoteIds": "[130830]",
                "chainId": "8453",
                "symmio": "0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43"
            },
            "timestamp": 1745194435,
            "uid": "1ipar3gfqap30ui",
            "result": {
                "chainId": "8453",
                "quoteIds": [
                    130830
                ],
                "symmio": "0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43",
                "latestBlockNumber": "29202543",
                "symbols": [
                    "XRPUSDT"
                ],
                "prices": [
                    "2082600000000000000"
                ],
                "pricesMap": {
                    "AUCTIONUSDT_BYBIT": "11270000000000000000",
                    "SIRENUSDT_BYBIT": "62380000000000000",
                    "UNIUSDT_BYBIT": "5270000000000000000",
                    "HPOS10IUSDT_BYBIT": "47190000000000000",
                    "BTCUSDT-26DEC25_BYBIT": "89429660000000000000000",
                    "ETHUSDT-27MAR26_BYBIT": "1680090000000000000000",
                    "MDTUSDT_BYBIT": "27600000000000000",
                    //...
                },
                "markPrices": {
                    "binance": {
                        "AUCTIONUSDT_BYBIT": "11270000000000000000",
                        "SIRENUSDT_BYBIT": "62380000000000000",
                        "UNIUSDT_BYBIT": "5270000000000000000",
                        "HPOS10IUSDT_BYBIT": "47190000000000000",
                        "BTCUSDT-26DEC25_BYBIT": "89429660000000000000000",
                        "ETHUSDT-27MAR26_BYBIT": "1680090000000000000000",
                        "MDTUSDT_BYBIT": "27600000000000000",
                        //...
                    }
                },
                "maxLeverages": {}
            },
            "signParams": [
                {
                    "name": "appId",
                    "type": "uint256",
                    "value": "67095677696457568621176602095256212877581942797155816526660337292193161013107"
                },
                {
                    "name": "reqId",
                    "type": "bytes",
                    "value": "0x45f355e6cb583b890a4d1b5766c0c381360516a46ab4c3754be3c3932ab273ae"
                },
                {
                    "type": "address",
                    "value": "0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43"
                },
                {
                    "type": "uint256[]",
                    "value": [
                        130830
                    ]
                },
                {
                    "type": "uint256[]",
                    "value": [
                        "2082600000000000000"
                    ]
                },
                {
                    "type": "uint256",
                    "value": 1745194435
                },
                {
                    "type": "uint256",
                    "value": "8453"
                }
            ],
            "resultHash": "0x8f22295f8c5b078effdd251c3d037e594bf694f1f013eb1c2764c0030939d7d8",
            "init": {
                "nonceAddress": "0x8fed0a83eF0a05D1b6d600370d164e7F7DD96c0E"
            }
        },
        "signatures": [
            {
                "owner": "0x8a59b05281ac699321D93974A228E7EC0A2c9357",
                "ownerPubKey": {
                    "x": "0x3fb5a506c907e2f6984e4f7207fc445d3c847474d056adfd4718f17548b72136",
                    "yParity": "0"
                },
                "signature": "0x45fb206809d9933afa219b0dbdbe53bd5fa15070fed1711436f19f02c8f44378"
            }
        ],
        "gwAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldSignature": "0x31b0b4394585dc3af6425770b276b622591c62340f4913ca7c0221e24a22f0eb53fcf26d69ce34ad1c3067390679a585e934d7af1c4b97bd8d575ac814b442211c",
        "nodeSignature": "0x31b0b4394585dc3af6425770b276b622591c62340f4913ca7c0221e24a22f0eb53fcf26d69ce34ad1c3067390679a585e934d7af1c4b97bd8d575ac814b442211c",
        "confirmed": true
    }
}

[GET] settle_upnl

Parameters:

  • partyA (address): The address of partyA.

  • chainId (uint): The chainId.

  • symmio (address): The address of the Symmio diamond contract.

  • quoteIds (uint[]): JSON-formatted list of quote IDs to be settled (e.g., [23249]).

Note: latestBlockNumber is not explicitly required in the example. The Muon backend will fetch the appropriate block data internally.


Returns:

  • chainId (string): The chain id.

  • partyA (address): The address of partyA.

  • symmio (address): Address of the Symmio diamond contract.

quoteSettlementData: An array containing settlement information for each quoteId.

  • Each item includes:

    • quoteId

    • currentPrice

    • partyBUpnlIndex

  • uPnlA (string): Finalized unrealized PnL for partyA.

  • upnlPartyBs (array): Finalized uPnL values for each counterparty.

  • notionalValueSumA (string): Sum of notional values for partyA’s settled positions.

  • notionalValueSumBs (array): Notional sums for each counterparty.

  • nonceA (string): Nonce or address used for replay protection for partyA (init.nonceAddress).

  • noncePartyBs (array): Nonces for each counterparty.

  • timestamp (uint): The block timestamp at which the data was generated.

  • signature (bytes): Muon-generated signature (signatures[0].signature).

  • owner (address): Address of the signer (signatures[0].owner).

  • nodeSignature (bytes): Gateway signature appended on contracts, verified on-chain before execution.


Example API Query

https://muon-oracle4.rasa.capital/v1/?app=symmio&method=settle_upnl&params[partyA]=0x33D689034225A67454980c9D91E35C03a4765B30&params[chainId]=42161&params[symmio]=0x8F06459f184553e5d04F07F868720BDaCAB39395&params[quoteIds]=[31742]

Example Response

{
    "success": true,
    "result": {
        "reqId": "0x0bcba7d9ac58f05f4ee597e26ccfac51163dc3723ef7a0224c5803a230b104cc",
        "app": "symmio",
        "appId": "67095677696457568621176602095256212877581942797155816526660337292193161013107",
        "method": "settle_upnl",
        "data": {
            "params": {
                "partyA": "0x33D689034225A67454980c9D91E35C03a4765B30",
                "chainId": "42161",
                "symmio": "0x8F06459f184553e5d04F07F868720BDaCAB39395",
                "quoteIds": "[31742]"
            },
            "timestamp": 1745195377,
            "uid": "1ipas097c22o7mh",
            "result": {
                "chainId": "42161",
                "partyA": "0x33D689034225A67454980c9D91E35C03a4765B30",
                "symmio": "0x8F06459f184553e5d04F07F868720BDaCAB39395",
                "latestBlockNumber": "328513907",
                "quoteSettlementData": [
                    [
                        "31742",
                        "2099600000000000000",
                        0
                    ]
                ],
                "uPnlA": "680193580148088858",
                "upnlPartyBs": [
                    "-680193580148088858"
                ],
                "notionalValueSumA": "12127366419851911141",
                "notionalValueSumBs": [
                    "12127366419851911141"
                ],
                "nonceA": "45",
                "noncePartyBs": [
                    "45"
                ]
            },
            "signParams": [
                {
                    "name": "appId",
                    "type": "uint256",
                    "value": "67095677696457568621176602095256212877581942797155816526660337292193161013107"
                },
                {
                    "name": "reqId",
                    "type": "bytes",
                    "value": "0x0bcba7d9ac58f05f4ee597e26ccfac51163dc3723ef7a0224c5803a230b104cc"
                },
                {
                    "type": "address",
                    "value": "0x8F06459f184553e5d04F07F868720BDaCAB39395"
                },
                {
                    "type": "string",
                    "value": "verifySettlement"
                },
                {
                    "type": "uint256[]",
                    "value": [
                        "45"
                    ]
                },
                {
                    "type": "uint256",
                    "value": "45"
                },
                {
                    "type": "bytes",
                    "value": "0x0000000000000000000000000000000000000000000000000000000000007bfe0000000000000000000000000000000000000000000000001d2347136a69000000"
                },
                {
                    "type": "int256[]",
                    "value": [
                        "-680193580148088858"
                    ]
                },
                {
                    "type": "int256",
                    "value": "680193580148088858"
                },
                {
                    "type": "uint256",
                    "value": 1745195377
                },
                {
                    "type": "uint256",
                    "value": "42161"
                }
            ],
            "resultHash": "0xbc5001bb7169d49195c9033b1e66616642d662b284cb8abf3d74e516d20e0ef9",
            "init": {
                "nonceAddress": "0x5d18D9A97789a7EB8C156365A9039DD0A7c9E390"
            }
        },
        "signatures": [
            {
                "owner": "0x8a59b05281ac699321D93974A228E7EC0A2c9357",
                "ownerPubKey": {
                    "x": "0x3fb5a506c907e2f6984e4f7207fc445d3c847474d056adfd4718f17548b72136",
                    "yParity": "0"
                },
                "signature": "0x35b32b00dcf2adf01477ac86b553f3fb60eaef3066af07d7b1b8dc019ee10a0d"
            }
        ],
        "gwAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldAddress": "0xF621f85f20BBe733699306D336230184621dBe60",
        "shieldSignature": "0x276c7f533beab07d778622bf43b958110fce73f411f8a0426b032853b2efa863480d704a5ec73ff4476ae91ab3caa329f531f479f115c3b51e7c6278cb3b428f1b",
        "nodeSignature": "0x276c7f533beab07d778622bf43b958110fce73f411f8a0426b032853b2efa863480d704a5ec73ff4476ae91ab3caa329f531f479f115c3b51e7c6278cb3b428f1b",
        "confirmed": true
    }
}

:

This endpoint calculates and returns the unrealized profit and loss (uPnL) for partyA. The signature returned by this endpoint is used in the function for partyA to ensure that they meet solvency requirements before funds are released.

This endpoint returns the same core data as uPnl_A but adds a specialized signature parameter (verifyLiquidationSig) to support liquidation processors. The signature from this endpoint is used in the function to verify that Party A is eligible for liquidation under on‑chain rules.

This endpoint calculates unrealized profit and loss (uPnL) for partyA and fetches the price for a specified symbol in one request. It’s used in the flow when Party A initiates a quote to Party B. See how the signature is formatted for this .

This endpoint calculates and returns the unrealized profit and loss (uPnL) for partyB, used in the flow to verify Party B’s solvency before locking their position. See how this is integrated .

This endpoint computes unrealized profit and loss (uPnL) for both partyA and partyB and retrieves the price for a specified symbol in a single call. It is used to call by solvers to validate asset prices and enforce solvency requirements before executing on-chain transactions.

The settle_upnl method is used to verify settlement calculations for one or more open positions (represented by quoteIds) for a given party. It finalizes the unrealized profit and loss (uPnl) for these positions and returns the settlement data, including the updated uPnl values, notional sums, and nonces required for verification and on-chain settlement. You can read more about settleUpnl() .

https://muon-oracle1.rasa.capital/v1/
https://muon-oracle2.rasa.capital/v1/
https://muon-oracle3.rasa.capital/v1/
https://muon-oracle4.rasa.capital/v1/
https://polygon-testnet-oracle.rasa.capital/v1/
here
here
openPosition()
liquidatePartyA()
sendQuoteWithAffiliate()
deallocate()
lockQuote()
here