GET Market Info

Returns the current quote of the specified instrument from the data feed/connection of the given account.

Returns real-time session status for an instrument, including whether the market is currently open or closed, the current/next session boundaries in UTC and exchange local time, and a countdown to the next state change.

This is useful for algos that need to know whether the market is in session before placing orders, or UIs that display session timers.

Retrieve market session info

GET /v1/api/market/info

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Query Parameters

Name
Type
Required
Description

instrument

string

Required

Instrument name (e.g., "ES 09-26")

*If neither is provided, defaults to ES front month.

Code Examples

import requests

token = 'my-secret-token'
url = "https://app.crosstrade.io/v1/api/market/info"
headers = {
    "Authorization": f"Bearer {token}",
    "Content-Type": "application/json"
}

params = {"instrument": "ES 09-26"}

try:
    response = requests.get(url, headers=headers, params=params)
    print(f"Response Code: {response.status_code}, Response Text: {response.text}")
except Exception as e:
    print(f"An error occurred: {e}")

Response

circle-info

When the market is closed, the session object reflects the next upcoming session with "label": "Next Session" and "action": "Until Open".

WebSocket API

This request can also be made over the WebSocket API. Query parameters are passed inside args. Use either instrument or root to identify the contract.

Last updated