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.analytics.stock_screener(stock_screener_request={
"clauses": [
{
"field": "marketcap",
"operator": models.ScreenClauseOperator.GTE,
"value": "1000000000",
},
{
"field": "pricetoearnings",
"operator": models.ScreenClauseOperator.GTE,
"value": "5",
},
{
"field": "pricetoearnings",
"operator": models.ScreenClauseOperator.LTE,
"value": "25",
},
],
"operator": models.StockScreenerRequestOperator1.AND,
}, order_direction=models.SortOrderEnum.ASC)
assert res.stock_screener_response is not None
# Handle response
print(res.stock_screener_response)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.analytics.stockScreener({
orderDirection: "asc",
body: {
clauses: [
{
field: "marketcap",
operator: "gte",
value: "1000000000",
},
{
field: "pricetoearnings",
operator: "gte",
value: "5",
},
{
field: "pricetoearnings",
operator: "lte",
value: "25",
},
],
operator: "AND",
},
});
console.log(result);
}
run();curl --request POST \
--url https://api.aries.com/v1/stock/screener \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clauses": [
{
"field": "marketcap",
"operator": "gte",
"value": "1000000000"
},
{
"field": "pricetoearnings",
"operator": "gte",
"value": "5"
},
{
"field": "pricetoearnings",
"operator": "lte",
"value": "25"
}
],
"operator": "AND"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clauses: [
{field: 'marketcap', operator: 'gte', value: '1000000000'},
{field: 'pricetoearnings', operator: 'gte', value: '5'},
{field: 'pricetoearnings', operator: 'lte', value: '25'}
],
operator: 'AND'
})
};
fetch('https://api.aries.com/v1/stock/screener', 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/stock/screener",
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([
'clauses' => [
[
'field' => 'marketcap',
'operator' => 'gte',
'value' => '1000000000'
],
[
'field' => 'pricetoearnings',
'operator' => 'gte',
'value' => '5'
],
[
'field' => 'pricetoearnings',
'operator' => 'lte',
'value' => '25'
]
],
'operator' => 'AND'
]),
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.aries.com/v1/stock/screener"
payload := strings.NewReader("{\n \"clauses\": [\n {\n \"field\": \"marketcap\",\n \"operator\": \"gte\",\n \"value\": \"1000000000\"\n },\n {\n \"field\": \"pricetoearnings\",\n \"operator\": \"gte\",\n \"value\": \"5\"\n },\n {\n \"field\": \"pricetoearnings\",\n \"operator\": \"lte\",\n \"value\": \"25\"\n }\n ],\n \"operator\": \"AND\"\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.aries.com/v1/stock/screener")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clauses\": [\n {\n \"field\": \"marketcap\",\n \"operator\": \"gte\",\n \"value\": \"1000000000\"\n },\n {\n \"field\": \"pricetoearnings\",\n \"operator\": \"gte\",\n \"value\": \"5\"\n },\n {\n \"field\": \"pricetoearnings\",\n \"operator\": \"lte\",\n \"value\": \"25\"\n }\n ],\n \"operator\": \"AND\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/stock/screener")
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 \"clauses\": [\n {\n \"field\": \"marketcap\",\n \"operator\": \"gte\",\n \"value\": \"1000000000\"\n },\n {\n \"field\": \"pricetoearnings\",\n \"operator\": \"gte\",\n \"value\": \"5\"\n },\n {\n \"field\": \"pricetoearnings\",\n \"operator\": \"lte\",\n \"value\": \"25\"\n }\n ],\n \"operator\": \"AND\"\n}"
response = http.request(request)
puts response.read_body[
{
"data": [
{
"number_value": 24.2204,
"tag": "pricetoearnings",
"text_value": null
},
{
"number_value": 2888569710564,
"tag": "marketcap",
"text_value": null
}
],
"security": {
"code": null,
"company_id": "com_qzEByJ",
"composite_figi": null,
"composite_ticker": "MSFT:US",
"currency": null,
"exchange": null,
"exchange_mic": null,
"figi": "BBG000BPHFS9",
"id": "sec_XaL6mg",
"name": "Microsoft Corporation",
"primary_listing": null,
"share_class_figi": null,
"stock_exchange_id": "sxg_ozMr9y",
"ticker": "MSFT"
}
}
]Stock Screener
Screen securities by sending a POST request with a JSON body containing operator and clauses (and optional groups). Use query params for page size, sort order, and primary-only filter.
Use Case: Build stock screeners (e.g., large-cap value, high ROE, cash-rich) by defining conditions with field, operator, and value. Combine with AND, OR, or NOT.
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.analytics.stock_screener(stock_screener_request={
"clauses": [
{
"field": "marketcap",
"operator": models.ScreenClauseOperator.GTE,
"value": "1000000000",
},
{
"field": "pricetoearnings",
"operator": models.ScreenClauseOperator.GTE,
"value": "5",
},
{
"field": "pricetoearnings",
"operator": models.ScreenClauseOperator.LTE,
"value": "25",
},
],
"operator": models.StockScreenerRequestOperator1.AND,
}, order_direction=models.SortOrderEnum.ASC)
assert res.stock_screener_response is not None
# Handle response
print(res.stock_screener_response)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.analytics.stockScreener({
orderDirection: "asc",
body: {
clauses: [
{
field: "marketcap",
operator: "gte",
value: "1000000000",
},
{
field: "pricetoearnings",
operator: "gte",
value: "5",
},
{
field: "pricetoearnings",
operator: "lte",
value: "25",
},
],
operator: "AND",
},
});
console.log(result);
}
run();curl --request POST \
--url https://api.aries.com/v1/stock/screener \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clauses": [
{
"field": "marketcap",
"operator": "gte",
"value": "1000000000"
},
{
"field": "pricetoearnings",
"operator": "gte",
"value": "5"
},
{
"field": "pricetoearnings",
"operator": "lte",
"value": "25"
}
],
"operator": "AND"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clauses: [
{field: 'marketcap', operator: 'gte', value: '1000000000'},
{field: 'pricetoearnings', operator: 'gte', value: '5'},
{field: 'pricetoearnings', operator: 'lte', value: '25'}
],
operator: 'AND'
})
};
fetch('https://api.aries.com/v1/stock/screener', 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/stock/screener",
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([
'clauses' => [
[
'field' => 'marketcap',
'operator' => 'gte',
'value' => '1000000000'
],
[
'field' => 'pricetoearnings',
'operator' => 'gte',
'value' => '5'
],
[
'field' => 'pricetoearnings',
'operator' => 'lte',
'value' => '25'
]
],
'operator' => 'AND'
]),
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.aries.com/v1/stock/screener"
payload := strings.NewReader("{\n \"clauses\": [\n {\n \"field\": \"marketcap\",\n \"operator\": \"gte\",\n \"value\": \"1000000000\"\n },\n {\n \"field\": \"pricetoearnings\",\n \"operator\": \"gte\",\n \"value\": \"5\"\n },\n {\n \"field\": \"pricetoearnings\",\n \"operator\": \"lte\",\n \"value\": \"25\"\n }\n ],\n \"operator\": \"AND\"\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.aries.com/v1/stock/screener")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clauses\": [\n {\n \"field\": \"marketcap\",\n \"operator\": \"gte\",\n \"value\": \"1000000000\"\n },\n {\n \"field\": \"pricetoearnings\",\n \"operator\": \"gte\",\n \"value\": \"5\"\n },\n {\n \"field\": \"pricetoearnings\",\n \"operator\": \"lte\",\n \"value\": \"25\"\n }\n ],\n \"operator\": \"AND\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/stock/screener")
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 \"clauses\": [\n {\n \"field\": \"marketcap\",\n \"operator\": \"gte\",\n \"value\": \"1000000000\"\n },\n {\n \"field\": \"pricetoearnings\",\n \"operator\": \"gte\",\n \"value\": \"5\"\n },\n {\n \"field\": \"pricetoearnings\",\n \"operator\": \"lte\",\n \"value\": \"25\"\n }\n ],\n \"operator\": \"AND\"\n}"
response = http.request(request)
puts response.read_body[
{
"data": [
{
"number_value": 24.2204,
"tag": "pricetoearnings",
"text_value": null
},
{
"number_value": 2888569710564,
"tag": "marketcap",
"text_value": null
}
],
"security": {
"code": null,
"company_id": "com_qzEByJ",
"composite_figi": null,
"composite_ticker": "MSFT:US",
"currency": null,
"exchange": null,
"exchange_mic": null,
"figi": "BBG000BPHFS9",
"id": "sec_XaL6mg",
"name": "Microsoft Corporation",
"primary_listing": null,
"share_class_figi": null,
"stock_exchange_id": "sxg_ozMr9y",
"ticker": "MSFT"
}
}
]Request body
Required. JSON with:| Field | Type | Required | Description |
|---|---|---|---|
operator | string | Yes | Logical operator: AND, OR, or NOT |
clauses | array | Yes* | List of conditions. Each has field, operator (eq, gt, gte, lt, lte, contains), and value (string). *At least one of clauses or groups must be non-empty. |
groups | array | No | Nested groups, each with operator and clauses, for complex logic. |
marketcap, pricetoearnings, roe, volume, open_price, dilutedeps, cashandequivalents, pricetobook, pricetosales, and others supported by the screener.
Query parameters
| Parameter | Type | Description |
|---|---|---|
page_size | integer | Results per request (1–50000). |
order_column | string | Sort by field (e.g. marketcap, pricetoearnings, roe, volume, open_price, dilutedeps, cashandequivalents). |
order_direction | string | asc or desc. |
primary_only | string | Use true or 1 to return only primary listings. |
Response
Success returns200 OK with a JSON array. Each element has:
- security — Identity and metadata:
id,company_id,stock_exchange_id,exchange,exchange_mic,name,code,currency,ticker,composite_ticker,figi,composite_figi,share_class_figi,primary_listing(fields may be null). - data — Array of screened tag values: each object has
tag(e.g. pricetoearnings, marketcap),number_value, andtext_value(one of which may be null).
[
{
"security": {
"id": "sec_XaL6mg",
"company_id": "com_qzEByJ",
"stock_exchange_id": "sxg_ozMr9y",
"exchange": null,
"exchange_mic": null,
"name": "Microsoft Corporation",
"code": null,
"currency": null,
"ticker": "MSFT",
"composite_ticker": "MSFT:US",
"figi": "BBG000BPHFS9",
"composite_figi": null,
"share_class_figi": null,
"primary_listing": null
},
"data": [
{ "tag": "pricetoearnings", "number_value": 24.2204, "text_value": null },
{ "tag": "marketcap", "number_value": 2888569710564.0, "text_value": null }
]
}
]
Examples
Market cap + P/E filter
POST /v1/stock/screener?page_size=100&order_column=marketcap&order_direction=desc
Content-Type: application/json
{
"operator": "AND",
"clauses": [
{ "field": "marketcap", "operator": "gte", "value": "1000000000" },
{ "field": "pricetoearnings", "operator": "gte", "value": "5" },
{ "field": "pricetoearnings", "operator": "lte", "value": "25" }
]
}
ROE + EPS filter
POST /v1/stock/screener?page_size=50&order_column=roe&order_direction=desc
{
"operator": "AND",
"clauses": [
{ "field": "roe", "operator": "gte", "value": "0.15" },
{ "field": "dilutedeps", "operator": "gte", "value": "1" }
]
}
P/B and P/S (value stocks)
POST /v1/stock/screener?page_size=100&order_column=marketcap&order_direction=asc
{
"operator": "AND",
"clauses": [
{ "field": "pricetobook", "operator": "gte", "value": "0.5" },
{ "field": "pricetobook", "operator": "lte", "value": "3" },
{ "field": "pricetosales", "operator": "lte", "value": "5" }
]
}
Volume + open price range
POST /v1/stock/screener?page_size=100&order_column=volume&order_direction=desc
{
"operator": "AND",
"clauses": [
{ "field": "volume", "operator": "gte", "value": "500000" },
{ "field": "open_price", "operator": "gte", "value": "10" },
{ "field": "open_price", "operator": "lte", "value": "100" }
]
}
Cash-rich, large cap
POST /v1/stock/screener?page_size=50&order_column=cashandequivalents&order_direction=desc
{
"operator": "AND",
"clauses": [
{ "field": "cashandequivalents", "operator": "gte", "value": "1000000000" },
{ "field": "marketcap", "operator": "gte", "value": "5000000000" }
]
}
Primary listings only
POST /v1/stock/screener?page_size=500&order_column=marketcap&order_direction=desc&primary_only=true
{
"operator": "AND",
"clauses": [
{ "field": "marketcap", "operator": "gte", "value": "500000000" },
{ "field": "roe", "operator": "gte", "value": "0.1" }
]
}
Authorizations
Query Parameters
Which data column to sort the screened results by. Accepts any column the upstream screener exposes — not a fixed enum on our side. Common columns:
marketcap— market capitalization.pricetoearnings— trailing P/E ratio.pricetobook— price-to-book ratio.roe— return on equity.volume— average daily volume.open_price/close_price— most recent open / close.dilutedeps— diluted earnings per share (TTM).cashandequivalents— cash + cash equivalents on the balance sheet.
Pair with order_direction (asc / desc).
Body
Screener request with operator (AND, OR, or NOT), clauses (field, operator, value), and optional groups.
- Option 1
- Option 2
Request body for POST /v1/stock/screener. At least one of clauses or groups must be non-empty.
Was this page helpful?