Skip to main content
@yieldxyz/sdk is a TypeScript client generated from the Yield API OpenAPI spec. It covers the Earn API (https://api.yield.xyz) only. It does not call the Trade or Borrow hosts, and it has no functions for tokens, campaigns, KYC status or simulation: call those over HTTP.
Configure it once with your project key, then call the generated functions. They mirror the Earn operations, such as getYields, getYield, getYieldBalances, enterYield and submitTransactionHash.
The client is generated, so it can trail the live spec. If a function you need is missing, call the endpoint over HTTP using the Earn reference. The SDK returns unsigned transactions like the raw API. Signing stays with you; see Authentication for keys and the quickstart for the flow.