Skip to content

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

FieldTypeDescription
symbolstringTrading pair symbol (e.g., "SOL-USDT")
descriptionstringMarket description (e.g., "Solana")
baseAssetstringBase asset ticker (e.g., "SOL")
quoteAssetstringQuote asset ticker (e.g., "USDT")
isOpenbooleanWhether the market is open for trading
isCloseOnlybooleanWhether the market is in close-only mode
priceExponentintegerNumber of decimal places for price
quantityExponentintegerNumber of decimal places for quantity
priceIncrementstringMinimum price increment (tick size)
minOrderSizestringMinimum order size
orderSizeIncrementstringOrder size increment
largePositionPenaltystringPenalty for large positions
contractSizeintegerContract size for the market
maxMarketOrderSizestringMaximum market order size
maxLimitOrderSizestringMaximum limit order size
minOrderPricestringMinimum order price
limitOrderPriceCapRatiostringPrice cap ratio for limit orders
limitOrderPriceFloorRatiostringPrice floor ratio for limit orders
marketOrderPriceCapRatiostringPrice cap ratio for market orders
marketOrderPriceFloorRatiostringPrice floor ratio for market orders
liquidationClearanceFeestringLiquidation clearance fee
minNotionalValuestringMinimum notional value for orders
maintenanceMarginTiersarrayArray 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.

FieldTypeDescription
minPositionSizestringMinimum notional position size (USD) for this tier
maxPositionSizestring / nullMaximum notional position size (USD) for this tier (null = unlimited)
maxLeveragenumberMaximum leverage allowed for positions in this tier
initialMarginRequirementstringInitial margin requirement as decimal (e.g., "0.01" = 1%)
maintenanceMarginRequirementstringMaintenance margin requirement as decimal (e.g., "0.005" = 0.5%)
Margin Calculations:
  • 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.

FieldTypeDescription
orderIdstringUnique order identifier (64-bit unsigned integer as string)
clientOrderIdstringClient-provided order identifier (128-bit hex string with 0x prefix)
symbolstringTrading pair symbol (e.g., "BTC-USDT")
sidestringOrder side: "buy" or "sell"
typestringOrder type: "LIMIT", "MARKET", "STOP_LOSS", "TAKE_PROFIT"
quantitystringOriginal order quantity
pricestringOrder price (empty for market orders)
triggerPricestringTrigger price for conditional orders
triggerPriceTypestringTrigger price type: "mark", "last", or "index"
timeInForcestringTime in force: "GTC", "IOC", or "FOK"
reduceOnlybooleanWhether order only reduces existing position
postOnlybooleanWhether order must be maker (no immediate match)
createdTimeintegerOrder creation timestamp (Unix seconds)
updatedTimeintegerLast update timestamp (Unix seconds)
filledQuantitystringQuantity that has been filled
takeProfitOrderIdstringID of linked take-profit order (if exists)
stopLossOrderIdstringID of linked stop-loss order (if exists)
closePositionbooleanWhether order closes entire position

Position Object

The Position object represents an open trading position, including profit/loss calculations, margin requirements, and risk management data.

FieldTypeDescription
positionIdstringPosition identifier
subAccountIdstringSubaccount identifier
symbolstringTrading symbol (e.g., "BTC-USDT")
sidestringPosition side: "long" or "short"
entryPricestringAverage entry price
quantitystringPosition size/quantity
realizedPnlstringRealized profit/loss
unrealizedPnlstringUnrealized profit/loss
usedMarginstringMargin used for this position
maintenanceMarginstringMaintenance margin required
liquidationPricestringPosition liquidation price
statusstringPosition status: "open", "close", "update"
netFundingstringNet funding payments (positive = received)
takeProfitOrderIdsarray[string]Array of take profit order IDs
stopLossOrderIdsarray[string]Array of stop loss order IDs
updatedAtintegerLast update timestamp (Unix milliseconds, not seconds!)
createdAtintegerCreation 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.

FieldTypeDescription
accountValuestringTotal account value including PnL
availableMarginstringUSDT amount available for new positions
totalUnrealizedPnlstringSum of all unrealized PnL
maintenanceMarginstringMinimum margin required for all positions
initialMarginstringInitial margin required for all positions
withdrawablestringUSDT amount available for withdrawal
adjustedAccountValuestringAdjusted account value for margin calculations

Subaccount Object

The Subaccount object contains account-level information including balances, positions, and trading permissions.

FieldTypeDescription
subAccountIdstringUnique subaccount identifier
masterAccountIdstring | nullID of the master account (null if this is a master account)
subAccountNamestringHuman-readable subaccount name
collateralsarrayArray of collateral assets held in this subaccount
crossMarginSummaryobjectCross margin summary with account value, margins, and P&L
positionsarrayArray of open positions for this subaccount
marketPreferencesobjectMarket-specific preferences and settings

Trade Object

The Trade object represents a completed trade execution, containing details about price, quantity, fees, and timing.

FieldTypeDescription
tradeIdstringUnique trade execution identifier
orderIdstringAssociated order ID
clientOrderIdstringClient-provided order ID (if exists)
symbolstringMarket symbol (e.g., "BTC-USDT")
sidestringTrade side: "buy" or "sell"
pricestringActual filled price of this trade
quantitystringActual filled quantity of this trade
realizedPnlstringRealized P&L from position closure
feestringTrading fee amount
feeRatestringFee rate applied
timestampintegerTrade timestamp (Unix milliseconds)
makerbooleantrue if maker order, false if taker
reduceOnlybooleantrue if trade reduced existing position
postOnlybooleantrue if order was post-only (maker-only)
markPricestringMark price at time of trade
entryPricestringPosition average entry price at time of trade
triggeredByLiquidationbooleantrue if triggered by liquidation
directionstringPosition direction after trade

Collateral Object

The Collateral object represents assets that can be used as margin or collateral for trading.

FieldTypeDescription
symbolstringCollateral token symbol (e.g., "USDT")
quantitystringAmount 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 null or omitted depending on the object state
  • Arrays: Collection fields (like positions, collaterals) are always arrays, even when empty