---
updatedAt: 2025-11-18T20:45:53.000Z
agentTools:
  projectIndex: https://docs.thetie.io/llms.txt
---

# Sentiment Data

Retrieve sentiment data (latest or historical) optimized for quantitative analysis.
Supports both latest snapshot data and historical time series data based on parameters.

**Data Types:**
- **Latest Data**: Most recent sentiment scores for specified or all coins
- **Historical Data**: Time series sentiment data with pagination support

**Key Features:**
- Automatic detection of historical vs latest requests
- Flexible field selection
- Multiple frequency options for historical data
- Pagination support for large datasets


Fetch the latest or historical values for coins.

Please refer to the general reference data for a full coin\_uid mapping.

<https://docs.thetie.io/v3.2/reference/getquantcoins>

For definitions of the metrics returned by this endpoint refer to <https://docs.thetie.io/v3.2/reference/sentiment-metrics>

<br />

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "externalDocs": {
    "description": "Find out more about The Tie API",
    "url": "https://thetie.io"
  },
  "info": {
    "title": "The Tie API - Quant Endpoints",
    "version": "1.0.0",
    "description": "OpenAPI specification for The Tie Quant endpoints, providing quantitative data analysis.\n\nThese endpoints are designed for quantitative analysis and algorithmic trading applications, offering:\n- Cryptocurrency data with essential fields for analysis\n- Sentiment analysis data\n- Comprehensive news data with advanced filtering capabilities\n- Reference data for news sources, collections, and tags\n\n### Authentication\nAll endpoints require API key authentication via the `x-api-key` header.\n\n### Contact Information\nFor questions, support, or feature requests, please contact your Account Manager or our API team at api@thetie.io.\n"
  },
  "servers": [
    {
      "url": "https://api-thetie.io"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Quant",
      "description": "Quantitative data endpoints for cryptocurrency analysis and reference data"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "API key for authentication. Contact your Account Manager to obtain an API key."
      }
    },
    "schemas": {
      "FormattedResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "success",
            "description": "Response status indicator"
          },
          "code": {
            "type": "integer",
            "example": 200,
            "description": "HTTP status code"
          },
          "data": {
            "description": "The actual response data"
          },
          "error": {
            "type": "object",
            "nullable": true,
            "properties": {
              "message": {
                "type": "string",
                "description": "Error message if request failed"
              },
              "source": {
                "type": "object",
                "description": "Source information for debugging"
              }
            },
            "description": "Error information if request failed"
          }
        },
        "required": [
          "status",
          "code",
          "data"
        ]
      },
      "PaginationInfo": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "nullable": true,
            "description": "Total number of results"
          },
          "next_marker": {
            "type": "string",
            "nullable": true,
            "description": "Marker for next page of results"
          },
          "prev_marker": {
            "type": "string",
            "nullable": true,
            "description": "Marker for previous page of results"
          },
          "has_next": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether more results are available"
          },
          "has_prev": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether previous results are available"
          }
        }
      },
      "SentimentRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the sentiment record",
            "example": "sent_123"
          },
          "coin_uid": {
            "type": "string",
            "description": "Unique identifier for the coin",
            "example": "bitcoin"
          },
          "datetime": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the sentiment data",
            "example": "2023-12-01T12:00:00Z"
          },
          "daily_sentiment": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "Daily sentiment score",
            "example": 0.75
          },
          "hourly_sentiment": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "Hourly sentiment score",
            "example": 0.68
          },
          "long_term_sentiment": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "Long-term sentiment trend",
            "example": 0.72
          },
          "tweet_volume": {
            "type": "number",
            "nullable": true,
            "description": "Volume of tweets/social mentions",
            "example": 1542
          },
          "tweet_volume_dominance": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "Tweet volume dominance percentage",
            "example": 12.5
          },
          "tweet_unique_sources_percent": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "Percentage of unique sources in tweets",
            "example": 85.2
          },
          "twitter_accounts": {
            "type": "number",
            "nullable": true,
            "description": "Number of unique Twitter accounts",
            "example": 234
          },
          "sentiment_1h": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "1-hour sentiment score",
            "example": 0.73
          },
          "tweet_volume_1_minute": {
            "type": "number",
            "nullable": true,
            "description": "Tweet volume in the last minute",
            "example": 15
          },
          "positive_tweets_percent": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "Percentage of positive tweets",
            "example": 45.6
          },
          "neutral_tweets_percent": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "Percentage of neutral tweets",
            "example": 32.1
          },
          "negative_tweets_percent": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "Percentage of negative tweets",
            "example": 22.3
          },
          "daily_sentiment_avg_30_days": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "30-day average of daily sentiment",
            "example": 0.71
          },
          "tweet_volume_30_day_avg": {
            "type": "number",
            "nullable": true,
            "description": "30-day average tweet volume",
            "example": 1234
          },
          "tweet_unique_sources_percent_30_day_avg": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "30-day average of unique sources percentage",
            "example": 82.5
          },
          "twitter_accounts_30_day_avg": {
            "type": "number",
            "nullable": true,
            "description": "30-day average of unique Twitter accounts",
            "example": 198
          },
          "hype_to_activity_ratio": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "Ratio of hype to actual activity",
            "example": 1.25
          },
          "nvtweet_ratio": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "Network value to tweet ratio",
            "example": 0.85
          },
          "relative_tweet_volume": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "Relative tweet volume compared to baseline",
            "example": 1.15
          },
          "daily_sentiment_change_7_days": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "7-day change in daily sentiment",
            "example": 0.05
          },
          "daily_sentiment_momentum_7_days": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "7-day sentiment momentum",
            "example": 0.08
          },
          "daily_sentiment_momentum": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "Current sentiment momentum",
            "example": 0.12
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when data was collected",
            "example": "2023-12-01T12:05:00Z"
          },
          "tweet_unique_sources_percent_1_minute": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "description": "Unique sources percentage in the last minute",
            "example": 78.3
          }
        },
        "required": [
          "id",
          "coin_uid",
          "datetime"
        ]
      }
    }
  },
  "paths": {
    "/v3/quant/sentiment": {
      "get": {
        "tags": [
          "Quant"
        ],
        "operationId": "getQuantSentiment",
        "summary": "Get sentiment data for quantitative analysis",
        "description": "Retrieve sentiment data (latest or historical) optimized for quantitative analysis.\nSupports both latest snapshot data and historical time series data based on parameters.\n\n**Data Types:**\n- **Latest Data**: Most recent sentiment scores for specified or all coins\n- **Historical Data**: Time series sentiment data with pagination support\n\n**Key Features:**\n- Automatic detection of historical vs latest requests\n- Flexible field selection\n- Multiple frequency options for historical data\n- Pagination support for large datasets\n",
        "parameters": [
          {
            "name": "historical",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Explicitly request historical data. If not specified, the system will auto-detect based on other parameters.\n"
          },
          {
            "name": "coin_uids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of coin UIDs to filter by.\nRequired for historical data requests.\n",
            "example": "bitcoin,ethereum,cardano"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of fields to return in the response.\n",
            "example": "coin_uid,datetime,sentiment_score,sentiment_classification"
          },
          {
            "name": "datetime_start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Start datetime for historical data (ISO 8601 format)",
            "example": "2023-11-01T00:00:00Z"
          },
          {
            "name": "datetime_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "End datetime for historical data (ISO 8601 format)",
            "example": "2023-12-01T00:00:00Z"
          },
          {
            "name": "frequency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1min",
                "5min",
                "1hour",
                "6hour",
                "1day",
                "7day",
                "30day",
                "90day",
                "1year"
              ],
              "default": "5min"
            },
            "description": "Data frequency for historical requests"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            },
            "description": "Number of records to return (for historical data)"
          },
          {
            "name": "next_marker",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pagination marker for next page"
          },
          {
            "name": "prev_marker",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pagination marker for previous page"
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Field to sort results by (for historical data)"
          }
        ],
        "responses": {
          "200": {
            "description": "Sentiment data (latest or historical based on parameters)",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/FormattedResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "oneOf": [
                            {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/SentimentRecord"
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "data": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/SentimentRecord"
                                  }
                                },
                                "pagination": {
                                  "$ref": "#/components/schemas/PaginationInfo"
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "latest_data": {
                    "summary": "Latest sentiment data response",
                    "value": {
                      "status": "success",
                      "code": 200,
                      "data": [
                        {
                          "id": "sent_123",
                          "coin_uid": "bitcoin",
                          "datetime": "2022-10-10T16:05:00.000Z",
                          "daily_sentiment": "42.27666666666666",
                          "daily_sentiment_avg_30_days": "49.2225879629629602",
                          "daily_sentiment_change_7_days": "0.08418186804956163",
                          "daily_sentiment_momentum": "0.7777777777777786",
                          "daily_sentiment_momentum_7_days": "3.821913580246914",
                          "hourly_sentiment": "53.96525978040974",
                          "hype_to_activity_ratio": "1.861574673460639",
                          "long_term_sentiment": "32.04222222222222",
                          "nvtweet_ratio": "5.615759389381764",
                          "tweet_volume": "56908.0",
                          "tweet_volume_30_day_avg": "65845.1875",
                          "tweet_volume_dominance": "0.2736935255812164",
                          "tweet_unique_sources_percent": "0.428",
                          "tweet_unique_sources_percent_30_day_avg": "0.40163055555555555556",
                          "twitter_accounts": "24356.624",
                          "twitter_accounts_30_day_avg": "26227.208902777776",
                          "tweet_volume_1_minute": "43.0",
                          "relative_tweet_volume": "-0.1357303067896951",
                          "positive_tweets_percent": "0.39592",
                          "neutral_tweets_percent": "0.3791899999999999",
                          "negative_tweets_percent": "0.22489"
                        }
                      ]
                    }
                  },
                  "historical_data": {
                    "summary": "Historical sentiment data response with pagination",
                    "value": {
                      "status": "success",
                      "code": 200,
                      "data": {
                        "data": [
                          {
                            "id": "sent_456",
                            "coin_uid": "bitcoin",
                            "datetime": "2023-11-30T12:00:00Z",
                            "daily_sentiment": 0.68,
                            "hourly_sentiment": 0.65,
                            "tweet_volume": 1234,
                            "positive_tweets_percent": 42.3,
                            "neutral_tweets_percent": 35.4,
                            "negative_tweets_percent": 22.3
                          },
                          {
                            "id": "sent_789",
                            "coin_uid": "bitcoin",
                            "datetime": "2023-11-30T13:00:00Z",
                            "daily_sentiment": 0.72,
                            "hourly_sentiment": 0.69,
                            "tweet_volume": 1456,
                            "positive_tweets_percent": 46.8,
                            "neutral_tweets_percent": 31.2,
                            "negative_tweets_percent": 22
                          }
                        ],
                        "pagination": {
                          "next_marker": "page_2",
                          "prev_marker": null,
                          "has_next": true,
                          "has_prev": false
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/FormattedResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SentimentRecord"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "missing_coin_uids": {
                    "summary": "Missing required coin_uids for historical data",
                    "value": {
                      "status": "error",
                      "code": 400,
                      "data": [],
                      "error": {
                        "message": "coin_uids is required for historical data",
                        "source": {
                          "endpoint": "/sentiment",
                          "historical": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/FormattedResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SentimentRecord"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}
```