Skip to main content
LI.FI Perps is a TypeScript SDK for trading perpetual futures across several venues through one interface. You call the same methods to place an order on any supported venue, and the SDK handles that venue’s signing scheme, credential lifecycle, and market data shape. The problem it solves is not routing. Each perpetuals venue has its own authorization model, its own order semantics, and its own streaming protocol, so supporting a second venue normally means writing a second integration. Here the venue is an argument.

What you get

One interface, several venues

Place, modify, and cancel orders with the same calls regardless of which venue executes them.

No per-order wallet popup

The user signs once during setup. Trades after that are authorized by a credential the SDK manages.

Streaming built in

Prices, orderbook, fills, and order status over WebSocket, with connections shared per channel.

Typed end to end

Wire types come from a zero-dependency package shared by the core SDK and every provider plugin.

Supported venues

Each venue keeps its own setup state and its own trading signer, so a user set up on one is not set up on another. Venue-specific behaviour is covered in Venues.

How the packages fit together

The core SDK is one package and each venue is another. You install the core plus only the venues you target.
Underneath both sits a zero-dependency wire-type package. Provider plugins depend on it directly and take the core SDK as a peer dependency, so a project ends up with exactly one copy of the SDK no matter how many venues it registers. The SDK exposes two layers. Service functions are the low-level surface, taking a client and returning venue data. PerpsClient sits above them and owns the full action pipeline, which is what most integrations use.

Access

Perps is not served from the public API host. The SDK targets a gated endpoint, and requests without granted access are refused. Getting an API key from the Partner Portal is not sufficient on its own; access to the Perps API is granted separately.

Talk to LI.FI sales

Get in touch to have your integrator granted access to the Perps API, so the environment your integration targets is one you can actually reach.

Next steps

Quickstart

Install, create a client, read markets, place an order.

Concepts

The create, authorize, execute pattern and where credentials live.

Venues

Signing models, setup, deposits, and withdrawals per venue.

Full SDK reference

Method-level reference, API reference, and error codes.