Link

Requests

This section explains the requests details based on the following:

Introduction

REST API provides access to account management and trading.

REST API URL https://api.copper.co

For Demo environment you can use https://api.stage.copper.co

All requests are HTTPS-based. The Content-Type in the request header should be set as application/json by default, but some requests require custom Content-Type.

Errors

Unless otherwise stated, bad requests will result in HTTP 4xx status codes in the response. The body returned will also contain information about the error.

Your HTTP library should be configured to provide message bodies for non-2xx requests so that you are able to read the message field from the body.

Common Error Codes

status description
400 Bad Request — Some validation errors: required fields, unsupported values
401 Unauthorized — Invalid API Key
403 Forbidden — You do not have access to the requested resource
404 Not Found
409 Conflict — Some validation was failed or you can’t complete this request for some reasons
500 Internal Server Error — We had a problem with our server

Success

Successful responses are indicated by 2xx HTTP status codes, and may optionally contain a body. If the response has a body it will be included under each resource below.