Magidoc

Welcome to Quanty API Documentation


🟢 API is in Alpha Stage


Quanty is a API that leverages a powerful Knowledge Graph, built on Neo4j and enhanced by AI and LLMs, to provide deep insights into financial data. This includes current and historical data on cryptocurrencies, stocks, and more.

API Overview

#

The Quanty API offers structured access to our insights through a GraphQL interface, ensuring that clients can fetch exactly what they need without over-fetching or under-fetching data.

Authorization

#

Pass your API token either as a query parameter apiToken or in the headers to authenticate your requests.

  1. HTTP Header: Recommended for most requests as it keeps the token concealed from URLs.
  • Add the token to the HTTP headers under the key apiToken .
  1. Query Parameter: Useful for quick tests or in environments where header manipulation is limited.
  • Append apiToken to the query parameters of your API request URL. Examples of provide your API token in two ways:

Example of Authorization Header:

#

    
  

Example of Authorization with Query Parameter:

#

    
  

Unauthorized Access

#

If you do not provide a token, or if the token is invalid, the API will return a 401 Unauthorized status code. Ensure your API token is correctly included in your requests.

    
  

Status Codes

#

Quanty API uses conventional HTTP response codes to indicate success or failure of an API request:

  • 200 OK - The request was successful.
  • 400 Bad Request - The request was unacceptable, often due to missing a required parameter.
  • 401 Unauthorized - No valid API token was provided.
  • 429 Too Many Requests - The request was rate limited.

Understanding API Credits

#

Quanty API uses a credit-based system to measure API usage. Each API call consumes one credit. The number of credits available depends on your subscription tier:

  • Starter Plan: 500 API credits.
  • Quant Plan: 2000 API credits.
  • Business Plan: 5000 API credits.

Checking Your API Credit Balance

#

To help monitor and manage your API credit usage, it's essential to regularly check your API credit balance. If your credits are exhausted, your API requests will return an error message, and your subscription may be temporarily disabled until new credits are available.

Optimizing Credit Usage

#

  • Cache Responses: Implement a caching layer to store frequent API responses and avoid repetitive API calls.
  • Request Batching: Where possible, batch similar requests together to minimize the number of separate API calls.
  • Optimize Querying: Limit the amount of data fetched in queries to only what is necessary for your application.

By understanding and managing your API credits, you can ensure consistent access to Quanty's insights and data without disruption.

Rate Limiting

#

Quanty API enforces rate limits to ensure fair usage and protect the service from abuse. The limits are as follows:

  • General API Rate Limit: Limits the number of requests that can be made to the API within a specific time frame.
    • Limit: 2000 requests per hour.
    • If the rate limit is exceeded, the API will return a 429 Too Many Requests status code.