For the complete documentation index, see llms.txt. This page is also available as Markdown.

DEX API Specification

This document defines the API specification that DEX partners must implement to integrate with the DexPal platform.

Version

v1 — All endpoints are prefixed with /dexpal/v1/.

Authentication

Endpoints can be secured with an API key provided to DexPal during onboarding.

Authorization: Bearer <api_key>

Base URL

Partners host the API at their own domain. DexPal configures the base URL per integration:

https://api.yourexchange.com

Response Envelope

All responses follow the same top-level structure:

{
  "success": true,
  "data": { ... },
  "pagination": { ... },
  "timestamp": "2026-01-20T21:00:00Z"
}
Field
Type
Always present
Description

success

boolean

yes

true on success, false on error

data

object | array

yes

Response payload

pagination

object

only on paginated endpoints

timestamp

ISO8601

yes

Server time at response generation

On error:

See Error Responses for status codes.

Field Conventions

  • All field names use camelCase

  • All monetary values are in USD unless the field name specifies otherwise

  • All timestamps use ISO8601 format (2026-01-20T21:00:00Z)

  • All rates and percentages are expressed as decimal numbers (0.01 = 1%, not "1%")

  • Fees are expressed as percentage decimals (0.05 = 0.05% fee, not 5%)

Shared Object Schemas

Endpoints

DEX-level

These endpoints return platform-wide data and are polled by DexPal on a fixed schedule.

Endpoint
Description
Poll Frequency

Real-time market data for all trading pairs

Every 30s

Aggregate DEX-level statistics

Every 5 min

Per-user affiliate trading activity

On demand

Governance token data

Every 5 min

Earn mechanisms (vaults, staking, LP pools)

Every 5 min

User-level

These endpoints return data scoped to specific wallet addresses.

DexPal users can connect multiple wallets to a single account. Since many of our partner DEXes support smart wallets, subaccounts, and one-click trading accounts, we pass all connected user addresses in most of our requests. User-level endpoints must return cumulative data for all user accounts linked to said addresses.

Collection vs. user-facing visibility

User-level endpoints are not affiliate-code gated at collection time. Return data for any requested address the DEX can read, even if the wallet has not used DexPal's affiliate code. This applies to /users/{address}/accounts, /users/positions, /users/orders, /users/history, /users/holdings, and /users/lp-holdings.

DexPal may hide full-data surfaces such as history from end users unless referral attribution is confirmed. That visibility rule is enforced by DexPal, not by partner API responses.

Endpoint
Description

Discover all accounts associated with an address

Open positions across all provided addresses

Pending limit orders across all provided addresses

Historical trade events, time-ranged and paginated

Wallet and DEX account balances

LP, vault, and staking positions

Rate Limiting

Partners should implement rate limiting appropriate to their infrastructure. DexPal will respect the following defaults unless agreed otherwise:

Endpoint group
Max requests/min

DEX-level

60

User-level

120

Return 429 Too Many Requests when limits are exceeded.

Last updated