curl --request GET \
--url https://testnet.edel-api.xyz/v1/accounts/{accountId}/portfolio/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://testnet.edel-api.xyz/v1/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/v1/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/v1/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/v1/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/v1/accounts/{accountId}/portfolio/history")
.header("Authorization", "Bearer <token>")
.asString();{
"version": "account-portfolio-history/v1",
"accountId": "acct_01HZYX3K9M",
"asset": "USDCx",
"method": "live-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": "998000000",
"value": "998.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
Returns the account value over time for a chart, oldest point first, in the account asset. Example request: GET /v1/accounts/{accountId}/portfolio/history?range=7d. range is one of 1d, 7d, 14d, 30d, 3m (90 days), 6m (180 days) or 1y (365 days) and ends now; no range reads 30d. Explicit windows are not offered: a window that ends in the past cannot be built without the account’s whole history. Any query parameter other than range answers 400 invalid_request. The server picks bucketMs and answers at most 400 points: 1d uses 5 minute buckets, 7d and 14d 1 hour, 30d 4 hours, 3m 12 hours, 6m and 1y 1 day. The first point is at the range start aligned down to the bucket; a point counts every record up to its time. The last point is the live account equity of the account snapshot, exact; each earlier point is that equity less the timed cash flows after it, so a past point assumes that unrealized profit and loss, funding payments, liquidation fees and insurance fund changes were the same then as now. Past points also assume the records are current: a cash flow the venue applied but has not yet recorded for this read makes every earlier point off by its amount until it is recorded, and freshness reports that lag. Transfers between an owner and its agents are timed when their receipt was recorded; a deposit held for a receipt check counts from the time it is credited. The value never counts spot tokens held: a spot buy lowers it by the amount paid and a spot sell raises it. Read method rather than assume one; it is an open string and a client must accept a value it does not know. Access is the funding surface: an API key needs the funding scope, as for transfers. Each account has a budget of 20 calls a minute on each API instance (429 past it), and a read that takes longer than 5 seconds, the wait for a database connection included, answers a retryable 503 service_degraded naming portfolio_history_read_timeout; a stored record that does not parse answers 503 naming portfolio_history_record_unreadable, not retryable, because it is a lasting data fault. An account with no activity answers a flat series at its equity. Unknown or foreign accounts are refused like the other account reads.
Method and path: GET /v1/accounts/{accountId}/portfolio/history
Authentication: DFNS trader bearer required.
Request schema: none.
Response schema: ExternalPortfolioHistoryResponse.
Error envelope: ExternalRestError (external-rest-error/v1).
curl --request GET \
--url https://testnet.edel-api.xyz/v1/accounts/{accountId}/portfolio/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://testnet.edel-api.xyz/v1/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/v1/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/v1/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/v1/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/v1/accounts/{accountId}/portfolio/history")
.header("Authorization", "Bearer <token>")
.asString();{
"version": "account-portfolio-history/v1",
"accountId": "acct_01HZYX3K9M",
"asset": "USDCx",
"method": "live-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": "998000000",
"value": "998.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 name of the method that built the values. Known today: live-equity-less-later-cash-flows/v1. A client must accept a name it does not know. live-equity-less-later-cash-flows/v1: the last point is the live account equity of the account snapshot, exact. A past point is that equity minus the account's cash flows after the point's time, in the account asset: credited deposits, settled withdrawals, transfers between an owner and its agents (in on the receiving account, out on the sending one, timed when the transfer's receipt was recorded), trading fees, the quote amount of spot fills (a spot buy lowers the value by the amount paid, a spot sell raises it by the amount received), and the realized profit and loss of each position plus the funding its record carries (positive when received, negative when paid), booked at the time the position closed. Position records carry no funding today, so every funding payment is untimed. A deposit held for a receipt check counts from the time it is credited. Account equity, and so every point, does not count the value of spot tokens held. A past point assumes that everything these records do not time was the same then as now: unrealized profit and loss, funding payments, liquidation fees, insurance fund cover and bad debt. A past point is off by how much those changed since then. Past points also assume the records are current: a cash flow the venue applied but has not yet recorded for this read makes every earlier point off by its amount until it is recorded; freshness reports that lag.
1