PearPear
API IntegrationAccess Management

Trade Accounts

Connect and manage the exchange accounts Pear trades on your behalf.

A trade account links your Pear identity to one connected exchange account on Hyperliquid, Binance, Bybit, OKX, or Lighter. You connect an account once, then scope every trading call to it with the x-trade-account-id header. Exchange credentials are stored encrypted and are never returned to the client.

Manage trade accounts

EndpointPurpose
GET /trade-accountsList your connected accounts.
POST /trade-accountsConnect an exchange account (supply that venue's credentials).
PATCH /trade-accounts/:idUpdate an account.
DELETE /trade-accounts/:idSoft-delete an account.
POST /trade-accounts/:id/restoreRestore a soft-deleted account.

Each account returns a stable id, an alias, and its connector (the exchange). Pass the id as x-trade-account-id on every account-scoped request.

Credentials per venue

Connecting an account requires that venue's credentials:

ExchangeCredentials
Hyperliquidsigner key
Binanceread and write API key pair
Bybit, OKXAPI key and secret (OKX also takes a passphrase)
LighterAPI private key and key index

Pear provisions the exchange-side plumbing for you. On Hyperliquid, for example, the builder approval and agent wallet that older direct integrations set up by hand are handled during connection, so you only supply the signer key.

Scoping requests

Once connected, list your accounts and pick one:

GET /trade-accounts

Then send its id on each trading call or account read:

x-trade-account-id: <trade-account-id>

If you have a single account it is used by default. With multiple accounts, always pass the header so the call targets the right venue.

On this page