> ## 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.

# private/get_settlement_history_by_currency

> Retrieves settlement, delivery, and bankruptcy events that have affected your account for a specific currency.

**Settlement vs. delivery:** Settlement is a daily event (at 08:00 UTC) for futures and perpetual positions that converts unrealized profit and loss into realized profit and loss. Option positions do not settle. Delivery is a one-time event that occurs when a futures or options contract expires — any remaining open position is closed at the delivery price. Delivery does not apply to perpetual or spot instruments. Both events take place at 08:00 UTC, which is why they are sometimes conflated.

Results can be filtered by settlement type and timestamp. Use pagination parameters (`count` and `continuation`) to retrieve large settlement histories. This data is useful for tracking account-affecting settlement events and understanding how contract expirations impact your account.

[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_settlement_history_by_currency)





## OpenAPI

````yaml /api-reference/coinbase-deribit-app-api/adv-starbase-openapi.json get /private/get_settlement_history_by_currency
openapi: 3.1.0
info:
  description: Coinbase Retail Advanced Trade API for derivatives trading.
  title: Coinbase Retail Advanced Trade (Deribit) API
  version: 2.1.1
servers:
  - url: https://drb.coinbase.com/api/v2
security: []
tags:
  - description: Can only be used over websockets.
    name: WebSocket Only
  - description: Public methods can be used without authentication.
    name: Public
  - description: >-
      <p>Private methods require authentication. All requests must include a
      valid OAuth2 token.</p>

      <p>A token can be requested using the <a
      href="#public-auth">/public/auth</a> method.</p>

      <p>When using the websockets protocol, the token must be included as a
      parameter <code>access_token</code> in the message. When using REST (HTTP
      GET), the token may also be passed in the <code>Authorization</code>
      header.</p>
    name: Private
  - name: Authentication
  - name: Session Management
  - description: >-
      Subscription works as [notifications](#notifications), so users will
      automatically (after subscribing) receive messages from the server.
      Overview for each channel response format is described in
      [subscriptions](#subscriptions) section.
    name: Subscription Management
  - name: Account Management
  - name: Trading
  - name: Market Data
  - name: Wallet
paths:
  /private/get_settlement_history_by_currency:
    get:
      tags:
        - Trading
        - Private
      description: >+
        Retrieves settlement, delivery, and bankruptcy events that have affected
        your account for a specific currency.


        **Settlement vs. delivery:** Settlement is a daily event (at 08:00 UTC)
        for futures and perpetual positions that converts unrealized profit and
        loss into realized profit and loss. Option positions do not settle.
        Delivery is a one-time event that occurs when a futures or options
        contract expires — any remaining open position is closed at the delivery
        price. Delivery does not apply to perpetual or spot instruments. Both
        events take place at 08:00 UTC, which is why they are sometimes
        conflated.


        Results can be filtered by settlement type and timestamp. Use pagination
        parameters (`count` and `continuation`) to retrieve large settlement
        histories. This data is useful for tracking account-affecting settlement
        events and understanding how contract expirations impact your account.


        [Try in API
        console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_settlement_history_by_currency)

      parameters:
        - name: currency
          in: query
          description: The currency symbol
          required: true
          schema:
            $ref: '#/components/schemas/currency'
        - name: type
          in: query
          description: Settlement type
          required: false
          schema:
            $ref: '#/components/schemas/settlement_type'
        - name: count
          in: query
          description: Number of requested items, default - `20`, maximum - `1000`
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
        - name: continuation
          in: query
          description: Continuation token for pagination
          required: false
          schema:
            type: string
            example: xY7T6cutS3t2B9YtaDkE6TS379oKnkzTvmEDUnEUP2Msa9xKWNNaT
        - name: search_start_timestamp
          in: query
          description: >-
            The latest timestamp to return result from (milliseconds since the
            UNIX epoch)
          required: false
          schema:
            $ref: '#/components/schemas/timestamp'
        - name: subaccount_id
          in: query
          description: >-
            The user id for the subaccount. Isolated perpetual settlements are
            recorded per subaccount and only visible when targeting the
            subaccount directly.
          required: false
          schema:
            type: integer
      requestBody:
        description: JSON-RPC request body
        content:
          application/json:
            examples:
              request:
                description: JSON-RPC Request Example
                value:
                  id: 8304
                  jsonrpc: '2.0'
                  method: private/get_settlement_history_by_currency
                  params:
                    count: 1
                    currency: BTC
                    type: delivery
      responses:
        '200':
          $ref: '#/components/responses/PrivateSettlementResponse'
      security:
        - ApiKey:
            - view
        - OAuth2:
            - wallet:transactions:read
components:
  schemas:
    currency:
      description: Currency, i.e `"BTC"`, `"ETH"`, `"USDC"`
      type: string
      enum:
        - BTC
        - ETH
        - USDC
        - USDT
        - EURR
    settlement_type:
      description: >-
        The type of settlement event. `settlement`: daily settlement of futures
        and perpetual positions at 08:00 UTC, converting unrealized profit and
        loss into realized profit and loss (option positions do not settle).
        `delivery`: one-time expiration of a futures or options contract at
        08:00 UTC, closing any remaining open position at the delivery price
        (does not apply to perpetual or spot instruments). `bankruptcy`.
      type: string
      enum:
        - settlement
        - delivery
        - bankruptcy
    timestamp:
      description: The timestamp (milliseconds since the Unix epoch)
      type: integer
      example: 1536569522277
    PrivateSettlementResponse:
      type: object
      properties:
        id:
          description: The id that was sent in the request
          type: integer
        jsonrpc:
          description: The JSON-RPC version (2.0)
          type: string
          enum:
            - '2.0'
        result:
          type: object
          properties:
            continuation:
              $ref: '#/components/schemas/continuation'
            settlements:
              type: array
              items:
                $ref: '#/components/schemas/settlement'
          required:
            - continuation
            - settlements
      required:
        - result
        - jsonrpc
    continuation:
      description: Continuation token for pagination.
      type: string
      example: xY7T6cutS3t2B9YtaDkE6TS379oKnkzTvmEDUnEUP2Msa9xKWNNaT
    settlement:
      type: object
      properties:
        funded:
          description: funded amount (bankruptcy only)
          type: number
          example: 0
        funding:
          description: funding (in base currency ; settlement for perpetual product only)
          type: number
          example: -0.000002511
        index_price:
          description: >-
            underlying index price at time of event (in quote currency;
            settlement and delivery only)
          type: number
          example: 11008.37
        instrument_name:
          description: instrument name (settlement and delivery only)
          type: string
          example: BTC-30MAR18
        mark_price:
          description: >-
            mark price for at the settlement time (in quote currency; settlement
            and delivery only)
          type: number
          example: 11000
        position:
          description: position size (in quote currency; settlement and delivery only)
          type: number
          example: 1000
        profit_loss:
          description: >-
            Platform-wide aggregate realized profit and loss for this settlement
            event, in base currency. This is the sum of the realized P&L of
            every position holder at the settlement or delivery price — it is
            **not** a per-account value. Present for `settlement` and `delivery`
            types only.
          type: number
          example: 0
        session_bankruptcy:
          description: value of session bankruptcy (in base currency; bankruptcy only)
          type: number
          example: 0.001160788
        session_profit_loss:
          description: >-
            Platform-wide aggregate total session profit and loss for this
            settlement event, in base currency. This is the sum of each position
            holder's session P&L (combining realized and unrealized components)
            across all users who held positions in the instrument — it is
            **not** a per-account value.
          type: number
          example: 0.001160788
        session_tax:
          description: total amount of paid taxes/fees (in base currency; bankruptcy only)
          type: number
          example: -0.001160788
        session_tax_rate:
          description: rate of paid taxes/fees (in base currency; bankruptcy only)
          type: number
          example: 0.000103333
        socialized:
          description: >-
            the amount of the socialized losses (in base currency; bankruptcy
            only)
          type: number
          example: -0.001160788
        timestamp:
          $ref: '#/components/schemas/timestamp'
        type:
          $ref: '#/components/schemas/settlement_type'
      required:
        - type
        - timestamp
        - session_profit_loss
        - position
        - instrument_name
        - index_price
        - funding
  responses:
    PrivateSettlementResponse:
      description: Success response
      content:
        application/json:
          examples:
            response:
              description: Response example
              value:
                id: 2192
                jsonrpc: '2.0'
                result:
                  continuation: xY7T6cusbMBNpH9SNmKb94jXSBxUPojJEdCPL4YociHBUgAhWQvEP
                  settlements:
                    - index_price: 119.8
                      instrument_name: ETH-22FEB19
                      mark_price: 121.67
                      position: -66
                      profit_loss: -0.001783937
                      session_profit_loss: 0.038358299
                      timestamp: 1550475692526
                      type: settlement
          schema:
            $ref: '#/components/schemas/PrivateSettlementResponse'
  securitySchemes:
    ApiKey:
      description: >-
        Call `public/auth` with `grant_type: coinbase_cdp` and a CDP JWT. Send
        the returned `access_token` as `Authorization: Bearer`.
      scheme: bearer
      type: http
    OAuth2:
      description: >-
        Call `public/auth` with `grant_type: coinbase_oauth2` and an OAuth
        access token. Send the returned `access_token` as `Authorization:
        Bearer`.
      flows:
        authorizationCode:
          authorizationUrl: https://login.coinbase.com/oauth2/auth
          scopes:
            wallet:accounts:read: View your accounts.
            wallet:accounts:update: Authorize `wallet:accounts:update` operations.
            wallet:buys:create: Place, edit, and cancel orders.
            wallet:payment-methods:read: View your payment methods.
            wallet:trades:create: Convert cryptocurrencies.
            wallet:trades:read: View your cryptocurrency conversions.
            wallet:transactions:read: View your transactions.
            wallet:transactions:transfer: Transfer funds between accounts.
            wallet:user:read: View your account information.
            wallet:user:update: Update your account information.
          tokenUrl: https://login.coinbase.com/oauth2/token
      type: oauth2

````