Copper.co Orders API

The orders API from Copper.co — 8 operation(s) for orders.

OpenAPI Specification

copper-co-orders-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 Orders 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: orders
paths:
  /dry-run-orders:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DryRunOrderRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DryRunOrder'
          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: Dry Run Order
      tags:
      - orders
  /orders:
    get:
      parameters:
      - description: Comma-separated list of portfolio IDs to filter by
        in: query
        name: portfolioIds
        required: false
        schema:
          items:
            type: string
          type: array
      - description: Comma-separated list of currencies to filter by `base_currency` or `quote_currency`
        in: query
        name: currencies
        required: false
        schema:
          items:
            type: string
          type: array
      - description: Comma-separated list of currencies to filter by `base_currency`
        in: query
        name: baseCurrencies
        required: false
        schema:
          items:
            type: string
          type: array
      - description: Comma-separated list of currencies to filter by `quote_currency`
        in: query
        name: quoteCurrencies
        required: false
        schema:
          items:
            type: string
          type: array
      - description: Comma-separated list of currencies to filter by `main_currency` (blockchain network)
        in: query
        name: mainCurrencies
        required: false
        schema:
          items:
            type: string
          type: array
      - description: Comma-separated list of order types to filter by. [See details](/enums/OrderType)
        in: query
        name: orderTypes
        required: false
        schema:
          items:
            $ref: '#/components/schemas/OrderType'
          type: array
      - description: Comma-separated list of statuses to filter by. [See details](/enums/OrderStatus)
        in: query
        name: statuses
        required: false
        schema:
          items:
            $ref: '#/components/schemas/OrderStatus'
          type: array
      - in: query
        name: offset
        required: false
        schema:
          type: string
      - in: query
        name: limit
        required: false
        schema:
          default: '1000'
          type: string
      - description: Filter by external order ID
        example:
        - 6de6d2c3-ce34-4ae8-b26e-d050167fc5c3
        in: query
        name: externalOrderId
        required: false
        schema:
          type: string
      - description: Filter by transfer chain ID
        in: query
        name: transferChainId
        required: false
        schema:
          type: string
      - description: Filter by blockchain transaction ID
        in: query
        name: transactionId
        required: false
        schema:
          type: string
      - description: Search query by blockchain transaction ID, fromAddress or toAddress
        in: query
        name: searchQuery
        required: false
        schema:
          type: string
      - description: Filter by updated date since timestamp
        in: query
        name: updatedSince
        required: false
        schema:
          type: string
      - description: Filter by created date since timestamp
        in: query
        name: createdSince
        required: false
        schema:
          type: string
      - description: Filter by created date since timestamp
        in: query
        name: createdAtFrom
        required: false
        schema:
          type: string
      - description: Filter by created date to timestamp
        in: query
        name: createdAtTo
        required: false
        schema:
          type: string
      - description: Filter by terminated date since timestamp
        in: query
        name: terminatedAtFrom
        required: false
        schema:
          type: string
      - description: Filter by terminated date to timestamp
        in: query
        name: terminatedAtTo
        required: false
        schema:
          type: string
      - description: Comma-separated list of portfolio types to filter by. [See details](/enums/PortfolioType)
        in: query
        name: portfolioTypes
        required: false
        schema:
          items:
            $ref: '#/components/schemas/PortfolioType'
          type: array
      - description: Comma-separated list of portfolio types to exclude. [See details](/enums/PortfolioType)
        in: query
        name: excludedPortfolioTypes
        required: false
        schema:
          items:
            $ref: '#/components/schemas/PortfolioType'
          type: array
      - in: query
        name: counterpartyId
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Orders'
          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 Orders
      tags:
      - orders
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrder'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          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 Order
      tags:
      - orders
  /orders/:
    post:
      description: Bulk orders creation. If the execution of an order fails, it will not affect the execution of other orders. Failed orders will be returned in the response. The bulk size should be less than 50 orders.
      parameters:
      - description: application/vnd.create-orders+json
        in: header
        name: Content-Type
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/vnd.create-orders+json:
            schema:
              $ref: '#/components/schemas/CreateOrders'
      responses:
        '200':
          content:
            application/vnd.create-orders+json:
              schema:
                $ref: '#/components/schemas/Orders'
          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 Multiple Orders
      tags:
      - orders
  /orders/{acceptOtcOrderId}:
    patch:
      description: Accept counterparty settlement order
      parameters:
      - description: application/vnd.approve-counterparty-otc+json
        in: header
        name: Content-Type
        required: false
        schema:
          type: string
      - in: path
        name: acceptOtcOrderId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.approve-counterparty-otc+json:
              schema:
                $ref: '#/components/schemas/Order'
          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: Accept Order
      tags:
      - orders
  /orders/{cancelOrderId}:
    patch:
      parameters:
      - description: application/vnd.cancel-order+json
        in: header
        name: Content-Type
        required: false
        schema:
          type: string
      - in: path
        name: cancelOrderId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.cancel-order+json:
            schema:
              $ref: '#/components/schemas/CancelOrder'
      responses:
        '200':
          content:
            application/vnd.cancel-order+json:
              schema:
                $ref: '#/components/schemas/Order'
          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: Cancel Order
      tags:
      - orders
  /orders/{coSignOrderId}:
    patch:
      parameters:
      - description: application/vnd.co-sign-order+json
        in: header
        name: Content-Type
        required: false
        schema:
          type: string
      - in: path
        name: coSignOrderId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.co-sign-order+json:
            schema:
              $ref: '#/components/schemas/UpdateOrderCoSigners'
      responses:
        '200':
          content:
            application/vnd.co-sign-order+json:
              schema:
                $ref: '#/components/schemas/Order'
          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: Approve (co-sign) Order
      tags:
      - orders
  /orders/{orderId}:
    get:
      parameters:
      - in: path
        name: orderId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          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 Order by ID
      tags:
      - orders
    patch:
      parameters:
      - description: application/vnd.enter-master-password+json
        in: header
        name: Content-Type
        required: false
        schema:
          type: string
      - in: path
        name: orderId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.enter-master-password+json:
            schema:
              $ref: '#/components/schemas/EnterMasterPassword'
      responses:
        '200':
          content:
            application/vnd.enter-master-password+json:
              schema:
                $ref: '#/components/schemas/Order'
          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: Provide master password for Order
      tags:
      - orders
  /orders/{startSigningOrderId}:
    patch:
      description: Start crypto signing for an order
      parameters:
      - description: application/vnd.start-signing+json
        in: header
        name: Content-Type
        required: false
        schema:
          type: string
      - in: path
        name: startSigningOrderId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.start-signing+json:
              schema:
                $ref: '#/components/schemas/Order'
          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: Start Signing
      tags:
      - orders
components:
  schemas:
    UserAbstraction:
      enum: []
      type: string
    UploadPartSignedTx:
      properties: {}
      type: object
    CryptoAddress:
      properties:
        _embedded:
          $ref: '#/components/schemas/CryptoAddressEmbedded'
          description: Additional information for this crypto address
          type: object
        acceptTokens:
          description: Indicates an address can be used for tokens on the same blockchain network
          type: boolean
        address:
          description: Address
          type: string
        addressTags:
          description: Address tags
          items:
            $ref: '#/components/schemas/AddressTag'
          type: array
        addressType:
          $ref: '#/components/schemas/AddressType'
          description: Address type. [See details](/enums/AddressType)
        category:
          $ref: '#/components/schemas/AddressCategory'
          description: Address category. [See details](/enums/AddressCategory)
        createdAt:
          description: Created at timestamp
          type: string
        createdBy:
          description: Created by user id
          type: string
        cryptoAddressId:
          description: Crypto address id
          type: string
        currency:
          deprecated: true
          description: Currency of an address
          type: string
        extra:
          $ref: '#/components/schemas/CryptoAddressExtra'
          description: Extra information for an address
          type: object
        isWhitelist:
          deprecated: true
          description: Indicates, if an address is whitelisted
          type: boolean
        lastUsedAt:
          description: Last used at
          type: string
        mainCurrency:
          description: Main currency of an address
          type: string
        memo:
          description: Address memo (destination tag for XRP)
          type: string
        name:
          description: Name of an address
          type: string
        organizationId:
          description: Organization id
          type: string
        portfolioIds:
          deprecated: true
          description: Portfolio ids, if address set for particular portfolios
          items:
            type: string
          type: array
        updatedAt:
          description: Last updated Updated at timestamp
          type: string
        updatedBy:
          description: Updated by user id
          type: string
      required:
      - cryptoAddressId
      - currency
      - name
      - address
      - createdBy
      - createdAt
      - isWhitelist
      - addressType
      type: object
    OrderReceiver:
      properties:
        amount:
          description: The amount of order in baseCurrency
          examples:
          - '0.1'
          type: string
        toAddress:
          description: The address where the funds should be transferred
          type: string
        toCryptoAddressId:
          description: In case of a withdrawal, the destination crypto address ID from the Address Book
          type: string
      type: object
    AddressCategory:
      enum:
      - smart-contract
      - payable-smart-contract
      - mining
      - unknown
      - self-hosted
      - vasp
      type: string
    DepositOrigin:
      enum: []
      type: string
    FeeType:
      enum: []
      type: string
    Warning:
      properties:
        code:
          type: string
        message:
          type: string
      required:
      - message
      type: object
    CurrencyConfiguration:
      properties:
        createdAt:
          description: Created at timestamp
          type: string
        createdBy:
          description: Created by user id
          type: string
        cryptoAddressId:
          description: Crypto address id
          type: string
        currency:
          description: Currency of an address
          type: string
        currencyConfigurationId:
          description: Currency configuration id
          type: string
        extra:
          $ref: '#/components/schemas/CurrencyConfigurationExtra'
          description: Extra information for an address
          type: object
        isWhitelist:
          description: Indicates, if an address is whitelisted
          type: boolean
        lastUsedAt:
          description: Last used at
          type: string
        portfolioIds:
          description: Portfolio ids, if address set for particular portfolios
          items:
            type: string
          type: array
        updatedAt:
          description: Last updated Updated at timestamp
          type: string
        updatedBy:
          description: Updated by user id
          type: string
      required:
      - currencyConfigurationId
      - cryptoAddressId
      - currency
      - createdBy
      - createdAt
      - isWhitelist
      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-res

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