curl --request POST \
--url https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/declines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"detail": "CATEGORY_NOT_QUOTED"
}
'import requests
url = "https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/declines"
payload = { "detail": "CATEGORY_NOT_QUOTED" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({detail: 'CATEGORY_NOT_QUOTED'})
};
fetch('https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/declines', 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://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/declines",
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([
'detail' => 'CATEGORY_NOT_QUOTED'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/declines"
payload := strings.NewReader("{\n \"detail\": \"CATEGORY_NOT_QUOTED\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/declines")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"detail\": \"CATEGORY_NOT_QUOTED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/declines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"detail\": \"CATEGORY_NOT_QUOTED\"\n}"
response = http.request(request)
puts response.read_body{
"rfq_id": "0198a78f-4d62-7abc-a188-613d1f7ccad2",
"status": "DECLINED"
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "UNAUTHENTICATED",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "FORBIDDEN",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "NOT_FOUND",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "RFQ_NOT_OPEN",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "REFRESH"
}
}{
"error": {
"code": "RATE_LIMITED",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "BACKOFF"
}
}{
"error": {
"code": "AUTHORIZATION_UNAVAILABLE",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "BACKOFF"
}
}Decline RFQ
Decline an RFQ you will not quote, so its taker does not wait out the collection window.
Requires a key for a maker with quote:write.
curl --request POST \
--url https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/declines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"detail": "CATEGORY_NOT_QUOTED"
}
'import requests
url = "https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/declines"
payload = { "detail": "CATEGORY_NOT_QUOTED" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({detail: 'CATEGORY_NOT_QUOTED'})
};
fetch('https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/declines', 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://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/declines",
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([
'detail' => 'CATEGORY_NOT_QUOTED'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/declines"
payload := strings.NewReader("{\n \"detail\": \"CATEGORY_NOT_QUOTED\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/declines")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"detail\": \"CATEGORY_NOT_QUOTED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/declines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"detail\": \"CATEGORY_NOT_QUOTED\"\n}"
response = http.request(request)
puts response.read_body{
"rfq_id": "0198a78f-4d62-7abc-a188-613d1f7ccad2",
"status": "DECLINED"
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "UNAUTHENTICATED",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "FORBIDDEN",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "NOT_FOUND",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "RFQ_NOT_OPEN",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "REFRESH"
}
}{
"error": {
"code": "RATE_LIMITED",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "BACKOFF"
}
}{
"error": {
"code": "AUTHORIZATION_UNAVAILABLE",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "BACKOFF"
}
}Authorizations
Scoped API key (ttk_...), created in the Totalis app or by a wallet-session user through the API keys routes with a fresh wallet signature; those routes never accept a key. Each key acts for one account, yours or a maker's, and holds only scopes that account can use. Each operation lists the scopes it requires. Send no Origin.
Path Parameters
The RFQ's rfq_id, from Create RFQ or RFQ_CREATED.
Body
Optional; no body declines as {} does. Decline every RFQ you will not quote: the optional detail tells Totalis why, and the taker never sees it.
Your decline of an open RFQ you will not quote. Every field is optional; {} declines without a detail.
Optional: your own short code for why you will not quote it, such as CHAIN_READ_STALE or CATEGORY_NOT_QUOTED. Stored and logged so Totalis can see why RFQs go unquoted; never shown to the taker.
^[A-Z][A-Z0-9_]{0,63}$Response
Your decline is recorded. The RFQ ends DECLINED once every maker with a live telemetry lease on the vault has declined it, no quote on it can still be accepted and no acceptance awaits an answer: status is DECLINED then, OPEN while another maker can still answer. Send no Idempotency-Key: the RFQ and your key's maker identify the one decline, so resending it answers again with the RFQ's current status and keeps your first detail. A quote you create on the RFQ after declining it withdraws the decline until you decline again.
Was this page helpful?

