Get Stock Exchange Information
curl --request POST \
--url https://api.aisa.one/apis/v1/api-ninjas/get-stock-exchange \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"city": "New York",
"country": "US",
"mic": "XNYS",
"name": "New York Stock Exchange"
}
'import requests
url = "https://api.aisa.one/apis/v1/api-ninjas/get-stock-exchange"
payload = {
"city": "New York",
"country": "US",
"mic": "XNYS",
"name": "New York Stock Exchange"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({city: 'New York', country: 'US', mic: 'XNYS', name: 'New York Stock Exchange'})
};
fetch('https://api.aisa.one/apis/v1/api-ninjas/get-stock-exchange', 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.aisa.one/apis/v1/api-ninjas/get-stock-exchange",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'city' => 'New York',
'country' => 'US',
'mic' => 'XNYS',
'name' => 'New York Stock Exchange'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/api-ninjas/get-stock-exchange"
payload := strings.NewReader("{\n \"city\": \"New York\",\n \"country\": \"US\",\n \"mic\": \"XNYS\",\n \"name\": \"New York Stock Exchange\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/api-ninjas/get-stock-exchange")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"city\": \"New York\",\n \"country\": \"US\",\n \"mic\": \"XNYS\",\n \"name\": \"New York Stock Exchange\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/api-ninjas/get-stock-exchange")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"city\": \"New York\",\n \"country\": \"US\",\n \"mic\": \"XNYS\",\n \"name\": \"New York Stock Exchange\"\n}"
response = http.request(request)
puts response.read_body{
"details": [
{
"address": "<string>",
"city": "<string>",
"country": "<string>",
"currency": "<string>",
"description": "<string>",
"founded": "<string>",
"iso2": "<string>",
"market_cap_usd": 123,
"market_close": "<string>",
"market_open": "<string>",
"mic": "<string>",
"name": "<string>",
"num_listings": 123,
"timezone": "<string>",
"website": "<string>"
}
]
}API Ninjas
Get Stock Exchange Information
Get Stock Exchange Information
POST
https://api.aisa.one
/
apis
/
v1
/
api-ninjas
/
get-stock-exchange
Get Stock Exchange Information
curl --request POST \
--url https://api.aisa.one/apis/v1/api-ninjas/get-stock-exchange \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"city": "New York",
"country": "US",
"mic": "XNYS",
"name": "New York Stock Exchange"
}
'import requests
url = "https://api.aisa.one/apis/v1/api-ninjas/get-stock-exchange"
payload = {
"city": "New York",
"country": "US",
"mic": "XNYS",
"name": "New York Stock Exchange"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({city: 'New York', country: 'US', mic: 'XNYS', name: 'New York Stock Exchange'})
};
fetch('https://api.aisa.one/apis/v1/api-ninjas/get-stock-exchange', 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.aisa.one/apis/v1/api-ninjas/get-stock-exchange",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'city' => 'New York',
'country' => 'US',
'mic' => 'XNYS',
'name' => 'New York Stock Exchange'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/api-ninjas/get-stock-exchange"
payload := strings.NewReader("{\n \"city\": \"New York\",\n \"country\": \"US\",\n \"mic\": \"XNYS\",\n \"name\": \"New York Stock Exchange\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/api-ninjas/get-stock-exchange")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"city\": \"New York\",\n \"country\": \"US\",\n \"mic\": \"XNYS\",\n \"name\": \"New York Stock Exchange\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/api-ninjas/get-stock-exchange")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"city\": \"New York\",\n \"country\": \"US\",\n \"mic\": \"XNYS\",\n \"name\": \"New York Stock Exchange\"\n}"
response = http.request(request)
puts response.read_body{
"details": [
{
"address": "<string>",
"city": "<string>",
"country": "<string>",
"currency": "<string>",
"description": "<string>",
"founded": "<string>",
"iso2": "<string>",
"market_cap_usd": 123,
"market_close": "<string>",
"market_open": "<string>",
"mic": "<string>",
"name": "<string>",
"num_listings": 123,
"timezone": "<string>",
"website": "<string>"
}
]
}请求规范
- 方法与路径: POST /apis/v1/api-ninjas/get-stock-exchange
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/api-ninjas/get-stock-exchange
{
"operationId": "api-ninjas.get-stock-exchange",
"method": "POST",
"path": "/apis/v1/api-ninjas/get-stock-exchange",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"city": {
"description": "City where the stock exchange is located (e.g., 'New York', 'London', 'Tokyo').",
"examples": [
"New York",
"London",
"Tokyo"
],
"type": "string"
},
"country": {
"description": "2-letter ISO country code (ISO-3166-1 alpha-2) to filter exchanges by country (e.g., 'US', 'GB', 'JP').",
"examples": [
"US",
"GB",
"JP"
],
"type": "string"
},
"mic": {
"description": "Market Identifier Code (MIC) to search for a specific stock exchange (e.g., 'XNYS' for New York Stock Exchange, 'XLON' for London Stock Exchange).",
"examples": [
"XNYS",
"XLON",
"XNAS"
],
"type": "string"
},
"name": {
"description": "Stock exchange name to search for (e.g., 'New York Stock Exchange', 'NASDAQ'). Partial matches are supported.",
"examples": [
"New York Stock Exchange",
"NASDAQ"
],
"type": "string"
}
},
"type": "object"
}
}
},
"required": false
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
按实际用量收费。 默认请求预估费用:$0.00089 USD。 最终费用以实际用量为准。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
请求体
application/json