Copper.co Deposit Targets API

The deposit-targets API from Copper.co — 2 operation(s) for deposit-targets.

OpenAPI Specification

copper-co-deposit-targets-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 Deposit Targets 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: deposit-targets
paths:
  /deposit-targets:
    get:
      description: Retrieve information about all deposit targets in an organization
      parameters:
      - in: query
        name: portfolioId
        required: false
        schema:
          type: string
      - in: query
        name: depositTargetId
        required: false
        schema:
          type: string
      - in: query
        name: externalId
        required: false
        schema:
          type: string
      - in: query
        name: currency
        required: false
        schema:
          type: string
      - in: query
        name: mainCurrency
        required: false
        schema:
          type: string
      - description: '[See details](/enums/DepositTargetType)'
        in: query
        name: targetTypes
        required: false
        schema:
          items:
            $ref: '#/components/schemas/DepositTargetType'
          type: array
      - description: '[See details](/enums/DepositTargetStatus)'
        in: query
        name: statuses
        required: false
        schema:
          items:
            $ref: '#/components/schemas/DepositTargetStatus'
          type: array
      - description: '[See details](/enums/SortingDirection)'
        in: query
        name: sortDirection
        required: false
        schema:
          $ref: '#/components/schemas/SortingDirection'
          type: string
      - in: query
        name: orderGroup
        required: false
        schema:
          $ref: '#/components/schemas/DepositTargetOrderGroup'
          type: string
      - in: query
        name: addresses
        required: false
        schema:
          items:
            type: string
          type: array
      - in: query
        name: memo
        required: false
        schema:
          type: string
      - in: query
        name: limit
        required: false
        schema:
          type: string
      - in: query
        name: offset
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepositTargets'
          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 Deposit Targets
      tags:
      - deposit-targets
    post:
      description: Create a new deposit target
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTarget'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepositTarget'
          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: Create Deposit Target
      tags:
      - deposit-targets
  /deposit-targets/{depositTargetId}:
    patch:
      description: Update deposit target
      parameters:
      - description: application/vnd.activate-deposit-target-currency+json
        in: header
        name: Content-Type
        required: false
        schema:
          type: string
      - in: path
        name: depositTargetId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.activate-deposit-target-currency+json:
            schema:
              $ref: '#/components/schemas/ActivateCurrency'
      responses:
        '200':
          content:
            application/vnd.activate-deposit-target-currency+json:
              schema:
                $ref: '#/components/schemas/DepositTarget'
          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: Activate Deposit Target Currency
      tags:
      - deposit-targets
components:
  schemas:
    PortfolioType:
      enum:
      - custody
      - trading-vault
      - trading
      - external
      - clearloop
      type: string
    SortingDirection:
      enum:
      - ASC
      - DESC
      type: string
    DepositTargets:
      properties:
        depositTargets:
          items:
            $ref: '#/components/schemas/DepositTarget'
          type: array
      required:
      - depositTargets
      type: object
    DepositTargetType:
      enum:
      - proxy
      - direct
      - external-wallet
      type: string
    DepositTarget:
      properties:
        acceptAllTokens:
          description: This parameter defines if this target is able to accept all tokens
          type: boolean
        activatedTokens:
          description: If tokens of a blockchain should be activated prior to any operation, this parameter includes a list of currencies to be activated with corresponding status - otherwise, the field is set as null
          items:
            $ref: '#/components/schemas/ActivatedToken'
          type: array
        address:
          type: string
        createdAt:
          type: string
        createdBy:
          type: string
        currency:
          type: string
        depositTargetId:
          type: string
        externalId:
          type: string
        mainCurrency:
          type: string
        memo:
          type: string
        metadata:
          description: 'Additional metadata you want to store with a new Deposit Target '
          type: object
        name:
          type: string
        organizationId:
          type: string
        portfolioId:
          type: string
        portfolioType:
          $ref: '#/components/schemas/PortfolioType'
          description: '[See details](/enums/PortfolioType)'
        requireTokensActivation:
          description: This parameter defines if this target is able to accept all tokens
          type: boolean
        status:
          $ref: '#/components/schemas/DepositTargetStatus'
          description: '[See details](/enums/DepositTargetStatus)'
        targetType:
          $ref: '#/components/schemas/DepositTargetType'
          description: '[See details](/enums/DepositTargetType)'
        updatedAt:
          type: string
        updatedBy:
          type: string
      required:
      - depositTargetId
      - externalId
      - portfolioType
      - targetType
      - status
      - mainCurrency
      - createdBy
      - updatedBy
      - createdAt
      - updatedAt
      - acceptAllTokens
      - requireTokensActivation
      type: object
    DepositTargetOrderGroup:
      enum: []
      type: string
    DepositTargetStatus:
      enum:
      - new
      - pending
      - approval-pending
      - enabled
      - disabled
      - error
      - portfolio-archived
      type: string
    CreateTarget:
      properties:
        activationCode:
          type: string
        address:
          type: string
        currency:
          type: string
        externalId:
          type: string
        mainCurrency:
          type: string
        memo:
          type: string
        name:
          type: string
        portfolioId:
          type: string
      required:
      - externalId
      - portfolioId
      - currency
      - mainCurrency
      type: object
    ActivatedToken:
      properties: {}
      type: object
    ActivateCurrency:
      properties:
        currency:
          type: string
        mainCurrency:
          type: string
      required:
      - currency
      type: object