Skip to main content

Overview

The 1tx REST API provides programmatic access to:
  • Instrument Discovery: Query all available DeFi instruments
  • Metrics & Analytics: Historical APY, TVL, and performance data
  • Portfolio Analysis: Score allocations, compare portfolio changes, and simulate historical yield
  • Protocol Information: Supported protocols and their markets
  • Transaction Building: Build router calldata bundles for buys and sells
  • Cross-Chain Monitoring: Estimate CCTP fees and track bridge execution by source tx hash

Base URL

Quick Start

Make Your First Request

Response:

Build a Buy Calldata Bundle

This returns the ordered transaction bundle the user wallet should sign and send.

Using TypeScript/JavaScript

Using Python

Response Format

Responses are endpoint-specific. The most common shapes in this API are:

Single Resource Response

Paginated Response

Collection Response

Error Response

Error Codes

Authentication requirements are endpoint-specific. Market-data endpoints use x-api-key. Transaction-building endpoints require both x-api-key and Authorization: Bearer <jwt>.

Rate Limiting

API requests 1tx rate limited:

Pagination

Most list endpoints support pagination:
Parameters:
  • page (default: 1) - Page number
  • limit (default: 10, max: 100) - Items per page

Filtering

Filter instruments by various criteria:

Sorting

Sort results using the sort parameter:

Next Steps

Instruments API

Query DeFi instruments

Integration Guide

Choose your integration model

Use Cases

See example implementations