{ "info": { "_postman_id": "a00e65c2-67e1-4683-99aa-be70d8a0a79f", "name": "Copper API", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Account API", "item": [ { "name": "Get account data", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "X-Timestamp", "type": "text", "value": "{{copperCurrentMillis}}" }, { "key": "Authorization", "type": "text", "value": "apikey {{copperApiKey}}" }, { "key": "X-Signature", "type": "text", "value": "{{copperSignature}}" }, { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "url": { "raw": "{{copperHost}}/platform/accounts", "host": [ "{{copperHost}}" ], "path": [ "platform", "accounts" ] } }, "response": [] }, { "name": "Get portfolios", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "X-Timestamp", "type": "text", "value": "{{copperCurrentMillis}}" }, { "key": "Authorization", "type": "text", "value": "apikey {{copperApiKey}}" }, { "key": "X-Signature", "type": "text", "value": "{{copperSignature}}" }, { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "url": { "raw": "{{copperHost}}/platform/portfolios/{portfolioId}", "host": [ "{{copperHost}}" ], "path": [ "platform", "portfolios", "{portfolioId}" ] } }, "response": [] }, { "name": "Get wallets", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "{{copperHost}}/platform/wallets", "host": [ "{{copperHost}}" ], "path": [ "platform", "wallets" ] } }, "response": [] }, { "name": "Get bank accounts", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "{{copperHost}}/platform/bank-accounts", "host": [ "{{copperHost}}" ], "path": [ "platform", "bank-accounts" ] } }, "response": [] }, { "name": "Get crypto addresses", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "{{copperHost}}/platform/crypto-addresses", "host": [ "{{copperHost}}" ], "path": [ "platform", "crypto-addresses" ] } }, "response": [] }, { "name": "Generate report with wallet snapshots", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"dateFrom\": \"01012021\",\n \"dateTo\": \"21102021\"\n}" }, "url": { "raw": "{{copperHost}}/platform/reports/wallets/wallets-snapshots", "host": [ "{{copperHost}}" ], "path": [ "platform", "reports", "wallets", "wallets-snapshots" ] } }, "response": [] }, { "name": "Generate report with net asset values", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"dateFrom\": \"01012021\",\n \"dateTo\": \"21102021\"\n}" }, "url": { "raw": "{{copperHost}}/platform/reports/wallets/net-asset-values", "host": [ "{{copperHost}}" ], "path": [ "platform", "reports", "wallets", "net-asset-values" ] } }, "response": [] }, { "name": "Download a generated report", "request": { "method": "GET", "header": [], "url": { "raw": "{{copperHost}}/platform/files/{fileId}", "host": [ "{{copperHost}}" ], "path": [ "platform", "files", "{fileId}" ] } }, "response": [] } ] }, { "name": "Trading API", "item": [ { "name": "Get token pairs for trading", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "{{copperHost}}/platform/pairs?eotc=true", "host": [ "{{copperHost}}" ], "path": [ "platform", "pairs" ], "query": [ { "key": "eotc", "value": "true" } ] } }, "response": [] }, { "name": "Place a trading offer", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": " {\n \"offerId\": \"8822\",\n \"status\": \"new\",\n \"portfolioId\": \"182be0c5cdcd5072bb1864cdee4d3d6e\", \n \"limitType\": \"rfq\",\n \"orderType\": \"sell\", \n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USD\",\n \"amount\": \"0.01\"\n }" }, "url": { "raw": "{{copperHost}}/platform/offers", "host": [ "{{copperHost}}" ], "path": [ "platform", "offers" ] } }, "response": [] }, { "name": "Get additional data of the placed offer (incl. price)", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{copperHost}}/platform/offers/{offerId}", "host": [ "{{copperHost}}" ], "path": [ "platform", "offers", "{offerId}" ] } }, "response": [] }, { "name": "Create buy/sell order", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": " {\n \"externalOrderId\": \"F7FCCFD3-B61B-4467-B456-B0FC27CE4494\",\n \"offerId\": \"8822\",\n \"orderType\": \"sell\",\n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USD\",\n \"amount\": \"5\",\n \"portfolioId\": \"oishiphoosaipho9ooTikohk5foo4Wah\",\n \"limitType\": \"rfq\"\n }" }, "url": { "raw": "{{copperHost}}/platform/orders", "host": [ "{{copperHost}}" ], "path": [ "platform", "orders" ] } }, "response": [] }, { "name": "Cancel order", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/vnd.cancel-order+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{}" }, "url": { "raw": "{{copperHost}}/platform/orders/{orderId}", "host": [ "{{copperHost}}" ], "path": [ "platform", "orders", "{orderId}" ] } }, "response": [] } ] }, { "name": "Settle API", "item": [ { "name": "Get currencies and tokens supported for trading", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{copperHost}}/platform/currencies?tags=show-trading", "host": [ "{{copperHost}}" ], "path": [ "platform", "currencies" ], "query": [ { "key": "tags", "value": "show-trading" } ] } }, "response": [] }, { "name": "Create settle order", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": " {\n \"externalOrderId\": \"F7FCCFD3-B61B-4467-B456-B0FC27CE4494\",\n \"orderType\": \"buy\",\n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USD\",\n \"amount\": \"5\",\n \"portfolioId\": \"oishiphoosaipho9ooTikohk5foo4Wah\",\n \"limitType\": \"otc\",\n \"priceLimit\": \"3300.57\",\n \"counterpartyPortfolioId\": \"53453\"\n } " }, "url": { "raw": "{{copperHost}}/platform/orders", "host": [ "{{copperHost}}" ], "path": [ "platform", "orders" ] } }, "response": [] }, { "name": "Accept an OTC order", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/vnd.approve-counterparty-otc+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{}" }, "url": { "raw": "{{copperHost}}/platform/orders/{counterpartyOrderId}", "host": [ "{{copperHost}}" ], "path": [ "platform", "orders", "{counterpartyOrderId}" ] } }, "response": [] }, { "name": "Cancel an OTC order", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/vnd.cancel-order+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{}" }, "url": { "raw": "{{copperHost}}/platform/orders/{orderId}", "host": [ "{{copperHost}}" ], "path": [ "platform", "orders", "{orderId}" ] } }, "response": [] } ] }, { "name": "Transfer API", "item": [ { "name": "Create withdraw order", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": " {\n \"externalOrderId\": \"regrwegf32424\",\n \"orderType\": \"withdraw\",\n \"baseCurrency\": \"ETH\",\n \"mainCurrency\": \"ETH\",\n \"feeLevel\": \"low\",\n \"includeFeeInWithdraw\": false,\n \"amount\": \"0.3\",\n \"portfolioId\": \"sDnucVFWzwR5ifnkokv9BQjL\",\n \"toAddress\": \"0xda31ceba4ada20d91bcb2951ceb47b7552af124d\"\n }" }, "url": { "raw": "{{copperHost}}/platform/orders", "host": [ "{{copperHost}}" ], "path": [ "platform", "orders" ] } }, "response": [] }, { "name": "Cancel a transfer order", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/vnd.cancel-order+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{}" }, "url": { "raw": "{{copperHost}}/platform/orders/{orderId}", "host": [ "{{copperHost}}" ], "path": [ "platform", "orders", "{orderId}" ] } }, "response": [] }, { "name": "\"Dry-run\" for a withdrawal order", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": " {\n \"orderType\": \"withdraw\",\n \"baseCurrency\": \"BTC\",\n \"mainCurrency\": \"BTC\",\n \"amount\": \"0.00600000\",\n \"portfolioId\": \"ck7oofls7000u3b5q7rlkgbxp\", \n \"toAddress\": \"169WoSkY83Cqd2hdX8wothUC7Z2kNW4jDm\"\n }" }, "url": { "raw": "{{copperHost}}/platform/dry-run-orders", "host": [ "{{copperHost}}" ], "path": [ "platform", "dry-run-orders" ] } }, "response": [] }, { "name": "Create withdraw order Copy", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": " {\n \"externalOrderId\": \"regrwegf32424\",\n \"orderType\": \"withdraw\",\n \"baseCurrency\": \"ETH\",\n \"mainCurrency\": \"ETH\",\n \"amount\": \"0.3\",\n \"portfolioId\": \"sDnucVFWzwR5ifnkokv9BQjL\",\n \"toAddress\": \"0xda31ceba4ada20d91bcb2951ceb47b7552af124d\"\n }" }, "url": { "raw": "{{copperHost}}/platform/orders", "host": [ "{{copperHost}}" ], "path": [ "platform", "orders" ] } }, "response": [] } ] }, { "name": "Wallet Messages API", "item": [ { "name": "Get all wallet messages", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{copperHost}}/platform/wallet-messages?limit=1&offset=0", "host": [ "{{copperHost}}" ], "path": [ "platform", "wallet-messages" ], "query": [ { "key": "limit", "value": "1" }, { "key": "offset", "value": "0" } ] } }, "response": [] }, { "name": "Get a wallet message by its ID", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{copperHost}}/platform/wallet-messages/{messageId}", "host": [ "{{copperHost}}" ], "path": [ "platform", "wallet-messages", "{messageId}" ] } }, "response": [] }, { "name": "Cancel message", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/vnd.cancel-wallet-message+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{}" }, "url": { "raw": "{{copperHost}}/platform/wallet-messages/{messageId}", "host": [ "{{copperHost}}" ], "path": [ "platform", "wallet-messages", "{messageId}" ] } }, "response": [] } ] }, { "name": "Deposit API", "item": [ { "name": "Create new deposit target", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": " {\n \"externalId\": \"111111211111111\", \n \"portfolioId\": \"DZXIxJt0AdOKkEZGmf2FwrZY\",\n \"currency\": \"USDT\",\n \"mainCurrency\": \"ETH\",\n \"name\": \"Test\",\n \"metadata\": {\n \"tags\": [\"test\"]\n }\n }" }, "url": { "raw": "{{copperHost}}/platform/deposit-targets", "host": [ "{{copperHost}}" ], "path": [ "platform", "deposit-targets" ] } }, "response": [] }, { "name": "Get list of deposit targets", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "X-Timestamp", "type": "text", "value": "{{copperCurrentMillis}}" }, { "key": "Authorization", "type": "text", "value": "apikey {{copperApiKey}}" }, { "key": "X-Signature", "type": "text", "value": "{{copperSignature}}" }, { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "url": { "raw": "{{copperHost}}/platform/deposit-targets", "host": [ "{{copperHost}}" ], "path": [ "platform", "deposit-targets" ] } }, "response": [] }, { "name": "Activate token for a deposit target", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/vnd.activate-deposit-target-currency+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"currency\": \"ALGO\"\n}" }, "url": { "raw": "{{copperHost}}/platform/deposit-targets/{depositTargetId}", "host": [ "{{copperHost}}" ], "path": [ "platform", "deposit-targets", "{depositTargetId}" ] } }, "response": [] } ] }, { "name": "Copper Unlimited Online workflow", "item": [ { "name": "1. Create withdraw order", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": " {\n \"externalOrderId\": \"regrwegf32424\",\n \"orderType\": \"withdraw\",\n \"baseCurrency\": \"ETH\",\n \"mainCurrency\": \"ETH\",\n \"feeLevel\": \"low\",\n \"includeFeeInWithdraw\": false,\n \"amount\": \"0.3\",\n \"portfolioId\": \"sDnucVFWzwR5ifnkokv9BQjL\",\n \"toAddress\": \"0xda31ceba4ada20d91bcb2951ceb47b7552af124d\"\n }" }, "url": { "raw": "{{copperHost}}/platform/orders", "host": [ "{{copperHost}}" ], "path": [ "platform", "orders" ] } }, "response": [] }, { "name": "2. Start the transaction settlement flow", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/vnd.upload-part-signed-tx+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{}" }, "url": { "raw": "{{copperHost}}/platform/orders/{orderId}", "host": [ "{{copperHost}}" ], "path": [ "platform", "orders", "{orderId}" ] } }, "response": [] }, { "name": "3. Sign the transaction asynchronously", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"type\": \"request\",\r\n \"keyPassword\": \"\",\r\n \"keyFilename\": \"WarmTestADA2.copper\",\r\n \"transactionRequestId\": \"323eddb1-4ce3-4628-9be9-d5c56ef398a5\",\r\n \"masterPassword\": \"\",\r\n \"apiKey\": \"\",\r\n \"apiSecret\": \"\",\r\n \"signRequest\": {\r\n \"{\"publicKeyHash\":\"ecdd5c92144de090c0396eb50e6c13989164806e5d3324375513ac7fb3cb965c\",\r\n \"transactionRequestId\":\"323eddb1-4ce3-4628-9be9-d5c56ef398a5\",\r\n \"currency\":\"ADA\",\r\n \"mainCurrency\":\"ADA\",\r\n \"amount\":\"100000000\",\r\n \"toAddress\":\"addr_test1vz9638q4rlxr4epvaxtqq7zs2yfazwzlu9tq7y6wgj2s6qcrgv58p\",\r\n \"includeFee\":false,\r\n \"transactionRequest\":{\"fee\":\"168889\",\"inputs\":[{\"txId\":\"8d87f4b60533568d92a3552b83c94107510444128f2b99d788a2da2d58197ff5\",\"value\":\"100000000\",\"txIndex\":\"0\"},{\"txId\":\"8ab9081ae480d3ebd8443553acef987c5f69b7f03353ca429c4c45824d4ceded\",\"value\":\"95472825\",\"txIndex\":\"0\"}],\"outputs\":[{\"value\":\"100000000\",\"address\":\"addr_test1vz9638q4rlxr4epvaxtqq7zs2yfazwzlu9tq7y6wgj2s6qcrgv58p\"}],\"includeFee\":false,\"currentSlot\":\"41571066\",\"nonceNumber\":\"35\",\"changeAmount\":\"95303936\",\"transactionType\":\"send\"},\"type\":\"request\"\r\n }\r\n}" }, "url": { "raw": "http://0.0.0.0:3010/sign-async", "protocol": "http", "host": [ "0", "0", "0", "0" ], "port": "3010", "path": [ "sign-async" ] } }, "response": [] }, { "name": "4. Get transaction status (optional)", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"type\": \"request\",\r\n \"keyPassword\": \"\",\r\n \"keyFilename\": \"WarmTestADA2.copper\",\r\n \"transactionRequestId\": \"323eddb1-4ce3-4628-9be9-d5c56ef398a5\",\r\n \"masterPassword\": \"\",\r\n \"apiKey\": \"\",\r\n \"apiSecret\": \"\",\r\n \"signRequest\": {\r\n \"{\"publicKeyHash\":\"ecdd5c92144de090c0396eb50e6c13989164806e5d3324375513ac7fb3cb965c\",\r\n \"transactionRequestId\":\"323eddb1-4ce3-4628-9be9-d5c56ef398a5\",\r\n \"currency\":\"ADA\",\r\n \"mainCurrency\":\"ADA\",\r\n \"amount\":\"100000000\",\r\n \"toAddress\":\"addr_test1vz9638q4rlxr4epvaxtqq7zs2yfazwzlu9tq7y6wgj2s6qcrgv58p\",\r\n \"includeFee\":false,\r\n \"transactionRequest\":{\"fee\":\"168889\",\"inputs\":[{\"txId\":\"8d87f4b60533568d92a3552b83c94107510444128f2b99d788a2da2d58197ff5\",\"value\":\"100000000\",\"txIndex\":\"0\"},{\"txId\":\"8ab9081ae480d3ebd8443553acef987c5f69b7f03353ca429c4c45824d4ceded\",\"value\":\"95472825\",\"txIndex\":\"0\"}],\"outputs\":[{\"value\":\"100000000\",\"address\":\"addr_test1vz9638q4rlxr4epvaxtqq7zs2yfazwzlu9tq7y6wgj2s6qcrgv58p\"}],\"includeFee\":false,\"currentSlot\":\"41571066\",\"nonceNumber\":\"35\",\"changeAmount\":\"95303936\",\"transactionType\":\"send\"},\"type\":\"request\"\r\n }\r\n}" }, "url": { "raw": "http://0.0.0.0:3010/sign-async/{transactionRequestId}", "protocol": "http", "host": [ "0", "0", "0", "0" ], "port": "3010", "path": [ "sign-async", "{transactionRequestId}" ], "query": [ { "key": "", "value": "", "disabled": true } ] } }, "response": [] } ] }, { "name": "(deprecated) Copper Unlimited Online workflow", "item": [ { "name": "1. Create withdraw order", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": " {\n \"externalOrderId\": \"regrwegf32424\",\n \"orderType\": \"withdraw\",\n \"baseCurrency\": \"ETH\",\n \"mainCurrency\": \"ETH\",\n \"amount\": \"0.3\",\n \"portfolioId\": \"sDnucVFWzwR5ifnkokv9BQjL\",\n \"toAddress\": \"0xda31ceba4ada20d91bcb2951ceb47b7552af124d\"\n }" }, "url": { "raw": "{{copperHost}}/platform/orders", "host": [ "{{copperHost}}" ], "path": [ "platform", "orders" ] } }, "response": [] }, { "name": "2. Start the transaction settlement flow", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/vnd.upload-part-signed-tx+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{}" }, "url": { "raw": "{{copperHost}}/platform/orders/{orderId}", "host": [ "{{copperHost}}" ], "path": [ "platform", "orders", "{orderId}" ] } }, "response": [] }, { "name": "3. Sign the transaction", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"type\": \"request\",\r\n \"keyPassword\": \"\",\r\n \"keyFilename\": \"WarmTestADA2.copper\",\r\n \"transactionRequestId\": \"323eddb1-4ce3-4628-9be9-d5c56ef398a5\",\r\n \"masterPassword\": \"\",\r\n \"apiKey\": \"\",\r\n \"apiSecret\": \"\",\r\n \"signRequest\": {\r\n \"{\"publicKeyHash\":\"ecdd5c92144de090c0396eb50e6c13989164806e5d3324375513ac7fb3cb965c\",\r\n \"transactionRequestId\":\"323eddb1-4ce3-4628-9be9-d5c56ef398a5\",\r\n \"currency\":\"ADA\",\r\n \"mainCurrency\":\"ADA\",\r\n \"amount\":\"100000000\",\r\n \"toAddress\":\"addr_test1vz9638q4rlxr4epvaxtqq7zs2yfazwzlu9tq7y6wgj2s6qcrgv58p\",\r\n \"includeFee\":false,\r\n \"transactionRequest\":{\"fee\":\"168889\",\"inputs\":[{\"txId\":\"8d87f4b60533568d92a3552b83c94107510444128f2b99d788a2da2d58197ff5\",\"value\":\"100000000\",\"txIndex\":\"0\"},{\"txId\":\"8ab9081ae480d3ebd8443553acef987c5f69b7f03353ca429c4c45824d4ceded\",\"value\":\"95472825\",\"txIndex\":\"0\"}],\"outputs\":[{\"value\":\"100000000\",\"address\":\"addr_test1vz9638q4rlxr4epvaxtqq7zs2yfazwzlu9tq7y6wgj2s6qcrgv58p\"}],\"includeFee\":false,\"currentSlot\":\"41571066\",\"nonceNumber\":\"35\",\"changeAmount\":\"95303936\",\"transactionType\":\"send\"},\"type\":\"request\"\r\n }\r\n}" }, "url": { "raw": "http://0.0.0.0:3010/sign-async", "protocol": "http", "host": [ "0", "0", "0", "0" ], "port": "3010", "path": [ "sign-async" ] } }, "response": [] }, { "name": "4. Upload the partly-signed transaction", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/vnd.start-custody-settlement+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{}" }, "url": { "raw": "{{copperHost}}/platform/orders/{orderId}", "host": [ "{{copperHost}}" ], "path": [ "platform", "orders", "{orderId}" ] } }, "response": [] } ] }, { "name": "Get latest orders", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{copperHost}}/platform/orders", "host": [ "{{copperHost}}" ], "path": [ "platform", "orders" ] } }, "response": [] }, { "name": "Get supported currencies", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "X-Timestamp", "value": "{{copperCurrentMillis}}", "type": "text" }, { "key": "Authorization", "value": "apikey {{copperApiKey}}", "type": "text" }, { "key": "X-Signature", "value": "{{copperSignature}}", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "{{copperHost}}/platform/currencies?currency=BTC&rateFor=USD", "host": [ "{{copperHost}}" ], "path": [ "platform", "currencies" ], "query": [ { "key": "currency", "value": "BTC" }, { "key": "rateFor", "value": "USD" } ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "var uuid = require('uuid');", "", "var guid = uuid.v4()", "", "function computeHttpSignature(config) {", " var hashf = (function() {", " switch (config.algorithm) {", " case 'hmac-sha1': return CryptoJS.HmacSHA1;", " case 'hmac-sha256': return CryptoJS.HmacSHA256;", " case 'hmac-sha512': return CryptoJS.HmacSHA512;", " default : return null;", " }", " }());", "", " var hash = hashf(config.data, config.secretkey);", "", " return hash;", "}", "", "", "var copperHost = environment.copperHost || pm.collectionVariables.get('copperHost');", "var copperApiKey = environment.copperApiKey || pm.collectionVariables.get('copperApiKey');", "var copperApiSecret = environment.copperApiSecret || pm.collectionVariables.get('copperApiSecret');", "var currentMillis = Date.now();", "var targetUrl = request.url.trim(); // there may be surrounding ws", "targetUrl = targetUrl.replace(\"{{copperHost}}\", copperHost);", "targetUrl = targetUrl.replace(new RegExp('^https?://[^/]+/'),'/'); // strip hostname", "targetUrl = targetUrl.replace(\"localhost:8080\", \"\");", "var method = request.method.toUpperCase();", "var body = (request.data && typeof request.data != 'object') ? request.data.replace(\"{{copperExternalId}}\", guid) : \"\"", "", "var config = {", " algorithm : 'hmac-sha256',", " apiKey : copperApiKey,", " secretkey : copperApiSecret,", " data: currentMillis + method + targetUrl + body", " };", "", "var sig = computeHttpSignature(config);", "", "postman.setEnvironmentVariable('copperExternalId', guid);", "postman.setEnvironmentVariable('copperSignature', sig);", "postman.setEnvironmentVariable(\"copperCurrentMillis\", currentMillis);" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "key": "copperHost", "value": "" }, { "key": "copperApiKey", "value": "" }, { "key": "copperApiSecret", "value": "" } ] }