Skip to main content
Yield.xyz offers three HTTP APIs, Earn, Trade and Borrow, and any API key from your project works on all three. Each API has its own host and its own OpenAPI spec. Everything is served under the /v1 path prefix, except GET /health.

Contract at a glance

  • Auth. Send x-api-key: <project API key> on every request. The same key works on all three hosts. See Authentication.
  • Base URLs. Production only. See Base URLs.
  • Project scoping. Discovery and per-yield calls are scoped to the project that owns the key. Earn returns only yields enabled for that project.
  • Unsigned transactions. Action endpoints return unsigned transactions. You sign them, then either broadcast them yourself or return them for Yield.xyz to submit, and Yield.xyz never holds keys. The submit bodies differ per API, so follow each product’s transaction page.
  • Errors and limits. Every API returns an error envelope and rate-limit headers. See Errors and retries.
  • Typed client. @yieldxyz/sdk wraps most Earn endpoints (not tokens, campaigns, KYC status or simulation).

Make your first calls

The quickstart walks through discovery, an action, signing and submission for each product.

Next

Authentication

Key format, headers and 401 behavior.

Errors and retries

Error envelope, rate limits and what is safe to retry.