> ## Documentation Index
> Fetch the complete documentation index at: https://tickblaze.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit a close request for one account and symbol

> Submits a close request for the specified account and symbol. Staff users can operate on any position for the authenticated firm, while non-staff users are limited to their own accounts. `triggered_by` is optional and defaults to authenticated user metadata when omitted.



## OpenAPI

````yaml /openapi.json patch /api/trade/positions/close/
openapi: 3.0.3
info:
  title: TBBO API
  version: 1.0.0
  description: >
    Authentication uses short-lived session tokens (3 hours).


    Send the token with every request using the `Authorization` header:


    ```

    Authorization: Token <token>

    ```


    Example:


    ```

    Authorization: Token 123abc456def789

    ```


    To obtain a token, call `POST /auth/login/` with valid credentials. The
    response includes a `key` value. Use that value in the header above for
    subsequent API calls.


    How to find required IDs:


    - `challenge_id`: Prop Tech Configuration -> Challenges

    - `user_id`: Tickblaze Manager -> Users

    - `account_id`: Tickblaze Manager -> Accounts 
servers: []
security: []
tags:
  - name: withdrawals
    description: Withdrawal related endpoints
    x-displayName: Withdrawals
paths:
  /api/trade/positions/close/:
    patch:
      tags:
        - Trade
      summary: Submit a close request for one account and symbol
      description: >-
        Submits a close request for the specified account and symbol. Staff
        users can operate on any position for the authenticated firm, while
        non-staff users are limited to their own accounts. `triggered_by` is
        optional and defaults to authenticated user metadata when omitted.
      operationId: api_trade_positions_close_partial_update
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedCloseSinglePositionRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedCloseSinglePositionRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedCloseSinglePositionRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationResponse'
          description: ''
      security:
        - tokenAuth: []
components:
  schemas:
    PatchedCloseSinglePositionRequest:
      type: object
      properties:
        account_id:
          type: integer
          minimum: 1
        symbol:
          type: string
          maxLength: 50
        triggered_by:
          type: string
          description: >-
            Optional actor label. Defaults to the authenticated user's email,
            name, or identifier, then 'system'.
          maxLength: 255
        user_id:
          type: integer
          minimum: 1
          description: >-
            Optional user identifier to associate with the close request.
            Defaults to the account owner.
    OperationResponse:
      type: object
      description: >-
        Standard serializer for operation responses. A command or a task should
        return a response matching this format.

        Operation = a request to perform some action, e.g. sync, update, delete,
        create, etc.
      properties:
        success:
          type: boolean
          description: Indicates whether the operation completed successfully.
        results:
          type: array
          items: {}
          description: >-
            List containing the result items produced by the operation. The
            structure of each item depends on the executed operation.
        summary:
          type: object
          additionalProperties: {}
          description: >-
            Aggregated summary information about the operation results (e.g.
            counts of updated, created, failed or unchanged records).
        duration_ms:
          type: number
          format: double
          description: Execution time of the operation in milliseconds.
        message:
          type: string
          nullable: true
          description: Optional human-readable message describing the operation outcome.
      required:
        - duration_ms
        - results
        - success
        - summary
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.