curl --request POST \
--url https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"quote_id": "0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e",
"entry": {
"maker_id": "7",
"legs": [
{
"outcome_id": "1209",
"side": "YES"
}
],
"stake": "25000000",
"payout": "98500000",
"fee_bps": 100,
"taker_fee_bps": 20,
"taker": "0x1111111111111111111111111111111111111111",
"expiry": "1790452875",
"salt": "48151623429108"
}
}
'import requests
url = "https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/quotes"
payload = {
"quote_id": "0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e",
"entry": {
"maker_id": "7",
"legs": [
{
"outcome_id": "1209",
"side": "YES"
}
],
"stake": "25000000",
"payout": "98500000",
"fee_bps": 100,
"taker_fee_bps": 20,
"taker": "0x1111111111111111111111111111111111111111",
"expiry": "1790452875",
"salt": "48151623429108"
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
quote_id: '0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e',
entry: {
maker_id: '7',
legs: [{outcome_id: '1209', side: 'YES'}],
stake: '25000000',
payout: '98500000',
fee_bps: 100,
taker_fee_bps: 20,
taker: '0x1111111111111111111111111111111111111111',
expiry: '1790452875',
salt: '48151623429108'
}
})
};
fetch('https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/quotes', 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}/quotes",
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([
'quote_id' => '0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e',
'entry' => [
'maker_id' => '7',
'legs' => [
[
'outcome_id' => '1209',
'side' => 'YES'
]
],
'stake' => '25000000',
'payout' => '98500000',
'fee_bps' => 100,
'taker_fee_bps' => 20,
'taker' => '0x1111111111111111111111111111111111111111',
'expiry' => '1790452875',
'salt' => '48151623429108'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/quotes"
payload := strings.NewReader("{\n \"quote_id\": \"0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e\",\n \"entry\": {\n \"maker_id\": \"7\",\n \"legs\": [\n {\n \"outcome_id\": \"1209\",\n \"side\": \"YES\"\n }\n ],\n \"stake\": \"25000000\",\n \"payout\": \"98500000\",\n \"fee_bps\": 100,\n \"taker_fee_bps\": 20,\n \"taker\": \"0x1111111111111111111111111111111111111111\",\n \"expiry\": \"1790452875\",\n \"salt\": \"48151623429108\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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}/quotes")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quote_id\": \"0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e\",\n \"entry\": {\n \"maker_id\": \"7\",\n \"legs\": [\n {\n \"outcome_id\": \"1209\",\n \"side\": \"YES\"\n }\n ],\n \"stake\": \"25000000\",\n \"payout\": \"98500000\",\n \"fee_bps\": 100,\n \"taker_fee_bps\": 20,\n \"taker\": \"0x1111111111111111111111111111111111111111\",\n \"expiry\": \"1790452875\",\n \"salt\": \"48151623429108\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote_id\": \"0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e\",\n \"entry\": {\n \"maker_id\": \"7\",\n \"legs\": [\n {\n \"outcome_id\": \"1209\",\n \"side\": \"YES\"\n }\n ],\n \"stake\": \"25000000\",\n \"payout\": \"98500000\",\n \"fee_bps\": 100,\n \"taker_fee_bps\": 20,\n \"taker\": \"0x1111111111111111111111111111111111111111\",\n \"expiry\": \"1790452875\",\n \"salt\": \"48151623429108\"\n }\n}"
response = http.request(request)
puts response.read_body{
"quote_id": "0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e"
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}Create quote
Create a quote in response to an RFQ.
Requires a key for a maker with quote:write.
curl --request POST \
--url https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"quote_id": "0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e",
"entry": {
"maker_id": "7",
"legs": [
{
"outcome_id": "1209",
"side": "YES"
}
],
"stake": "25000000",
"payout": "98500000",
"fee_bps": 100,
"taker_fee_bps": 20,
"taker": "0x1111111111111111111111111111111111111111",
"expiry": "1790452875",
"salt": "48151623429108"
}
}
'import requests
url = "https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/quotes"
payload = {
"quote_id": "0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e",
"entry": {
"maker_id": "7",
"legs": [
{
"outcome_id": "1209",
"side": "YES"
}
],
"stake": "25000000",
"payout": "98500000",
"fee_bps": 100,
"taker_fee_bps": 20,
"taker": "0x1111111111111111111111111111111111111111",
"expiry": "1790452875",
"salt": "48151623429108"
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
quote_id: '0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e',
entry: {
maker_id: '7',
legs: [{outcome_id: '1209', side: 'YES'}],
stake: '25000000',
payout: '98500000',
fee_bps: 100,
taker_fee_bps: 20,
taker: '0x1111111111111111111111111111111111111111',
expiry: '1790452875',
salt: '48151623429108'
}
})
};
fetch('https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/quotes', 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}/quotes",
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([
'quote_id' => '0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e',
'entry' => [
'maker_id' => '7',
'legs' => [
[
'outcome_id' => '1209',
'side' => 'YES'
]
],
'stake' => '25000000',
'payout' => '98500000',
'fee_bps' => 100,
'taker_fee_bps' => 20,
'taker' => '0x1111111111111111111111111111111111111111',
'expiry' => '1790452875',
'salt' => '48151623429108'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/quotes"
payload := strings.NewReader("{\n \"quote_id\": \"0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e\",\n \"entry\": {\n \"maker_id\": \"7\",\n \"legs\": [\n {\n \"outcome_id\": \"1209\",\n \"side\": \"YES\"\n }\n ],\n \"stake\": \"25000000\",\n \"payout\": \"98500000\",\n \"fee_bps\": 100,\n \"taker_fee_bps\": 20,\n \"taker\": \"0x1111111111111111111111111111111111111111\",\n \"expiry\": \"1790452875\",\n \"salt\": \"48151623429108\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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}/quotes")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quote_id\": \"0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e\",\n \"entry\": {\n \"maker_id\": \"7\",\n \"legs\": [\n {\n \"outcome_id\": \"1209\",\n \"side\": \"YES\"\n }\n ],\n \"stake\": \"25000000\",\n \"payout\": \"98500000\",\n \"fee_bps\": 100,\n \"taker_fee_bps\": 20,\n \"taker\": \"0x1111111111111111111111111111111111111111\",\n \"expiry\": \"1790452875\",\n \"salt\": \"48151623429108\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hip4-api.totalis.trade/v1/rfqs/{rfq_id}/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote_id\": \"0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e\",\n \"entry\": {\n \"maker_id\": \"7\",\n \"legs\": [\n {\n \"outcome_id\": \"1209\",\n \"side\": \"YES\"\n }\n ],\n \"stake\": \"25000000\",\n \"payout\": \"98500000\",\n \"fee_bps\": 100,\n \"taker_fee_bps\": 20,\n \"taker\": \"0x1111111111111111111111111111111111111111\",\n \"expiry\": \"1790452875\",\n \"salt\": \"48151623429108\"\n }\n}"
response = http.request(request)
puts response.read_body{
"quote_id": "0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e"
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}Authorizations
Scoped API key from the Totalis app settings. 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.
Headers
Lowercase UUIDv7 naming this command, unique per caller and route. A retry with the same key and body returns the original result; the same key with a different body returns 409 IDEMPOTENCY_KEY_REUSED.
^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$Path Parameters
The RFQ's rfq_id, from Create RFQ or RFQ_CREATED.
Body
- Entry
- Sell back
- Transfer
Your quote on the RFQ: quote_id plus exactly one set of terms. Send entry for an entry RFQ, and sell_back or transfer for a cash-out RFQ. It replaces your live quote on the RFQ.
EIP-712 digest of entry, as the Quote struct. It must match the terms exactly. You sign it when you confirm an acceptance, and it becomes the position_id of the position the trade opens.
^0x[0-9a-f]{64}$Entry terms. stake, taker and legs must match the RFQ, maker_id must be your maker, and expiry is Unix seconds, at most 30 seconds ahead.
Show child attributes
Show child attributes
Response
The quote is live on the RFQ, or an exact retry returned it. It is unsigned and nothing is on chain: the taker receives it as QUOTE_CREATED and can accept it until expiry, and you sign only when you confirm that acceptance.
The created quote's ID.
ID of the created quote: the digest of its terms.
^0x[0-9a-f]{64}$Was this page helpful?

