curl --request GET \
--url https://testnet.edel-api.xyz/v2/accounts/{accountId}/portfolio/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://testnet.edel-api.xyz/v2/accounts/{accountId}/portfolio/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://testnet.edel-api.xyz/v2/accounts/{accountId}/portfolio/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));use reqwest::blocking::Client;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let response = Client::new()
.get("https://testnet.edel-api.xyz/v2/accounts/{accountId}/portfolio/history")
.bearer_auth(std::env::var("EDEL_API_KEY")?)
.send()?;
println!("{} {}", response.status(), response.text()?);
Ok(())
}
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://testnet.edel-api.xyz/v2/accounts/{accountId}/portfolio/history"
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://testnet.edel-api.xyz/v2/accounts/{accountId}/portfolio/history")
.header("Authorization", "Bearer <token>")
.asString();{
"version": "account-portfolio-history/v1",
"accountId": "acct_01HZYX3K9M",
"asset": "USDCx",
"method": "live-total-value-past-equity-less-later-cash-flows/v1",
"range": "1d",
"fromEpochMs": 1763463600000,
"toEpochMs": 1763550000000,
"bucketMs": 300000,
"points": [
{
"timeEpochMs": 1763463600000,
"valueAtoms": "0",
"value": "0.000000"
},
{
"timeEpochMs": 1763463900000,
"valueAtoms": "0",
"value": "0.000000"
},
{
"timeEpochMs": 1763549700000,
"valueAtoms": "998000000",
"value": "998.000000"
},
{
"timeEpochMs": 1763550000000,
"valueAtoms": "1048000000",
"value": "1048.000000"
}
],
"freshness": {
"status": "fresh",
"degradedState": "none",
"journalSequence": 4812,
"asOfEpochMs": 1763549999000,
"projectorLagMs": 0,
"dbReplicaLagMs": 0,
"backfillStatus": "live"
}
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}Get account portfolio value history (v2)
Returns the account value over time, oldest point first, in the account asset. The range ends now and defaults to 30d. The default method is held-tokens-at-candle-close/v1. Each historical point adds the value of the spot tokens held at that time to account equity. It uses only completed Edel one-minute trade candles and carries forward the last earlier close through gaps. Tokens without an eligible close contribute zero. The last point uses the live total account value when available and the latest completed trade candle values otherwise. For the legacy calculation shown in the example, send method=live-total-value-past-equity-less-later-cash-flows/v1. The server returns at most 400 points. The 1d range uses 5 minute buckets, 7d and 14d use 1 hour, 30d uses 4 hours, 3m uses 12 hours, and 6m and 1y use 1 day. The first point is at the start aligned down to the bucket. A point includes records through its timestamp. Query keys other than range and method return 400 invalid_request. An API key needs the funding scope. Each account has a budget of 20 calls per minute per API instance and receives 429 above that budget. The database read has a five-second deadline including pool wait. A timeout returns retryable 503 service_degraded with portfolio_history_read_timeout. An unreadable record returns 503 with portfolio_history_record_unreadable. Unknown or foreign accounts receive the same refusal as on other account reads.
curl --request GET \
--url https://testnet.edel-api.xyz/v2/accounts/{accountId}/portfolio/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://testnet.edel-api.xyz/v2/accounts/{accountId}/portfolio/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://testnet.edel-api.xyz/v2/accounts/{accountId}/portfolio/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));use reqwest::blocking::Client;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let response = Client::new()
.get("https://testnet.edel-api.xyz/v2/accounts/{accountId}/portfolio/history")
.bearer_auth(std::env::var("EDEL_API_KEY")?)
.send()?;
println!("{} {}", response.status(), response.text()?);
Ok(())
}
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://testnet.edel-api.xyz/v2/accounts/{accountId}/portfolio/history"
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://testnet.edel-api.xyz/v2/accounts/{accountId}/portfolio/history")
.header("Authorization", "Bearer <token>")
.asString();{
"version": "account-portfolio-history/v1",
"accountId": "acct_01HZYX3K9M",
"asset": "USDCx",
"method": "live-total-value-past-equity-less-later-cash-flows/v1",
"range": "1d",
"fromEpochMs": 1763463600000,
"toEpochMs": 1763550000000,
"bucketMs": 300000,
"points": [
{
"timeEpochMs": 1763463600000,
"valueAtoms": "0",
"value": "0.000000"
},
{
"timeEpochMs": 1763463900000,
"valueAtoms": "0",
"value": "0.000000"
},
{
"timeEpochMs": 1763549700000,
"valueAtoms": "998000000",
"value": "998.000000"
},
{
"timeEpochMs": 1763550000000,
"valueAtoms": "1048000000",
"value": "1048.000000"
}
],
"freshness": {
"status": "fresh",
"degradedState": "none",
"journalSequence": 4812,
"asOfEpochMs": 1763549999000,
"projectorLagMs": 0,
"dbReplicaLagMs": 0,
"backfillStatus": "live"
}
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}Authorizations
The authorization field takes the session bearer returned by sign-in, or an API key where the route allows keys. Paste the token itself into the authorization field. When invitation-only access is enabled, private operations require the account's sign-in email to be invited. Sign-in can complete without an invitation, but private HTTP, MCP and FIX operations refuse with access_not_allowlisted (HTTP 403): "Private access is limited to invited accounts. Contact support to request access." Public market data remains available. Invitation changes apply to the next private operation, including existing FIX sessions. Do not retry until support confirms access.
Query Parameters
Response
Success
The method that built the values. Clients must accept new method names. held-tokens-at-candle-close/v1 is the default. Earlier points add the held spot tokens to account equity. Fill quantities, credited deposits, completed withdrawals and committed account transfers rewind the projected token balances to each point. Each token uses the latest completed one-minute trade candle close at or before the point on an Edel spot market quoted in the account asset. This carries the last earlier close through gaps. A token with no eligible close contributes zero. The last point uses the live total account value when available and the same candle method otherwise. Collateral is already in equity. live-total-value-past-equity-less-later-cash-flows/v1 is the legacy method. It reports token value at the live point only. When the legacy live token valuation is unavailable it returns live-equity-less-later-cash-flows/v1. Both methods estimate earlier equity from live equity less subsequent credited deposits, settled withdrawals, committed account transfers, fees, spot quote amounts, and realized profit and loss plus recorded funding at position close. An account transfer counts at receipt time. A deposit held for a receipt check counts once credited. Untimed changes such as unrealized profit and loss are treated as constant across the range. Late projections and any balance movements without a timed record can affect earlier estimates.
1