Actions51
- Accounts Actions
- Products Actions
- Orders Actions
- Portfolio Actions
- List Portfolios
- Create Portfolio
- Move Portfolio Funds
- Get Portfolio Breakdown
- Delete Portfolio
- Edit Portfolio
- Get Futures Balance Summary
- Get Intraday Margin Setting
- Set Intraday Margin Setting
- Get Current Margin Window
- List Futures Positions
- Get Futures Position
- Schedule Futures Sweep
- List Futures Sweeps
- Cancel Pending Futures Sweep
- Allocate Portfolio
- Get Perpetuals Portfolio Summary
- List Perpetuals Positions
- Get Perpetuals Position
- Get Portfolios Balances
- Opt Inor Outof Multi Asset Collateral
- Fees Actions
- Converts Actions
- Public Actions
- Payment Methods Actions
- Data Actions
Orders → Close Position
AI-generatedSummary
Close an existing open position in the Coinbase CDP Orders resource.
Inputs
- requestOptions (required) — Collection of options to customize the request for closing the position.
- requestOptions.batching — Batching configuration for request throttling including batch size and interval.
- requestOptions.allowUnauthorizedCerts — Set to true to ignore SSL certificate issues.
- requestOptions.proxy — Optional HTTP proxy to route the requests.
- requestOptions.timeout — Timeout period in milliseconds for server response.
Output shape
no body — success/failure only
Handles success and failure responses based on the closing position request.
Examples
Example 1: Close a long position in Bitcoin with a batch size of 10 and a timeout of 5000 ms.
Set batching with 10 items and a timeout of 5000 ms, set the ignore SSL option to false.