curl --request POST \
--url https://api.breet.io/v1/trades/sells/sell/{id}/complete \
--header 'X-Breet-Env: <api-key>' \
--header 'x-app-id: <api-key>' \
--header 'x-app-secret: <api-key>'import requests
url = "https://api.breet.io/v1/trades/sells/sell/{id}/complete"
headers = {
"x-app-id": "<api-key>",
"x-app-secret": "<api-key>",
"X-Breet-Env": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-app-id': '<api-key>',
'x-app-secret': '<api-key>',
'X-Breet-Env': '<api-key>'
}
};
fetch('https://api.breet.io/v1/trades/sells/sell/{id}/complete', 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.breet.io/v1/trades/sells/sell/{id}/complete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Breet-Env: <api-key>",
"x-app-id: <api-key>",
"x-app-secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.breet.io/v1/trades/sells/sell/{id}/complete"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-app-id", "<api-key>")
req.Header.Add("x-app-secret", "<api-key>")
req.Header.Add("X-Breet-Env", "<api-key>")
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.breet.io/v1/trades/sells/sell/{id}/complete")
.header("x-app-id", "<api-key>")
.header("x-app-secret", "<api-key>")
.header("X-Breet-Env", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.breet.io/v1/trades/sells/sell/{id}/complete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-app-id"] = '<api-key>'
request["x-app-secret"] = '<api-key>'
request["X-Breet-Env"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "sell completed successfully",
"success": true,
"data": {},
"meta": {},
"summary": {},
"stats": {}
}Complete A Flagged Deposit With A Resolution Fee
Releases a deposit that was flagged only because it fell below the asset’s minimum, by paying the resolution fee out of the deposit itself.
Breet deducts the asset’s flagFeeUSD from the USD value actually received, converts the remainder at the current rate, credits your wallet, and fires trade.completed with flagFeeUSD populated. If auto-settlement is enabled on the address, the net amount is paid out to the linked bank account as usual.
Only deposits with status: "flagged" and passAMLCheck: true are eligible — a deposit flagged by an AML check cannot be resolved this way. The remainder after the fee must be greater than $1; when it is not, the only route is a top-up to the same address in the same asset. The call is a no-op after the deposit is credited, so a retry on an already-resolved deposit returns 404.
Read flagFeeUSD per asset from GET /trades/assets before calling, and see Deposits for the full flow.
curl --request POST \
--url https://api.breet.io/v1/trades/sells/sell/{id}/complete \
--header 'X-Breet-Env: <api-key>' \
--header 'x-app-id: <api-key>' \
--header 'x-app-secret: <api-key>'import requests
url = "https://api.breet.io/v1/trades/sells/sell/{id}/complete"
headers = {
"x-app-id": "<api-key>",
"x-app-secret": "<api-key>",
"X-Breet-Env": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-app-id': '<api-key>',
'x-app-secret': '<api-key>',
'X-Breet-Env': '<api-key>'
}
};
fetch('https://api.breet.io/v1/trades/sells/sell/{id}/complete', 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.breet.io/v1/trades/sells/sell/{id}/complete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Breet-Env: <api-key>",
"x-app-id: <api-key>",
"x-app-secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.breet.io/v1/trades/sells/sell/{id}/complete"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-app-id", "<api-key>")
req.Header.Add("x-app-secret", "<api-key>")
req.Header.Add("X-Breet-Env", "<api-key>")
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.breet.io/v1/trades/sells/sell/{id}/complete")
.header("x-app-id", "<api-key>")
.header("x-app-secret", "<api-key>")
.header("X-Breet-Env", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.breet.io/v1/trades/sells/sell/{id}/complete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-app-id"] = '<api-key>'
request["x-app-secret"] = '<api-key>'
request["X-Breet-Env"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "sell completed successfully",
"success": true,
"data": {},
"meta": {},
"summary": {},
"stats": {}
}Authorizations
Your application ID from the Breet dashboard
Your application secret from the Breet dashboard
Environment selector: sandbox or production
Path Parameters
ID of the flagged deposit (the id on the trade.flagged webhook payload).
Response
Deposit resolved, wallet credited
Was this page helpful?