Copper.co Clearloop API

The clearloop API from Copper.co — 9 operation(s) for clearloop.

OpenAPI Specification

copper-co-clearloop-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: 'Copper API is based on the REST API interface provided for data exchange between a client and a server with the use of HTTPS requests and responses.

    By default, the request should include a Content-Type header set as application/json. Some requests require different header fields, as well as other Content-Type values. In this case, a proper header will be stated in an example.

    When interacting with the API, please note that all numerical values, such as order amounts or timestamps, should be transmitted as strings. This ensures consistent data representation and prevents potential issues with floating-point precision'
  title: Copper Platform Clearloop API
  version: latest
servers:
- description: platform.copper.co
  url: https://api.copper.co/platform
- description: demo.copper.co
  url: https://api.stage.copper.co/platform
- description: testnet.copper.co
  url: https://api.testnet.copper.co/platform
tags:
- name: clearloop
paths:
  /clearloop/actions:
    get:
      parameters:
      - description: Unix timestamp (in milliseconds) to retrieve records from this point in time
        in: query
        name: fromTimestamp
        required: false
        schema:
          type: string
      - description: Unix timestamp (in milliseconds) to retrieve records up to this point in time
        in: query
        name: toTimestamp
        required: false
        schema:
          type: string
      - description: Unique identifier of the exchange account for which records are retrieved
        in: query
        name: clientAccountId
        required: false
        schema:
          type: string
      - description: List of Copper portfolio IDs to filter records
        in: query
        name: portfolioIds
        required: false
        schema:
          items:
            type: string
          type: array
      - description: 'Type of action: `add-funds` (delegate to the exchange) or `remove-funds` (undelegate from the exchange)'
        in: query
        name: actionType
        required: false
        schema:
          type: string
      - description: Maximum number of records to return (pagination limit)
        in: query
        name: limit
        required: false
        schema:
          type: string
      - description: Number of records to skip before starting to return results (pagination offset)
        in: query
        name: offset
        required: false
        schema:
          type: string
      - description: 'Sort order for results: `asc` for ascending or `desc` for descending'
        in: query
        name: sortDirection
        required: false
        schema:
          default: asc
          type: string
      - description: If true, only return records for actions that have been successfully executed (i.e., funds have been successfully added or removed).If false, include all records regardless of execution status
        in: query
        name: filterExecuted
        required: false
        schema:
          default: 'false'
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetActionsResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - bad-request
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - forbidden
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - conflict
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Conflict
      summary: Get ClearLoop Actions
      tags:
      - clearloop
  /clearloop/actions/{actionId}:
    get:
      parameters:
      - in: path
        name: actionId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClearLoopAction'
          description: OK
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - bad-request
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - forbidden
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - conflict
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Conflict
      summary: Get ClearLoop Action by ID
      tags:
      - clearloop
  /clearloop/balances:
    get:
      parameters:
      - description: Unique Copper account identifier for which records can be retrieved
        in: query
        name: portfolioId
        required: false
        schema:
          type: string
      - description: If `true`, only balances with non-zero values will be returned
        in: query
        name: nonEmpty
        required: false
        schema:
          default: 'true'
          type: boolean
      - description: If `true`, includes `totalAvailableBalanceToUndelegate` across both the main account and subaccounts
        in: query
        name: fetchSubaccounts
        required: false
        schema:
          default: 'false'
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClearLoopBalances'
          description: OK
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - bad-request
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - forbidden
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - conflict
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Conflict
      summary: Get ClearLoop Balances
      tags:
      - clearloop
  /clearloop/exchanges:
    get:
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClearLoopExchangesResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - bad-request
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - forbidden
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - conflict
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Conflict
      summary: Get ClearLoop Exchanges
      tags:
      - clearloop
  /clearloop/exchanges/{exchangeId}:
    get:
      parameters:
      - in: path
        name: exchangeId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClearLoopExchangeInformation'
          description: OK
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - bad-request
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - forbidden
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - conflict
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Conflict
      summary: Get ClearLoop Exchange by ID
      tags:
      - clearloop
  /clearloop/portfolios:
    get:
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClearLoopPortfoliosResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - bad-request
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - forbidden
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - conflict
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Conflict
      summary: Get ClearLoop Portfolios
      tags:
      - clearloop
  /clearloop/portfolios/{portfolioId}:
    get:
      parameters:
      - in: path
        name: portfolioId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClearLoopPortfolioResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - bad-request
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - forbidden
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - conflict
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Conflict
      summary: Get ClearLoop Portfolio by Id
      tags:
      - clearloop
  /clearloop/settlements:
    get:
      parameters:
      - description: Unique Copper account identifier for which records can be retrieved
        in: query
        name: portfolioId
        required: false
        schema:
          type: string
      - description: Exchange account unique identifier for which records can be retrieved
        in: query
        name: clientAccountId
        required: false
        schema:
          type: string
      - description: Unique exchange settlement identifier per instruction, defined by client account and settlement currency. Guaranteed to be unique within each exchange.
        in: query
        name: exchangeSettlementId
        required: false
        schema:
          type: string
      - description: Unix timestamp in milliseconds to filter settlements created after this time
        in: query
        name: createdAfter
        required: false
        schema:
          type: string
      - description: Unix timestamp in milliseconds to filter settlements created before this time
        in: query
        name: createdBefore
        required: false
        schema:
          type: string
      - description: Unix timestamp (in milliseconds) of the date and time when the settlement cycle has started
        in: query
        name: cycleStartTimestamp
        required: false
        schema:
          type: string
      - description: The number of most recent cycles that you want to retrieve for every exchange. For example, specifying 1 will return the last settlement for every queried exchange
        in: query
        name: cycles
        required: false
        schema:
          type: string
      - description: Comma separated list with statuses to be included. [See details](/enums/ClearLoopSettlementStatus)
        in: query
        name: clearLoopSettlementStatuses
        required: false
        schema:
          items:
            $ref: '#/components/schemas/ClearLoopSettlementStatus'
          type: array
      - description: Comma separated list with statuses not to be included. [See details](/enums/ClearLoopSettlementStatus)
        in: query
        name: clearLoopSettlementStatusesNotIn
        required: false
        schema:
          items:
            $ref: '#/components/schemas/ClearLoopSettlementStatus'
          type: array
      - description: Maximum number of records to return (pagination limit)
        in: query
        name: limit
        required: false
        schema:
          default: '1000'
          type: string
      - description: 'The sorting order of settlement records, which are sorted by their `createdAt` field: `asc` (ascending) or `desc` (descending)'
        in: query
        name: sortDirection
        required: false
        schema:
          default: asc
          type: string
      - description: Number of records to skip before starting to return results (pagination offset)
        in: query
        name: offset
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClearLoopSettlementsResponseV2'
          description: OK
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - bad-request
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - forbidden
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - conflict
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Conflict
      summary: Get ClearLoop Settlements
      tags:
      - clearloop
  /clearloop/settlements/{settlementId}:
    get:
      parameters:
      - in: path
        name: settlementId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClearLoopSettlementV2'
          description: OK
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - bad-request
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - forbidden
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                    - conflict
                    type: string
                  message:
                    description: A human-readable message providing more details about the error
                    type: string
                type: object
          description: Conflict
      summary: Get ClearLoop Settlement by ID
      tags:
      - clearloop
components:
  schemas:
    ClearLoopExchangeSettlementDetails:
      properties:
        frequency:
          description: Frequency of the settlement in milliseconds
          type: string
        nextSettlementTimestamp:
          description: Unix timestamp (in milliseconds) of the date and time when the next settlement cycle will start
          type: string
      type: object
    OrderStatus:
      enum:
      - new
      - waiting-funds
      - reserving
      - reserved
      - queued
      - validating-funds
      - working
      - waiting-approve
      - co-sign-require
      - approved
      - processing
      - executed
      - canceled
      - rejecting
      - rejected
      - declining
      - declined
      - suspending
      - suspended
      - blocked
      - action-required
      - accepting
      - accepted
      - require-initializer-approve
      - waiting-counterparty-approve
      - require-counterparty-approve
      - ready-for-settlement
      - settled
      - part-signed-tx-added
      - full-signed-tx-added
      - rejected-part-signed-tx-added
      - rejected-full-signed-tx-added
      - accepted-part-signed-tx-added
      - accepted-full-signed-tx-added
      - awaiting-settlement
      - master-password-required
      - manual-resolving
      - error
      - pending-atomic-settlement-confirmation
      - atomic-settlement-reservation-completed
      - require-finalize
      - waiting-accept-deposit
      - waiting-reject-deposit
      type: string
    ClearLoopPortfolioResponse:
      properties:
        clientAccountId:
          description: Identifier of the client account associated with the ClearLoop portfolio
          type: string
        custodyType:
          $ref: '#/components/schemas/PortfolioCustodyType'
          description: Custody type of the ClearLoop portfolio, which indicates how the portfolio is held by the custodian. Possible values include `segregated-trust-wallet`, `clearloop-omnibus`, and `external`.. [See details](/enums/PortfolioCustodyType)
        delegationsEnabled:
          description: Indicates whether delegations are enabled for the ClearLoop portfolio
          type: boolean
        disabledDelegationsReason:
          description: 'Reason why delegations are disabled for the ClearLoop portfolio. Example: `CL-SETTLEMENTS-1`, which means that delegation is disabled due to an upcoming or pending settlement'
          type: string
        disabledUndelegationsReason:
          description: 'Reason why undelegations are disabled for the ClearLoop portfolio. Example: `CL-SETTLEMENTS-1`, which means that undelegation is disabled due to an upcoming or pending settlement'
          type: string
        organizationId:
          description: Identifier of the client organisation holding the ClearLoop portfolio
          type: string
        portfolioId:
          description: Identifier of the ClearLoop portfolio
          type: string
        settlementDetails:
          $ref: '#/components/schemas/PortfolioSettlementDetails'
          description: Settlement details associated with the ClearLoop portfolio
          type: object
        settlementStatus:
          $ref: '#/components/schemas/PortfolioSettlementStatus'
          description: Settlement status of the last settlement cycle. [See details](/enums/PortfolioSettlementStatus)
        undelegationsEnabled:
          description: Indicates whether undelegations are enabled for the ClearLoop portfolio
          type: boolean
      type: object
    ClearLoopExchangesResponse:
      properties:
        clearLoopExchanges:
          description: An array of exchange objects
          items:
            $ref: '#/components/schemas/ClearLoopExchangeInformation'
          type: array
      required:
      - clearLoopExchanges
      type: object
    PortfolioSettlementDetails:
      properties:
        comments:
          description: Optional comments, for example, reason for exclusion
          type: string
        status:
          $ref: '#/components/schemas/PortfolioSettlementStatus'
          description: Settlement status of the ClearLoop portfolio. [See details](/enums/PortfolioSettlementStatus)
      type: object
    ClearLoopExchangeInformation:
      properties:
        collateralDetails:
          $ref: '#/components/schemas/ClearLoopExchangeCollateralDetails'
          description: Collateral details
          type: object
        exchangeId:
          description: Exchange identifier
          type: string
        name:
          description: Human-readable name of the exchange
          type: string
        settlementDetails:
          $ref: '#/components/schemas/ClearLoopExchangeSettlementDetails'
          description: Settlements configuration details
          type: object
      required:
      - exchangeId
      - name
      type: object
    ClearLoopPortfoliosResponse:
      properties:
        portfolios:
          description: An array of ClearLoop portfolios (i.e. accounts) held at Copper
          items:
            $ref: '#/components/schemas/ClearLoopPortfolioResponse'
          type: array
      type: object
    ClearLoopSettlementSubStatus:
      enum: []
      type: string
    ClearLoopSettlementV2:
      properties:
        completedAt:
          description: Unix timestamp (in milliseconds) of the date and time when the settlement was fully completed
          type: string
        createdAt:
          description: Unix timestamp (in milliseconds) of the date and time when the settlement started
          type: string
        custodian:
          description: Custodian associated to settlement
          type: string
        cycleEndTimestamp:
          description: Unix timestamp (in milliseconds) of the date and time when the settlement cycle has ended
          type: string
        cycleStartTimestamp:
          description: Unix timestamp (in milliseconds) of the date and time when the settlement cycle has started
          type: string
        deadline:
          description: Unix timestamp (in milliseconds) of the settlement deadline
          type: string
        exchange:
          description: Exchange name
          type: string
        exchangeId:
          description: Exchange identifier
          type: string
        failureReason:
          type: string
        settlementDetails:
          description: Array of settlement detail records for each client account linked to a given settlement ID
          items:
            $ref: '#/components/schemas/ClearLoopSettlementDetails'
          type: array
        settlementId:
          description: Unique Copper settlement identifier
          type: string
        settlementStatus:
          $ref: '#/components/schemas/ClearLoopSettlementStatus'
          description: Status describing the settlement. [See details](/enums/ClearLoopSettlementStatus)
        settlementSubStatus:
          $ref: '#/components/schemas/ClearLoopSettlementSubStatus'
          description: Sub-status providing additional context to the status of the settlement
      required:
      - settlementId
      - settlementStatus
      - settlementSubStatus
      - cycleStartTimestamp
      - exchange
      - exchangeId
      type: object
    ClearLoopPagination:
      properties:
        limit:
          description: Numerical limit of records for any given page
          type: string
        page:
          description: Current page index (numerical)
          type: string
        pages:
          description: Total number of pages matching the query
          type: string
        totalItems:
          description: Total number of records returned
          type: string
      type: object
    ClearLoopSettlementExclusionDetails:
      properties:
        exclusionReason:
          description: Settlement exclusion reason
          type: string
        exclusionSettlementId:
          description: Exclusion settlement identifier, if the client has been excluded from a settlement cycle.
          type: string
      required:
      - exclusionReason
      type: object
    ClearLoopBalances:
      properties:
        balances:
          description: Array of balance records per wallet
          items:
            $ref: '#/components/schemas/ManagedFund'
          type: array
      required:
      - balances
      type: object
    ClearLoopSettlementStatus:
      enum:
      - new
      - pending-exchange-confirmation
      - in-progress
      - completed
      - failed
      - cancelled
      - partially-completed
      - ignored
      - on-chain-orders-in-progress
      - excluded
      type: string
    ClearLoopAction:
      properties:
        action:
          description: 'Type of action performed: `add-funds` (delegate) or `remove-funds` (undelegate)'
  

# --- truncated at 32 KB (40 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/copper-co/refs/heads/main/openapi/copper-co-clearloop-api-openapi.yml