Create First Party Session
curl --request POST \
--url https://api.example.com/api/graph/v1/chart-sessions \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"symbol": "<string>",
"from_time": 2,
"to_time": 2,
"schema_version": "1.0",
"interval": "1m",
"timezone": "America/New_York"
}
'import requests
url = "https://api.example.com/api/graph/v1/chart-sessions"
payload = {
"symbol": "<string>",
"from_time": 2,
"to_time": 2,
"schema_version": "1.0",
"interval": "1m",
"timezone": "America/New_York"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
symbol: '<string>',
from_time: 2,
to_time: 2,
schema_version: '1.0',
interval: '1m',
timezone: 'America/New_York'
})
};
fetch('https://api.example.com/api/graph/v1/chart-sessions', 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://api.example.com/api/graph/v1/chart-sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => '<string>',
'from_time' => 2,
'to_time' => 2,
'schema_version' => '1.0',
'interval' => '1m',
'timezone' => 'America/New_York'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/graph/v1/chart-sessions"
payload := strings.NewReader("{\n \"symbol\": \"<string>\",\n \"from_time\": 2,\n \"to_time\": 2,\n \"schema_version\": \"1.0\",\n \"interval\": \"1m\",\n \"timezone\": \"America/New_York\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/graph/v1/chart-sessions")
.header("Idempotency-Key", "<idempotency-key>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"<string>\",\n \"from_time\": 2,\n \"to_time\": 2,\n \"schema_version\": \"1.0\",\n \"interval\": \"1m\",\n \"timezone\": \"America/New_York\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph/v1/chart-sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"<string>\",\n \"from_time\": 2,\n \"to_time\": 2,\n \"schema_version\": \"1.0\",\n \"interval\": \"1m\",\n \"timezone\": \"America/New_York\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Chart Sessions
Create First Party Session
POST
/
api
/
graph
/
v1
/
chart-sessions
Create First Party Session
curl --request POST \
--url https://api.example.com/api/graph/v1/chart-sessions \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"symbol": "<string>",
"from_time": 2,
"to_time": 2,
"schema_version": "1.0",
"interval": "1m",
"timezone": "America/New_York"
}
'import requests
url = "https://api.example.com/api/graph/v1/chart-sessions"
payload = {
"symbol": "<string>",
"from_time": 2,
"to_time": 2,
"schema_version": "1.0",
"interval": "1m",
"timezone": "America/New_York"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
symbol: '<string>',
from_time: 2,
to_time: 2,
schema_version: '1.0',
interval: '1m',
timezone: 'America/New_York'
})
};
fetch('https://api.example.com/api/graph/v1/chart-sessions', 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://api.example.com/api/graph/v1/chart-sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => '<string>',
'from_time' => 2,
'to_time' => 2,
'schema_version' => '1.0',
'interval' => '1m',
'timezone' => 'America/New_York'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/graph/v1/chart-sessions"
payload := strings.NewReader("{\n \"symbol\": \"<string>\",\n \"from_time\": 2,\n \"to_time\": 2,\n \"schema_version\": \"1.0\",\n \"interval\": \"1m\",\n \"timezone\": \"America/New_York\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/graph/v1/chart-sessions")
.header("Idempotency-Key", "<idempotency-key>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"<string>\",\n \"from_time\": 2,\n \"to_time\": 2,\n \"schema_version\": \"1.0\",\n \"interval\": \"1m\",\n \"timezone\": \"America/New_York\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph/v1/chart-sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"<string>\",\n \"from_time\": 2,\n \"to_time\": 2,\n \"schema_version\": \"1.0\",\n \"interval\": \"1m\",\n \"timezone\": \"America/New_York\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
Required string length:
8 - 128Body
application/json
Pattern:
^[A-Z][A-Z0-9.\-]{0,14}$Required range:
x >= 1Required range:
x >= 1Allowed value:
"1.0"Available options:
1m, 2m, 5m, 15m, 1h, 1d Available options:
area, candle, candles, line, footprint, heikinashi Required string length:
1 - 64Response
Successful Response