New order
2 min
📝 description creates a buy or sell order using a valid quote the request must include an authorization header and an idempotencykey to avoid processing duplicate submissions the order remains pending until it is executed and settled { "name" "/api/trade/v1/new order", "method" "get", "url" "https //cloudbreak cambyopro com/api/trade/v1/new order", "description" "creates a new buy or sell order", "tab" "examples", "examples" { "languages" \[ { "id" "wrjsddcximaw1kstkeizd", "language" "curl", "code" "curl request get \\\\\n url https //cloudbreak cambyopro com/api/trade/v1/new order \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n header 'authorization string' \\\\\n data '{\n \\"idempotencykey\\" \\"string\\",\n \\"side\\" \\"string\\",\n \\"pair\\" \\"string\\",\n \\"settlement\\" \\"string\\",\n \\"amout\\" \\"string\\",\n \\"currency amount\\" \\"string\\"\n }'", "customlabel" "" }, { "id" "np6xe 1ln6b2egd3kcdqm", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'get',\n 'url' 'https //cloudbreak cambyopro com/api/trade/v1/new order',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json',\n 'authorization' 'string'\n },\n body json stringify({\n \\"idempotencykey\\" \\"string\\",\n \\"side\\" \\"string\\",\n \\"pair\\" \\"string\\",\n \\"settlement\\" \\"string\\",\n \\"amout\\" \\"string\\",\n \\"currency amount\\" \\"string\\"\n })\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "mliwmsd04x8ao7zxjlbcz", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\nmyheaders append(\\"authorization\\", \\"string\\");\n\nvar raw = json stringify({\n \\"idempotencykey\\" \\"string\\",\n \\"side\\" \\"string\\",\n \\"pair\\" \\"string\\",\n \\"settlement\\" \\"string\\",\n \\"amout\\" \\"string\\",\n \\"currency amount\\" \\"string\\"\n});\n\nvar requestoptions = {\n method 'get',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //cloudbreak cambyopro com/api/trade/v1/new order\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "asj dobqrex27sgpowyh", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //cloudbreak cambyopro com/api/trade/v1/new order\\"\n\npayload = json dumps({\n \\"idempotencykey\\" \\"string\\",\n \\"side\\" \\"string\\",\n \\"pair\\" \\"string\\",\n \\"settlement\\" \\"string\\",\n \\"amout\\" \\"string\\",\n \\"currency amount\\" \\"string\\"\n})\nheaders = {\n 'accept' 'application/json',\n 'content type' 'application/json',\n 'authorization' 'string'\n}\n\nresponse = requests request(\\"get\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "j07rhoup1f4ezb9caxiwv", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //cloudbreak cambyopro com/api/trade/v1/new order\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http get new(url)\nrequest\[\\"accept\\"] = \\"application/json\\"\nrequest\[\\"content type\\"] = \\"application/json\\"\nrequest\[\\"authorization\\"] = \\"string\\"\nrequest body = json dump({\n \\"idempotencykey\\" \\"string\\",\n \\"side\\" \\"string\\",\n \\"pair\\" \\"string\\",\n \\"settlement\\" \\"string\\",\n \\"amout\\" \\"string\\",\n \\"currency amount\\" \\"string\\"\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "wrjsddcximaw1kstkeizd" }, "results" { "languages" \[ { "id" "hqngb8bxs6zzosl8szf l", "language" "200", "code" "{\n \\"success\\" true,\n \\"message\\" \\"order created successfully \\",\n \\"ordercode\\" \\"8654307\\",\n \\"status\\" \\"pending\\",\n \\"createdat\\" \\"2025 10 26t14 16 48 754z\\",\n \\"price\\" 5 728,\n \\"currency amount\\" \\"usdt\\",\n \\"qty\\" 100,\n \\"execute\\" {\n \\"status order\\" \\"processing\\",\n \\"error\\" \\"failed to execute order \\"\n },\n \\"retry settlement\\" {\n \\"success\\" true,\n \\"brokerage\\" {}\n }\n}", "customlabel" "" }, { "id" "bk04ai34nltnvfwal8zdu", "language" "401", "code" "{\n \\"success\\" false,\n \\"message\\" \\"missing bearer token\\"\n}", "customlabel" "" }, { "id" "m7lj7ksldqsva5gnztz8b", "language" "409", "code" "{\n \\"success\\" false,\n \\"message\\" \\"idempotency key already used for this account \\"\n}", "customlabel" "" }, { "id" "zjfrx41h6zujsmupgwl9p", "language" "422", "code" "{\n \\"success\\" false,\n \\"message\\" \\"the given data was invalid \\"\n}", "customlabel" "" }, { "id" "gju acazpxyfim ecp2jl", "language" "502", "code" "{\n \\"success\\" false,\n \\"message\\" \\"failed to create order \\"\n}", "customlabel" "" } ], "selectedlanguageid" "hqngb8bxs6zzosl8szf l" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[ { "name" "authorization", "kind" "required", "type" "string", "description" "bearer {{accesstoken}}", "" "bearer {{accesstoken}}" } ], "bodydataparameters" \[ { "name" "idempotencykey", "kind" "required", "type" "string", "description" "idempotency code used to uniquely identify the request and prevent duplicate processing must be a string between 1 and 36 characters ", "" "idempotency code used to uniquely identify the request and prevent duplicate processing must be a string between 1 and 36 characters " }, { "name" "side", "kind" "required", "type" "string", "description" "buy or sell\n", "" "buy or sell\n" }, { "name" "pair", "kind" "required", "type" "string", "description" "currency pair in the format usdt brl", "" "currency pair in the format usdt brl" }, { "name" "settlement", "kind" "required", "type" "string", "description" "fastest, d0/d0 e d1/d1", "" "fastest, d0/d0 e d1/d1" }, { "name" "amout", "kind" "required", "type" "string", "description" "the value cannot be less than 0 1", "" "the value cannot be less than 0 1" }, { "name" "currency amount", "kind" "required", "type" "string", "description" "brl or usdt", "" "brl or usdt" }, { "name" "market close", "kind" "optional", "type" "boolean", "description" "market status", "" "market status" }, { "name" "wallet id", "kind" "optional", "type" "string", "description" "wallet id", "" "wallet id" } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" true, "autogeneratedanchorslug" "apitradev1new order", "legacyhash" "73kqydhr0uxunk5rvsstz" }