API Reference / Net Liquidating Value History
Get Net-Liq History For Account
getNetLiqHistory/accounts/{accountNumber}/net-liq/historyBase URL: https://api.cert.tastyworks.com (Sandbox) · https://api.tastyworks.com (Production)
Returns the account's net liquidating value history (the total current value of the account — roughly the cash you would end up with if you closed every position) as open/high/low/close data. Use the `time-back` parameter for a window relative to now (`1d`, `1w`, `1m`, `3m`, `6m`, `1y`, `all`), or supply `start-time`/`end-time` for an explicit window. This is a read-only endpoint and moves no money.
Code samples
curl -X GET 'https://api.cert.tastyworks.com/accounts/{accountNumber}/net-liq/history?time-back=1d&start-time=%7Bstart-time%7D&end-time=%7Bend-time%7D&interval=%7Binterval%7D' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'User-Agent: tastytrade-docs-example/1.0'import requests
url = "https://api.cert.tastyworks.com/accounts/{accountNumber}/net-liq/history?time-back=1d&start-time=%7Bstart-time%7D&end-time=%7Bend-time%7D&interval=%7Binterval%7D"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"User-Agent": "tastytrade-docs-example/1.0",
}
resp = requests.get(url, headers=headers)
print(resp.status_code, resp.json())const resp = await fetch("https://api.cert.tastyworks.com/accounts/{accountNumber}/net-liq/history?time-back=1d&start-time=%7Bstart-time%7D&end-time=%7Bend-time%7D&interval=%7Binterval%7D", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"User-Agent": "tastytrade-docs-example/1.0",
},
})
const data = await resp.json()
console.log(resp.status, data)package main
import (
"net/http"
"io"
"fmt"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.cert.tastyworks.com/accounts/{accountNumber}/net-liq/history?time-back=1d&start-time=%7Bstart-time%7D&end-time=%7Bend-time%7D&interval=%7Binterval%7D", nil)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("User-Agent", "tastytrade-docs-example/1.0")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, string(out))
}import java.net.URI;
import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://api.cert.tastyworks.com/accounts/{accountNumber}/net-liq/history?time-back=1d&start-time=%7Bstart-time%7D&end-time=%7Bend-time%7D&interval=%7Binterval%7D"))
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("User-Agent", "tastytrade-docs-example/1.0")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> resp = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(resp.statusCode() + " " + resp.body());Parameters
| Name | In | Type | Description |
|---|---|---|---|
| accountNumber* | path | string | |
| time-back | query | string | A request of data relative to the current time enum: 1d, 1w, 1m, 3m, 6m, 1y, all e.g. "1d" |
| start-time | query | string | The start-time of a windowed request in format '2011-12-03T10:15:30+01:00[Europe/Paris]' |
| end-time | query | string | The end-time of a windowed request in format '2011-12-03T10:15:30+01:00[Europe/Paris]' |
| interval | query | string |
Responses
Example response
{
"data": {
"open": 32100.5,
"high": 32650.75,
"low": 31980.25,
"close": 32520.734,
"totalOpen": 32100.5,
"totalHigh": 32650.75,
"totalLow": 31980.25,
"totalClose": 32520.734,
"pendingCashOpen": 0,
"pendingCashHigh": 0,
"pendingCashLow": 0,
"pendingCashClose": 0,
"time": "string"
},
"context": "/accounts/{accountNumber}/net-liq/history"
}Schema
datarequiredobject (NetLiqOhlc)A single open/high/low/close record of an account's net liquidating value over an interval. The `open`/`high`/`low`/`close` fields track the account's net liquidating value, and the `pendingCash*` fields track cash that is temporarily in a holding period while a cash transfer is processed.
opennumber <double>Net liquidating value at the start of the interval.
example:
32100.5highnumber <double>Highest net liquidating value observed during the interval.
example:
32650.75lownumber <double>Lowest net liquidating value observed during the interval.
example:
31980.25closenumber <double>Net liquidating value at the end of the interval.
example:
32520.734totalOpennumber <double>Total net liquidating value at the start of the interval.
example:
32100.5totalHighnumber <double>Highest total net liquidating value observed during the interval.
example:
32650.75totalLownumber <double>Lowest total net liquidating value observed during the interval.
example:
31980.25totalClosenumber <double>Total net liquidating value at the end of the interval.
example:
32520.734pendingCashOpennumber <double>Pending cash (cash mid-transfer that has not cleared) at the start of the interval. Usually 0.
example:
0pendingCashHighnumber <double>Highest pending cash observed during the interval. Usually 0.
example:
0pendingCashLownumber <double>Lowest pending cash observed during the interval. Usually 0.
example:
0pendingCashClosenumber <double>Pending cash at the end of the interval. Usually 0.
example:
0timestringTimestamp marking the record within the requested window.
contextrequiredstringexample:
"/accounts/{accountNumber}/net-liq/history"
Example response
{
"error": {
"code": "unauthorized",
"message": "No valid access token was provided; access tokens expire after 15 minutes."
}
}Schema
errorrequiredobjectcoderequiredstringMachine-readable error code (see the Error reference).
messagerequiredstringHuman-readable explanation.
errorsarray<object>{3 fields}Present for multi-error / validation failures; one entry per problem.
Example response
{
"error": {
"code": "not_permitted",
"message": "User not permitted access"
}
}Schema
errorrequiredobjectcoderequiredstringMachine-readable error code (see the Error reference).
messagerequiredstringHuman-readable explanation.
errorsarray<object>{3 fields}Present for multi-error / validation failures; one entry per problem.
Example response
{
"error": {
"code": "string",
"message": "string",
"errors": [
{
"code": "string",
"message": "string",
"domain": "string"
}
]
}
}Schema
errorrequiredobjectcoderequiredstringMachine-readable error code (see the Error reference).
messagerequiredstringHuman-readable explanation.
errorsarray<object>{3 fields}Present for multi-error / validation failures; one entry per problem.
Example response
{
"error": {
"code": "string",
"message": "string",
"errors": [
{
"code": "string",
"message": "string",
"domain": "string"
}
]
}
}Schema
errorrequiredobjectcoderequiredstringMachine-readable error code (see the Error reference).
messagerequiredstringHuman-readable explanation.
errorsarray<object>{3 fields}Present for multi-error / validation failures; one entry per problem.
Related
- Rate-limit class:
read· idempotent — Rate limits & backoff - Error reference — codes, causes, and fixes
Agents: this page is also Markdown (with the embedded OpenAPI definition) — append .md or send Accept: text/markdown. Index at /llms.txt.