The Mito API

Is a GraphQL API, which allows for great flexibility for the user as he may specify the structure of the data retrieved. It's strongly typed making it ideal for code generation and type checking. To read more about GraphQL go to graphql.org/learn.

Since GraphQL is a query language and essentially transport protocol agnostic, you may contact the API by sending a GET or POST to https://graphql.mito.ai/graphql. To read more about the appropriate body or query variables click here.

Start exploring the API at https://graphql.mito.ai/graphiql.

Query

Object

This is the root query type and as such will be your main entry-point to the Mito API when fetching data.

Fields

  • companyById(
    •   id: ID! Company ID.
    )
    : Company

    Given an internal Mito ID, you may retrieve a company at this field. If no matching company is found this field is null. The ID's can be found by using the other fields, such as Query.findCompanies.

  • findCompanies(
    •   q: String! Query string.
    •   first: Int = 10 Page size.
    )
    : CompanyConnection!

    Search for companies given a query string as the q argument. The number of potential companies returned is limited by the first argument, which is not required and defaulted to 10.

  • trendingCompaniesByIndex(
    •   index: Index! Market index.
    •   first: Int = 10 Page size.
    )
    : CompanyConnection!

    Find currently trending companies on a given market index. The indices are added on demand. The number of potential companies returned is limited by the first argument, which is not required and defaulted to 10.

  • trendingCompaniesBySector(
    •   sector: Sector! Industry sector.
    •   first: Int = 10 Page size.
    )
    : CompanyConnection!

    Find currently trending companies in a give sector based in the IPTC Media Topics. New sectors are added lazily on demand. The number of potential companies returned is limited by the first argument, which is not required and defaulted to 10.

  • cryptocurrencyById(
    •   id: ID! Cryptocurrency ID.
    )
    : Cryptocurrency

    Given an internal Mito ID, you may retrieve a cryptocurrency at this field. If no matching cryptocurrency is found this field is null. The ID's can be found by using the other fields, such as Query.findCryptocurrencies.

  • findCryptocurrencies(
    •   q: String! Query string.
    •   first: Int = 10 Page size.
    )
    : CryptocurrencyConnection!

    Search for cryptocurrencies given a query string as the q argument. The number of potential cryptocurrencies returned is limited by the first argument, which is not required and defaulted to 10.

  • trendingCryptocurrenciesByIndex(
    •   cryptoIndex: CryptoIndex! Crypto index.
    •   first: Int = 10 Page size.
    )
    : CryptocurrencyConnection!

    Find currently trending cryptocurrencies on a given market index. The indices are added on demand. The number of potential companies returned is limited by the first argument, which is not required and defaulted to 10.

CryptocurrencyConnection

Object

A connection of cryptocurrencies facilitating pagination of cryptocurrencies. To read more about connections, see the pagination documentation on graphql.org/learn/pagination/.

Fields

Article

Object

This usually represents a news article which has been analyzed and linked by Mito.

Fields

  • title: String!

    The title of the news article.

  • abstract: String!

    The abstract is a sentence describing the content of the article. This is not contextual to anything other thant the article itself.

  • timestamp: String!

    Time of publication of the article in combined date and time ISO 8601 format.

  • publisher: String!

    The publisher of the article. Usually this is the website of the publicist.

CompanyConnection

Object

A connection of companies facilitating pagination of companies. To read more about connections, see the pagination documentation on graphql.org/learn/pagination/.

Fields

  • A list of edges containing the companies as nodes.

  • pageInfo: PageInfo!

    Page information, which can be used for page traversal.

CompanyConnectionEdge

Object

An edge in a company connection. To read more about connections, see the pagination documentation on graphql.org/learn/pagination/.

Fields

  • cursor: String!

    Cursor used for page traversal.

  • node: Company!

    The node containing a compny.

Cryptocurrency

Object

An object representing a cryptocurrency. From here you may currently access the base information, such as stories related to the cryptocurrency.

Fields

  • id: ID!

    The internal Mito ID of the cryptocurrency. Save this for fetching this object without searching for a cryptocurrency. This can be done with the Query.cryptocurrencyById field.

  • name: String!

    The name of the cryptocurrency.

  • website: String

    The official website of the cryptocurrency.

  • reddit: String

    The subreddit of the cryptocurrency.

  • twitterUsername: String

    The official twitter username. The corresponding twitter page should be https://twitter.com/{twitterUsername}.

  • stories(): StoryConnection!

    Stories related to this cryptocurrency. Depending on your selection and language, this may contain stories mentioning the cryptocurrency directly or something affiliated with the cryptocurrency. Read more about the different selections under the story selection enum.

Company

Object

An object representing a company. From here you may currently access the base information, such as title, and stories related to the company.

Fields

  • id: ID!

    The internal Mito ID of the company. Save this for fetching this object without searching for a company. This can be done with the Query.companyById field.

  • name: String!

    The name of the company.

  • website: String

    The official website of the company.

  • twitterUsername: String

    The official twitter username. The corresponding twitter page should be https://twitter.com/{twitterUsername}.

  • facebookProfileId: String

    The official facebook profile ID. The corresponding facebook page should be https://facebook.com/{facebookProfileId}.

  • stories(): StoryConnection!

    Stories related to this company. Depending on your selection and language, this may contain stories mentioning the company directly or something affiliated with the company. Read more about the different selections under the story selection enum.

CryptocurrencyConnectionEdge

Object

An edge in a cryptocurrency connection. To read more about connections, see the pagination documentation on graphql.org/learn/pagination/.

Fields

StoryConnectionEdge

Object

An edge in an entity connection. To read more about connections, see the pagination documentation on graphql.org/learn/pagination/.

Fields

  • node: Story!

    Story as a node.

  • cursor: String!

    The current cursor. Use this for pagination.

  • relevant: Boolean!

    An indicator of whether the story is "relevant" for the given entity or not. A story can mention an entity, or related entity, without being relevant.

  • abstract: String!

    This is similar to the Article.abstract field, in that it is a sentence deemed relevant for the article. The only difference being that it is relevant in context of the parent entity.

PageInfo

Object

Page info contains booleans which can be used for pagination.

Fields

  • hasPreviousPage: Boolean!

    This is true if backwards pagination is supported and there are more preceding pages.

  • hasNextPage: Boolean!

    Indicates if the last page has been reached.

Story

Object

A story is a collection of articles written about the same subject, i.e. a cluster of articles. Working with stories rather than articles provides a better overview of the media landscape by removing articles that, to some degree, are duplicates.

Fields

  • size: Int!

    The size is a number expressing how widely it has propagated the media. This is an indicator on the number of articles written about this story.

  • primaryArticle: Article!

    A story consists of several articles. This is the "best" article representing the story.

StoryConnection

Object

A connection of stories facilitating pagination of stories. To read more about connections, see the pagination documentation on graphql.org/learn/pagination/.

Fields

  • A list of edges containing the stories as nodes and contextual information.

  • pageInfo: PageInfo!

    Page information, which can be used for page traversal.

Index

Enum

An enum containing the currently supported market indices.

Values

  • DAX

    The DAX stock market index consisting of 30 major stocks traded on Frankfurt Stock Exchange.

    Read more on wikipedia

  • CAC

    The CAC 40 stock market index based on 40 of the highest market caps listed on Euronext Paris.

    Read more on wikipedia

  • OMXC

    The OMX Copenhagen 20 stock market index based on the 20 most-traded stocks on Copenhagen Stock Exchange.

    Read more on wikipedia

  • OMXS

    The OMX Stockholm 30 stock market index based on the market capitalizations of the 30 most-traded stocks on Stockholm Stock Exchange.

    Read more on wikipedia

  • OBX

    THE OBX stock market index based on the 25 most liquid companies listed on Oslo Stock Exchange.

    Read more on wikipedia

  • DJIA

    The Dow Jones Industrial Average (DJIA) stock market index based on the performance of 30 large companies on NYSE and NASDAQ.

    Read more on wikipedia

CryptoIndex

Enum

An enum containing the currently supported cryptocurrency indices.

Values

  • COINBASE

    The Coinbase index fund containing four major cryptocurrencies.

    Read more on Coinbase

Sector

Enum

An enum containing the currently supported sectors based on the IPTC Media Topics.

Values

  • PHARMA

    This sector corresponds to the IPTC media topic: "pharmaceutical".

StorySelection

Enum

An enum used to filter stories.

Values

  • RELEVANT

    Only stories deemed relevant to the company is fetched.

  • RECENT

    No filter is applied.

StoryLanguage

Enum

An enum used to filter stories by language.

Values

  • SPANISH

    Spanish.

  • FRENCH

    French.

  • GERMAN

    German.

  • DANISH

    Danish.

  • SWEDISH

    Swedish.

  • NORWEGIAN

    Norwegian.

  • ENGLISH

    English.

Int

Scalar

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Boolean

Scalar

The Boolean scalar type represents true or false.

ID

Scalar

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.

String

Scalar

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.