from finance_dev import FinanceDev, models
with FinanceDev(
security=models.Security(
client_id="<YOUR_CLIENT_ID_HERE>",
client_secret="<YOUR_CLIENT_SECRET_HERE>",
),
) as fd_client:
res = fd_client.market.get_status(exchange=models.ExchangeCode.US)
assert res.market_status is not None
# Handle response
print(res.market_status)import { FinanceDev } from "@ariesdotcom/finance-dev";
const financeDev = new FinanceDev({
security: {
clientID: "<YOUR_CLIENT_ID_HERE>",
clientSecret: "<YOUR_CLIENT_SECRET_HERE>",
},
});
async function run() {
const result = await financeDev.market.getStatus({});
console.log(result);
}
run();curl --request GET \
--url https://api.aries.com/v1/market/status \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aries.com/v1/market/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aries.com/v1/market/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aries.com/v1/market/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aries.com/v1/market/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/market/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"exchange": "US",
"isOpen": false,
"session": "",
"timestamp": 1765526940,
"timezone": "America/New_York"
}Market Status
Retrieve current market status indicating whether exchanges are open, closed, or in pre-market/after-hours trading sessions. Useful for determining real-time trading availability.
Use Case: Check if NYSE is open before placing live trades in your trading application.
from finance_dev import FinanceDev, models
with FinanceDev(
security=models.Security(
client_id="<YOUR_CLIENT_ID_HERE>",
client_secret="<YOUR_CLIENT_SECRET_HERE>",
),
) as fd_client:
res = fd_client.market.get_status(exchange=models.ExchangeCode.US)
assert res.market_status is not None
# Handle response
print(res.market_status)import { FinanceDev } from "@ariesdotcom/finance-dev";
const financeDev = new FinanceDev({
security: {
clientID: "<YOUR_CLIENT_ID_HERE>",
clientSecret: "<YOUR_CLIENT_SECRET_HERE>",
},
});
async function run() {
const result = await financeDev.market.getStatus({});
console.log(result);
}
run();curl --request GET \
--url https://api.aries.com/v1/market/status \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aries.com/v1/market/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aries.com/v1/market/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aries.com/v1/market/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aries.com/v1/market/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/market/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"exchange": "US",
"isOpen": false,
"session": "",
"timestamp": 1765526940,
"timezone": "America/New_York"
}Authorizations
Query Parameters
exchange code (case-insensitive). Select from the Try it dropdown or use any value from the supported exchange list in the API reference page.
Two-to-three-letter exchange code identifying a global stock exchange (e.g. US = U.S. exchanges, L = London, HK = Hong Kong, T = Tokyo, PA = Paris). Used as the exchange query parameter for market-status and market-holiday endpoints. Other endpoints may return a different exchange-code format depending on the upstream data source.
AD, AS, AT, AX, BA, BC, BD, BE, BH, BK, BO, BR, CA, CN, CO, CR, CS, DB, DE, DU, F, HA, HE, HK, HM, IC, IR, IS, JK, JO, KL, KQ, KS, KW, L, LS, MC, ME, MI, MT, MU, MX, NE, NL, NS, NZ, OL, OM, PA, PK, PM, PR, QA, RG, RO, SA, SC, SG, SI, SN, SR, SS, ST, SW, SX, SZ, T, TA, TG, TL, TO, TW, TWO, US, V, VI, VN, VS, WA "US"
Response
Successful response
Current trading status of a market.
Was this page helpful?