> ## Documentation Index
> Fetch the complete documentation index at: https://v3.docs.derive.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Get remaining rate limits for the connection

> Returns the caller's current remaining rate-limit allowances for the active connection, broken out into matching-request, non-matching-request, and per-endpoint buckets. On WebSocket connections it also includes the remaining connection allowance.



## OpenAPI

````yaml /openapi.json post /public/getRateLimits
openapi: 3.1.0
info:
  title: Derive v3 API
  version: 0.2.0
  description: JSON-RPC 2.0 methods, served over WebSocket and HTTP POST.
servers:
  - url: https://api.derive.xyz/v3
    description: Production (HTTP POST base)
  - url: https://testnet.api.derive.xyz/v3
    description: Testnet (HTTP POST base)
security: []
tags:
  - name: Subaccounts
    description: >-
      List, inspect, and label subaccounts, portfolios, positions, and
      collateral.
  - name: Session Keys
    description: Register, edit, and list delegated signing keys.
  - name: Account
    description: Wallet-level account information and settings.
  - name: Orderbook
    description: Place, replace, cancel, and query orders, trigger orders, and algos.
  - name: RFQ
    description: 'Request-for-quote: send RFQs, quote, and execute block trades.'
  - name: Vault Shareholders
    description: >-
      Deposit into and withdraw from vaults, and track shares, requests, and
      performance.
  - name: Vault Curators
    description: >-
      Create and operate curated vaults: settle deposit and withdrawal requests,
      and manage vault metadata.
  - name: History
    description: >-
      Per-account historical records: orders, trades, transfers, and
      settlements.
  - name: Market Maker Protection
    description: Configure, read, and reset market-maker protection.
  - name: Transfers & Withdrawals
    description: Move collateral between subaccounts, to other wallets, and on-chain.
  - name: System
    description: Rate limits and transaction lookups.
  - name: Market Data
    description: Instruments, currencies, tickers, and market-wide feeds.
  - name: Referrals
    description: Referral codes and program performance.
  - name: Other
    description: Uncategorized.
paths:
  /public/getRateLimits:
    post:
      tags:
        - System
      summary: Get remaining rate limits for the connection
      description: >-
        Returns the caller's current remaining rate-limit allowances for the
        active connection, broken out into matching-request,
        non-matching-request, and per-endpoint buckets. On WebSocket connections
        it also includes the remaining connection allowance.
      operationId: public_getRateLimits
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmptyRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitResult'
        default:
          description: JSON-RPC error (see Error Codes)
components:
  schemas:
    EmptyRequest:
      description: This method takes no parameters; send an empty object `{}`.
      type: 'null'
    RateLimitResult:
      type: object
      required:
        - remaining_matching
        - remaining_non_matching
        - remaining_per_endpoint
      properties:
        remaining_connections:
          description: >-
            Remaining WebSocket connection allowance for this account, present
            only on WebSocket connections.
          anyOf:
            - $ref: '#/components/schemas/RateLimitInfo'
            - type: 'null'
        remaining_matching:
          $ref: '#/components/schemas/RateLimitInfo'
        remaining_non_matching:
          $ref: '#/components/schemas/RateLimitInfo'
        remaining_per_endpoint:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/RateLimitInfo'
    RateLimitInfo:
      type: object
      required:
        - consumedPoints
        - isFirstInDuration
        - msBeforeNext
        - remainingPoints
      properties:
        consumedPoints:
          description: Total consumed points.
          type: integer
          format: int64
        isFirstInDuration:
          description: Whether it's the first request in this duration window.
          type: boolean
        msBeforeNext:
          description: Milliseconds before the next request is allowed (0 if none).
          type: integer
          format: uint64
          minimum: 0
        remainingPoints:
          description: Number of remaining points (tokens).
          type: integer
          format: int64

````

## Related topics

- [Rate Limits](/rate-limits.md)
- [Connecting over WebSocket](/connecting.md)
- [Error Codes](/error-codes.md)
