curl --request GET \
--url https://api.international.coinbase.com/api/v1/portfolios/{portfolio}/fills \
--header 'CB-ACCESS-KEY: <api-key>' \
--header 'CB-ACCESS-PASSPHRASE: <api-key>' \
--header 'CB-ACCESS-SIGN: <api-key>' \
--header 'CB-ACCESS-TIMESTAMP: <api-key>'import requests
url = "https://api.international.coinbase.com/api/v1/portfolios/{portfolio}/fills"
headers = {
"CB-ACCESS-KEY": "<api-key>",
"CB-ACCESS-PASSPHRASE": "<api-key>",
"CB-ACCESS-SIGN": "<api-key>",
"CB-ACCESS-TIMESTAMP": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'CB-ACCESS-KEY': '<api-key>',
'CB-ACCESS-PASSPHRASE': '<api-key>',
'CB-ACCESS-SIGN': '<api-key>',
'CB-ACCESS-TIMESTAMP': '<api-key>'
}
};
fetch('https://api.international.coinbase.com/api/v1/portfolios/{portfolio}/fills', 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.international.coinbase.com/api/v1/portfolios/{portfolio}/fills",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"CB-ACCESS-KEY: <api-key>",
"CB-ACCESS-PASSPHRASE: <api-key>",
"CB-ACCESS-SIGN: <api-key>",
"CB-ACCESS-TIMESTAMP: <api-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"
"net/http"
"io"
)
func main() {
url := "https://api.international.coinbase.com/api/v1/portfolios/{portfolio}/fills"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("CB-ACCESS-KEY", "<api-key>")
req.Header.Add("CB-ACCESS-PASSPHRASE", "<api-key>")
req.Header.Add("CB-ACCESS-SIGN", "<api-key>")
req.Header.Add("CB-ACCESS-TIMESTAMP", "<api-key>")
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.international.coinbase.com/api/v1/portfolios/{portfolio}/fills")
.header("CB-ACCESS-KEY", "<api-key>")
.header("CB-ACCESS-PASSPHRASE", "<api-key>")
.header("CB-ACCESS-SIGN", "<api-key>")
.header("CB-ACCESS-TIMESTAMP", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.international.coinbase.com/api/v1/portfolios/{portfolio}/fills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["CB-ACCESS-KEY"] = '<api-key>'
request["CB-ACCESS-PASSPHRASE"] = '<api-key>'
request["CB-ACCESS-SIGN"] = '<api-key>'
request["CB-ACCESS-TIMESTAMP"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"pagination": {
"result_limit": 30,
"result_offset": 50,
"ref_datetime": "2023-03-16T23:59:53.000Z"
},
"results": [
{
"portfolio_id": "t4umaqa-1-1",
"portfolio_uuid": "018ab3b1-d38a-750e-8a1d-8b7815ea8bfb",
"portfolio_name": "portfolio1",
"fill_id": "14thr7g8-1-1",
"exec_id": 224040873497739740,
"order_id": "14thr7eg-1-1",
"instrument_id": "14thr7dw-1-0",
"instrument_uuid": "c3f2130a-1e47-4f33-9a88-beffc11fdd50",
"symbol": "BTC-PERP",
"match_id": "14thr75g-0-0",
"fill_price": 31011.75,
"fill_qty": 0.2,
"client_id": "4V5LrMqiJPU44hpQ",
"client_order_id": "ABC123",
"order_qty": 1.2,
"limit_price": 31012,
"total_filled": 0.1,
"filled_vwap": 31011.1,
"expire_time": "2023-03-16T23:59:53.000Z",
"stop_price": 31010.5,
"side": "BUY",
"tif": "GTC",
"stp_mode": "AGGRESSING",
"flags": "<string>",
"fee": 75.53,
"fee_asset": "USDC",
"order_status": "WORKING",
"event_time": "2023-03-16T23:59:53.000Z",
"source": "LIQUIDATION",
"execution_venue": "CLOB, RFQ, COINBASE_EXCHANGE_CLOB, COINBASE_EXCHANGE_RFQ"
}
]
}List portfolio fills
Returns all of the fills for a given portfolio.
curl --request GET \
--url https://api.international.coinbase.com/api/v1/portfolios/{portfolio}/fills \
--header 'CB-ACCESS-KEY: <api-key>' \
--header 'CB-ACCESS-PASSPHRASE: <api-key>' \
--header 'CB-ACCESS-SIGN: <api-key>' \
--header 'CB-ACCESS-TIMESTAMP: <api-key>'import requests
url = "https://api.international.coinbase.com/api/v1/portfolios/{portfolio}/fills"
headers = {
"CB-ACCESS-KEY": "<api-key>",
"CB-ACCESS-PASSPHRASE": "<api-key>",
"CB-ACCESS-SIGN": "<api-key>",
"CB-ACCESS-TIMESTAMP": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'CB-ACCESS-KEY': '<api-key>',
'CB-ACCESS-PASSPHRASE': '<api-key>',
'CB-ACCESS-SIGN': '<api-key>',
'CB-ACCESS-TIMESTAMP': '<api-key>'
}
};
fetch('https://api.international.coinbase.com/api/v1/portfolios/{portfolio}/fills', 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.international.coinbase.com/api/v1/portfolios/{portfolio}/fills",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"CB-ACCESS-KEY: <api-key>",
"CB-ACCESS-PASSPHRASE: <api-key>",
"CB-ACCESS-SIGN: <api-key>",
"CB-ACCESS-TIMESTAMP: <api-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"
"net/http"
"io"
)
func main() {
url := "https://api.international.coinbase.com/api/v1/portfolios/{portfolio}/fills"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("CB-ACCESS-KEY", "<api-key>")
req.Header.Add("CB-ACCESS-PASSPHRASE", "<api-key>")
req.Header.Add("CB-ACCESS-SIGN", "<api-key>")
req.Header.Add("CB-ACCESS-TIMESTAMP", "<api-key>")
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.international.coinbase.com/api/v1/portfolios/{portfolio}/fills")
.header("CB-ACCESS-KEY", "<api-key>")
.header("CB-ACCESS-PASSPHRASE", "<api-key>")
.header("CB-ACCESS-SIGN", "<api-key>")
.header("CB-ACCESS-TIMESTAMP", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.international.coinbase.com/api/v1/portfolios/{portfolio}/fills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["CB-ACCESS-KEY"] = '<api-key>'
request["CB-ACCESS-PASSPHRASE"] = '<api-key>'
request["CB-ACCESS-SIGN"] = '<api-key>'
request["CB-ACCESS-TIMESTAMP"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"pagination": {
"result_limit": 30,
"result_offset": 50,
"ref_datetime": "2023-03-16T23:59:53.000Z"
},
"results": [
{
"portfolio_id": "t4umaqa-1-1",
"portfolio_uuid": "018ab3b1-d38a-750e-8a1d-8b7815ea8bfb",
"portfolio_name": "portfolio1",
"fill_id": "14thr7g8-1-1",
"exec_id": 224040873497739740,
"order_id": "14thr7eg-1-1",
"instrument_id": "14thr7dw-1-0",
"instrument_uuid": "c3f2130a-1e47-4f33-9a88-beffc11fdd50",
"symbol": "BTC-PERP",
"match_id": "14thr75g-0-0",
"fill_price": 31011.75,
"fill_qty": 0.2,
"client_id": "4V5LrMqiJPU44hpQ",
"client_order_id": "ABC123",
"order_qty": 1.2,
"limit_price": 31012,
"total_filled": 0.1,
"filled_vwap": 31011.1,
"expire_time": "2023-03-16T23:59:53.000Z",
"stop_price": 31010.5,
"side": "BUY",
"tif": "GTC",
"stp_mode": "AGGRESSING",
"flags": "<string>",
"fee": 75.53,
"fee_asset": "USDC",
"order_status": "WORKING",
"event_time": "2023-03-16T23:59:53.000Z",
"source": "LIQUIDATION",
"execution_venue": "CLOB, RFQ, COINBASE_EXCHANGE_CLOB, COINBASE_EXCHANGE_RFQ"
}
]
}- Java
- .NET
- Go
- Python
- TS/JS
- CLI
PortfoliosService portfoliosService = IntxServiceFactory.createPortfoliosService(client);
ListPortfolioFillsRequest request = new ListPortfolioFillsRequest.Builder()
.portfolio("portfolio_id")
.build();
ListPortfolioFillsResponse response = portfoliosService.listPortfolioFills(request);
var portfoliosService = new PortfoliosService(client);
var request = new ListPortfolioFillsRequest(
Portfolio: "portfolio_id",
);
var response = portfoliosService.ListPortfolioFills(request);
portfoliosSvc := portfolios.NewPortfoliosService(client)
request := &portfolios.GetPortfolioFillsRequest{
Portfolio: "portfolio_id",
}
response, err := portfoliosSvc.GetPortfolioFillsRequest(context.Background(), request)
client = IntxClient()
request = ListPortfolioFillsRequest(
portfolio="portfolio_id",
)
response = client.list_portfolio_fills(request)
const portfoliosService = new PortfoliosService(client);
portfoliosService.listPortfolioFills({
portfolio: 'PORTFOLIO_ID_HERE',
}).then(async (response) => {
console.log('Portfolio Fills: ', response);
})
intxctl get-portfolio-fills --help
Authorizations
The Client ID that owns the API Key for the request
The pass phrase affiliated with the API Key
A HMAC SHA-256 signature using the API Key secret on the string TIMESTAMP, METHOD, REQUEST_PATH, BODY
The timestamp of when the request is being made
Path Parameters
Identifies the portfolio by UUID (e.g., 892e8c7c-e979-4cad-b61b-55a197932cf1) or portfolio ID (e.g., 5189861793641175)
Query Parameters
A specific order for which to fetch fills identified by order ID
43877033468085760
Fetch fills for all orders with the given client order ID
"ABC123"
The maximum event_time for results. Can be used in pagination to keep result set static. Uses ISO-8601 format (e.g., 2023-03-16T23:59:53Z)
"2023-03-16T23:59:53.000Z"
The number of results to return (defaults to 25 with a max supported value of 100)
30
The number of results from the beginning to skip past
50
The minimum event_time for results. Uses ISO-8601 format (e.g., 2023-03-16T23:59:53Z)
"2023-03-16T23:59:53.000Z"
Was this page helpful?