curl --request GET \
--url https://platform.spritz.finance/v1/wallet-kit/portfolio/snapshots \
--header 'Authorization: Bearer <token>'import requests
url = "https://platform.spritz.finance/v1/wallet-kit/portfolio/snapshots"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.spritz.finance/v1/wallet-kit/portfolio/snapshots', 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://platform.spritz.finance/v1/wallet-kit/portfolio/snapshots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://platform.spritz.finance/v1/wallet-kit/portfolio/snapshots"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platform.spritz.finance/v1/wallet-kit/portfolio/snapshots")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.spritz.finance/v1/wallet-kit/portfolio/snapshots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"range": "1d",
"latest": {
"id": "<string>",
"bucketStart": "2023-11-07T05:31:56Z",
"capturedAt": "2023-11-07T05:31:56Z",
"status": "complete",
"totalBalanceUsd": "1234.56",
"assetCount": 1,
"chainCount": 1,
"walletCount": 1,
"capturedWalletCount": 1,
"unsupportedWalletCount": 1,
"failedWalletCount": 1
},
"baseline": {
"id": "<string>",
"bucketStart": "2023-11-07T05:31:56Z",
"capturedAt": "2023-11-07T05:31:56Z",
"status": "complete",
"totalBalanceUsd": "1234.56",
"assetCount": 1,
"chainCount": 1,
"walletCount": 1,
"capturedWalletCount": 1,
"unsupportedWalletCount": 1,
"failedWalletCount": 1
},
"changeUsd": "12.34",
"changePercent": "1.23",
"points": [
{
"id": "<string>",
"bucketStart": "2023-11-07T05:31:56Z",
"capturedAt": "2023-11-07T05:31:56Z",
"status": "complete",
"totalBalanceUsd": "1234.56",
"assetCount": 1,
"chainCount": 1,
"walletCount": 1,
"capturedWalletCount": 1,
"unsupportedWalletCount": 1,
"failedWalletCount": 1
}
]
}{
"title": "Unauthorized",
"status": 401,
"type": "urn:problem-type:auth:unauthorized",
"detail": "Bearer token required",
"instance": "<string>",
"realm": "API",
"scope": "read:users"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true
}Get wallet portfolio snapshots
Returns the authenticated user’s portfolio snapshot history for the requested range. latest and baseline reference the newest and oldest snapshots inside the range; changeUsd/changePercent are simple balance deltas (not P&L). New users with no snapshots return latest/baseline as null and an empty points array.
curl --request GET \
--url https://platform.spritz.finance/v1/wallet-kit/portfolio/snapshots \
--header 'Authorization: Bearer <token>'import requests
url = "https://platform.spritz.finance/v1/wallet-kit/portfolio/snapshots"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.spritz.finance/v1/wallet-kit/portfolio/snapshots', 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://platform.spritz.finance/v1/wallet-kit/portfolio/snapshots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://platform.spritz.finance/v1/wallet-kit/portfolio/snapshots"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platform.spritz.finance/v1/wallet-kit/portfolio/snapshots")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.spritz.finance/v1/wallet-kit/portfolio/snapshots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"range": "1d",
"latest": {
"id": "<string>",
"bucketStart": "2023-11-07T05:31:56Z",
"capturedAt": "2023-11-07T05:31:56Z",
"status": "complete",
"totalBalanceUsd": "1234.56",
"assetCount": 1,
"chainCount": 1,
"walletCount": 1,
"capturedWalletCount": 1,
"unsupportedWalletCount": 1,
"failedWalletCount": 1
},
"baseline": {
"id": "<string>",
"bucketStart": "2023-11-07T05:31:56Z",
"capturedAt": "2023-11-07T05:31:56Z",
"status": "complete",
"totalBalanceUsd": "1234.56",
"assetCount": 1,
"chainCount": 1,
"walletCount": 1,
"capturedWalletCount": 1,
"unsupportedWalletCount": 1,
"failedWalletCount": 1
},
"changeUsd": "12.34",
"changePercent": "1.23",
"points": [
{
"id": "<string>",
"bucketStart": "2023-11-07T05:31:56Z",
"capturedAt": "2023-11-07T05:31:56Z",
"status": "complete",
"totalBalanceUsd": "1234.56",
"assetCount": 1,
"chainCount": 1,
"walletCount": 1,
"capturedWalletCount": 1,
"unsupportedWalletCount": 1,
"failedWalletCount": 1
}
]
}{
"title": "Unauthorized",
"status": 401,
"type": "urn:problem-type:auth:unauthorized",
"detail": "Bearer token required",
"instance": "<string>",
"realm": "API",
"scope": "read:users"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true
}Authorizations
User bearer credential: either a Cognito JWT or an ak_ user API key. Backend integrators using HMAC must include the user API key alongside the three HMAC headers on user-scoped endpoints.
Query Parameters
1d, 7d, 30d, 90d, 1y, all Response
Portfolio snapshot history for the authenticated user's wallets. changeUsd and changePercent are simple balance deltas, not P&L. New users with no history return latest/baseline as null and points empty.
Portfolio snapshot history for the authenticated user's wallets. changeUsd and changePercent are simple balance deltas, not P&L. New users with no history return latest/baseline as null and points empty.
1d, 7d, 30d, 90d, 1y, all Newest snapshot inside the requested range, or null when no snapshots exist.
Show child attributes
Show child attributes
Oldest snapshot inside the requested range, or null when no snapshots exist.
Show child attributes
Show child attributes
Simple USD balance delta between baseline and latest, formatted to two decimal places. Not P&L. Null when history is empty.
"12.34"
Simple percentage change between baseline and latest balance, formatted to two decimal places. Not P&L. Null when history is empty or baseline balance is zero.
"1.23"
Snapshot points inside the requested range, ordered by bucketStart. Empty when no history exists.
Show child attributes
Show child attributes