curl --request POST \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/rfq \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "<string>",
"client_quote_id": "f69a20b1-4ac4-420e-90b5-814a12565bfa",
"limit_price": "<string>",
"base_quantity": "<string>",
"quote_value": "<string>",
"settl_currency": "<string>",
"quote_duration_ms": "5000"
}
'import requests
url = "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/rfq"
payload = {
"product_id": "<string>",
"client_quote_id": "f69a20b1-4ac4-420e-90b5-814a12565bfa",
"limit_price": "<string>",
"base_quantity": "<string>",
"quote_value": "<string>",
"settl_currency": "<string>",
"quote_duration_ms": "5000"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
product_id: '<string>',
client_quote_id: 'f69a20b1-4ac4-420e-90b5-814a12565bfa',
limit_price: '<string>',
base_quantity: '<string>',
quote_value: '<string>',
settl_currency: '<string>',
quote_duration_ms: '5000'
})
};
fetch('https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/rfq', 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.prime.coinbase.com/v1/portfolios/{portfolio_id}/rfq",
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([
'product_id' => '<string>',
'client_quote_id' => 'f69a20b1-4ac4-420e-90b5-814a12565bfa',
'limit_price' => '<string>',
'base_quantity' => '<string>',
'quote_value' => '<string>',
'settl_currency' => '<string>',
'quote_duration_ms' => '5000'
]),
CURLOPT_HTTPHEADER => [
"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://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/rfq"
payload := strings.NewReader("{\n \"product_id\": \"<string>\",\n \"client_quote_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"limit_price\": \"<string>\",\n \"base_quantity\": \"<string>\",\n \"quote_value\": \"<string>\",\n \"settl_currency\": \"<string>\",\n \"quote_duration_ms\": \"5000\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/rfq")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"<string>\",\n \"client_quote_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"limit_price\": \"<string>\",\n \"base_quantity\": \"<string>\",\n \"quote_value\": \"<string>\",\n \"settl_currency\": \"<string>\",\n \"quote_duration_ms\": \"5000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/rfq")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_id\": \"<string>\",\n \"client_quote_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"limit_price\": \"<string>\",\n \"base_quantity\": \"<string>\",\n \"quote_value\": \"<string>\",\n \"settl_currency\": \"<string>\",\n \"quote_duration_ms\": \"5000\"\n}"
response = http.request(request)
puts response.read_body{
"quote_id": "<string>",
"expiration_time": "2023-11-07T05:31:56Z",
"best_price": "<string>",
"order_total": "<string>",
"price_inclusive_of_fees": "<string>",
"quote_duration_ms": "5000"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"subcode": "ENTITY_ID_INVALID",
"trace_id": "<string>"
}{
"code": "PERMISSION_DENIED",
"message": "<string>",
"subcode": "AUTH_RESOURCE_ACCESS_DENIED",
"trace_id": "<string>"
}{
"code": "RESOURCE_NOT_FOUND",
"message": "<string>",
"subcode": "AUTH_RESOURCE_NOT_FOUND",
"trace_id": "<string>"
}{
"code": "RATE_LIMIT_EXCEEDED",
"message": "<string>",
"subcode": "SERVER_RATE_LIMIT_EXCEEDED",
"trace_id": "<string>"
}{
"code": "SERVICE_UNAVAILABLE",
"message": "<string>",
"subcode": "SERVER_MAINTENANCE_MODE_ACTIVE",
"trace_id": "<string>"
}Create Quote Request
A Quote Request is the start of the RFQ process. Coinbase Prime sends a Quote Request to Liquidity Providers (LPs) on behalf of a customer looking to participate in an RFQ trade.
Always required: portfolio_id, product_id, side, client_quote_id, and limit_price. One of either base_quantity or quote_value is always required.
curl --request POST \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/rfq \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "<string>",
"client_quote_id": "f69a20b1-4ac4-420e-90b5-814a12565bfa",
"limit_price": "<string>",
"base_quantity": "<string>",
"quote_value": "<string>",
"settl_currency": "<string>",
"quote_duration_ms": "5000"
}
'import requests
url = "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/rfq"
payload = {
"product_id": "<string>",
"client_quote_id": "f69a20b1-4ac4-420e-90b5-814a12565bfa",
"limit_price": "<string>",
"base_quantity": "<string>",
"quote_value": "<string>",
"settl_currency": "<string>",
"quote_duration_ms": "5000"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
product_id: '<string>',
client_quote_id: 'f69a20b1-4ac4-420e-90b5-814a12565bfa',
limit_price: '<string>',
base_quantity: '<string>',
quote_value: '<string>',
settl_currency: '<string>',
quote_duration_ms: '5000'
})
};
fetch('https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/rfq', 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.prime.coinbase.com/v1/portfolios/{portfolio_id}/rfq",
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([
'product_id' => '<string>',
'client_quote_id' => 'f69a20b1-4ac4-420e-90b5-814a12565bfa',
'limit_price' => '<string>',
'base_quantity' => '<string>',
'quote_value' => '<string>',
'settl_currency' => '<string>',
'quote_duration_ms' => '5000'
]),
CURLOPT_HTTPHEADER => [
"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://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/rfq"
payload := strings.NewReader("{\n \"product_id\": \"<string>\",\n \"client_quote_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"limit_price\": \"<string>\",\n \"base_quantity\": \"<string>\",\n \"quote_value\": \"<string>\",\n \"settl_currency\": \"<string>\",\n \"quote_duration_ms\": \"5000\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/rfq")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"<string>\",\n \"client_quote_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"limit_price\": \"<string>\",\n \"base_quantity\": \"<string>\",\n \"quote_value\": \"<string>\",\n \"settl_currency\": \"<string>\",\n \"quote_duration_ms\": \"5000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/rfq")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_id\": \"<string>\",\n \"client_quote_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"limit_price\": \"<string>\",\n \"base_quantity\": \"<string>\",\n \"quote_value\": \"<string>\",\n \"settl_currency\": \"<string>\",\n \"quote_duration_ms\": \"5000\"\n}"
response = http.request(request)
puts response.read_body{
"quote_id": "<string>",
"expiration_time": "2023-11-07T05:31:56Z",
"best_price": "<string>",
"order_total": "<string>",
"price_inclusive_of_fees": "<string>",
"quote_duration_ms": "5000"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"subcode": "ENTITY_ID_INVALID",
"trace_id": "<string>"
}{
"code": "PERMISSION_DENIED",
"message": "<string>",
"subcode": "AUTH_RESOURCE_ACCESS_DENIED",
"trace_id": "<string>"
}{
"code": "RESOURCE_NOT_FOUND",
"message": "<string>",
"subcode": "AUTH_RESOURCE_NOT_FOUND",
"trace_id": "<string>"
}{
"code": "RATE_LIMIT_EXCEEDED",
"message": "<string>",
"subcode": "SERVER_RATE_LIMIT_EXCEEDED",
"trace_id": "<string>"
}{
"code": "SERVICE_UNAVAILABLE",
"message": "<string>",
"subcode": "SERVER_MAINTENANCE_MODE_ACTIVE",
"trace_id": "<string>"
}Path Parameters
The ID of the portfolio that owns the order
Body
based off PostOrderPreviewRequest
- UNKNOWN_ORDER_SIDE: nil value
- BUY: Buy order
- SELL: Sell order
BUY, SELL A client-generated order ID used for reference purposes (note: order will be rejected if this ID is not unique among all currently active orders)
"f69a20b1-4ac4-420e-90b5-814a12565bfa"
Optional quote timeout in milliseconds. Defaults to 3000 ms (3 seconds) if not specified. Maximum allowed value is 30000 ms (30 seconds); requests with a larger value are rejected. Mirrors FIX tag 8090 (QuoteRequestGoodForMs).
"5000"
Response
A successful response.
Echo of the quote_duration_ms supplied in the request. 0 if the client did not supply a value, in which case the server applies the default of 3000 ms (3 seconds).
"5000"
Was this page helpful?