Accept Quote
curl --request POST \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/accept_quote \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "<string>",
"client_order_id": "f69a20b1-4ac4-420e-90b5-814a12565bfa",
"quote_id": "f69a20b1-4ac4-420e-90b5-814a12565bfa",
"settl_currency": "<string>"
}
'import requests
url = "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/accept_quote"
payload = {
"product_id": "<string>",
"client_order_id": "f69a20b1-4ac4-420e-90b5-814a12565bfa",
"quote_id": "f69a20b1-4ac4-420e-90b5-814a12565bfa",
"settl_currency": "<string>"
}
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_order_id: 'f69a20b1-4ac4-420e-90b5-814a12565bfa',
quote_id: 'f69a20b1-4ac4-420e-90b5-814a12565bfa',
settl_currency: '<string>'
})
};
fetch('https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/accept_quote', 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}/accept_quote",
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_order_id' => 'f69a20b1-4ac4-420e-90b5-814a12565bfa',
'quote_id' => 'f69a20b1-4ac4-420e-90b5-814a12565bfa',
'settl_currency' => '<string>'
]),
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}/accept_quote"
payload := strings.NewReader("{\n \"product_id\": \"<string>\",\n \"client_order_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"quote_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"settl_currency\": \"<string>\"\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}/accept_quote")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"<string>\",\n \"client_order_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"quote_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"settl_currency\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/accept_quote")
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_order_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"quote_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"settl_currency\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"order_id": "<string>"
}Orders
Accept Quote
Accepts the quote received by the quote request and creates an order with the provided quote ID.
Always required: portfolio_id, product_id, side, quote_id, client_quote_id.
POST
/
v1
/
portfolios
/
{portfolio_id}
/
accept_quote
Accept Quote
curl --request POST \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/accept_quote \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "<string>",
"client_order_id": "f69a20b1-4ac4-420e-90b5-814a12565bfa",
"quote_id": "f69a20b1-4ac4-420e-90b5-814a12565bfa",
"settl_currency": "<string>"
}
'import requests
url = "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/accept_quote"
payload = {
"product_id": "<string>",
"client_order_id": "f69a20b1-4ac4-420e-90b5-814a12565bfa",
"quote_id": "f69a20b1-4ac4-420e-90b5-814a12565bfa",
"settl_currency": "<string>"
}
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_order_id: 'f69a20b1-4ac4-420e-90b5-814a12565bfa',
quote_id: 'f69a20b1-4ac4-420e-90b5-814a12565bfa',
settl_currency: '<string>'
})
};
fetch('https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/accept_quote', 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}/accept_quote",
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_order_id' => 'f69a20b1-4ac4-420e-90b5-814a12565bfa',
'quote_id' => 'f69a20b1-4ac4-420e-90b5-814a12565bfa',
'settl_currency' => '<string>'
]),
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}/accept_quote"
payload := strings.NewReader("{\n \"product_id\": \"<string>\",\n \"client_order_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"quote_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"settl_currency\": \"<string>\"\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}/accept_quote")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"<string>\",\n \"client_order_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"quote_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"settl_currency\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/accept_quote")
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_order_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"quote_id\": \"f69a20b1-4ac4-420e-90b5-814a12565bfa\",\n \"settl_currency\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"order_id": "<string>"
}Path Parameters
The ID of the portfolio that owns the order
Body
application/json
- UNKNOWN_ORDER_SIDE: nil value
- BUY: Buy order
- SELL: Sell order
Available options:
BUY, SELL A client-generated ID used for reference purposes (note: order will be rejected if this ID is not unique among all currently active orders)
Example:
"f69a20b1-4ac4-420e-90b5-814a12565bfa"
A quote id that was returned from the quote request
Example:
"f69a20b1-4ac4-420e-90b5-814a12565bfa"
Response
200 - application/json
A successful response.
Was this page helpful?
⌘I