Skip to main content
POST
/
dry-run-orders
Dry Run Order
curl --request POST \
  --url https://api.copper.co/platform/dry-run-orders \
  --header 'Content-Type: application/json' \
  --data '
{
  "baseCurrency": "<string>",
  "portfolioId": "<string>",
  "amount": "<string>",
  "includeFeeInWithdraw": true,
  "mainCurrency": "<string>",
  "memo": "<string>",
  "payload": "<string>",
  "payloads": [
    "<string>"
  ],
  "priceLimit": "<string>",
  "quoteAmount": "<string>",
  "quoteCurrency": "<string>",
  "quoteMainCurrency": "<string>",
  "requestedNetworkFees": {
    "feePerByte": "<string>",
    "gasLimit": "<string>",
    "gasPriceGwei": "<string>",
    "maxFeePerGas": "<string>",
    "maxPriorityFeePerGas": "<string>"
  },
  "toCounterpartyId": "<string>",
  "toCryptoAddressId": "<string>",
  "toInvoiceId": "<string>",
  "toLendingInvoiceId": "<string>",
  "toPortfolioId": "<string>"
}
'
import requests

url = "https://api.copper.co/platform/dry-run-orders"

payload = {
"baseCurrency": "<string>",
"portfolioId": "<string>",
"amount": "<string>",
"includeFeeInWithdraw": True,
"mainCurrency": "<string>",
"memo": "<string>",
"payload": "<string>",
"payloads": ["<string>"],
"priceLimit": "<string>",
"quoteAmount": "<string>",
"quoteCurrency": "<string>",
"quoteMainCurrency": "<string>",
"requestedNetworkFees": {
"feePerByte": "<string>",
"gasLimit": "<string>",
"gasPriceGwei": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>"
},
"toCounterpartyId": "<string>",
"toCryptoAddressId": "<string>",
"toInvoiceId": "<string>",
"toLendingInvoiceId": "<string>",
"toPortfolioId": "<string>"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
baseCurrency: '<string>',
portfolioId: '<string>',
amount: '<string>',
includeFeeInWithdraw: true,
mainCurrency: '<string>',
memo: '<string>',
payload: '<string>',
payloads: ['<string>'],
priceLimit: '<string>',
quoteAmount: '<string>',
quoteCurrency: '<string>',
quoteMainCurrency: '<string>',
requestedNetworkFees: {
feePerByte: '<string>',
gasLimit: '<string>',
gasPriceGwei: '<string>',
maxFeePerGas: '<string>',
maxPriorityFeePerGas: '<string>'
},
toCounterpartyId: '<string>',
toCryptoAddressId: '<string>',
toInvoiceId: '<string>',
toLendingInvoiceId: '<string>',
toPortfolioId: '<string>'
})
};

fetch('https://api.copper.co/platform/dry-run-orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.copper.co/platform/dry-run-orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'baseCurrency' => '<string>',
'portfolioId' => '<string>',
'amount' => '<string>',
'includeFeeInWithdraw' => true,
'mainCurrency' => '<string>',
'memo' => '<string>',
'payload' => '<string>',
'payloads' => [
'<string>'
],
'priceLimit' => '<string>',
'quoteAmount' => '<string>',
'quoteCurrency' => '<string>',
'quoteMainCurrency' => '<string>',
'requestedNetworkFees' => [
'feePerByte' => '<string>',
'gasLimit' => '<string>',
'gasPriceGwei' => '<string>',
'maxFeePerGas' => '<string>',
'maxPriorityFeePerGas' => '<string>'
],
'toCounterpartyId' => '<string>',
'toCryptoAddressId' => '<string>',
'toInvoiceId' => '<string>',
'toLendingInvoiceId' => '<string>',
'toPortfolioId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.copper.co/platform/dry-run-orders"

payload := strings.NewReader("{\n \"baseCurrency\": \"<string>\",\n \"portfolioId\": \"<string>\",\n \"amount\": \"<string>\",\n \"includeFeeInWithdraw\": true,\n \"mainCurrency\": \"<string>\",\n \"memo\": \"<string>\",\n \"payload\": \"<string>\",\n \"payloads\": [\n \"<string>\"\n ],\n \"priceLimit\": \"<string>\",\n \"quoteAmount\": \"<string>\",\n \"quoteCurrency\": \"<string>\",\n \"quoteMainCurrency\": \"<string>\",\n \"requestedNetworkFees\": {\n \"feePerByte\": \"<string>\",\n \"gasLimit\": \"<string>\",\n \"gasPriceGwei\": \"<string>\",\n \"maxFeePerGas\": \"<string>\",\n \"maxPriorityFeePerGas\": \"<string>\"\n },\n \"toCounterpartyId\": \"<string>\",\n \"toCryptoAddressId\": \"<string>\",\n \"toInvoiceId\": \"<string>\",\n \"toLendingInvoiceId\": \"<string>\",\n \"toPortfolioId\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.copper.co/platform/dry-run-orders")
.header("Content-Type", "application/json")
.body("{\n \"baseCurrency\": \"<string>\",\n \"portfolioId\": \"<string>\",\n \"amount\": \"<string>\",\n \"includeFeeInWithdraw\": true,\n \"mainCurrency\": \"<string>\",\n \"memo\": \"<string>\",\n \"payload\": \"<string>\",\n \"payloads\": [\n \"<string>\"\n ],\n \"priceLimit\": \"<string>\",\n \"quoteAmount\": \"<string>\",\n \"quoteCurrency\": \"<string>\",\n \"quoteMainCurrency\": \"<string>\",\n \"requestedNetworkFees\": {\n \"feePerByte\": \"<string>\",\n \"gasLimit\": \"<string>\",\n \"gasPriceGwei\": \"<string>\",\n \"maxFeePerGas\": \"<string>\",\n \"maxPriorityFeePerGas\": \"<string>\"\n },\n \"toCounterpartyId\": \"<string>\",\n \"toCryptoAddressId\": \"<string>\",\n \"toInvoiceId\": \"<string>\",\n \"toLendingInvoiceId\": \"<string>\",\n \"toPortfolioId\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.copper.co/platform/dry-run-orders")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"baseCurrency\": \"<string>\",\n \"portfolioId\": \"<string>\",\n \"amount\": \"<string>\",\n \"includeFeeInWithdraw\": true,\n \"mainCurrency\": \"<string>\",\n \"memo\": \"<string>\",\n \"payload\": \"<string>\",\n \"payloads\": [\n \"<string>\"\n ],\n \"priceLimit\": \"<string>\",\n \"quoteAmount\": \"<string>\",\n \"quoteCurrency\": \"<string>\",\n \"quoteMainCurrency\": \"<string>\",\n \"requestedNetworkFees\": {\n \"feePerByte\": \"<string>\",\n \"gasLimit\": \"<string>\",\n \"gasPriceGwei\": \"<string>\",\n \"maxFeePerGas\": \"<string>\",\n \"maxPriorityFeePerGas\": \"<string>\"\n },\n \"toCounterpartyId\": \"<string>\",\n \"toCryptoAddressId\": \"<string>\",\n \"toInvoiceId\": \"<string>\",\n \"toLendingInvoiceId\": \"<string>\",\n \"toPortfolioId\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "baseCurrency": "<string>",
  "portfolioId": "<string>",
  "amount": "<string>",
  "extra": {
    "availableCoSigners": [
      "<string>"
    ],
    "availableSnapshot": "<string>",
    "balanceSnapshot": "<string>",
    "clearLoop": true,
    "clearLoopExtra": {
      "clearLoopExternalNetted": true,
      "clearLoopSettlementId": "<string>"
    },
    "clientAccountId": "<string>",
    "coSigners": [
      "<string>"
    ],
    "coSignersNumber": "<string>",
    "confirmations": "<string>",
    "counterpartyPortfolioId": "<string>",
    "depositOrderId": "<string>",
    "depositTargetId": "<string>",
    "description": "<string>",
    "estimatedFees": {
      "fee": "<string>",
      "feeCurrency": "<string>",
      "baseFeePerGas": "<string>",
      "estimatedTime": "<string>",
      "feePerByte": {},
      "gasLimit": {},
      "gasPriceGwei": "<string>",
      "maxFeePerGas": "<string>",
      "maxPriorityFeePerGas": "<string>",
      "reportingCurrencyRate": "<string>",
      "transactionBytes": "<string>"
    },
    "externalBroadcast": true,
    "fees": [
      {
        "fee": "<string>",
        "feeCurrency": "<string>",
        "baseFeePerGas": "<string>",
        "estimatedTime": "<string>",
        "feePerByte": {},
        "gasLimit": {},
        "gasPriceGwei": "<string>",
        "maxFeePerGas": "<string>",
        "maxPriorityFeePerGas": "<string>",
        "reportingCurrencyRate": "<string>",
        "transactionBytes": "<string>"
      }
    ],
    "fromAddresses": [
      "<string>"
    ],
    "fromCounterpartyId": "<string>",
    "fromCryptoAddress": {
      "address": "<string>",
      "createdAt": "<string>",
      "createdBy": "<string>",
      "cryptoAddressId": "<string>",
      "currency": "<string>",
      "isWhitelist": true,
      "name": "<string>",
      "_embedded": {
        "currencyConfigurations": [
          {
            "createdAt": "<string>",
            "createdBy": "<string>",
            "cryptoAddressId": "<string>",
            "currency": "<string>",
            "currencyConfigurationId": "<string>",
            "isWhitelist": true,
            "extra": {},
            "lastUsedAt": "<string>",
            "portfolioIds": [
              "<string>"
            ],
            "updatedAt": "<string>",
            "updatedBy": "<string>"
          }
        ]
      },
      "acceptTokens": true,
      "addressTags": [],
      "extra": {},
      "lastUsedAt": "<string>",
      "mainCurrency": "<string>",
      "memo": "<string>",
      "organizationId": "<string>",
      "portfolioIds": [
        "<string>"
      ],
      "updatedAt": "<string>",
      "updatedBy": "<string>"
    },
    "fromCryptoAddressId": "<string>",
    "fromPortfolioId": "<string>",
    "includeFeeInWithdraw": true,
    "invoiceId": "<string>",
    "marketPrice": "<string>",
    "memo": "<string>",
    "nextTransferTo": [
      {
        "cryptoAddressId": "<string>",
        "portfolioId": "<string>"
      }
    ],
    "originalDepositAmount": "<string>",
    "partSigned": {},
    "payload": "<string>",
    "payloads": [
      "<string>"
    ],
    "reportingCurrencyRate": "<string>",
    "reportingQuoteCurrencyRate": "<string>",
    "signed": {},
    "spenderAddress": "<string>",
    "terminatedReportingCurrencyRate": "<string>",
    "toAddress": "<string>",
    "toCounterpartyId": "<string>",
    "toCryptoAddressId": "<string>",
    "toInvoiceId": "<string>",
    "toLendingInvoiceId": "<string>",
    "toPortfolioId": "<string>",
    "totalQuoteAmount": "<string>",
    "transactionId": "<string>",
    "transactionRequest": {},
    "transferAmount": "<string>",
    "transferChainId": "<string>",
    "transferDepositTargetId": "<string>",
    "transferFees": "<string>",
    "transferFeesCurrency": "<string>",
    "transferTransactionId": "<string>",
    "withdrawFee": "<string>",
    "withdrawOrderId": "<string>"
  },
  "mainCurrency": "<string>",
  "warning": {
    "message": "<string>",
    "code": "<string>"
  }
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}

Body

application/json
baseCurrency
string
required
orderType
enum<string>
required
Available options:
sell,
buy,
deposit,
withdraw,
multi-withdraw,
wallet-message,
retrieved-deposit,
earn-reward,
earn-shared-reward,
claim-shared-reward,
cross-chain-deposit,
cross-chain-withdraw
portfolioId
string
required
amount
string
blockchainTransactionType
enum<string>

Blockchain transaction type. See details

Available options:
send,
multi-withdraw,
account-set,
approve-hot-key,
approve-builder-fee,
allowance,
smart-call,
multi-smart-call,
activate,
activate-trading,
stake-delegation,
stake-nomination,
stake-undelegation,
complete-withdrawal,
stake-complete-deposit,
take-reward,
pool-creation,
edit-pool,
governance-vote,
unjail,
importance-transfer,
transfer-stake,
rebond-stake,
chill,
cross-chain-send,
accept-deposit,
reject-deposit,
create-referral,
set-referral
deliveryType
enum<string>
Available options:
free-of-payment,
payment-vs-payment
feeLevel
enum<string>
Available options:
low,
medium,
high
includeFeeInWithdraw
boolean
limitType
enum<string>
Available options:
otc,
rfq
mainCurrency
string
memo
string
payload
string
payloads
string[]
priceLimit
string
quoteAmount
string
quoteCurrency
string
quoteMainCurrency
string
requestedNetworkFees
object
toCounterpartyId
string
toCryptoAddressId
string
toInvoiceId
string
toLendingInvoiceId
string
toPortfolioId
string

Response

OK

baseCurrency
string
required
orderType
enum<string>
required
Available options:
sell,
buy,
deposit,
withdraw,
multi-withdraw,
wallet-message,
retrieved-deposit,
earn-reward,
earn-shared-reward,
claim-shared-reward,
cross-chain-deposit,
cross-chain-withdraw
portfolioId
string
required
amount
string
extra
object
mainCurrency
string
warning
object