curl --request POST \
--url https://api.hotstuff.trade/info \
--header 'Content-Type: application/json' \
--data '{
"method": "account_info",
"params": {
"user": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"collateralID": 1,
"includeHistory": true
}
}'
import requests
url = "https://api.hotstuff.trade/info"
payload = {
"method": "account_info",
"params": {
"user": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"collateralID": 1,
"includeHistory": True
}
}
response = requests.post(url, json=payload)
print(response.json())
const url = "https://api.hotstuff.trade/info";
const payload = {
method: "account_info",
params: {
user: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
collateralID: 1,
includeHistory: true,
},
};
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" => "account_info",
"params" => [
"user" => "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"collateralID" => 1,
"includeHistory" => true
]
]);
$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": "account_info",
"params": map[string]interface{}{
"user": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"collateralID": 1,
"includeHistory": true,
},
}
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\":\"account_info\",\"params\":{\"user\":\"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\"collateralID\":1,\"includeHistory\":true}}";
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: "account_info",
params: {
user: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
collateralID: 1,
includeHistory: true
}
}
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)
{
"account": {
"address": "0x42C183edba036906447372a7c81Eb89D0B9f2175",
"role": 0,
"margin_mode": "cross",
"multi_asset_mode": false,
"hedge_mode": false,
"referrer": "0x944Aa860FA3402bC93401c177ce255494b2C0C86",
"referral_codes": [
"HELLO"
],
"referral_timestamp": 1765207493207,
"created_at_block_timestamp": 1764946705982
},
"rewards": [
{
"Account": "0x42C183edba036906447372a7c81Eb89D0B9f2175",
"CollateralID": 1,
"Source": "referral_commission",
"IsSpot": false,
"Amount": "0",
"ClaimAmount": "3.764047",
"CreatedAt": 1768305424272
}
],
"history": [
{
"Account": "0x42C183edba036906447372a7c81Eb89D0B9f2175",
"CollateralID": 1,
"Source": "referral_commission",
"IsSpot": false,
"Amount": "0.101354",
"ClaimAmount": "0",
"CreatedAt": 1768305424272
}
]
}{
"error": "<error message>"
}Accounts
account_info
Send POST request to /info with method: “account_info”
POST
/
info
curl --request POST \
--url https://api.hotstuff.trade/info \
--header 'Content-Type: application/json' \
--data '{
"method": "account_info",
"params": {
"user": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"collateralID": 1,
"includeHistory": true
}
}'
import requests
url = "https://api.hotstuff.trade/info"
payload = {
"method": "account_info",
"params": {
"user": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"collateralID": 1,
"includeHistory": True
}
}
response = requests.post(url, json=payload)
print(response.json())
const url = "https://api.hotstuff.trade/info";
const payload = {
method: "account_info",
params: {
user: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
collateralID: 1,
includeHistory: true,
},
};
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" => "account_info",
"params" => [
"user" => "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"collateralID" => 1,
"includeHistory" => true
]
]);
$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": "account_info",
"params": map[string]interface{}{
"user": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"collateralID": 1,
"includeHistory": true,
},
}
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\":\"account_info\",\"params\":{\"user\":\"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\"collateralID\":1,\"includeHistory\":true}}";
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: "account_info",
params: {
user: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
collateralID: 1,
includeHistory: true
}
}
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)
{
"account": {
"address": "0x42C183edba036906447372a7c81Eb89D0B9f2175",
"role": 0,
"margin_mode": "cross",
"multi_asset_mode": false,
"hedge_mode": false,
"referrer": "0x944Aa860FA3402bC93401c177ce255494b2C0C86",
"referral_codes": [
"HELLO"
],
"referral_timestamp": 1765207493207,
"created_at_block_timestamp": 1764946705982
},
"rewards": [
{
"Account": "0x42C183edba036906447372a7c81Eb89D0B9f2175",
"CollateralID": 1,
"Source": "referral_commission",
"IsSpot": false,
"Amount": "0",
"ClaimAmount": "3.764047",
"CreatedAt": 1768305424272
}
],
"history": [
{
"Account": "0x42C183edba036906447372a7c81Eb89D0B9f2175",
"CollateralID": 1,
"Source": "referral_commission",
"IsSpot": false,
"Amount": "0.101354",
"ClaimAmount": "0",
"CreatedAt": 1768305424272
}
]
}{
"error": "<error message>"
}Retrieve account information including account details, rewards, and optional referral reward history.
curl --request POST \
--url https://api.hotstuff.trade/info \
--header 'Content-Type: application/json' \
--data '{
"method": "account_info",
"params": {
"user": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"collateralID": 1,
"includeHistory": true
}
}'
import requests
url = "https://api.hotstuff.trade/info"
payload = {
"method": "account_info",
"params": {
"user": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"collateralID": 1,
"includeHistory": True
}
}
response = requests.post(url, json=payload)
print(response.json())
const url = "https://api.hotstuff.trade/info";
const payload = {
method: "account_info",
params: {
user: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
collateralID: 1,
includeHistory: true,
},
};
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" => "account_info",
"params" => [
"user" => "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"collateralID" => 1,
"includeHistory" => true
]
]);
$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": "account_info",
"params": map[string]interface{}{
"user": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"collateralID": 1,
"includeHistory": true,
},
}
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\":\"account_info\",\"params\":{\"user\":\"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\"collateralID\":1,\"includeHistory\":true}}";
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: "account_info",
params: {
user: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
collateralID: 1,
includeHistory: true
}
}
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)