NEAR Protocol Legacy / DEX API

Deprecated.

Operations 6

GET /v1/dex Get top dex pairs by pagination #
GET /v1/dex/count Get top dex pairs count #
GET /v1/dex/pairs/{pair} Get dex pair info #
GET /v1/dex/pairs/{pair}/txns Get dex pair txns by pagination #
GET /v1/dex/pairs/{pair}/txns/count Get dex pair txns count #
GET /v1/dex/pairs/{pair}/charts Get dex pair chart data #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/near-legacy-dex-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

near-legacy-dex-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: NearBlocks REST API for the NEAR Protocol block explorer. Provides endpoints to access blockchain data including accounts, transactions, blocks, tokens, NFTs, and staking.
  title: NearBlocks Explorer Legacy / DEX API
  version: 1.0.0
servers:
- description: Mainnet
  url: https://api.nearblocks.io
- description: Testnet
  url: https://api-testnet.nearblocks.io
tags:
- description: Deprecated.
  name: Legacy / DEX
paths:
  /v1/dex:
    get:
      summary: Get top dex pairs by pagination
      tags:
      - Legacy / DEX
      parameters:
      - in: query
        name: search
        description: Search keyword
        schema:
          type: string
      - in: query
        name: page
        description: Page number
        schema:
          type: number
          minimum: 1
          maximum: 100
          default: 1
      - in: query
        name: per_page
        description: Number of items per page
        schema:
          type: number
          minimum: 1
          maximum: 50
          default: 50
      - in: query
        name: sort
        description: Sort field
        schema:
          type: string
          enum:
          - volume
          - txns
          - makers
          default: volume
      - in: query
        name: order
        description: Sort order
        schema:
          type: string
          enum:
          - desc
          - asc
          default: desc
      responses:
        '200':
          description: Success response
      operationId: getV1Dex
      x-operation-id-source: derived
  /v1/dex/count:
    get:
      summary: Get top dex pairs count
      tags:
      - Legacy / DEX
      parameters:
      - in: query
        name: search
        description: Search keyword
        schema:
          type: string
      responses:
        '200':
          description: Success response
      operationId: getV1DexCount
      x-operation-id-source: derived
  /v1/dex/pairs/{pair}:
    get:
      summary: Get dex pair info
      tags:
      - Legacy / DEX
      parameters:
      - in: path
        name: pair
        required: true
        description: Pair ID
        schema:
          type: string
        examples:
          pair:
            value: example-pair-id
      responses:
        '200':
          description: Success response
      operationId: getV1DexPairsByPair
      x-operation-id-source: derived
  /v1/dex/pairs/{pair}/txns:
    get:
      summary: Get dex pair txns by pagination
      tags:
      - Legacy / DEX
      parameters:
      - in: path
        name: pair
        required: true
        description: Pair ID
        schema:
          type: string
        examples:
          pair:
            value: example-pair-id
      - in: query
        name: a
        description: Maker account ID
        schema:
          type: string
      - in: query
        name: cursor
        description: Next page cursor
        schema:
          type: string
      - in: query
        name: per_page
        description: Number of items per page. Each increment of 25 will count towards rate limit. For example, per page 50 will use 2 credits.
        schema:
          type: number
          minimum: 1
          maximum: 250
          default: 25
      responses:
        '200':
          description: Success response
      operationId: getV1DexPairsByPairTxns
      x-operation-id-source: derived
  /v1/dex/pairs/{pair}/txns/count:
    get:
      summary: Get dex pair txns count
      tags:
      - Legacy / DEX
      parameters:
      - in: path
        name: pair
        required: true
        description: Pair ID
        schema:
          type: string
        examples:
          pair:
            value: example-pair-id
      - in: query
        name: a
        description: Maker account ID
        schema:
          type: string
      responses:
        '200':
          description: Success response
      operationId: getV1DexPairsByPairTxnsCount
      x-operation-id-source: derived
  /v1/dex/pairs/{pair}/charts:
    get:
      summary: Get dex pair chart data
      tags:
      - Legacy / DEX
      parameters:
      - in: path
        name: pair
        required: true
        description: Pair ID
        schema:
          type: string
        examples:
          pair:
            value: example-pair-id
      - in: query
        name: interval
        required: true
        description: Time interval
        schema:
          type: string
          enum:
          - 1m
          - 1h
          - 1d
          default: 1m
      - in: query
        name: to
        required: true
        description: End timestamp
        schema:
          type: number
      - in: query
        name: limit
        required: true
        description: Number of rows
        schema:
          type: number
      responses:
        '200':
          description: Success response
      operationId: getV1DexPairsByPairCharts
      x-operation-id-source: derived
components:
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http