Get Markets (WebSocket)
Retrieve comprehensive market configuration information for all available trading pairs through the WebSocket connection.
Endpoint
ws.send() wss://api.synthetix.io/v1/ws/infoRequest
Request Format
{
"id": "markets-1",
"method": "post",
"params": {
"action": "getMarkets"
}
}Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Client-generated unique request identifier |
method | string | Yes | Must be "post" |
params | object | Yes | Request parameters wrapper |
params.action | string | Yes | Must be "getMarkets" |
Response
Success Response
{
"id": "markets-1",
"status": 200,
"result": {
"response": [
{
"symbol": "SOL-USDT",
"description": "Solana",
"baseAsset": "SOL",
"quoteAsset": "USDT",
"isOpen": true,
"isCloseOnly": false,
"priceExponent": 2,
"quantityExponent": 2,
"priceIncrement": "0.01",
"minOrderSize": "0.01",
"orderSizeIncrement": "0.01",
"contractSize": 1,
"maxMarketOrderSize": "1000000",
"maxLimitOrderSize": "1000000",
"minOrderPrice": "0.01",
"limitOrderPriceCapRatio": "1.5",
"limitOrderPriceFloorRatio": "0.5",
"marketOrderPriceCapRatio": "1.1",
"marketOrderPriceFloorRatio": "0.9",
"liquidationClearanceFee": "0.002",
"minNotionalValue": "10",
"maintenanceMarginTiers": [
{
"minPositionSize": "0",
"maxPositionSize": "500000",
"maxLeverage": 100,
"initialMarginRequirement": "0.01",
"maintenanceMarginRequirement": "0.005"
},
{
"minPositionSize": "500001",
"maxPositionSize": "10000000",
"maxLeverage": 50,
"initialMarginRequirement": "0.02",
"maintenanceMarginRequirement": "0.01"
},
{
"minPositionSize": "10000001",
"maxPositionSize": "50000000",
"maxLeverage": 25,
"initialMarginRequirement": "0.04",
"maintenanceMarginRequirement": "0.02"
},
{
"minPositionSize": "50000001",
"maxPositionSize": "200000000",
"maxLeverage": 10,
"initialMarginRequirement": "0.1",
"maintenanceMarginRequirement": "0.05"
},
{
"minPositionSize": "200000001",
"maxPositionSize": null,
"maxLeverage": 2,
"initialMarginRequirement": "0.5",
"maintenanceMarginRequirement": "0.25"
}
]
}
],
"status": "success"
}
}Note: The last margin tier shows
"maxPositionSize": ""(empty string), which indicates unlimited position size for positions above 200M USD notional.
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 |
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 | Maximum notional position size (USD) for this tier (empty string "" = 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
Error Response
{
"id": "markets-1",
"status": 500,
"result": null,
"error": {
"code": 500,
"message": "Could not pull market configuration"
}
}WebSocket Connection Example
const ws = new WebSocket('wss://papi.synthetix.io/v1/ws/info');
ws.onopen = () => {
// Request all markets
ws.send(JSON.stringify({
id: 'markets-1',
method: 'post',
params: {
action: 'getMarkets'
}
}));
};
ws.onmessage = (event) => {
const response = JSON.parse(event.data);
if (response.id === 'markets-1' && response.status === 200) {
const markets = response.result.response;
console.log('Markets:', markets);
console.log(`Total markets: ${markets.length}`);
// Process market configuration
markets.forEach(market => {
console.log(`${market.symbol}: ${market.description}`);
});
}
};Market Information
- Comprehensive Data: Includes all market configuration, trading rules, and limits
- Real-time Updates: Market status and configuration are updated in real-time
- Trading Rules: All necessary information for placing compliant orders
- Margin Requirements: Complete margin tier information for risk management
- Price Precision: Exact decimal precision for prices and quantities
Use Cases
- Trading Applications: Get market specifications for order validation
- Risk Management: Access margin requirements and position limits
- Market Analysis: Understand trading rules and market structure
- Order Management: Validate order parameters before submission
- System Integration: Configure trading systems with market rules
Validation Rules
- No authentication required (public Info WebSocket)
- No rate limiting beyond standard API limits
- Returns data for all available markets
Related Endpoints
- Get Market Prices - Current market prices via WebSocket
- REST Alternative - HTTP GET request for markets