curl --request POST \
--url https://api.hotstuff.trade/info \
--header 'Content-Type: application/json' \
--data '{
"method": "chart",
"params": {
"symbol": "1",
"chart_type": "mark",
"resolution": "1",
"from": 1658716757,
"to": 1758716766000
}
}'
import requests
url = "https://api.hotstuff.trade/info"
payload = {
"method": "chart",
"params": {
"symbol": "1",
"chart_type": "mark",
"resolution": "1",
"from": 1658716757,
"to": 1758716766000
}
}
response = requests.post(url, json=payload)
print(response.json())
const url = "https://api.hotstuff.trade/info";
const payload = {
method: "chart",
params: {
symbol: "1",
chart_type: "mark",
resolution: "1",
from: 1658716757,
to: 1758716766000,
},
};
fetch(url, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
})
.then((response) => response.json())
.then((data) => console.log(data));
<?php
$url = "https://api.hotstuff.trade/info";
$payload = json_encode([
"method" => "chart",
"params" => [
"symbol" => "1",
"chart_type" => "mark",
"resolution" => "1",
"from" => 1658716757,
"to" => 1758716766000
]
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.hotstuff.trade/info"
payload := map[string]interface{}{
"method": "chart",
"params": map[string]interface{}{
"symbol": "1",
"chart_type": "mark",
"resolution": "1",
"from": 1658716757,
"to": 1758716766000,
},
}
jsonData, _ := json.Marshal(payload)
resp, _ := http.Post(url, "application/json", bytes.NewBuffer(jsonData))
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.*;
URL url = new URL("https://api.hotstuff.trade/info");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/json");
conn.setDoOutput(true);
String jsonPayload = "{\"method\":\"chart\",\"params\":{\"symbol\":\"1\",\"chart_type\":\"mark\",\"resolution\":\"1\",\"from\":1658716757,\"to\":1758716766000}}";
OutputStream os = conn.getOutputStream();
os.write(jsonPayload.getBytes());
os.flush();
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String response = in.readLine();
System.out.println(response);
require 'net/http'
require 'json'
uri = URI('https://api.hotstuff.trade/info')
payload = {
method: "chart",
params: {
symbol: "1",
chart_type: "mark",
resolution: "1",
from: 1658716757,
to: 1758716766000
}
}
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path, 'Content-Type' => 'application/json')
request.body = payload.to_json
response = http.request(request)
puts JSON.parse(response.body)
[
{
"close": 70816,
"high": 70967,
"low": 70816,
"open": 70967,
"time": 1770668100000,
"volume": 0.21369
},
{
"close": 70664,
"high": 70816,
"low": 70639,
"open": 70816,
"time": 1770668160000,
"volume": 0.08373
}
]{
"error": "<error message>"
}Global
chart
Send POST request to /info with method: “chart”
POST
/
info
curl --request POST \
--url https://api.hotstuff.trade/info \
--header 'Content-Type: application/json' \
--data '{
"method": "chart",
"params": {
"symbol": "1",
"chart_type": "mark",
"resolution": "1",
"from": 1658716757,
"to": 1758716766000
}
}'
import requests
url = "https://api.hotstuff.trade/info"
payload = {
"method": "chart",
"params": {
"symbol": "1",
"chart_type": "mark",
"resolution": "1",
"from": 1658716757,
"to": 1758716766000
}
}
response = requests.post(url, json=payload)
print(response.json())
const url = "https://api.hotstuff.trade/info";
const payload = {
method: "chart",
params: {
symbol: "1",
chart_type: "mark",
resolution: "1",
from: 1658716757,
to: 1758716766000,
},
};
fetch(url, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
})
.then((response) => response.json())
.then((data) => console.log(data));
<?php
$url = "https://api.hotstuff.trade/info";
$payload = json_encode([
"method" => "chart",
"params" => [
"symbol" => "1",
"chart_type" => "mark",
"resolution" => "1",
"from" => 1658716757,
"to" => 1758716766000
]
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.hotstuff.trade/info"
payload := map[string]interface{}{
"method": "chart",
"params": map[string]interface{}{
"symbol": "1",
"chart_type": "mark",
"resolution": "1",
"from": 1658716757,
"to": 1758716766000,
},
}
jsonData, _ := json.Marshal(payload)
resp, _ := http.Post(url, "application/json", bytes.NewBuffer(jsonData))
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.*;
URL url = new URL("https://api.hotstuff.trade/info");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/json");
conn.setDoOutput(true);
String jsonPayload = "{\"method\":\"chart\",\"params\":{\"symbol\":\"1\",\"chart_type\":\"mark\",\"resolution\":\"1\",\"from\":1658716757,\"to\":1758716766000}}";
OutputStream os = conn.getOutputStream();
os.write(jsonPayload.getBytes());
os.flush();
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String response = in.readLine();
System.out.println(response);
require 'net/http'
require 'json'
uri = URI('https://api.hotstuff.trade/info')
payload = {
method: "chart",
params: {
symbol: "1",
chart_type: "mark",
resolution: "1",
from: 1658716757,
to: 1758716766000
}
}
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path, 'Content-Type' => 'application/json')
request.body = payload.to_json
response = http.request(request)
puts JSON.parse(response.body)
[
{
"close": 70816,
"high": 70967,
"low": 70816,
"open": 70967,
"time": 1770668100000,
"volume": 0.21369
},
{
"close": 70664,
"high": 70816,
"low": 70639,
"open": 70816,
"time": 1770668160000,
"volume": 0.08373
}
]{
"error": "<error message>"
}Retrieve OHLCV chart data for technical analysis and charting.
curl --request POST \
--url https://api.hotstuff.trade/info \
--header 'Content-Type: application/json' \
--data '{
"method": "chart",
"params": {
"symbol": "1",
"chart_type": "mark",
"resolution": "1",
"from": 1658716757,
"to": 1758716766000
}
}'
import requests
url = "https://api.hotstuff.trade/info"
payload = {
"method": "chart",
"params": {
"symbol": "1",
"chart_type": "mark",
"resolution": "1",
"from": 1658716757,
"to": 1758716766000
}
}
response = requests.post(url, json=payload)
print(response.json())
const url = "https://api.hotstuff.trade/info";
const payload = {
method: "chart",
params: {
symbol: "1",
chart_type: "mark",
resolution: "1",
from: 1658716757,
to: 1758716766000,
},
};
fetch(url, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
})
.then((response) => response.json())
.then((data) => console.log(data));
<?php
$url = "https://api.hotstuff.trade/info";
$payload = json_encode([
"method" => "chart",
"params" => [
"symbol" => "1",
"chart_type" => "mark",
"resolution" => "1",
"from" => 1658716757,
"to" => 1758716766000
]
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.hotstuff.trade/info"
payload := map[string]interface{}{
"method": "chart",
"params": map[string]interface{}{
"symbol": "1",
"chart_type": "mark",
"resolution": "1",
"from": 1658716757,
"to": 1758716766000,
},
}
jsonData, _ := json.Marshal(payload)
resp, _ := http.Post(url, "application/json", bytes.NewBuffer(jsonData))
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.*;
URL url = new URL("https://api.hotstuff.trade/info");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/json");
conn.setDoOutput(true);
String jsonPayload = "{\"method\":\"chart\",\"params\":{\"symbol\":\"1\",\"chart_type\":\"mark\",\"resolution\":\"1\",\"from\":1658716757,\"to\":1758716766000}}";
OutputStream os = conn.getOutputStream();
os.write(jsonPayload.getBytes());
os.flush();
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String response = in.readLine();
System.out.println(response);
require 'net/http'
require 'json'
uri = URI('https://api.hotstuff.trade/info')
payload = {
method: "chart",
params: {
symbol: "1",
chart_type: "mark",
resolution: "1",
from: 1658716757,
to: 1758716766000
}
}
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path, 'Content-Type' => 'application/json')
request.body = payload.to_json
response = http.request(request)
puts JSON.parse(response.body)
Chart Types
| Type | Description |
|---|---|
mark | Mark price data |
index | Index price data |
ltp | Last traded price data |
Resolutions
| Resolution | Interval |
|---|---|
1 | 1 minute |
5 | 5 minutes |
15 | 15 minutes |
30 | 30 minutes |
60 | 1 hour |
240 | 4 hours |
1D | 1 day |
1W | 1 week |