Copper.co Exchange API

The Exchange API from Copper.co — 1 operation(s) for exchange.

OpenAPI Specification

copper-co-exchange-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 Exchange 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: Exchange
paths:
  /exchange:
    post:
      description: Execute Hyperliquid exchange action. Mimics https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HyperliquidExchangeRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HyperliquidExchangeResponse'
          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: Execute exchange action
      tags:
      - Exchange
components:
  schemas:
    HyperliquidExchangeRequest:
      properties: {}
      type: object
    HyperliquidExchangeResponse:
      properties: {}
      type: object