> For the complete documentation index, see [llms.txt](https://docs.symm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.symm.io/trader-documentation/interacting-with-contracts/querying-info-from-our-contracts.md).

# Querying Info from our Contracts

### Querying info from the SYMMIO diamond

Symmio is built on the Diamond Standard, so the protocol's read methods are spread across many facets behind a single address. Calling them through a generic block explorer is painful: the explorer doesn't know which facet implements which selector, and the ABI surface is large. The [SYMMIO Intent Inspector](https://intent.symmscan.com/inspector) is built for this. It reads the live facet and selector map per chain, gives you a typed form for every read function, and decodes the results into something legible.

{% embed url="<https://intent.symmscan.com/inspector>" %}

{% hint style="info" %}
The Inspector works against any SYMMIO diamond. The Symmio core, the AccountLayer, and the InstantLayer are all browsable; just pick the chain and paste the diamond address you want to inspect.
{% endhint %}

### Opening the Inspector

Go to [intent.symmscan.com/inspector](https://intent.symmscan.com/inspector), pick the chain you want to query (the Inspector supports every chain Symmio is deployed on), then paste the diamond address, or use one of the suggested defaults for that chain.

<figure><img src="/files/XUoHDPan8YkLvheFMl72" alt=""><figcaption></figcaption></figure>

The URL pattern is human-readable too, so you can deep-link straight to a specific function call:

```
https://intent.symmscan.com/inspector/<chain>/diamond
https://intent.symmscan.com/inspector/<chain>/diamond?method=<selector>
```

So you can deep-link to a specific function call.

#### Browsing facets and selectors

Once a diamond is loaded, the Inspector shows every facet registered on it, along with every function selector that facet implements. This is the source of truth for whether a given function is live on a given chain: if a selector is missing from the list, the facet hasn't been deployed (or hasn't been cut into the diamond) on that chain.

<figure><img src="/files/2juHmM1PwvXV2mLQbYuF" alt=""><figcaption></figcaption></figure>

#### Calling a view function

Click any read function (`view` or `pure`) and the Inspector builds a typed input form for its parameters. Fill in the inputs, hit "call", and the result comes back decoded.

<figure><img src="/files/QA6TEWBhy64yYR0Qi440" alt=""><figcaption></figcaption></figure>

Some common reads you'll do this way:

<table><thead><tr><th width="191">Function</th><th width="145.6666259765625">Diamond</th><th>What you get</th></tr></thead><tbody><tr><td><code>getUserSubAccountsAddresses(owner, offset, limit)</code></td><td>AccountLayer</td><td>All SubAccounts owned by an EOA</td></tr><tr><td><code>getVirtualAccountsAddressesOfSubAccount(sub, offset, limit)</code></td><td>AccountLayer</td><td>Currently-active VAs on a SubAccount</td></tr><tr><td><code>getVirtualAccountQuoteIds(va, offset, limit)</code></td><td>AccountLayer</td><td>Open quote IDs the AccountLayer is tracking on a VA</td></tr><tr><td><code>predictNextVirtualAccountAddress(sub, isolation, symbolId)</code></td><td>AccountLayer</td><td>Deterministic next-VA address — use this when computing <code>addMarginToNextVA</code> calldata</td></tr><tr><td><code>getActiveVAByKey(sub, isolation, symbolId)</code></td><td>AccountLayer</td><td>The live VA for <code>(sub, isolation, symbol)</code>, or <code>0x0</code> if none</td></tr><tr><td><code>getBindState(account)</code></td><td>Symmio core</td><td><code>(status, partyB, timestamp)</code> — <code>status == 1</code> means bound</td></tr><tr><td><code>getQuote(quoteId)</code></td><td>Symmio core</td><td>The full quote struct (size, price, locked margins, state, etc.)</td></tr></tbody></table>

For the full set of read functions on each diamond, see the facet listing. Anything view-tagged is callable from the Inspector.

### Decoding calldata

If you have a raw `0x…` blob, from a failed transaction, a log, or an EIP-712 `SignedOperation`'s `callData` field, the Inspector can decode it as long as the leading selector matches one in the diamond's selector map. Paste the calldata, pick the diamond, and the Inspector resolves it to a function name and pretty-prints the arguments.

<figure><img src="/files/XXcysP1l9KmBvH6n6NkG" alt=""><figcaption></figcaption></figure>

This is the fastest way to check an Instant Layer `SignedOperation`: sign one, paste the `callData` into the decoder, and confirm it calls what you expect before posting to the solver.

### Reading bind state for an account

When you're wiring up the Instant Layer flow, the most common reason `sendQuote` reverts is that the SubAccount isn't bound to a PartyB. Bind state lives on the Symmio core, not the AccountLayer, so:

1. Open the Symmio core diamond in the Inspector.
2. Call `getBindState(<subAccount>)`.
3. Expect `status = 1` and `partyB = <your hedger>`. Anything else means `bindToPartyB` hasn't landed, or landed on a different SubAccount.

<figure><img src="/files/hVfVRo4P2PoTq8DOZFcA" alt=""><figcaption></figcaption></figure>

#### Reading a quote's state

Given a `quoteId` from the hedger's `SendQuoteTransaction` notification, call `getQuote(quoteId)` on the Symmio core to see the full quote struct: price, quantity, filled amounts, locked margins, state (`PENDING`, `LOCKED`, `OPEN`, `CLOSE_PENDING`, `CLOSED`, and so on), the bound PartyB, and the affiliate.

<figure><img src="/files/YOIAG1JYZz4SSYY9R1hW" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.symm.io/trader-documentation/interacting-with-contracts/querying-info-from-our-contracts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
