---
agentTools:
  projectIndex: https://coinglass.readme.io/llms.txt
---

# Top Long vs Short Position Ratio History

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://open-api.coinglass.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "coinglassSecret"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/public/v2/indicator/top_long_short_position_ratio": {
      "get": {
        "summary": "Top Long vs Short Position Ratio History",
        "description": "",
        "operationId": "top-long-vs-short-position-ratio",
        "parameters": [
          {
            "name": "ex",
            "in": "query",
            "description": "pass the exchange name eg. Binance Okex",
            "required": true,
            "schema": {
              "type": "string",
              "default": "Binance"
            }
          },
          {
            "name": "pair",
            "in": "query",
            "description": "pass the pair eg. BTCUSDT",
            "required": true,
            "schema": {
              "type": "string",
              "default": "BTCUSDT"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "description": "pass the time interval eg. m1 m5 m15 m30 h1 h4 ...",
            "required": true,
            "schema": {
              "type": "string",
              "default": "h1"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "pass the return limit ,max:500,",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "start_time",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "1668481704000"
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "1668568104000"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "RESPONSE BODY": {
                    "value": ""
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "63734bb38f9bdf00545e7f8a:64005a9993943909834e0765"
}
```