SensaAI GraphQL API Reference
Welcome to the SensaAI GraphQL API reference! This reference includes the complete set of public GraphQL types, queries, mutations, and their parameters.
Terms of Service
API Endpoints
# Endpoint:
https://sensaai.com/graphiql/
Queries
apiCreditsUsage
benchmarks
Description
Retrieves a list of available benchmarks which can be utilized for performance comparison purposes.
Response
Returns [BenchmarkType]
Example
Query
query Benchmarks {
benchmarks {
id
owner {
id
email
phoneNumber
firstName
lastName
registeredAt
stripeCustomerId
referralId
hasReferrals
}
name
category {
id
name
displayName
description
include
portfolioSet {
...PortfolioTypeFragment
}
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
id
owner {
...UserTypeFragment
}
name
category {
...PortfolioCategoryTypeFragment
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
...PortfolioTypeFragment
}
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
copies {
...PortfolioTypeFragment
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
...PortfolioHoldingsTypeFragment
}
portfolioValues
}
subscriptionviewSet {
id
user {
...UserTypeFragment
}
type
stock {
...StockTypeFragment
}
portfolio {
...PortfolioTypeFragment
}
watchlist {
...WatchlistTypeFragment
}
timestamp
}
copies {
id
owner {
...UserTypeFragment
}
name
category {
...PortfolioCategoryTypeFragment
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
...PortfolioTypeFragment
}
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
copies {
...PortfolioTypeFragment
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
...PortfolioHoldingsTypeFragment
}
portfolioValues
}
}
}
Response
{
"data": {
"benchmarks": [
{
"id": 4,
"owner": UserType,
"name": "abc123",
"category": PortfolioCategoryType,
"description": "xyz789",
"private": true,
"featured": false,
"createdAt": "2007-12-03T10:15:30Z",
"rebalanceFrequency": 123,
"maxStocks": 987,
"maxStocksCriteria": "MARKET_CAP",
"maxStocksCriteriaOrder": "DESCENDING",
"maxSectorConcentration": Decimal,
"totalRating": [Decimal],
"returnRating": [Decimal],
"growthRating": [Decimal],
"riskRating": [Decimal],
"valuationRating": [Decimal],
"technicalRating": [Decimal],
"macroRating": [Decimal],
"marketCap": [Decimal],
"sectorIds": [123],
"industryIds": [123],
"copiedFrom": PortfolioType,
"subscriptionviewSet": [SubscriptionViewType],
"copies": [PortfolioType]
}
]
}
}
errors
Response
Returns [String]
Example
Query
query Errors {
errors
}
Response
{"data": {"errors": ["abc123"]}}
industries
Response
Returns [IndustryType]
Example
Query
query Industries {
industries {
id
name
sector {
id
name
industrySet {
...IndustryTypeFragment
}
stockSet {
...StockTypeFragment
}
sectorRatings {
...SectorRatingNodeConnectionFragment
}
}
stockSet {
id
ticker
name
sector {
...SectorTypeFragment
}
industry {
...IndustryTypeFragment
}
includeSearch
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
stockRatings {
...WatchlistItemsNodeConnectionFragment
}
watchlistItems {
...WatchlistItemsTypeFragment
}
ratingalertSet {
...RatingAlertTypeFragment
}
stockPriceData
stockRatingsData
stockIncomeAnnualData
stockBalanceAnnualData
stockCashFlowAnnualData
stockDerivedAnnualData
stockIncomeQuarterlyData
stockBalanceQuarterlyData
stockCashFlowQuarterlyData
stockDerivedQuarterlyData
stockIncomeTtmData
stockBalanceTtmData
stockCashFlowTtmData
stockDerivedTtmData
stockDescription
marketCap
}
industryRatings {
pageInfo {
...PageInfoFragment
}
edges {
...IndustryRatingNodeEdgeFragment
}
totalCount
edgeCount
}
}
}
Response
{
"data": {
"industries": [
{
"id": "4",
"name": "xyz789",
"sector": SectorType,
"stockSet": [StockType],
"industryRatings": IndustryRatingNodeConnection
}
]
}
}
industryRatings
Description
Retrieves average industry ratings.
Response
Returns an IndustryRatingNodeConnection
Arguments
Name | Description |
---|---|
ranges - GenericScalar
|
Defines range of industry ratings to be returned. |
orderBy - [String]
|
Defines what rating is used to rank industries in response. |
search - [String]
|
Limit to industries where name contain search string. |
anonymised - Boolean
|
|
offset - Int
|
|
before - String
|
|
after - String
|
|
first - Int
|
|
last - Int
|
|
industry_Name - String
|
|
industry_Name_Icontains - String
|
|
date - Date
|
Example
Query
query IndustryRatings(
$ranges: GenericScalar,
$orderBy: [String],
$search: [String],
$anonymised: Boolean,
$offset: Int,
$before: String,
$after: String,
$first: Int,
$last: Int,
$industry_Name: String,
$industry_Name_Icontains: String,
$date: Date
) {
industryRatings(
ranges: $ranges,
orderBy: $orderBy,
search: $search,
anonymised: $anonymised,
offset: $offset,
before: $before,
after: $after,
first: $first,
last: $last,
industry_Name: $industry_Name,
industry_Name_Icontains: $industry_Name_Icontains,
date: $date
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
...IndustryRatingNodeFragment
}
cursor
}
totalCount
edgeCount
}
}
Variables
{
"ranges": GenericScalar,
"orderBy": ["abc123"],
"search": ["abc123"],
"anonymised": true,
"offset": 987,
"before": "abc123",
"after": "xyz789",
"first": 987,
"last": 987,
"industry_Name": "xyz789",
"industry_Name_Icontains": "xyz789",
"date": "2007-12-03"
}
Response
{
"data": {
"industryRatings": {
"pageInfo": PageInfo,
"edges": [IndustryRatingNodeEdge],
"totalCount": 123,
"edgeCount": 123
}
}
}
invoice
Response
Returns a GenericScalar
Arguments
Name | Description |
---|---|
invoiceId - String
|
Retrieves a specific invoice object. |
Example
Query
query Invoice($invoiceId: String) {
invoice(invoiceId: $invoiceId)
}
Variables
{"invoiceId": "abc123"}
Response
{"data": {"invoice": GenericScalar}}
invoices
Description
Retrieves a list of invoices for user.
Response
Returns a GenericScalar
Example
Query
query Invoices {
invoices
}
Response
{"data": {"invoices": GenericScalar}}
paymentMethods
Description
Retrieves a list of your registered payment methods.
Response
Returns a GenericScalar
Example
Query
query PaymentMethods {
paymentMethods
}
Response
{"data": {"paymentMethods": GenericScalar}}
portfolio
Response
Returns a PortfolioType
Arguments
Name | Description |
---|---|
id - Int
|
Example
Query
query Portfolio($id: Int) {
portfolio(id: $id) {
id
owner {
id
email
phoneNumber
firstName
lastName
registeredAt
stripeCustomerId
referralId
hasReferrals
}
name
category {
id
name
displayName
description
include
portfolioSet {
...PortfolioTypeFragment
}
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
id
owner {
...UserTypeFragment
}
name
category {
...PortfolioCategoryTypeFragment
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
...PortfolioTypeFragment
}
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
copies {
...PortfolioTypeFragment
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
...PortfolioHoldingsTypeFragment
}
portfolioValues
}
subscriptionviewSet {
id
user {
...UserTypeFragment
}
type
stock {
...StockTypeFragment
}
portfolio {
...PortfolioTypeFragment
}
watchlist {
...WatchlistTypeFragment
}
timestamp
}
copies {
id
owner {
...UserTypeFragment
}
name
category {
...PortfolioCategoryTypeFragment
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
...PortfolioTypeFragment
}
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
copies {
...PortfolioTypeFragment
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
...PortfolioHoldingsTypeFragment
}
portfolioValues
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
id
stock {
...StockTypeFragment
}
date
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
}
portfolioValues
}
}
Variables
{"id": 987}
Response
{
"data": {
"portfolio": {
"id": "4",
"owner": UserType,
"name": "abc123",
"category": PortfolioCategoryType,
"description": "xyz789",
"private": false,
"featured": true,
"createdAt": "2007-12-03T10:15:30Z",
"rebalanceFrequency": 123,
"maxStocks": 987,
"maxStocksCriteria": "MARKET_CAP",
"maxStocksCriteriaOrder": "DESCENDING",
"maxSectorConcentration": Decimal,
"totalRating": [Decimal],
"returnRating": [Decimal],
"growthRating": [Decimal],
"riskRating": [Decimal],
"valuationRating": [Decimal],
"technicalRating": [Decimal],
"macroRating": [Decimal],
"marketCap": [Decimal],
"sectorIds": [123],
"industryIds": [123],
"copiedFrom": PortfolioType,
"subscriptionviewSet": [SubscriptionViewType],
"copies": [PortfolioType],
"nextRebalanceDate": "abc123",
"previousRebalanceDate": "xyz789",
"benchmarkId": 4,
"ranges": GenericScalar,
"holdings": [PortfolioHoldingsType],
"portfolioValues": GenericScalar
}
}
}
portfolioCategories
Response
Returns [PortfolioCategoryType]
Example
Query
query PortfolioCategories {
portfolioCategories {
id
name
displayName
description
include
portfolioSet {
id
owner {
...UserTypeFragment
}
name
category {
...PortfolioCategoryTypeFragment
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
...PortfolioTypeFragment
}
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
copies {
...PortfolioTypeFragment
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
...PortfolioHoldingsTypeFragment
}
portfolioValues
}
}
}
Response
{
"data": {
"portfolioCategories": [
{
"id": "4",
"name": "xyz789",
"displayName": "xyz789",
"description": "xyz789",
"include": true,
"portfolioSet": [PortfolioType]
}
]
}
}
portfolioCategory
Response
Returns a PortfolioCategoryType
Example
Query
query PortfolioCategory(
$name: String,
$id: Int
) {
portfolioCategory(
name: $name,
id: $id
) {
id
name
displayName
description
include
portfolioSet {
id
owner {
...UserTypeFragment
}
name
category {
...PortfolioCategoryTypeFragment
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
...PortfolioTypeFragment
}
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
copies {
...PortfolioTypeFragment
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
...PortfolioHoldingsTypeFragment
}
portfolioValues
}
}
}
Variables
{"name": "xyz789", "id": 123}
Response
{
"data": {
"portfolioCategory": {
"id": 4,
"name": "abc123",
"displayName": "xyz789",
"description": "xyz789",
"include": false,
"portfolioSet": [PortfolioType]
}
}
}
portfolioHoldings
Description
Retrieves portfolio holdings for a portfolio.
Response
Returns a PortfolioHoldingsNodeConnection
Arguments
Name | Description |
---|---|
id - Int
|
id of the portfolio |
orderBy - [String]
|
Defines what rating is used to rank stocks in response. - in front denotes ranking in descending order (e.g. -total_rating returns stock with highest total_rating first). |
search - [String]
|
Limit holdings where ticker or name contain search string. |
holdingsPeriod - String
|
|
ratingsPeriod - String
|
|
anonymised - Boolean
|
|
offset - Int
|
|
before - String
|
|
after - String
|
|
first - Int
|
|
last - Int
|
|
stock_Ticker - String
|
|
stock_Ticker_Icontains - String
|
|
stock_Name - String
|
|
stock_Name_Icontains - String
|
Example
Query
query PortfolioHoldings(
$id: Int,
$orderBy: [String],
$search: [String],
$holdingsPeriod: String,
$ratingsPeriod: String,
$anonymised: Boolean,
$offset: Int,
$before: String,
$after: String,
$first: Int,
$last: Int,
$stock_Ticker: String,
$stock_Ticker_Icontains: String,
$stock_Name: String,
$stock_Name_Icontains: String
) {
portfolioHoldings(
id: $id,
orderBy: $orderBy,
search: $search,
holdingsPeriod: $holdingsPeriod,
ratingsPeriod: $ratingsPeriod,
anonymised: $anonymised,
offset: $offset,
before: $before,
after: $after,
first: $first,
last: $last,
stock_Ticker: $stock_Ticker,
stock_Ticker_Icontains: $stock_Ticker_Icontains,
stock_Name: $stock_Name,
stock_Name_Icontains: $stock_Name_Icontains
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
...PortfolioHoldingsNodeFragment
}
cursor
}
totalCount
edgeCount
averageRatings
sectorCount
industryCount
}
}
Variables
{
"id": 987,
"orderBy": ["abc123"],
"search": ["abc123"],
"holdingsPeriod": "abc123",
"ratingsPeriod": "abc123",
"anonymised": false,
"offset": 123,
"before": "xyz789",
"after": "abc123",
"first": 987,
"last": 987,
"stock_Ticker": "xyz789",
"stock_Ticker_Icontains": "xyz789",
"stock_Name": "abc123",
"stock_Name_Icontains": "abc123"
}
Response
{
"data": {
"portfolioHoldings": {
"pageInfo": PageInfo,
"edges": [PortfolioHoldingsNodeEdge],
"totalCount": 123,
"edgeCount": 987,
"averageRatings": GenericScalar,
"sectorCount": GenericScalar,
"industryCount": GenericScalar
}
}
}
portfolioMetrics
Description
Retrieves performance metrics for a portfolio.
Response
Returns a GenericScalar
Example
Query
query PortfolioMetrics(
$id: Int,
$benchmark: String,
$period: String
) {
portfolioMetrics(
id: $id,
benchmark: $benchmark,
period: $period
)
}
Variables
{
"id": 987,
"benchmark": "abc123",
"period": "abc123"
}
Response
{"data": {"portfolioMetrics": GenericScalar}}
portfolioReturn
Response
Returns a GenericScalar
Arguments
Name | Description |
---|---|
id - Int
|
Example
Query
query PortfolioReturn($id: Int) {
portfolioReturn(id: $id)
}
Variables
{"id": 123}
Response
{"data": {"portfolioReturn": GenericScalar}}
portfolioReturnChart
Description
Retrieves periodic portfolio performance for a portfolio.
Response
Returns a GenericScalar
Arguments
Name | Description |
---|---|
id - Int
|
id of the portfolio |
chartType - String
|
The type of portfolio performance. Possible values are: "cumulative_return", "yearly_returns", "histogram", "drawdown", "rolling_beta" (requires benchmark), "rolling_volatility", "rolling_sharpe", "monthly_heatmap", "boxplot". |
benchmark - String
|
Benchmark for comparison. |
Example
Query
query PortfolioReturnChart(
$id: Int,
$chartType: String,
$benchmark: String
) {
portfolioReturnChart(
id: $id,
chartType: $chartType,
benchmark: $benchmark
)
}
Variables
{
"id": 987,
"chartType": "xyz789",
"benchmark": "abc123"
}
Response
{"data": {"portfolioReturnChart": GenericScalar}}
portfolioTrades
Description
Retrieves trade instructions for a portfolio on latest rebalance date.
Response
Returns a GenericScalar
Example
Query
query PortfolioTrades(
$id: Int,
$date: Date,
$value: Float,
$valuePrevious: Float,
$allowFractional: Boolean
) {
portfolioTrades(
id: $id,
date: $date,
value: $value,
valuePrevious: $valuePrevious,
allowFractional: $allowFractional
)
}
Variables
{
"id": 123,
"date": "2007-12-03",
"value": 123.45,
"valuePrevious": 123.45,
"allowFractional": false
}
Response
{"data": {"portfolioTrades": GenericScalar}}
portfoliosForUser
Response
Returns [PortfolioType]
Arguments
Name | Description |
---|---|
id - Int
|
id of the portfolio |
Example
Query
query PortfoliosForUser($id: Int) {
portfoliosForUser(id: $id) {
id
owner {
id
email
phoneNumber
firstName
lastName
registeredAt
stripeCustomerId
referralId
hasReferrals
}
name
category {
id
name
displayName
description
include
portfolioSet {
...PortfolioTypeFragment
}
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
id
owner {
...UserTypeFragment
}
name
category {
...PortfolioCategoryTypeFragment
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
...PortfolioTypeFragment
}
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
copies {
...PortfolioTypeFragment
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
...PortfolioHoldingsTypeFragment
}
portfolioValues
}
subscriptionviewSet {
id
user {
...UserTypeFragment
}
type
stock {
...StockTypeFragment
}
portfolio {
...PortfolioTypeFragment
}
watchlist {
...WatchlistTypeFragment
}
timestamp
}
copies {
id
owner {
...UserTypeFragment
}
name
category {
...PortfolioCategoryTypeFragment
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
...PortfolioTypeFragment
}
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
copies {
...PortfolioTypeFragment
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
...PortfolioHoldingsTypeFragment
}
portfolioValues
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
id
stock {
...StockTypeFragment
}
date
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
}
portfolioValues
}
}
Variables
{"id": 123}
Response
{
"data": {
"portfoliosForUser": [
{
"id": "4",
"owner": UserType,
"name": "abc123",
"category": PortfolioCategoryType,
"description": "abc123",
"private": false,
"featured": false,
"createdAt": "2007-12-03T10:15:30Z",
"rebalanceFrequency": 987,
"maxStocks": 987,
"maxStocksCriteria": "MARKET_CAP",
"maxStocksCriteriaOrder": "DESCENDING",
"maxSectorConcentration": Decimal,
"totalRating": [Decimal],
"returnRating": [Decimal],
"growthRating": [Decimal],
"riskRating": [Decimal],
"valuationRating": [Decimal],
"technicalRating": [Decimal],
"macroRating": [Decimal],
"marketCap": [Decimal],
"sectorIds": [987],
"industryIds": [987],
"copiedFrom": PortfolioType,
"subscriptionviewSet": [SubscriptionViewType],
"copies": [PortfolioType],
"nextRebalanceDate": "xyz789",
"previousRebalanceDate": "abc123",
"benchmarkId": "4",
"ranges": GenericScalar,
"holdings": [PortfolioHoldingsType],
"portfolioValues": GenericScalar
}
]
}
}
products
Description
Retrieves a list of available SensaAI products.
Response
Returns [ProductType]
Example
Query
query Products(
$type: String,
$id: ID
) {
products(
type: $type,
id: $id
) {
id
subscriptionLevel
name
description
type
stripeProductIdTest
stripeProductId
priceSet {
id
price
currency
interval
stripePriceIdTest
stripePriceId
product {
...ProductTypeFragment
}
subscriptionSet {
...SubscriptionTypeFragment
}
}
subscriptionSet {
id
user {
...UserTypeFragment
}
product {
...ProductTypeFragment
}
price {
...PriceTypeFragment
}
gateway
createdAt
validUntil
status
stripeCustomerId
stripeSubscriptionId
subscriptionpaymentSet {
...SubscriptionPaymentTypeFragment
}
}
subscriptionpaymentSet {
id
subscription {
...SubscriptionTypeFragment
}
product {
...ProductTypeFragment
}
amount
gatewayFee
currency
date
status
stripeInvoiceId
commission
}
prices {
id
price
currency
interval
stripePriceIdTest
stripePriceId
product {
...ProductTypeFragment
}
subscriptionSet {
...SubscriptionTypeFragment
}
}
features {
id
name
title
category
valueBoolean
valueNumerical
}
}
}
Variables
{
"type": "abc123",
"id": "4"
}
Response
{
"data": {
"products": [
{
"id": 4,
"subscriptionLevel": 123,
"name": "abc123",
"description": "abc123",
"type": "abc123",
"stripeProductIdTest": "xyz789",
"stripeProductId": "abc123",
"priceSet": [PriceType],
"subscriptionSet": [SubscriptionType],
"subscriptionpaymentSet": [
SubscriptionPaymentType
],
"prices": [PriceType],
"features": [ProductFeaturesType]
}
]
}
}
profile
Description
Retrieves profile data for user which API key is provided in query header.
Response
Returns a UserType
Example
Query
query Profile {
profile {
id
email
phoneNumber
firstName
lastName
registeredAt
stripeCustomerId
referralId
hasReferrals
}
}
Response
{
"data": {
"profile": {
"id": 4,
"email": "xyz789",
"phoneNumber": "abc123",
"firstName": "abc123",
"lastName": "abc123",
"registeredAt": "2007-12-03T10:15:30Z",
"stripeCustomerId": "abc123",
"referralId": "xyz789",
"hasReferrals": false
}
}
}
publicPortfolios
Response
Returns [PortfolioType]
Example
Query
query PublicPortfolios {
publicPortfolios {
id
owner {
id
email
phoneNumber
firstName
lastName
registeredAt
stripeCustomerId
referralId
hasReferrals
}
name
category {
id
name
displayName
description
include
portfolioSet {
...PortfolioTypeFragment
}
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
id
owner {
...UserTypeFragment
}
name
category {
...PortfolioCategoryTypeFragment
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
...PortfolioTypeFragment
}
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
copies {
...PortfolioTypeFragment
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
...PortfolioHoldingsTypeFragment
}
portfolioValues
}
subscriptionviewSet {
id
user {
...UserTypeFragment
}
type
stock {
...StockTypeFragment
}
portfolio {
...PortfolioTypeFragment
}
watchlist {
...WatchlistTypeFragment
}
timestamp
}
copies {
id
owner {
...UserTypeFragment
}
name
category {
...PortfolioCategoryTypeFragment
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
...PortfolioTypeFragment
}
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
copies {
...PortfolioTypeFragment
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
...PortfolioHoldingsTypeFragment
}
portfolioValues
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
id
stock {
...StockTypeFragment
}
date
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
}
portfolioValues
}
}
Response
{
"data": {
"publicPortfolios": [
{
"id": 4,
"owner": UserType,
"name": "abc123",
"category": PortfolioCategoryType,
"description": "xyz789",
"private": true,
"featured": false,
"createdAt": "2007-12-03T10:15:30Z",
"rebalanceFrequency": 987,
"maxStocks": 123,
"maxStocksCriteria": "MARKET_CAP",
"maxStocksCriteriaOrder": "DESCENDING",
"maxSectorConcentration": Decimal,
"totalRating": [Decimal],
"returnRating": [Decimal],
"growthRating": [Decimal],
"riskRating": [Decimal],
"valuationRating": [Decimal],
"technicalRating": [Decimal],
"macroRating": [Decimal],
"marketCap": [Decimal],
"sectorIds": [123],
"industryIds": [987],
"copiedFrom": PortfolioType,
"subscriptionviewSet": [SubscriptionViewType],
"copies": [PortfolioType],
"nextRebalanceDate": "abc123",
"previousRebalanceDate": "xyz789",
"benchmarkId": 4,
"ranges": GenericScalar,
"holdings": [PortfolioHoldingsType],
"portfolioValues": GenericScalar
}
]
}
}
sectorRatings
Description
Retrieves average sector ratings.
Response
Returns a SectorRatingNodeConnection
Arguments
Name | Description |
---|---|
ranges - GenericScalar
|
Defines range of sector ratings to be returned. |
orderBy - [String]
|
Defines what rating is used to rank sectors in response. |
search - [String]
|
Limit to sectors where ticker or name contain search string. |
anonymised - Boolean
|
|
offset - Int
|
|
before - String
|
|
after - String
|
|
first - Int
|
|
last - Int
|
|
sector_Name - String
|
|
sector_Name_Icontains - String
|
|
date - Date
|
Example
Query
query SectorRatings(
$ranges: GenericScalar,
$orderBy: [String],
$search: [String],
$anonymised: Boolean,
$offset: Int,
$before: String,
$after: String,
$first: Int,
$last: Int,
$sector_Name: String,
$sector_Name_Icontains: String,
$date: Date
) {
sectorRatings(
ranges: $ranges,
orderBy: $orderBy,
search: $search,
anonymised: $anonymised,
offset: $offset,
before: $before,
after: $after,
first: $first,
last: $last,
sector_Name: $sector_Name,
sector_Name_Icontains: $sector_Name_Icontains,
date: $date
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
...SectorRatingNodeFragment
}
cursor
}
totalCount
edgeCount
}
}
Variables
{
"ranges": GenericScalar,
"orderBy": ["xyz789"],
"search": ["xyz789"],
"anonymised": true,
"offset": 123,
"before": "xyz789",
"after": "abc123",
"first": 123,
"last": 987,
"sector_Name": "xyz789",
"sector_Name_Icontains": "xyz789",
"date": "2007-12-03"
}
Response
{
"data": {
"sectorRatings": {
"pageInfo": PageInfo,
"edges": [SectorRatingNodeEdge],
"totalCount": 123,
"edgeCount": 123
}
}
}
sectors
Response
Returns [SectorType]
Example
Query
query Sectors {
sectors {
id
name
industrySet {
id
name
sector {
...SectorTypeFragment
}
stockSet {
...StockTypeFragment
}
industryRatings {
...IndustryRatingNodeConnectionFragment
}
}
stockSet {
id
ticker
name
sector {
...SectorTypeFragment
}
industry {
...IndustryTypeFragment
}
includeSearch
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
stockRatings {
...WatchlistItemsNodeConnectionFragment
}
watchlistItems {
...WatchlistItemsTypeFragment
}
ratingalertSet {
...RatingAlertTypeFragment
}
stockPriceData
stockRatingsData
stockIncomeAnnualData
stockBalanceAnnualData
stockCashFlowAnnualData
stockDerivedAnnualData
stockIncomeQuarterlyData
stockBalanceQuarterlyData
stockCashFlowQuarterlyData
stockDerivedQuarterlyData
stockIncomeTtmData
stockBalanceTtmData
stockCashFlowTtmData
stockDerivedTtmData
stockDescription
marketCap
}
sectorRatings {
pageInfo {
...PageInfoFragment
}
edges {
...SectorRatingNodeEdgeFragment
}
totalCount
edgeCount
}
}
}
Response
{
"data": {
"sectors": [
{
"id": "4",
"name": "xyz789",
"industrySet": [IndustryType],
"stockSet": [StockType],
"sectorRatings": SectorRatingNodeConnection
}
]
}
}
stockByTicker
Description
Returns a specific stock object if exists for stock ticker input.
Response
Returns a StockType
Example
Query
query StockByTicker(
$ticker: String!,
$periods: Int,
$anonymised: Boolean
) {
stockByTicker(
ticker: $ticker,
periods: $periods,
anonymised: $anonymised
) {
id
ticker
name
sector {
id
name
industrySet {
...IndustryTypeFragment
}
stockSet {
...StockTypeFragment
}
sectorRatings {
...SectorRatingNodeConnectionFragment
}
}
industry {
id
name
sector {
...SectorTypeFragment
}
stockSet {
...StockTypeFragment
}
industryRatings {
...IndustryRatingNodeConnectionFragment
}
}
includeSearch
subscriptionviewSet {
id
user {
...UserTypeFragment
}
type
stock {
...StockTypeFragment
}
portfolio {
...PortfolioTypeFragment
}
watchlist {
...WatchlistTypeFragment
}
timestamp
}
stockRatings {
pageInfo {
...PageInfoFragment
}
edges {
...WatchlistItemsNodeEdgeFragment
}
totalCount
edgeCount
averageRatings
sectorCount
industryCount
id
}
watchlistItems {
id
stock {
...StockTypeFragment
}
}
ratingalertSet {
id
user {
...UserTypeFragment
}
stock {
...StockTypeFragment
}
createdAt
ratingType {
...RatingTypeTypeFragment
}
trigger
value
currentRating
}
stockPriceData
stockRatingsData
stockIncomeAnnualData
stockBalanceAnnualData
stockCashFlowAnnualData
stockDerivedAnnualData
stockIncomeQuarterlyData
stockBalanceQuarterlyData
stockCashFlowQuarterlyData
stockDerivedQuarterlyData
stockIncomeTtmData
stockBalanceTtmData
stockCashFlowTtmData
stockDerivedTtmData
stockDescription
marketCap
}
}
Variables
{
"ticker": "abc123",
"periods": 123,
"anonymised": false
}
Response
{
"data": {
"stockByTicker": {
"id": 123,
"ticker": "abc123",
"name": "abc123",
"sector": SectorType,
"industry": IndustryType,
"includeSearch": false,
"subscriptionviewSet": [SubscriptionViewType],
"stockRatings": WatchlistItemsNodeConnection,
"watchlistItems": [WatchlistItemsType],
"ratingalertSet": [RatingAlertType],
"stockPriceData": GenericScalar,
"stockRatingsData": GenericScalar,
"stockIncomeAnnualData": GenericScalar,
"stockBalanceAnnualData": GenericScalar,
"stockCashFlowAnnualData": GenericScalar,
"stockDerivedAnnualData": GenericScalar,
"stockIncomeQuarterlyData": GenericScalar,
"stockBalanceQuarterlyData": GenericScalar,
"stockCashFlowQuarterlyData": GenericScalar,
"stockDerivedQuarterlyData": GenericScalar,
"stockIncomeTtmData": GenericScalar,
"stockBalanceTtmData": GenericScalar,
"stockCashFlowTtmData": GenericScalar,
"stockDerivedTtmData": GenericScalar,
"stockDescription": GenericScalar,
"marketCap": 987.65
}
}
}
stockMetrics
Description
Retrieves performance metrics for a stock.
Response
Returns a GenericScalar
Example
Query
query StockMetrics(
$id: Int,
$benchmark: String,
$period: String
) {
stockMetrics(
id: $id,
benchmark: $benchmark,
period: $period
)
}
Variables
{
"id": 987,
"benchmark": "xyz789",
"period": "xyz789"
}
Response
{"data": {"stockMetrics": GenericScalar}}
stockRatings
Description
Retrieves a stock ratings object or a list of stock ratings objects.
Response
Returns a StockRatingNodeConnection
Arguments
Name | Description |
---|---|
ranges - GenericScalar
|
Defines range of stock ratings to be returned. E.g. setting to ranges={return_rating:[8,10],growth_rating:[7,10]} will only return stocks with return_ratings equal to or above 8 and growth_rating equal to or above 7. Min is 0 and max is 10. By default, no ratings limits are applied. |
dateRange - [String]
|
Defines the date range for stock ratings. Provide two dates in the format "YYYY-MM-DD", e.g., ["2023-01-01", "2023-12-31"]. |
orderBy - [String]
|
Defines what rating is used to rank stocks in response. - in front denotes ranking in descending order (e.g. -total_rating returns stock with the highest total_rating first). |
search - [String]
|
Limit to stocks where ticker or name contain the search string. |
sectorIds - [Int]
|
Limit to stocks in selected sectors |
industryIds - [Int]
|
Limit to stocks in selected industries |
ticker - String
|
|
anonymised - Boolean
|
|
offset - Int
|
|
before - String
|
|
after - String
|
|
first - Int
|
|
last - Int
|
|
stock_Ticker - String
|
|
stock_Ticker_Icontains - String
|
|
stock_Name - String
|
|
stock_Name_Icontains - String
|
|
date - Date
|
Example
Query
query StockRatings(
$ranges: GenericScalar,
$dateRange: [String],
$orderBy: [String],
$search: [String],
$sectorIds: [Int],
$industryIds: [Int],
$ticker: String,
$anonymised: Boolean,
$offset: Int,
$before: String,
$after: String,
$first: Int,
$last: Int,
$stock_Ticker: String,
$stock_Ticker_Icontains: String,
$stock_Name: String,
$stock_Name_Icontains: String,
$date: Date
) {
stockRatings(
ranges: $ranges,
dateRange: $dateRange,
orderBy: $orderBy,
search: $search,
sectorIds: $sectorIds,
industryIds: $industryIds,
ticker: $ticker,
anonymised: $anonymised,
offset: $offset,
before: $before,
after: $after,
first: $first,
last: $last,
stock_Ticker: $stock_Ticker,
stock_Ticker_Icontains: $stock_Ticker_Icontains,
stock_Name: $stock_Name,
stock_Name_Icontains: $stock_Name_Icontains,
date: $date
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
...StockRatingNodeFragment
}
cursor
}
totalCount
edgeCount
}
}
Variables
{
"ranges": GenericScalar,
"dateRange": ["abc123"],
"orderBy": ["xyz789"],
"search": ["abc123"],
"sectorIds": [123],
"industryIds": [987],
"ticker": "abc123",
"anonymised": true,
"offset": 123,
"before": "abc123",
"after": "xyz789",
"first": 123,
"last": 987,
"stock_Ticker": "abc123",
"stock_Ticker_Icontains": "abc123",
"stock_Name": "xyz789",
"stock_Name_Icontains": "xyz789",
"date": "2007-12-03"
}
Response
{
"data": {
"stockRatings": {
"pageInfo": PageInfo,
"edges": [StockRatingNodeEdge],
"totalCount": 987,
"edgeCount": 987
}
}
}
stockReturnChart
Description
Retrieves periodic performance for a stock.
Response
Returns a GenericScalar
Arguments
Name | Description |
---|---|
id - Int
|
id of the stock |
chartType - String
|
The type of portfolio performance. Possible values are: "cumulative_return", "yearly_returns", "histogram", "drawdown", "rolling_beta" (requires benchmark), "rolling_volatility", "rolling_sharpe", "monthly_heatmap", "boxplot". |
benchmark - String
|
Benchmark for comparison. |
Example
Query
query StockReturnChart(
$id: Int,
$chartType: String,
$benchmark: String
) {
stockReturnChart(
id: $id,
chartType: $chartType,
benchmark: $benchmark
)
}
Variables
{
"id": 123,
"chartType": "xyz789",
"benchmark": "abc123"
}
Response
{"data": {"stockReturnChart": GenericScalar}}
stocksSearch
Description
Retrieves a list of one or more stocks meeting search criteria. Search string used to search stock names and stock tickers. If a very broad search string is provided the result will be limited to the first 10 stocks meeting the search criteria.
Response
Returns [StockType]
Arguments
Name | Description |
---|---|
search - String!
|
Example
Query
query StocksSearch($search: String!) {
stocksSearch(search: $search) {
id
ticker
name
sector {
id
name
industrySet {
...IndustryTypeFragment
}
stockSet {
...StockTypeFragment
}
sectorRatings {
...SectorRatingNodeConnectionFragment
}
}
industry {
id
name
sector {
...SectorTypeFragment
}
stockSet {
...StockTypeFragment
}
industryRatings {
...IndustryRatingNodeConnectionFragment
}
}
includeSearch
subscriptionviewSet {
id
user {
...UserTypeFragment
}
type
stock {
...StockTypeFragment
}
portfolio {
...PortfolioTypeFragment
}
watchlist {
...WatchlistTypeFragment
}
timestamp
}
stockRatings {
pageInfo {
...PageInfoFragment
}
edges {
...WatchlistItemsNodeEdgeFragment
}
totalCount
edgeCount
averageRatings
sectorCount
industryCount
id
}
watchlistItems {
id
stock {
...StockTypeFragment
}
}
ratingalertSet {
id
user {
...UserTypeFragment
}
stock {
...StockTypeFragment
}
createdAt
ratingType {
...RatingTypeTypeFragment
}
trigger
value
currentRating
}
stockPriceData
stockRatingsData
stockIncomeAnnualData
stockBalanceAnnualData
stockCashFlowAnnualData
stockDerivedAnnualData
stockIncomeQuarterlyData
stockBalanceQuarterlyData
stockCashFlowQuarterlyData
stockDerivedQuarterlyData
stockIncomeTtmData
stockBalanceTtmData
stockCashFlowTtmData
stockDerivedTtmData
stockDescription
marketCap
}
}
Variables
{"search": "xyz789"}
Response
{
"data": {
"stocksSearch": [
{
"id": 123,
"ticker": "abc123",
"name": "xyz789",
"sector": SectorType,
"industry": IndustryType,
"includeSearch": false,
"subscriptionviewSet": [SubscriptionViewType],
"stockRatings": WatchlistItemsNodeConnection,
"watchlistItems": [WatchlistItemsType],
"ratingalertSet": [RatingAlertType],
"stockPriceData": GenericScalar,
"stockRatingsData": GenericScalar,
"stockIncomeAnnualData": GenericScalar,
"stockBalanceAnnualData": GenericScalar,
"stockCashFlowAnnualData": GenericScalar,
"stockDerivedAnnualData": GenericScalar,
"stockIncomeQuarterlyData": GenericScalar,
"stockBalanceQuarterlyData": GenericScalar,
"stockCashFlowQuarterlyData": GenericScalar,
"stockDerivedQuarterlyData": GenericScalar,
"stockIncomeTtmData": GenericScalar,
"stockBalanceTtmData": GenericScalar,
"stockCashFlowTtmData": GenericScalar,
"stockDerivedTtmData": GenericScalar,
"stockDescription": GenericScalar,
"marketCap": 123.45
}
]
}
}
subscriptions
Description
Retrieves a list of subscriptions for user.
Response
Returns [SubscriptionType]
Arguments
Name | Description |
---|---|
type - String
|
Example
Query
query Subscriptions($type: String) {
subscriptions(type: $type) {
id
user {
id
email
phoneNumber
firstName
lastName
registeredAt
stripeCustomerId
referralId
hasReferrals
}
product {
id
subscriptionLevel
name
description
type
stripeProductIdTest
stripeProductId
priceSet {
...PriceTypeFragment
}
subscriptionSet {
...SubscriptionTypeFragment
}
subscriptionpaymentSet {
...SubscriptionPaymentTypeFragment
}
prices {
...PriceTypeFragment
}
features {
...ProductFeaturesTypeFragment
}
}
price {
id
price
currency
interval
stripePriceIdTest
stripePriceId
product {
...ProductTypeFragment
}
subscriptionSet {
...SubscriptionTypeFragment
}
}
gateway
createdAt
validUntil
status
stripeCustomerId
stripeSubscriptionId
subscriptionpaymentSet {
id
subscription {
...SubscriptionTypeFragment
}
product {
...ProductTypeFragment
}
amount
gatewayFee
currency
date
status
stripeInvoiceId
commission
}
}
}
Variables
{"type": "xyz789"}
Response
{
"data": {
"subscriptions": [
{
"id": 4,
"user": UserType,
"product": ProductType,
"price": PriceType,
"gateway": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"validUntil": "2007-12-03T10:15:30Z",
"status": "abc123",
"stripeCustomerId": "xyz789",
"stripeSubscriptionId": "xyz789",
"subscriptionpaymentSet": [
SubscriptionPaymentType
]
}
]
}
}
success
Response
Returns a Boolean
Example
Query
query Success {
success
}
Response
{"data": {"success": true}}
utilisation
Description
Retrieves object showing user's API usage for the current subscription period.
Response
Returns a GenericScalar
Example
Query
query Utilisation {
utilisation
}
Response
{"data": {"utilisation": GenericScalar}}
watchlist
Description
Retrieves a specific watchlist object.
Response
Returns a WatchlistType
Arguments
Name | Description |
---|---|
id - Int
|
Example
Query
query Watchlist($id: Int) {
watchlist(id: $id) {
id
owner {
id
email
phoneNumber
firstName
lastName
registeredAt
stripeCustomerId
referralId
hasReferrals
}
name
description
private
createdAt
subscriptionviewSet {
id
user {
...UserTypeFragment
}
type
stock {
...StockTypeFragment
}
portfolio {
...PortfolioTypeFragment
}
watchlist {
...WatchlistTypeFragment
}
timestamp
}
watchlistItems {
pageInfo {
...PageInfoFragment
}
edges {
...WatchlistItemNodeEdgeFragment
}
}
stockCount
avgTotalRating
}
}
Variables
{"id": 123}
Response
{
"data": {
"watchlist": {
"id": "4",
"owner": UserType,
"name": "abc123",
"description": "abc123",
"private": false,
"createdAt": "2007-12-03T10:15:30Z",
"subscriptionviewSet": [SubscriptionViewType],
"watchlistItems": WatchlistItemNodeConnection,
"stockCount": 987,
"avgTotalRating": GenericScalar
}
}
}
watchlistItems
Description
Retrieves list of stocks in a watchlist.
Response
Returns a WatchlistItemsNodeConnection
Arguments
Name | Description |
---|---|
watchlistId - Int
|
id of the watchlist |
orderBy - [String]
|
Defines what rating is used to rank stocks in response. - in front denotes ranking in descending order (e.g. -total_rating returns stock with highest total_rating first). Other options are ticker or name. Default is ticker. |
search - [String]
|
Limit to stocks where ticker or name contain search string. |
anonymised - Boolean
|
|
offset - Int
|
|
before - String
|
|
after - String
|
|
first - Int
|
|
last - Int
|
|
stock_Ticker - String
|
|
stock_Ticker_Icontains - String
|
|
stock_Name - String
|
|
stock_Name_Icontains - String
|
Example
Query
query WatchlistItems(
$watchlistId: Int,
$orderBy: [String],
$search: [String],
$anonymised: Boolean,
$offset: Int,
$before: String,
$after: String,
$first: Int,
$last: Int,
$stock_Ticker: String,
$stock_Ticker_Icontains: String,
$stock_Name: String,
$stock_Name_Icontains: String
) {
watchlistItems(
watchlistId: $watchlistId,
orderBy: $orderBy,
search: $search,
anonymised: $anonymised,
offset: $offset,
before: $before,
after: $after,
first: $first,
last: $last,
stock_Ticker: $stock_Ticker,
stock_Ticker_Icontains: $stock_Ticker_Icontains,
stock_Name: $stock_Name,
stock_Name_Icontains: $stock_Name_Icontains
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
...WatchlistItemsNodeFragment
}
cursor
}
totalCount
edgeCount
averageRatings
sectorCount
industryCount
id
}
}
Variables
{
"watchlistId": 987,
"orderBy": ["abc123"],
"search": ["xyz789"],
"anonymised": true,
"offset": 123,
"before": "abc123",
"after": "xyz789",
"first": 123,
"last": 123,
"stock_Ticker": "xyz789",
"stock_Ticker_Icontains": "abc123",
"stock_Name": "abc123",
"stock_Name_Icontains": "abc123"
}
Response
{
"data": {
"watchlistItems": {
"pageInfo": PageInfo,
"edges": [WatchlistItemsNodeEdge],
"totalCount": 123,
"edgeCount": 123,
"averageRatings": GenericScalar,
"sectorCount": GenericScalar,
"industryCount": GenericScalar,
"id": 987
}
}
}
watchlistsForUser
Description
Retrieves a list of watchlists objects for user.
Response
Returns [WatchlistType]
Arguments
Name | Description |
---|---|
id - Int
|
Example
Query
query WatchlistsForUser($id: Int) {
watchlistsForUser(id: $id) {
id
owner {
id
email
phoneNumber
firstName
lastName
registeredAt
stripeCustomerId
referralId
hasReferrals
}
name
description
private
createdAt
subscriptionviewSet {
id
user {
...UserTypeFragment
}
type
stock {
...StockTypeFragment
}
portfolio {
...PortfolioTypeFragment
}
watchlist {
...WatchlistTypeFragment
}
timestamp
}
watchlistItems {
pageInfo {
...PageInfoFragment
}
edges {
...WatchlistItemNodeEdgeFragment
}
}
stockCount
avgTotalRating
}
}
Variables
{"id": 987}
Response
{
"data": {
"watchlistsForUser": [
{
"id": 4,
"owner": UserType,
"name": "xyz789",
"description": "xyz789",
"private": true,
"createdAt": "2007-12-03T10:15:30Z",
"subscriptionviewSet": [SubscriptionViewType],
"watchlistItems": WatchlistItemNodeConnection,
"stockCount": 123,
"avgTotalRating": GenericScalar
}
]
}
}
Mutations
addToWatchlist
Response
Returns an AddToWatchlist
Example
Query
mutation AddToWatchlist(
$stockIds: [ID],
$stockTickers: [String],
$watchlistId: ID!
) {
addToWatchlist(
stockIds: $stockIds,
stockTickers: $stockTickers,
watchlistId: $watchlistId
) {
success
errors
}
}
Variables
{
"stockIds": [4],
"stockTickers": ["abc123"],
"watchlistId": "4"
}
Response
{
"data": {
"addToWatchlist": {
"success": true,
"errors": ["abc123"]
}
}
}
createPortfolio
Response
Returns a CreatePortfolio
Arguments
Name | Description |
---|---|
spData - PortfolioInput
|
Example
Query
mutation CreatePortfolio($spData: PortfolioInput) {
createPortfolio(spData: $spData) {
success
errors
portfolio {
id
owner {
...UserTypeFragment
}
name
category {
...PortfolioCategoryTypeFragment
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
...PortfolioTypeFragment
}
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
copies {
...PortfolioTypeFragment
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
...PortfolioHoldingsTypeFragment
}
portfolioValues
}
}
}
Variables
{"spData": PortfolioInput}
Response
{
"data": {
"createPortfolio": {
"success": true,
"errors": ["abc123"],
"portfolio": PortfolioType
}
}
}
createRatingAlert
Response
Returns a CreateRatingAlert
Example
Query
mutation CreateRatingAlert(
$ratingTypeId: Int!,
$stockId: Int!,
$trigger: String!,
$userId: Int,
$value: Decimal!
) {
createRatingAlert(
ratingTypeId: $ratingTypeId,
stockId: $stockId,
trigger: $trigger,
userId: $userId,
value: $value
) {
success
errors
ratingAlert {
id
user {
...UserTypeFragment
}
stock {
...StockTypeFragment
}
createdAt
ratingType {
...RatingTypeTypeFragment
}
trigger
value
currentRating
}
}
}
Variables
{
"ratingTypeId": 987,
"stockId": 987,
"trigger": "abc123",
"userId": 123,
"value": Decimal
}
Response
{
"data": {
"createRatingAlert": {
"success": false,
"errors": ["abc123"],
"ratingAlert": RatingAlertType
}
}
}
createWatchlist
Response
Returns a CreateWatchlist
Example
Query
mutation CreateWatchlist(
$description: String,
$name: String,
$private: Boolean
) {
createWatchlist(
description: $description,
name: $name,
private: $private
) {
success
errors
watchlist {
id
owner {
...UserTypeFragment
}
name
description
private
createdAt
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
watchlistItems {
...WatchlistItemNodeConnectionFragment
}
stockCount
avgTotalRating
}
}
}
Variables
{
"description": "abc123",
"name": "abc123",
"private": false
}
Response
{
"data": {
"createWatchlist": {
"success": false,
"errors": ["abc123"],
"watchlist": WatchlistType
}
}
}
deletePortfolio
Response
Returns a DeletePortfolio
Arguments
Name | Description |
---|---|
id - ID
|
Example
Query
mutation DeletePortfolio($id: ID) {
deletePortfolio(id: $id) {
success
errors
portfolio {
id
owner {
...UserTypeFragment
}
name
category {
...PortfolioCategoryTypeFragment
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
...PortfolioTypeFragment
}
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
copies {
...PortfolioTypeFragment
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
...PortfolioHoldingsTypeFragment
}
portfolioValues
}
}
}
Variables
{"id": 4}
Response
{
"data": {
"deletePortfolio": {
"success": true,
"errors": ["abc123"],
"portfolio": PortfolioType
}
}
}
deleteRatingAlert
Response
Returns a DeleteRatingAlert
Arguments
Name | Description |
---|---|
alertId - Int!
|
Example
Query
mutation DeleteRatingAlert($alertId: Int!) {
deleteRatingAlert(alertId: $alertId) {
success
errors
}
}
Variables
{"alertId": 987}
Response
{
"data": {
"deleteRatingAlert": {
"success": true,
"errors": ["xyz789"]
}
}
}
deleteRatingAlerts
Response
Returns a DeleteRatingAlerts
Arguments
Name | Description |
---|---|
alertIds - [ID]!
|
Example
Query
mutation DeleteRatingAlerts($alertIds: [ID]!) {
deleteRatingAlerts(alertIds: $alertIds) {
success
errors
}
}
Variables
{"alertIds": [4]}
Response
{
"data": {
"deleteRatingAlerts": {
"success": true,
"errors": ["xyz789"]
}
}
}
deleteWatchlist
Response
Returns a DeleteWatchlist
Arguments
Name | Description |
---|---|
id - ID!
|
Example
Query
mutation DeleteWatchlist($id: ID!) {
deleteWatchlist(id: $id) {
success
errors
}
}
Variables
{"id": "4"}
Response
{
"data": {
"deleteWatchlist": {
"success": true,
"errors": ["abc123"]
}
}
}
editRatingAlert
Response
Returns an EditRatingAlert
Example
Query
mutation EditRatingAlert(
$alertId: Int!,
$ratingTypeId: Int,
$trigger: String,
$value: Decimal
) {
editRatingAlert(
alertId: $alertId,
ratingTypeId: $ratingTypeId,
trigger: $trigger,
value: $value
) {
success
errors
ratingAlert {
id
user {
...UserTypeFragment
}
stock {
...StockTypeFragment
}
createdAt
ratingType {
...RatingTypeTypeFragment
}
trigger
value
currentRating
}
}
}
Variables
{
"alertId": 123,
"ratingTypeId": 123,
"trigger": "abc123",
"value": Decimal
}
Response
{
"data": {
"editRatingAlert": {
"success": false,
"errors": ["xyz789"],
"ratingAlert": RatingAlertType
}
}
}
removeFromWatchlist
Response
Returns a RemoveFromWatchlist
Example
Query
mutation RemoveFromWatchlist(
$stockIds: [ID],
$watchlistId: ID!
) {
removeFromWatchlist(
stockIds: $stockIds,
watchlistId: $watchlistId
) {
success
errors
}
}
Variables
{
"stockIds": ["4"],
"watchlistId": "4"
}
Response
{
"data": {
"removeFromWatchlist": {
"success": false,
"errors": ["xyz789"]
}
}
}
updatePortfolio
Response
Returns an UpdatePortfolio
Arguments
Name | Description |
---|---|
portfolioId - ID
|
|
spData - PortfolioInput!
|
Example
Query
mutation UpdatePortfolio(
$portfolioId: ID,
$spData: PortfolioInput!
) {
updatePortfolio(
portfolioId: $portfolioId,
spData: $spData
) {
success
errors
portfolio {
id
owner {
...UserTypeFragment
}
name
category {
...PortfolioCategoryTypeFragment
}
description
private
featured
createdAt
rebalanceFrequency
maxStocks
maxStocksCriteria
maxStocksCriteriaOrder
maxSectorConcentration
totalRating
returnRating
growthRating
riskRating
valuationRating
technicalRating
macroRating
marketCap
sectorIds
industryIds
copiedFrom {
...PortfolioTypeFragment
}
subscriptionviewSet {
...SubscriptionViewTypeFragment
}
copies {
...PortfolioTypeFragment
}
nextRebalanceDate
previousRebalanceDate
benchmarkId
ranges
holdings {
...PortfolioHoldingsTypeFragment
}
portfolioValues
}
}
}
Variables
{"portfolioId": 4, "spData": PortfolioInput}
Response
{
"data": {
"updatePortfolio": {
"success": false,
"errors": ["abc123"],
"portfolio": PortfolioType
}
}
}
updateWatchlist
Response
Returns an UpdateWatchlist
Example
Query
mutation UpdateWatchlist(
$description: String,
$name: String,
$watchlistId: ID!
) {
updateWatchlist(
description: $description,
name: $name,
watchlistId: $watchlistId
) {
success
errors
}
}
Variables
{
"description": "abc123",
"name": "xyz789",
"watchlistId": "4"
}
Response
{
"data": {
"updateWatchlist": {
"success": true,
"errors": ["abc123"]
}
}
}
Types
AddToWatchlist
BenchmarkType
Fields
Field Name | Description |
---|---|
id - ID!
|
|
owner - UserType!
|
User id of portfolio owner |
name - String!
|
Name of the portfolio |
category - PortfolioCategoryType
|
|
description - String
|
|
private - Boolean!
|
Indicates whether portfolio is private or accessible for other users |
featured - Boolean!
|
Indicates whether portfolio should be shown in the featured portfolios section |
createdAt - DateTime!
|
|
rebalanceFrequency - Int!
|
|
maxStocks - Int
|
|
maxStocksCriteria - PortfoliosPortfolioMaxStocksCriteriaChoices!
|
|
maxStocksCriteriaOrder - PortfoliosPortfolioMaxStocksCriteriaOrderChoices!
|
|
maxSectorConcentration - Decimal!
|
|
totalRating - [Decimal!]
|
|
returnRating - [Decimal!]
|
|
growthRating - [Decimal!]
|
|
riskRating - [Decimal!]
|
|
valuationRating - [Decimal!]
|
|
technicalRating - [Decimal!]
|
|
macroRating - [Decimal!]
|
|
marketCap - [Decimal!]
|
|
sectorIds - [Int!]
|
|
industryIds - [Int!]
|
|
copiedFrom - PortfolioType
|
|
subscriptionviewSet - [SubscriptionViewType!]!
|
|
copies - [PortfolioType!]!
|
Example
{
"id": 4,
"owner": UserType,
"name": "xyz789",
"category": PortfolioCategoryType,
"description": "xyz789",
"private": false,
"featured": true,
"createdAt": "2007-12-03T10:15:30Z",
"rebalanceFrequency": 123,
"maxStocks": 987,
"maxStocksCriteria": "MARKET_CAP",
"maxStocksCriteriaOrder": "DESCENDING",
"maxSectorConcentration": Decimal,
"totalRating": [Decimal],
"returnRating": [Decimal],
"growthRating": [Decimal],
"riskRating": [Decimal],
"valuationRating": [Decimal],
"technicalRating": [Decimal],
"macroRating": [Decimal],
"marketCap": [Decimal],
"sectorIds": [987],
"industryIds": [987],
"copiedFrom": PortfolioType,
"subscriptionviewSet": [SubscriptionViewType],
"copies": [PortfolioType]
}
Boolean
Description
The Boolean
scalar type represents true
or false
.
Example
true
CreatePortfolio
Fields
Field Name | Description |
---|---|
success - Boolean
|
|
errors - [String]
|
|
portfolio - PortfolioType
|
Example
{
"success": false,
"errors": ["xyz789"],
"portfolio": PortfolioType
}
CreateRatingAlert
Fields
Field Name | Description |
---|---|
success - Boolean
|
|
errors - [String]
|
|
ratingAlert - RatingAlertType
|
Example
{
"success": true,
"errors": ["xyz789"],
"ratingAlert": RatingAlertType
}
CreateWatchlist
Fields
Field Name | Description |
---|---|
success - Boolean
|
|
errors - [String]
|
|
watchlist - WatchlistType
|
Example
{
"success": true,
"errors": ["abc123"],
"watchlist": WatchlistType
}
Date
Description
The Date
scalar type represents a Date value as specified by iso8601.
Example
"2007-12-03"
DateTime
Description
The DateTime
scalar type represents a DateTime value as specified by iso8601.
Example
"2007-12-03T10:15:30Z"
Decimal
Description
The Decimal
scalar type represents a python Decimal.
Example
Decimal
DeletePortfolio
Fields
Field Name | Description |
---|---|
success - Boolean
|
|
errors - [String]
|
|
portfolio - PortfolioType
|
Example
{
"success": true,
"errors": ["abc123"],
"portfolio": PortfolioType
}
DeleteRatingAlert
DeleteRatingAlerts
DeleteWatchlist
EditRatingAlert
Fields
Field Name | Description |
---|---|
success - Boolean
|
|
errors - [String]
|
|
ratingAlert - RatingAlertType
|
Example
{
"success": false,
"errors": ["abc123"],
"ratingAlert": RatingAlertType
}
Float
Description
The Float
scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
123.45
GenericScalar
Description
The GenericScalar
scalar type represents a generic GraphQL scalar value that could be: String, Boolean, Int, Float, List or Object.
Example
GenericScalar
ID
Description
The ID
scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4"
) or integer (such as 4
) input value will be accepted as an ID.
Example
4
IndustryRatingNode
Example
{
"id": 4,
"industry": IndustryType,
"date": "2007-12-03",
"totalRating": Decimal,
"returnRating": Decimal,
"growthRating": Decimal,
"riskRating": Decimal,
"valuationRating": Decimal,
"technicalRating": Decimal,
"macroRating": Decimal
}
IndustryRatingNodeConnection
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Pagination data for this connection. |
edges - [IndustryRatingNodeEdge]!
|
Contains the nodes in this connection. |
totalCount - Int
|
|
edgeCount - Int
|
Example
{
"pageInfo": PageInfo,
"edges": [IndustryRatingNodeEdge],
"totalCount": 123,
"edgeCount": 987
}
IndustryRatingNodeEdge
Description
A Relay edge containing a IndustryRatingNode
and its cursor.
Fields
Field Name | Description |
---|---|
node - IndustryRatingNode
|
The item at the end of the edge |
cursor - String!
|
A cursor for use in pagination |
Example
{
"node": IndustryRatingNode,
"cursor": "abc123"
}
IndustryType
Fields
Field Name | Description |
---|---|
id - ID!
|
|
name - String
|
|
sector - SectorType
|
|
stockSet - [StockType!]!
|
|
industryRatings - IndustryRatingNodeConnection!
|
|
Example
{
"id": "4",
"name": "xyz789",
"sector": SectorType,
"stockSet": [StockType],
"industryRatings": IndustryRatingNodeConnection
}
Int
Description
The Int
scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
987
Node
Description
An object with an ID
Fields
Field Name | Description |
---|---|
id - ID!
|
The ID of the object |
Possible Types
Node Types |
---|
Example
{"id": "4"}
PageInfo
Description
The Relay compliant PageInfo
type, containing data necessary to paginate this connection.
Fields
Field Name | Description |
---|---|
hasNextPage - Boolean!
|
When paginating forwards, are there more items? |
hasPreviousPage - Boolean!
|
When paginating backwards, are there more items? |
startCursor - String
|
When paginating backwards, the cursor to continue. |
endCursor - String
|
When paginating forwards, the cursor to continue. |
Example
{
"hasNextPage": true,
"hasPreviousPage": false,
"startCursor": "abc123",
"endCursor": "xyz789"
}
PortfolioCategoryType
Example
{
"id": "4",
"name": "abc123",
"displayName": "abc123",
"description": "abc123",
"include": false,
"portfolioSet": [PortfolioType]
}
PortfolioHoldingsNode
Example
{
"id": "4",
"stock": StockType,
"date": "2007-12-03",
"totalRating": Decimal,
"returnRating": Decimal,
"growthRating": Decimal,
"riskRating": Decimal,
"valuationRating": Decimal,
"technicalRating": Decimal,
"macroRating": Decimal
}
PortfolioHoldingsNodeConnection
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Pagination data for this connection. |
edges - [PortfolioHoldingsNodeEdge]!
|
Contains the nodes in this connection. |
totalCount - Int
|
|
edgeCount - Int
|
|
averageRatings - GenericScalar
|
|
sectorCount - GenericScalar
|
|
industryCount - GenericScalar
|
Example
{
"pageInfo": PageInfo,
"edges": [PortfolioHoldingsNodeEdge],
"totalCount": 987,
"edgeCount": 987,
"averageRatings": GenericScalar,
"sectorCount": GenericScalar,
"industryCount": GenericScalar
}
PortfolioHoldingsNodeEdge
Description
A Relay edge containing a PortfolioHoldingsNode
and its cursor.
Fields
Field Name | Description |
---|---|
node - PortfolioHoldingsNode
|
The item at the end of the edge |
cursor - String!
|
A cursor for use in pagination |
Example
{
"node": PortfolioHoldingsNode,
"cursor": "xyz789"
}
PortfolioHoldingsType
Example
{
"id": 4,
"stock": StockType,
"date": "2007-12-03",
"totalRating": Decimal,
"returnRating": Decimal,
"growthRating": Decimal,
"riskRating": Decimal,
"valuationRating": Decimal,
"technicalRating": Decimal,
"macroRating": Decimal
}
PortfolioInput
Fields
Input Field | Description |
---|---|
owner - Int
|
|
name - String
|
|
description - String
|
|
private - Boolean
|
|
rebalanceFrequency - Int
|
|
maxStocks - Int
|
|
maxStocksCriteria - String
|
|
maxStocksCriteriaOrder - String
|
|
maxSectorConcentration - Decimal
|
|
ranges - GenericScalar
|
|
sectorIds - [Int]
|
|
industryIds - [Int]
|
|
copiedFrom - Int
|
Example
{
"owner": 123,
"name": "xyz789",
"description": "abc123",
"private": false,
"rebalanceFrequency": 123,
"maxStocks": 987,
"maxStocksCriteria": "abc123",
"maxStocksCriteriaOrder": "xyz789",
"maxSectorConcentration": Decimal,
"ranges": GenericScalar,
"sectorIds": [123],
"industryIds": [123],
"copiedFrom": 987
}
PortfolioType
Description
An object with info for a portfolio
Fields
Field Name | Description |
---|---|
id - ID!
|
|
owner - UserType!
|
User id of portfolio owner |
name - String!
|
Name of the portfolio |
category - PortfolioCategoryType
|
|
description - String
|
|
private - Boolean!
|
Indicates whether portfolio is private or accessible for other users |
featured - Boolean!
|
Indicates whether portfolio should be shown in the featured portfolios section |
createdAt - DateTime!
|
|
rebalanceFrequency - Int!
|
|
maxStocks - Int
|
|
maxStocksCriteria - PortfoliosPortfolioMaxStocksCriteriaChoices!
|
|
maxStocksCriteriaOrder - PortfoliosPortfolioMaxStocksCriteriaOrderChoices!
|
|
maxSectorConcentration - Decimal!
|
|
totalRating - [Decimal!]
|
|
returnRating - [Decimal!]
|
|
growthRating - [Decimal!]
|
|
riskRating - [Decimal!]
|
|
valuationRating - [Decimal!]
|
|
technicalRating - [Decimal!]
|
|
macroRating - [Decimal!]
|
|
marketCap - [Decimal!]
|
|
sectorIds - [Int!]
|
|
industryIds - [Int!]
|
|
copiedFrom - PortfolioType
|
|
subscriptionviewSet - [SubscriptionViewType!]!
|
|
copies - [PortfolioType!]!
|
|
nextRebalanceDate - String
|
|
previousRebalanceDate - String
|
|
benchmarkId - ID
|
|
ranges - GenericScalar
|
|
holdings - [PortfolioHoldingsType]
|
|
portfolioValues - GenericScalar
|
Example
{
"id": 4,
"owner": UserType,
"name": "abc123",
"category": PortfolioCategoryType,
"description": "abc123",
"private": false,
"featured": true,
"createdAt": "2007-12-03T10:15:30Z",
"rebalanceFrequency": 987,
"maxStocks": 123,
"maxStocksCriteria": "MARKET_CAP",
"maxStocksCriteriaOrder": "DESCENDING",
"maxSectorConcentration": Decimal,
"totalRating": [Decimal],
"returnRating": [Decimal],
"growthRating": [Decimal],
"riskRating": [Decimal],
"valuationRating": [Decimal],
"technicalRating": [Decimal],
"macroRating": [Decimal],
"marketCap": [Decimal],
"sectorIds": [987],
"industryIds": [123],
"copiedFrom": PortfolioType,
"subscriptionviewSet": [SubscriptionViewType],
"copies": [PortfolioType],
"nextRebalanceDate": "abc123",
"previousRebalanceDate": "xyz789",
"benchmarkId": "4",
"ranges": GenericScalar,
"holdings": [PortfolioHoldingsType],
"portfolioValues": GenericScalar
}
PortfoliosPortfolioMaxStocksCriteriaChoices
Description
An enumeration.
Values
Enum Value | Description |
---|---|
|
Market Cap |
|
Total Rating |
|
Return Rating |
|
Growth Rating |
|
Risk Rating |
|
Valuation Rating |
|
Technical Rating |
|
Macro Rating |
Example
"MARKET_CAP"
PortfoliosPortfolioMaxStocksCriteriaOrderChoices
Description
An enumeration.
Values
Enum Value | Description |
---|---|
|
Descending |
|
Ascending |
Example
"DESCENDING"
PriceType
Fields
Field Name | Description |
---|---|
id - ID!
|
|
price - Int!
|
|
currency - String!
|
|
interval - String
|
|
stripePriceIdTest - String
|
|
stripePriceId - String
|
|
product - ProductType!
|
|
subscriptionSet - [SubscriptionType!]!
|
Example
{
"id": 4,
"price": 123,
"currency": "abc123",
"interval": "abc123",
"stripePriceIdTest": "abc123",
"stripePriceId": "xyz789",
"product": ProductType,
"subscriptionSet": [SubscriptionType]
}
ProductFeaturesType
ProductType
Fields
Field Name | Description |
---|---|
id - ID!
|
|
subscriptionLevel - Int
|
|
name - String!
|
|
description - String
|
|
type - String!
|
|
stripeProductIdTest - String
|
|
stripeProductId - String
|
|
priceSet - [PriceType!]!
|
|
subscriptionSet - [SubscriptionType!]!
|
|
subscriptionpaymentSet - [SubscriptionPaymentType!]!
|
|
prices - [PriceType]
|
|
features - [ProductFeaturesType]
|
Example
{
"id": "4",
"subscriptionLevel": 123,
"name": "xyz789",
"description": "abc123",
"type": "abc123",
"stripeProductIdTest": "abc123",
"stripeProductId": "abc123",
"priceSet": [PriceType],
"subscriptionSet": [SubscriptionType],
"subscriptionpaymentSet": [SubscriptionPaymentType],
"prices": [PriceType],
"features": [ProductFeaturesType]
}
RatingAlertType
Example
{
"id": "4",
"user": UserType,
"stock": StockType,
"createdAt": "2007-12-03T10:15:30Z",
"ratingType": RatingTypeType,
"trigger": "xyz789",
"value": Decimal,
"currentRating": Decimal
}
RatingTypeType
RemoveFromWatchlist
SectorRatingNode
Example
{
"id": 4,
"sector": SectorType,
"date": "2007-12-03",
"totalRating": Decimal,
"returnRating": Decimal,
"growthRating": Decimal,
"riskRating": Decimal,
"valuationRating": Decimal,
"technicalRating": Decimal,
"macroRating": Decimal
}
SectorRatingNodeConnection
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Pagination data for this connection. |
edges - [SectorRatingNodeEdge]!
|
Contains the nodes in this connection. |
totalCount - Int
|
|
edgeCount - Int
|
Example
{
"pageInfo": PageInfo,
"edges": [SectorRatingNodeEdge],
"totalCount": 123,
"edgeCount": 123
}
SectorRatingNodeEdge
Description
A Relay edge containing a SectorRatingNode
and its cursor.
Fields
Field Name | Description |
---|---|
node - SectorRatingNode
|
The item at the end of the edge |
cursor - String!
|
A cursor for use in pagination |
Example
{
"node": SectorRatingNode,
"cursor": "xyz789"
}
SectorType
Fields
Field Name | Description |
---|---|
id - ID!
|
|
name - String
|
|
industrySet - [IndustryType!]!
|
|
stockSet - [StockType!]!
|
|
sectorRatings - SectorRatingNodeConnection!
|
|
Example
{
"id": "4",
"name": "abc123",
"industrySet": [IndustryType],
"stockSet": [StockType],
"sectorRatings": SectorRatingNodeConnection
}
StockRatingNode
Example
{
"id": "4",
"stock": StockType,
"date": "2007-12-03",
"totalRating": 987.65,
"returnRating": 123.45,
"growthRating": 123.45,
"riskRating": 987.65,
"valuationRating": 987.65,
"technicalRating": 123.45,
"macroRating": 987.65
}
StockRatingNodeConnection
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Pagination data for this connection. |
edges - [StockRatingNodeEdge]!
|
Contains the nodes in this connection. |
totalCount - Int
|
|
edgeCount - Int
|
Example
{
"pageInfo": PageInfo,
"edges": [StockRatingNodeEdge],
"totalCount": 123,
"edgeCount": 123
}
StockRatingNodeEdge
Description
A Relay edge containing a StockRatingNode
and its cursor.
Fields
Field Name | Description |
---|---|
node - StockRatingNode
|
The item at the end of the edge |
cursor - String!
|
A cursor for use in pagination |
Example
{
"node": StockRatingNode,
"cursor": "abc123"
}
StockType
Fields
Field Name | Description |
---|---|
id - Int!
|
|
ticker - String
|
|
name - String
|
|
sector - SectorType
|
|
industry - IndustryType
|
|
includeSearch - Boolean!
|
|
subscriptionviewSet - [SubscriptionViewType!]!
|
|
stockRatings - WatchlistItemsNodeConnection!
|
|
watchlistItems - [WatchlistItemsType!]!
|
|
ratingalertSet - [RatingAlertType!]!
|
|
stockPriceData - GenericScalar
|
|
stockRatingsData - GenericScalar
|
|
stockIncomeAnnualData - GenericScalar
|
|
stockBalanceAnnualData - GenericScalar
|
|
stockCashFlowAnnualData - GenericScalar
|
|
stockDerivedAnnualData - GenericScalar
|
|
stockIncomeQuarterlyData - GenericScalar
|
|
stockBalanceQuarterlyData - GenericScalar
|
|
stockCashFlowQuarterlyData - GenericScalar
|
|
stockDerivedQuarterlyData - GenericScalar
|
|
stockIncomeTtmData - GenericScalar
|
|
stockBalanceTtmData - GenericScalar
|
|
stockCashFlowTtmData - GenericScalar
|
|
stockDerivedTtmData - GenericScalar
|
|
stockDescription - GenericScalar
|
|
marketCap - Float
|
Example
{
"id": 987,
"ticker": "xyz789",
"name": "abc123",
"sector": SectorType,
"industry": IndustryType,
"includeSearch": false,
"subscriptionviewSet": [SubscriptionViewType],
"stockRatings": WatchlistItemsNodeConnection,
"watchlistItems": [WatchlistItemsType],
"ratingalertSet": [RatingAlertType],
"stockPriceData": GenericScalar,
"stockRatingsData": GenericScalar,
"stockIncomeAnnualData": GenericScalar,
"stockBalanceAnnualData": GenericScalar,
"stockCashFlowAnnualData": GenericScalar,
"stockDerivedAnnualData": GenericScalar,
"stockIncomeQuarterlyData": GenericScalar,
"stockBalanceQuarterlyData": GenericScalar,
"stockCashFlowQuarterlyData": GenericScalar,
"stockDerivedQuarterlyData": GenericScalar,
"stockIncomeTtmData": GenericScalar,
"stockBalanceTtmData": GenericScalar,
"stockCashFlowTtmData": GenericScalar,
"stockDerivedTtmData": GenericScalar,
"stockDescription": GenericScalar,
"marketCap": 123.45
}
String
Description
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"xyz789"
SubscriptionPaymentType
Fields
Field Name | Description |
---|---|
id - ID!
|
|
subscription - SubscriptionType
|
|
product - ProductType
|
|
amount - Int!
|
|
gatewayFee - Int
|
|
currency - String!
|
|
date - DateTime!
|
|
status - String!
|
|
stripeInvoiceId - String
|
|
commission - Float
|
Example
{
"id": 4,
"subscription": SubscriptionType,
"product": ProductType,
"amount": 123,
"gatewayFee": 987,
"currency": "xyz789",
"date": "2007-12-03T10:15:30Z",
"status": "abc123",
"stripeInvoiceId": "abc123",
"commission": 123.45
}
SubscriptionType
Example
{
"id": "4",
"user": UserType,
"product": ProductType,
"price": PriceType,
"gateway": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"validUntil": "2007-12-03T10:15:30Z",
"status": "abc123",
"stripeCustomerId": "xyz789",
"stripeSubscriptionId": "abc123",
"subscriptionpaymentSet": [SubscriptionPaymentType]
}
SubscriptionViewType
Fields
Field Name | Description |
---|---|
id - ID!
|
|
user - UserType!
|
|
type - String!
|
|
stock - StockType
|
|
portfolio - PortfolioType
|
|
watchlist - WatchlistType
|
|
timestamp - DateTime!
|
Example
{
"id": 4,
"user": UserType,
"type": "abc123",
"stock": StockType,
"portfolio": PortfolioType,
"watchlist": WatchlistType,
"timestamp": "2007-12-03T10:15:30Z"
}
UpdatePortfolio
Fields
Field Name | Description |
---|---|
success - Boolean
|
|
errors - [String]
|
|
portfolio - PortfolioType
|
Example
{
"success": true,
"errors": ["abc123"],
"portfolio": PortfolioType
}
UpdateWatchlist
UserType
Description
User type object
Example
{
"id": "4",
"email": "xyz789",
"phoneNumber": "xyz789",
"firstName": "abc123",
"lastName": "xyz789",
"registeredAt": "2007-12-03T10:15:30Z",
"stripeCustomerId": "xyz789",
"referralId": "xyz789",
"hasReferrals": true
}
WatchlistItemNode
Fields
Field Name | Description |
---|---|
id - ID!
|
The ID of the object |
watchlist - WatchlistType!
|
|
stock - StockType
|
|
createdAt - DateTime!
|
Example
{
"id": "4",
"watchlist": WatchlistType,
"stock": StockType,
"createdAt": "2007-12-03T10:15:30Z"
}
WatchlistItemNodeConnection
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Pagination data for this connection. |
edges - [WatchlistItemNodeEdge]!
|
Contains the nodes in this connection. |
Example
{
"pageInfo": PageInfo,
"edges": [WatchlistItemNodeEdge]
}
WatchlistItemNodeEdge
Description
A Relay edge containing a WatchlistItemNode
and its cursor.
Fields
Field Name | Description |
---|---|
node - WatchlistItemNode
|
The item at the end of the edge |
cursor - String!
|
A cursor for use in pagination |
Example
{
"node": WatchlistItemNode,
"cursor": "abc123"
}
WatchlistItemsNode
Example
{
"id": "4",
"stock": StockType,
"date": "2007-12-03",
"totalRating": 123.45,
"returnRating": 987.65,
"growthRating": 987.65,
"riskRating": 123.45,
"valuationRating": 987.65,
"technicalRating": 123.45,
"macroRating": 987.65
}
WatchlistItemsNodeConnection
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Pagination data for this connection. |
edges - [WatchlistItemsNodeEdge]!
|
Contains the nodes in this connection. |
totalCount - Int
|
|
edgeCount - Int
|
|
averageRatings - GenericScalar
|
|
sectorCount - GenericScalar
|
|
industryCount - GenericScalar
|
|
id - Int
|
Example
{
"pageInfo": PageInfo,
"edges": [WatchlistItemsNodeEdge],
"totalCount": 123,
"edgeCount": 123,
"averageRatings": GenericScalar,
"sectorCount": GenericScalar,
"industryCount": GenericScalar,
"id": 987
}
WatchlistItemsNodeEdge
Description
A Relay edge containing a WatchlistItemsNode
and its cursor.
Fields
Field Name | Description |
---|---|
node - WatchlistItemsNode
|
The item at the end of the edge |
cursor - String!
|
A cursor for use in pagination |
Example
{
"node": WatchlistItemsNode,
"cursor": "xyz789"
}
WatchlistItemsType
WatchlistType
Fields
Field Name | Description |
---|---|
id - ID!
|
|
owner - UserType!
|
|
name - String!
|
|
description - String
|
|
private - Boolean!
|
|
createdAt - DateTime!
|
|
subscriptionviewSet - [SubscriptionViewType!]!
|
|
watchlistItems - WatchlistItemNodeConnection
|
|
stockCount - Int
|
|
avgTotalRating - GenericScalar
|
Example
{
"id": "4",
"owner": UserType,
"name": "xyz789",
"description": "abc123",
"private": false,
"createdAt": "2007-12-03T10:15:30Z",
"subscriptionviewSet": [SubscriptionViewType],
"watchlistItems": WatchlistItemNodeConnection,
"stockCount": 987,
"avgTotalRating": GenericScalar
}