Lambda API Overview
The PAX lambda API provides deterministic ultra-low latency market access. To use the lambda API, traders submit lambda orders that are comprised of:
- A lambda program, and
- an underlying order.
Using the PAX on-chip co-lo technology, every in-force lambda program is evaluated on every market data event. When a lambda program is satisfied, its underlying order is placed immediately.
The PAX lambda book is implemented in FPGA hardware, i.e. is implemented on the same chip as the PAX matching engine. Thus, orders launched from PAX lambdas inherently arrive at the PAX matching engine before any orders launched from external servers.
Access
Section titled “Access”Every PAX client has a λ account and a free-tier account from signup. No separate approval is needed to use the lambda API.
To submit lambdas, create an API key for the λ account with trade permission. Lambda requests signed with a free-tier key are rejected. Orders placed from the λ account over REST are charged λ fees. See Fee Structure.
The chip tracks liquidity for a fixed number of λ accounts at a time, currently 16. A λ account takes a slot when it places its first order or lambda, and keeps it. While every slot is taken, orders and lambdas from λ accounts without a slot are rejected. Free-tier accounts are not subject to this limit.
Data sources
Section titled “Data sources”PAX lambda programs can read data from any local market data feed and from a variety of high importance non-local market data feeds. The asset of the underlying limit order need not match the market data feed on which the lambda program is evaluated. This enables cross-product and cross-market trades using the PAX lambda API.
| Same asset | Cross-product | |
|---|---|---|
| Local market data | Buy BTC perps following a BTC perps buy | Buy ETH on the basis of BTC perps |
| Remote market data | Cancel BTC quote following a BTC mid price tick on Binance | Buy BTC perps following a BTC perps mid price tick on Binance |
Making, taking, and canceling
Section titled “Making, taking, and canceling”Underlying orders for lambda programs can make or take liquidity, and can cancel previously placed resting limit orders. The optionality to cancel quotes using lambda programs reduces the risk of bad fills for market makers sensitive to local or remote price changes.
| Use case | Limit order structure |
|---|---|
| Making | Non-marketable limit price |
| Taking | Marketable limit price |
| Cancel | Price and side of previous quote with negative quantity |
Example
Section titled “Example”The two parts of an example lambda order (the lambda program and underlying order) are shown here:
Lambda program:
| Trigger asset | Trigger event | Threshold |
|---|---|---|
| BTC | LocalMidPx | > 100,000.00 |
Underlying order:
| Asset | Action | Limit price | Quantity |
|---|---|---|---|
| ETH | Buy | 3,000.00 | 0.5 |
The predicate specifies that when BTC’s mid-price exceeds $100,000, the condition is met. The underlying order is to buy 0.5 ETH at a limit price of $3,000.
Use case: Taking
Section titled “Use case: Taking”The PAX lambda API facilitates market taking by placing orders in response to local price changes and remote price changes on external exchanges. For example, a trader could use a lambda program to buy BTC at PAX every time BTC price ticks up at Binance.
Use case: Market making
Section titled “Use case: Market making”Market making involves simultaneously placing offers to both buy and sell. Market makers face exposure risk if they can’t cancel their quotes quickly enough when market conditions change.
The PAX lambda API helps market makers by allowing them to place quotes immediately when new price levels open up and cancel quotes instantly when price changes are imminent, reducing exposure risk from bad fills. This fosters deeper liquidity and tighter spreads, creating a better market for all participants.
Multiple lambda responses
Section titled “Multiple lambda responses”When multiple lambda predicates are met simultaneously (e.g., several traders responding to the same market signal), the PAX lambda response unit prioritizes orders as follows:
- Underlying orders that cancel existing offered liquidity are placed first.
- Underlying orders that add liquidity are placed next.
- Underlying orders that remove liquidity are placed last.
If there are multiple orders in any group, they’re split into smaller units of quantity and randomly interleaved, ensuring the opportunity is shared among participants responding on the same basis.
See Lambda Reference for the full program specification.
Regulated services provided by 1Money USA, Inc., a licensed money transmitter, NMLS ID 2628653 · Licenses