Skip to main content
Before trading, the user must authorize certain actions on each DEX. The available authorizations are discovered dynamically from the GET /dexes endpoint. See SDK / Authorization for the full implementation guide.

Discovery

Each DEX returns an authorizations[] array describing what approvals are needed:
const { dexes } = await getDexes(client);
const hl = dexes.find((d) => d.key === 'hyperliquid');
console.log(hl.authorizations);
// [
//   { key: 'ApproveAgent', name: 'Approve Agent', params: [{ name: 'agentAddress', type: 'string', required: true }] },
//   { key: 'ApproveBuilderFee', name: 'Approve Builder Fee', params: [] },
// ]

Batch Authorization

Authorizations are processed in batches:
  1. CreatePOST /createAuthorization with an array of desired authorizations
  2. The backend checks which are already satisfied and returns only the ones that need signing
  3. Sign — User signs each returned typedData with their wallet
  4. SubmitPOST /authorization with all signed payloads