Units
Inputs are human decimals.100 is 100 USD or 100 tokens, 5 as leverage is 5x, 0.5 as slippage is 0.5 percent, and a price is a plain decimal. Pass a string such as '0.123456' for exact values. An amount with more decimal places than the token has throws InvalidAmount instead of rounding.
Outputs are decimal strings. Every result object also carries raw, the same values as bigint in contract units: USD with 30 decimals and tokens with their own decimals. Anywhere an amount is expected you can pass { raw: 10n ** 30n }.
Requests and the keeper
ZEUS uses the GMX v1 request model. Your transaction creates a request on the PositionRouter and pays an execution fee in ETH. A keeper then updates prices and executes or cancels the request in one transaction, usually within seconds. Limit, take profit and stop loss orders wait in the OrderBook until their trigger price is reached. The SDK hides the two steps: a trading call resolves only when the keeper has acted, and returns a receipt.Fees and limits
Execution fee
Execution fee
Each request pays the keeper an execution fee in ETH. The SDK pays the contract minimum plus 20 percent. OrderBook orders require strictly more than the minimum, which the buffer covers.
Slippage
Slippage
The worst accepted price comes from the Vault price: the maximum price for a Long open or a Short close, the minimum price for a Short open or a Long close. Slippage must be between 0.01 and 5 percent.
Leverage
Leverage
At most 50.2x, the level at which the Vault liquidates. With
leverage the size is the collateral’s USD value times the leverage, before fees.Checks before sending
Checks before sending
The SDK checks the plugin approval, the token allowance and the free pool capacity, and simulates the call. A failed check throws a typed error and nothing is sent.
Collateral tokens
Longs hold the market’s token as collateral and Shorts hold USDC. Paying or receiving another token swaps it through the pool.Builder code
Every transaction carries the ZEUS Base builder code as an ERC-8021 data suffix. PassbuilderCode: false to send plain calldata.