POST Historical Bars
Returns an array of historical quotes at the period, duration, and granularity specified
Pull historical OHLCV bars
Name
Value
Name
Type
Required
Description
import requests
token = 'my-secret-token'
url = "https://app.crosstrade.io/v1/api/market/bars"
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
}
data = {
"instrument": "ES 09-26",
"periodType": "minute",
"period": 5,
"daysBack": 1,
"limit": 3
}
try:
response = requests.post(url, headers=headers, json=data)
print(f"Response Code: {response.status_code}, Response Text: {response.text}")
except Exception as e:
print(f"An error occurred: {e}")WebSocket API
Last updated