shareGroupState query returns the definitions of share groups used by PORTFOLIO margin mode accounts. A share group defines a set of contracts that share a single margin pool, with a common settlement coin. Use this to understand which contracts are grouped together when calculating portfolio margin requirements, and to check whether a group is currently accepting new (non-reduce-only) orders.
Request
string
required
type (required) — Must be "shareGroupState".integer
groupId — Filter results by group ID. Use 0 or omit to return all share groups. Pass a positive integer to retrieve the definition for a single group. An unknown groupId returns HTTP 200 with an empty groups array.Response
string
Always
"shareGroupState".object[]
The matching share group definitions. Empty when
groupId matches no group. Each element carries the fields below.integer
Unique identifier for this share group. Reference this ID in portfolio margin operations.
integer
The coin used for settlement and margin within this group. Cross-reference with the
coins array in configs for the coin name and decimals.string
Current status of the share group:
"Active"— the group accepts all order types."Frozen"— the group is suspended; onlyreduceOnlyorders are accepted on contracts in this group.
integer[]
Array of contract IDs that belong to this share group, in ascending order. All contracts in a group share the same margin pool and settlement coin.
portfolioGroups from userAccount.