Account
Create a personal API key session
Exchanges the trader’s own personal API key for a short-lived bearer
token. No partner app credentials are needed. The session is limited to
the trader’s own accounts. Market data isn’t included: futures positions
and accounts carry no live market values.
The same exchange is accepted on /trade/partner/session when the body
has no app_id or app_secret.
POST
/
trade
/
api-keys
/
session
Create a personal API key session
curl --request POST \
--url https://api.hyperprop.com/trade/api-keys/session \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"email": "<string>",
"firm": "<string>"
}
'import requests
url = "https://api.hyperprop.com/trade/api-keys/session"
payload = {
"api_key": "<string>",
"email": "<string>",
"firm": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({api_key: '<string>', email: '<string>', firm: '<string>'})
};
fetch('https://api.hyperprop.com/trade/api-keys/session', 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.hyperprop.com/trade/api-keys/session",
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([
'api_key' => '<string>',
'email' => '<string>',
'firm' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.hyperprop.com/trade/api-keys/session"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"email\": \"<string>\",\n \"firm\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.hyperprop.com/trade/api-keys/session")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"email\": \"<string>\",\n \"firm\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/trade/api-keys/session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"email\": \"<string>\",\n \"firm\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": null,
"data": {
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"account_ids": [
"b2e571d1-54b6-42a5-a09a-ccd543594567"
],
"expires_in": 900,
"markets": [
"crypto",
"futures"
],
"organization_id": "7e8f9a0b-4c5d-4e6f-8a9b-0c1d2e3f4a51",
"organization_name": "FakePropFirm",
"organization_slug": "fakepropfirm",
"organizations": [
{
"account_ids": [
"b2e571d1-54b6-42a5-a09a-ccd543594567"
],
"id": "7e8f9a0b-4c5d-4e6f-8a9b-0c1d2e3f4a51",
"name": "FakePropFirm",
"slug": "fakepropfirm"
}
],
"scope": "trade",
"session_type": "personal_api_key",
"token_type": "Bearer"
},
"error": null,
"success": true
}{
"code": "ERROR_CODE",
"data": null,
"error": "Error message describing what went wrong",
"success": false
}{
"code": "ERROR_CODE",
"data": null,
"error": "Error message describing what went wrong",
"success": false
}{
"code": "ERROR_CODE",
"data": null,
"error": "Error message describing what went wrong",
"success": false
}{
"code": "ERROR_CODE",
"data": null,
"error": "Error message describing what went wrong",
"success": false
}Body
application/json
Request body for a personal API key session.
Response
Session created
⌘I
Create a personal API key session
curl --request POST \
--url https://api.hyperprop.com/trade/api-keys/session \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"email": "<string>",
"firm": "<string>"
}
'import requests
url = "https://api.hyperprop.com/trade/api-keys/session"
payload = {
"api_key": "<string>",
"email": "<string>",
"firm": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({api_key: '<string>', email: '<string>', firm: '<string>'})
};
fetch('https://api.hyperprop.com/trade/api-keys/session', 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.hyperprop.com/trade/api-keys/session",
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([
'api_key' => '<string>',
'email' => '<string>',
'firm' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.hyperprop.com/trade/api-keys/session"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"email\": \"<string>\",\n \"firm\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.hyperprop.com/trade/api-keys/session")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"email\": \"<string>\",\n \"firm\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/trade/api-keys/session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"email\": \"<string>\",\n \"firm\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": null,
"data": {
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"account_ids": [
"b2e571d1-54b6-42a5-a09a-ccd543594567"
],
"expires_in": 900,
"markets": [
"crypto",
"futures"
],
"organization_id": "7e8f9a0b-4c5d-4e6f-8a9b-0c1d2e3f4a51",
"organization_name": "FakePropFirm",
"organization_slug": "fakepropfirm",
"organizations": [
{
"account_ids": [
"b2e571d1-54b6-42a5-a09a-ccd543594567"
],
"id": "7e8f9a0b-4c5d-4e6f-8a9b-0c1d2e3f4a51",
"name": "FakePropFirm",
"slug": "fakepropfirm"
}
],
"scope": "trade",
"session_type": "personal_api_key",
"token_type": "Bearer"
},
"error": null,
"success": true
}{
"code": "ERROR_CODE",
"data": null,
"error": "Error message describing what went wrong",
"success": false
}{
"code": "ERROR_CODE",
"data": null,
"error": "Error message describing what went wrong",
"success": false
}{
"code": "ERROR_CODE",
"data": null,
"error": "Error message describing what went wrong",
"success": false
}{
"code": "ERROR_CODE",
"data": null,
"error": "Error message describing what went wrong",
"success": false
}