Close Position
AI-generatedSummary
Close an existing perpetual position on the Strike Finance platform by specifying the Cardano address and the position ID.
Inputs
- Strike API Base URL — Base URL for the Strike Finance API. Defaults to https://app.strikefinance.org/api.
- Network — Cardano network to use, options are Mainnet, Testnet, or Preprod.
- Address Source (required) — Source of the Cardano address to be used: generate from wallet, from input data, or manual entry.
- Address Index — Index to generate address from wallet if 'Generate from Wallet' is selected (default 0).
- Manual Address — Manually entered Cardano address if 'Manual' is selected as address source.
- Position ID (required) — ID of the open position to close, corresponding to the transaction hash of the position.
Output shape
a single JSON object representing the close position transaction ready for submission, including the transaction CBOR and metadata about the position closed, or an error object if the close operation fails.
The output includes a 'transaction_ready' status with a transaction CBOR string to be signed and submitted. If the specified position ID is not found or other errors occur, the output contains an error message. The operation first retrieves open positions to verify and gather details needed to build the close transaction.
Examples
Example 1: Closing a position with an address generated from a connected wallet on mainnet.
Select 'Close Position' operation, leave 'Strike API Base URL' as default, select 'Mainnet' for network, choose 'Generate from Wallet' for address source, set address index if necessary (default 0), and specify the Position ID to close.
