> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# user.position_lock 

> Notifications when position lock state is enabled or disabled for the user.

Use this channel to monitor risk-control position lock events (which restrict opening or expanding positions) and react immediately when restrictions are updated.




## AsyncAPI

````yaml api-reference/coinbase-deribit-app-api/adv-starbase-asyncapi.json user.position_lock
id: user.position_lock
title: 'user.position_lock '
description: >
  Notifications when position lock state is enabled or disabled for the user.


  Use this channel to monitor risk-control position lock events (which restrict
  opening or expanding positions) and react immediately when restrictions are
  updated.
servers:
  - id: private
    protocol: wss
    host: drb.coinbase.com/ws/api/v2
    bindings: []
    variables: []
address: user.position_lock
parameters: []
bindings: []
operations:
  - &ref_1
    id: receive_user_position_lock_updates
    title: Receive position lock updates
    description: Client receives position lock update notifications
    type: receive
    messages:
      - &ref_3
        id: subscribe_request
        contentType: application/json
        payload:
          - name: Subscription Request
            description: >-
              Client sends subscription request to subscribe to notification
              channel.
            type: object
            properties:
              - name: id
                type: integer
                description: Client request id, echoed in the response.
                required: true
              - name: jsonrpc
                type: string
                description: JSON-RPC version. Always `2.0`.
                required: true
              - name: method
                type: string
                description: >-
                  `private/subscribe` on the private WebSocket, after
                  `public/auth`.
                enumValues:
                  - private/subscribe
                required: true
              - name: params
                type: object
                required: true
                properties:
                  - name: channels
                    type: array
                    description: >-
                      Stream names to subscribe to, for example
                      `quote.BTC-PERPETUAL`.
                    required: true
                    properties:
                      - name: item
                        type: string
                        required: false
        headers: []
        jsonPayloadSchema:
          additionalProperties: false
          properties:
            id:
              default: 42
              description: Client request id, echoed in the response.
              type: integer
              x-parser-schema-id: <anonymous-schema-1353>
            jsonrpc:
              default: '2.0'
              description: JSON-RPC version. Always `2.0`.
              type: string
              x-parser-schema-id: <anonymous-schema-1354>
            method:
              default: private/subscribe
              description: >-
                `private/subscribe` on the private WebSocket, after
                `public/auth`.
              enum:
                - private/subscribe
              type: string
              x-parser-schema-id: <anonymous-schema-1355>
            params:
              additionalProperties: false
              properties:
                channels:
                  default:
                    - user.position_lock
                  description: >-
                    Stream names to subscribe to, for example
                    `quote.BTC-PERPETUAL`.
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-1358>
                  type: array
                  x-parser-schema-id: <anonymous-schema-1357>
              required:
                - channels
              type: object
              x-parser-schema-id: <anonymous-schema-1356>
          required:
            - id
            - jsonrpc
            - method
            - params
          type: object
          x-parser-schema-id: <anonymous-schema-1352>
        title: Subscription Request
        description: >-
          Client sends subscription request to subscribe to notification
          channel.
        example: |-
          {
            "id": 42,
            "jsonrpc": "2.0",
            "method": "private/subscribe",
            "params": {
              "channels": [
                "user.position_lock"
              ]
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe_request
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: user.position_lock
  - &ref_2
    id: send_subscribe_user_position_lock
    title: Send subscribe request for position lock
    description: Client sends subscription request for user position lock
    type: send
    messages:
      - &ref_4
        id: subscription_message
        contentType: application/json
        payload:
          - name: Subscription Notification Data
            description: Server sends subscription notification data
            type: object
            properties:
              - name: data
                type: object
                required: true
                properties:
                  - name: locked
                    type: boolean
                    description: >-
                      Value is set to `true` when user position lock is active,
                      `false` when removed
                    required: true
        headers: []
        jsonPayloadSchema:
          additionalProperties: false
          description: Response containing notification data
          properties:
            data:
              additionalProperties: false
              properties:
                locked:
                  description: >-
                    Value is set to `true` when user position lock is active,
                    `false` when removed
                  example: true
                  type: boolean
                  x-parser-schema-id: <anonymous-schema-1361>
              required:
                - locked
              type: object
              x-parser-schema-id: <anonymous-schema-1360>
          required:
            - data
          type: object
          x-parser-schema-id: <anonymous-schema-1359>
        title: Subscription Notification Data
        description: Server sends subscription notification data
        example: |-
          {
            "jsonrpc": "2.0",
            "method": "subscription",
            "params": {
              "channel": "user.position_lock",
              "data": {
                "locked": true
              }
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscription_message
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
sendMessages:
  - *ref_3
receiveMessages:
  - *ref_4
extensions:
  - id: x-parser-unique-object-id
    value: user.position_lock
securitySchemes: []

````