Contracts
Contracts · ABI

SYMMIO Core

Margin allocation and the request-based withdraw system on the core diamond — allocate, initiate, finalize, cancel, and the read views.

Wallet
Not connected

getAccountBalanceOf
read
Read balanceOf for a selected subaccount on its SYMMIO core.

Enter a wallet address to load subaccounts.

Pick a subaccount or enter one manually.

Select a subaccount to read balanceOf.
getAccountBalanceInfo
read
Read balanceInfoOfPartyA for a selected subaccount on its SYMMIO core.

Enter a wallet address to load subaccounts.

Pick a subaccount or enter one manually.

Select a subaccount to read balance info.
getFeeForUser
read
Read the open and close fee rates for a user/account and SYMMIO symbol id.

Enter a wallet address to load subaccounts.

Pick a subaccount or enter any SYMMIO account address.

Leave empty to use configured affiliate 0x58bB…E24D.

Fill the fields and run the read to see fee rates.
getOnchainContractMarkets
read
Read paginated on-chain contract markets from SYMMIO core getSymbols.
Run the read to fetch on-chain contract markets.
getPartyAOpenPositions
read
Read a partyA's open positions (virtual account, lowcap).
Run the read to see open positions.
getPartyAOpenPositionsBatch
read
Read the open positions of many partyAs — any mix of subaccounts and VAs — in chunked multicalls, one result per account.

Pick or paste accounts one at a time — each joins the list below, and results come back in that order.

Pick accounts and run the read.
isPartyALiquidated
read
Whether a partyA's liquidation is in progress — true from the moment a liquidator starts it until it is finalized.
Run the read to see the liquidation flag.
getPartyAPendingQuotes
read
List a partyA's pending quote ids (PENDING / LOCKED / CANCEL_PENDING). Hydrate each with getQuote.
Run the read to see pending quote ids.
getQuote
read
Read a single quote by id. Resolves to ‘not found’ when no quote has that id.
Run the read to see the quote.
getFundingFeesOfPartyB
read
Read the accumulated-funding state a solver (partyB) keeps for one symbol: current and average per-epoch rates, epoch tracking and carried-over fee snapshots.

Leave empty to use the Enigma solver 0x0420…445c.

Pick a market and run the read to see the pair’s funding state.
getPendingWithdrawRequests
read
List a subaccount's active (non-terminal) withdraw requests.
Run the read to see pending requests.
getWithdrawRequests
read
Read a single withdraw request by subaccount and request id.
Run the read to see the request.
getLastWithdrawRequestId
read
Read a subaccount's most recent withdraw request id (0 when there are none).
Run the read to see the last request id.
getWithdrawableTime
read
Read the earliest time a withdrawal initiated now could be finalized for a subaccount.
Run the read to see the withdrawable time.
getWithdrawCooldownOf
read
Read when a subaccount was last deallocated or credited to withdrawable balance, and when it can deallocate next.
Run the read to see the subaccount’s cooldown timestamp.
getDeallocateDebounceTime
read
Read the minimum time the protocol enforces between two deallocations of the same account.
Run the read to see the deallocate debounce.

allocate
write
Move a subaccount's available balance into allocated (tradeable) margin (routed via AccountLayer _call).
Fill the fields above and submit.
deallocate
write
Move a subaccount's allocated (tradeable) balance back into its available balance (routed via AccountLayer _call). Sending fetches a fresh Muon uPnL signature automatically; subject to the on-chain deallocate debounce.
Fill the fields above and submit.
initiateWithdraw
write
Open a classic same-chain withdraw request for a subaccount (routed via AccountLayer _call).
Fill the fields above and submit.
finalizeWithdrawRequest
write
Finalize a matured withdraw request, paying out to its receivers. Permissionless after cooldown.
Fill the fields above and submit.
requestCancelWithdraw
write
Cancel a pending withdraw request for a subaccount (routed via AccountLayer _call).
Fill the fields above and submit.
executeAccountCalls
write
Run several SYMMIO core writes as one subaccount, in one atomic transaction. Reference only: this card explains the call and sends nothing.

How it works

  1. Pass a subaccount and an ordered list of { functionName, args }. Each name must be a write in the SDK’s SYMMIO core ABI, with its own units.
  2. The SDK encodes every call first, so a wrong name or argument fails before any wallet prompt.
  3. From the wallet, the calls go out as one AccountLayer _call transaction, simulated first. If one call reverts, none of them happen.
  4. Gasless, every call is relayed in order as one request. With gasless: true, a list holding a call the relayer cannot carry is refused instead of going to the wallet.
  5. Nothing is inferred: no request ids, and no call’s return value is fed into the next. Read what you need before you build the list.

Why this card cannot send it

This app uses the SDK only through @symmio/trading-react, and that package has no hook for this call: the calls are arbitrary core writes, so no fixed set of reads can be refreshed after them. For a withdrawal you do not need it: the useWithdraw flow already deallocates and initiates in one atomic transaction on a cross-margin subaccount.

In a React app

import { executeAccountCallsMutationOptions } from "@symmio/trading-core";
import { useSymmioConfig } from "@symmio/trading-react";
import { useMutation } from "@tanstack/react-query";

const config = useSymmioConfig();
const { mutate } = useMutation(executeAccountCallsMutationOptions(config));

mutate({
  account: subAccount,
  calls: [
    { functionName: "deallocate", args: [amount18, upnlSig] },
    { functionName: "initiateWithdraw", args: [parts, false, providerData] },
  ],
});
// Wait for the receipt, then refresh the reads these calls changed.

Full reference: SDK docs → Core → SYMMIO contract → executeAccountCalls.