Get wallet portfolio snapshots
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
}Wallet Kit
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.
GET
/
v1
/
wallet-kit
/
portfolio
/
snapshots
Get wallet portfolio snapshots
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
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.