Skip to main content

Open

string
required
BTC/USD, or just BTC, in any case.
'long' | 'short'
required
Amount
required
Amount of payToken put in as collateral.
string
required
USDC, ETH (sent as native ETH), WETH or a market token such as BTC.
Amount
required
Position size in USD, or leverage. Pass exactly one.
Amount
required
Percent, 0.01 to 5.

Close

Without size the whole position closes.
Receiving a token other than the collateral swaps the payout through the pool. When the pool cannot give that token, for example below its USDC buffer, the keeper cancels the close with cancelReason: 'capacity'. Receiving the collateral token (the market’s token or ETH for a Long, USDC for a Short) never swaps.

Cancel a pending request

A request that sees no keeper outcome within 60 seconds throws ExecutionTimeout, which can withdraw it:
zeus.trade.cancelRequest(requestKey) does the same for any pending request of the wallet once the contract’s public delay has passed.