curl --request GET \
--url 'https://api.capyfin.com/v1/instruments?apikey='import requests
url = "https://api.capyfin.com/v1/instruments?apikey="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.capyfin.com/v1/instruments?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?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?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?apikey=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.capyfin.com/v1/instruments?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{
"total": 100,
"sub": true,
"items": [
{
"slug": "nasdaq-aapl",
"symbol": "AAPL",
"name": "Apple",
"type": "stock",
"exchange": "nasdaq",
"listed": true,
"image": "https://example.com/aapl.png",
"closingPrice": 237.33,
"returnLastDay": 1.92,
"returnThisWeek": 3.24,
"returnThisMonth": 5.06,
"returnYearToDate": 23.26,
"returnLastYear": 24.91
}
]
}Get a list of instruments.
Returns a paginated list of instruments.
curl --request GET \
--url 'https://api.capyfin.com/v1/instruments?apikey='import requests
url = "https://api.capyfin.com/v1/instruments?apikey="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.capyfin.com/v1/instruments?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?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?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?apikey=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.capyfin.com/v1/instruments?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{
"total": 100,
"sub": true,
"items": [
{
"slug": "nasdaq-aapl",
"symbol": "AAPL",
"name": "Apple",
"type": "stock",
"exchange": "nasdaq",
"listed": true,
"image": "https://example.com/aapl.png",
"closingPrice": 237.33,
"returnLastDay": 1.92,
"returnThisWeek": 3.24,
"returnThisMonth": 5.06,
"returnYearToDate": 23.26,
"returnLastYear": 24.91
}
]
}Authorizations
Pass your API key as a query parameter (e.g., /endpoint?apikey=YOUR_API_KEY)
Query Parameters
Filter by symbol. Accepts multiple symbols separated by commas.
Filter by index. Accepts multiple indices separated by commas.
SPX500, DJ30, NSDQ100 Filter by country (ISO 3166-1 alpha-2 country code). Accepts multiple countries separated by commas.
"US,GB"
Sorts results by a field or aggregate expressions. Format for field sort: 'fieldName:order' (e.g., 'returnYearToDate:asc', default is 'desc'). For aggregates like sum or avg, use 'operation(field1,field2):order' (e.g., 'sum(yearlyReturns.2023,yearlyReturns.2022)' or 'avg(operatingMargin,grossIncomeMargin):asc')').
Comma-separated list of fields to include in the response.
Page number for pagination (default: 1).
1
Filter by average net profit margin. Comparators: gt, lt, gte, lte.
"gt:20"
Filter by the average return on investment. Comparators: gt, lt, gte, lte.
"gt:15"
Filter by gross income margin. Comparators: gt, lt, gte, lte.
"gte:40"
Filter by operating margin. Comparators: gt, lt, gte, lte.
"gte:15"
Filter by quick ratio. Comparators: gt, lt, gte, lte.
"gte:1.5"
Filter by total debt to equity ratio. Comparators: gt, lt, gte, lte.
"lt:0.5"
Filter by beta. Comparators: gt, lt, gte, lte.
"gt:1"
Filter by current ratio. Comparators: gt, lt, gte, lte.
"gte:1"
Filter by P/E ratio. Comparators: gt, lt, gte, lte.
"lte:25"
Filter by dividend yield percentage. Comparators: gt, lt, gte, lte.
"gt:5"
Filter by sales or revenue in dollars. Comparators: gt, lt, gte, lte.
"gt:1000000"
Filter by earnings per share. Comparators: gt, lt, gte, lte.
"gt:1"
Filter by market cap in dollars. Comparators: gt, lt, gte, lte.
"gte:100000000"
Filter by number of employees. Comparators: gt, lt, gte, lte.
"gte:1000"
