curl --request POST \
--url 'https://api.edgeful.com/v1/settings/defaults' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--data '{"market": "stock", "ticker": "SPY", "date_range": "6m"}'import requests
url = "https://api.edgeful.com/v1/settings/defaults"
headers = {"Authorization": "Bearer <api-key>"}
payload = {'market': 'stock', 'ticker': 'SPY', 'date_range': '6m'}
response = requests.post(url, headers=headers, json=payload)
print(response.json())const url = "https://api.edgeful.com/v1/settings/defaults";
const options = {
method: "POST",
headers: { Authorization: "Bearer <api-key>", "Content-Type": "application/json" },
body: JSON.stringify({"market": "stock", "ticker": "SPY", "date_range": "6m"}),
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data);<?php
$ch = curl_init("https://api.edgeful.com/v1/settings/defaults");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer <api-key>", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"market": "stock", "ticker": "SPY", "date_range": "6m"}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://api.edgeful.com/v1/settings/defaults", strings.NewReader(`{"market": "stock", "ticker": "SPY", "date_range": "6m"}`))
req.Header.Set("Authorization", "Bearer <api-key>")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.edgeful.com/v1/settings/defaults"))
.header("Authorization", "Bearer <api-key>")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\"market\": \"stock\", \"ticker\": \"SPY\", \"date_range\": \"6m\"}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());require "net/http"
require "uri"
uri = URI("https://api.edgeful.com/v1/settings/defaults")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <api-key>"
request["Content-Type"] = "application/json"
request.body = '{"market": "stock", "ticker": "SPY", "date_range": "6m"}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(request)
end
puts response.body{
"status": "<string>",
"defaults": {
"market": "<string>",
"ticker": "<string>",
"session": "<string>",
"date_range": "<string>",
"report": "<string>",
"url": "<string>"
},
"previous": {
"market": "<string>",
"ticker": "<string>",
"session": "<string>",
"date_range": "<string>",
"report": "<string>",
"url": "<string>"
},
"changed": {},
"url": "<string>"
}update defaults
change any subset of your default market, ticker, session, date range and report. Edgeful reconciles the whole tuple as the account form does: the report constrains the market, a market change resets the ticker, and the session must be a standard preset the report allows (the report catalog with a market lists them). returns the reconciled defaults and the previous ones, so sending previous back undoes the change. this changes your account, and Edgeful shows the change after a reload. requires the key’s write permission.
curl --request POST \
--url 'https://api.edgeful.com/v1/settings/defaults' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--data '{"market": "stock", "ticker": "SPY", "date_range": "6m"}'import requests
url = "https://api.edgeful.com/v1/settings/defaults"
headers = {"Authorization": "Bearer <api-key>"}
payload = {'market': 'stock', 'ticker': 'SPY', 'date_range': '6m'}
response = requests.post(url, headers=headers, json=payload)
print(response.json())const url = "https://api.edgeful.com/v1/settings/defaults";
const options = {
method: "POST",
headers: { Authorization: "Bearer <api-key>", "Content-Type": "application/json" },
body: JSON.stringify({"market": "stock", "ticker": "SPY", "date_range": "6m"}),
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data);<?php
$ch = curl_init("https://api.edgeful.com/v1/settings/defaults");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer <api-key>", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"market": "stock", "ticker": "SPY", "date_range": "6m"}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://api.edgeful.com/v1/settings/defaults", strings.NewReader(`{"market": "stock", "ticker": "SPY", "date_range": "6m"}`))
req.Header.Set("Authorization", "Bearer <api-key>")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.edgeful.com/v1/settings/defaults"))
.header("Authorization", "Bearer <api-key>")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\"market\": \"stock\", \"ticker\": \"SPY\", \"date_range\": \"6m\"}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());require "net/http"
require "uri"
uri = URI("https://api.edgeful.com/v1/settings/defaults")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <api-key>"
request["Content-Type"] = "application/json"
request.body = '{"market": "stock", "ticker": "SPY", "date_range": "6m"}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(request)
end
puts response.body{
"status": "<string>",
"defaults": {
"market": "<string>",
"ticker": "<string>",
"session": "<string>",
"date_range": "<string>",
"report": "<string>",
"url": "<string>"
},
"previous": {
"market": "<string>",
"ticker": "<string>",
"session": "<string>",
"date_range": "<string>",
"report": "<string>",
"url": "<string>"
},
"changed": {},
"url": "<string>"
}Authorizations
Send your Edgeful API key in the Authorization header as Bearer <api-key> (for example, Bearer ef_live_<random>).
Body
default market; a change resets the ticker to that market's default.
futures, stock, forex, crypto default ticker, known on the default market.
1 - 30default session: a standard session id the default report allows on the market.
1 - 80default date range preset.
1m, 3m, 6m, ytd, 1yr, 2yr, 3yr, 5yr default report: a report catalog slug, or custom: of a saved custom report.
1 - 80Response
Successful Response
updated or unchanged.
the reconciled defaults after this write.
Show child attributes
Show child attributes
the defaults before this write, for undo.
Show child attributes
Show child attributes
the fields that changed, with their new values.
Show child attributes
Show child attributes
the default report page in Edgeful.
Was this page helpful?