Get Instrument by Symbol
curl --request GET \
--url 'https://api.capyfin.com/v1/instruments/{symbol}?apikey='import requests
url = "https://api.capyfin.com/v1/instruments/{symbol}?apikey="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.capyfin.com/v1/instruments/{symbol}?apikey=', 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.capyfin.com/v1/instruments/{symbol}?apikey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.capyfin.com/v1/instruments/{symbol}?apikey="
req, _ := http.NewRequest("GET", url, nil)
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.capyfin.com/v1/instruments/{symbol}?apikey=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.capyfin.com/v1/instruments/{symbol}?apikey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"instrument": {
"id": "507f1f77bcf86cd799439011",
"slug": "nasdaq-aapl",
"symbol": "AAPL",
"name": "Apple",
"fullName": "Apple Inc.",
"exchange": "nasdaq",
"image": "https://assets.capyfin.com/instruments/507f1f77bcf86cd799439011.png",
"marketCap": 3587432814000,
"country": "US",
"segments": [
"<string>"
],
"geo": [
"<string>"
],
"kpis": [
"<string>"
],
"investorRelationsUrl": "https://investor.apple.com",
"closingPrice": 237.33,
"returnLastDay": 1.92,
"returnThisWeek": 3.24,
"return2Years": 54.771,
"return5Years": 281.63,
"returnAll": 1432.26,
"dividendYield": 0.4171,
"dividendExDate": "2024-11-08T00:00:00.000Z",
"dividendPayDate": "2024-11-14T00:00:00.000Z",
"dividendUsd": 0.25,
"dividendFrequency": "QUARTERLY",
"dividendYearly": {
"2023": 0.94,
"2024": 0.97
},
"closeYearly": {
"2023": 192.53,
"2024": 237.33
}
}
}Instruments API
Get Instrument by Symbol
Retrieve a single instrument by its symbol.
GET
/
v1
/
instruments
/
{symbol}
Get Instrument by Symbol
curl --request GET \
--url 'https://api.capyfin.com/v1/instruments/{symbol}?apikey='import requests
url = "https://api.capyfin.com/v1/instruments/{symbol}?apikey="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.capyfin.com/v1/instruments/{symbol}?apikey=', 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.capyfin.com/v1/instruments/{symbol}?apikey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.capyfin.com/v1/instruments/{symbol}?apikey="
req, _ := http.NewRequest("GET", url, nil)
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.capyfin.com/v1/instruments/{symbol}?apikey=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.capyfin.com/v1/instruments/{symbol}?apikey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"instrument": {
"id": "507f1f77bcf86cd799439011",
"slug": "nasdaq-aapl",
"symbol": "AAPL",
"name": "Apple",
"fullName": "Apple Inc.",
"exchange": "nasdaq",
"image": "https://assets.capyfin.com/instruments/507f1f77bcf86cd799439011.png",
"marketCap": 3587432814000,
"country": "US",
"segments": [
"<string>"
],
"geo": [
"<string>"
],
"kpis": [
"<string>"
],
"investorRelationsUrl": "https://investor.apple.com",
"closingPrice": 237.33,
"returnLastDay": 1.92,
"returnThisWeek": 3.24,
"return2Years": 54.771,
"return5Years": 281.63,
"returnAll": 1432.26,
"dividendYield": 0.4171,
"dividendExDate": "2024-11-08T00:00:00.000Z",
"dividendPayDate": "2024-11-14T00:00:00.000Z",
"dividendUsd": 0.25,
"dividendFrequency": "QUARTERLY",
"dividendYearly": {
"2023": 0.94,
"2024": 0.97
},
"closeYearly": {
"2023": 192.53,
"2024": 237.33
}
}
}⌘I
