Objects
This page provides detailed reference information for all object types used throughout the Synthetix API. These objects represent the core data structures that you'll encounter when interacting with trading endpoints, account management, and market data.
Market Object
The Market object represents a trading market/pair configuration, including trading rules, size limits, margin requirements, and decimal precision settings.
Market Object
| Field | Type | Description |
|---|---|---|
symbol | string | Trading pair symbol (e.g., "SOL-USDT") |
description | string | Market description (e.g., "Solana") |
baseAsset | string | Base asset ticker (e.g., "SOL") |
quoteAsset | string | Quote asset ticker (e.g., "USDT") |
isOpen | boolean | Whether the market is open for trading |
isCloseOnly | boolean | Whether the market is in close-only mode |
priceExponent | integer | Number of decimal places for price |
quantityExponent | integer | Number of decimal places for quantity |
priceIncrement | string | Minimum price increment (tick size) |
minOrderSize | string | Minimum order size |
orderSizeIncrement | string | Order size increment |
largePositionPenalty | string | Penalty for large positions |
contractSize | integer | Contract size for the market |
maxMarketOrderSize | string | Maximum market order size |
maxLimitOrderSize | string | Maximum limit order size |
minOrderPrice | string | Minimum order price |
limitOrderPriceCapRatio | string | Price cap ratio for limit orders |
limitOrderPriceFloorRatio | string | Price floor ratio for limit orders |
marketOrderPriceCapRatio | string | Price cap ratio for market orders |
marketOrderPriceFloorRatio | string | Price floor ratio for market orders |
liquidationClearanceFee | string | Liquidation clearance fee |
minNotionalValue | string | Minimum notional value for orders |
maintenanceMarginTiers | array | Array of maintenance margin tiers |
Margin Tiers Object
Margin tiers define the maximum leverage and margin requirements based on position size (notional value in USD). As position size increases, maximum leverage decreases and margin requirements increase to manage risk.
| Field | Type | Description |
|---|---|---|
minPositionSize | string | Minimum notional position size (USD) for this tier |
maxPositionSize | string / null | Maximum notional position size (USD) for this tier (null = unlimited) |
maxLeverage | number | Maximum leverage allowed for positions in this tier |
initialMarginRequirement | string | Initial margin requirement as decimal (e.g., "0.01" = 1%) |
maintenanceMarginRequirement | string | Maintenance margin requirement as decimal (e.g., "0.005" = 0.5%) |
- Initial margin requirement = 1 / max_leverage
- Maintenance margin requirement = 1 / (2 × max_leverage)
Example: For SOL-USDT with the tiers shown above:
- Position size $0 - $500,000: Up to 100x leverage, 1% initial margin, 0.5% maintenance margin
- Position size $500,001 - $10,000,000: Up to 50x leverage, 2% initial margin, 1% maintenance margin
- Position size $10,000,001 - $50,000,000: Up to 25x leverage, 4% initial margin, 2% maintenance margin
- Position size $50,000,001 - $200,000,000: Up to 10x leverage, 10% initial margin, 5% maintenance margin
- Position size > $200,000,001: Up to 2x leverage, 50% initial margin, 25% maintenance margin
Order Object
The Order object represents a trading order in the system. Orders can be in various states and contain information about execution, pricing, and timing.
| Field | Type | Description |
|---|---|---|
orderId | string | Unique order identifier (64-bit unsigned integer as string) |
clientOrderId | string | Client-provided order identifier (128-bit hex string with 0x prefix) |
symbol | string | Trading pair symbol (e.g., "BTC-USDT") |
side | string | Order side: "buy" or "sell" |
type | string | Order type: "LIMIT", "MARKET", "STOP_LOSS", "TAKE_PROFIT" |
quantity | string | Original order quantity |
price | string | Order price (empty for market orders) |
triggerPrice | string | Trigger price for conditional orders |
triggerPriceType | string | Trigger price type: "mark", "last", or "index" |
timeInForce | string | Time in force: "GTC", "IOC", or "FOK" |
reduceOnly | boolean | Whether order only reduces existing position |
postOnly | boolean | Whether order must be maker (no immediate match) |
createdTime | integer | Order creation timestamp (Unix seconds) |
updatedTime | integer | Last update timestamp (Unix seconds) |
filledQuantity | string | Quantity that has been filled |
takeProfitOrderId | string | ID of linked take-profit order (if exists) |
stopLossOrderId | string | ID of linked stop-loss order (if exists) |
closePosition | boolean | Whether order closes entire position |
Position Object
The Position object represents an open trading position, including profit/loss calculations, margin requirements, and risk management data.
| Field | Type | Description |
|---|---|---|
positionId | string | Position identifier |
subAccountId | string | Subaccount identifier |
symbol | string | Trading symbol (e.g., "BTC-USDT") |
side | string | Position side: "long" or "short" |
entryPrice | string | Average entry price |
quantity | string | Position size/quantity |
realizedPnl | string | Realized profit/loss |
unrealizedPnl | string | Unrealized profit/loss |
usedMargin | string | Margin used for this position |
maintenanceMargin | string | Maintenance margin required |
liquidationPrice | string | Position liquidation price |
status | string | Position status: "open", "close", "update" |
netFunding | string | Net funding payments (positive = received) |
takeProfitOrderIds | array[string] | Array of take profit order IDs |
stopLossOrderIds | array[string] | Array of stop loss order IDs |
updatedAt | integer | Last update timestamp (Unix milliseconds, not seconds!) |
createdAt | integer | Creation timestamp (Unix milliseconds, not seconds!) |
Cross Margin Summary Object
The Cross Margin Summary object provides comprehensive margin and risk metrics for a subaccount's cross-margin trading activity.
| Field | Type | Description |
|---|---|---|
accountValue | string | Total account value including PnL |
availableMargin | string | USDT amount available for new positions |
totalUnrealizedPnl | string | Sum of all unrealized PnL |
maintenanceMargin | string | Minimum margin required for all positions |
initialMargin | string | Initial margin required for all positions |
withdrawable | string | USDT amount available for withdrawal |
adjustedAccountValue | string | Adjusted account value for margin calculations |
Subaccount Object
The Subaccount object contains account-level information including balances, positions, and trading permissions.
| Field | Type | Description |
|---|---|---|
subAccountId | string | Unique subaccount identifier |
masterAccountId | string | null | ID of the master account (null if this is a master account) |
subAccountName | string | Human-readable subaccount name |
collaterals | array | Array of collateral assets held in this subaccount |
crossMarginSummary | object | Cross margin summary with account value, margins, and P&L |
positions | array | Array of open positions for this subaccount |
marketPreferences | object | Market-specific preferences and settings |
Trade Object
The Trade object represents a completed trade execution, containing details about price, quantity, fees, and timing.
| Field | Type | Description |
|---|---|---|
tradeId | string | Unique trade execution identifier |
orderId | string | Associated order ID |
clientOrderId | string | Client-provided order ID (if exists) |
symbol | string | Market symbol (e.g., "BTC-USDT") |
side | string | Trade side: "buy" or "sell" |
price | string | Actual filled price of this trade |
quantity | string | Actual filled quantity of this trade |
realizedPnl | string | Realized P&L from position closure |
fee | string | Trading fee amount |
feeRate | string | Fee rate applied |
timestamp | integer | Trade timestamp (Unix milliseconds) |
maker | boolean | true if maker order, false if taker |
reduceOnly | boolean | true if trade reduced existing position |
postOnly | boolean | true if order was post-only (maker-only) |
markPrice | string | Mark price at time of trade |
entryPrice | string | Position average entry price at time of trade |
triggeredByLiquidation | boolean | true if triggered by liquidation |
direction | string | Position direction after trade |
Collateral Object
The Collateral object represents assets that can be used as margin or collateral for trading.
| Field | Type | Description |
|---|---|---|
symbol | string | Collateral token symbol (e.g., "USDT") |
quantity | string | Amount of collateral held |
Object Usage Notes
- Field Naming: All object field names follow camelCase naming convention (
subAccountId,orderId,clientOrderId) - String Numbers: Most numeric values are returned as strings to preserve precision and avoid floating-point rounding issues
- Timestamps: All timestamps are Unix milliseconds (unsigned 64-bit integer) representing time in milliseconds since the Unix epoch (e.g.,
1704067200000) - IDs: Object IDs are typically strings or integers depending on the specific object type
- Nullability: Some fields may be
nullor omitted depending on the object state - Arrays: Collection fields (like
positions,collaterals) are always arrays, even when empty