List Existing Locates
curl --request GET \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/locatesimport requests
url = "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/locates"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/locates', 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}/locates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.prime.coinbase.com/v1/portfolios/{portfolio_id}/locates"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/locates")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/locates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"locates": [
{
"locate_id": "9227410b-d2d2-4646-950d-df126601bf2a",
"entity_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"portfolio_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"symbol": "BTC",
"requested_amount": "5.22",
"interest_rate": "0.05",
"status": "filled",
"approved_amount": "2.5",
"conversion_date": "2023-01-01T00:00:00.000Z",
"created_at": "2023-01-01T00:00:00.000Z",
"locate_date": "2023-01-01T00:00:00.000Z"
}
]
}Financing
List Existing Locates
List locates for the portfolio
GET
/
v1
/
portfolios
/
{portfolio_id}
/
locates
List Existing Locates
curl --request GET \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/locatesimport requests
url = "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/locates"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/locates', 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}/locates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.prime.coinbase.com/v1/portfolios/{portfolio_id}/locates"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/locates")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/locates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"locates": [
{
"locate_id": "9227410b-d2d2-4646-950d-df126601bf2a",
"entity_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"portfolio_id": "e8bbed13-fa33-41de-86d5-4335d8f08166",
"symbol": "BTC",
"requested_amount": "5.22",
"interest_rate": "0.05",
"status": "filled",
"approved_amount": "2.5",
"conversion_date": "2023-01-01T00:00:00.000Z",
"created_at": "2023-01-01T00:00:00.000Z",
"locate_date": "2023-01-01T00:00:00.000Z"
}
]
}Supported Products
- Portfolio Margin
Path Parameters
The unique ID of the portfolio
Query Parameters
The IDs of specific locates to filter for
Deprecated: Use locate_date instead
The date of the locates in YYYY-MM-DD format
Response
200 - application/json
A successful response.
Show child attributes
Show child attributes
Was this page helpful?
⌘I