Account
Create a firm-scoped partner session
Exchanges partner app credentials + a trader API key + a firm for a short-lived bearer token. The token only acknowledges the trader’s accounts at that firm: accounts the same trader holds at other firms are invisible to the session, for reads, writes and WebSocket events alike.
POST
/
trade
/
partner
/
session
Create a firm-scoped partner session
curl --request POST \
--url https://api.hyperprop.com/trade/partner/session \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"app_secret": "<string>",
"firm": "<string>"
}
'import requests
url = "https://api.hyperprop.com/trade/partner/session"
payload = {
"api_key": "<string>",
"app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"app_secret": "<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>',
app_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
app_secret: '<string>',
firm: '<string>'
})
};
fetch('https://api.hyperprop.com/trade/partner/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/partner/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>',
'app_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'app_secret' => '<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/partner/session"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"app_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"app_secret\": \"<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/partner/session")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"app_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"app_secret\": \"<string>\",\n \"firm\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/trade/partner/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 \"app_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"app_secret\": \"<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": 3600,
"organization_id": "7e8f9a0b-4c5d-4e6f-8a9b-0c1d2e3f4a51",
"organization_name": "FakePropFirm",
"organization_slug": "fakepropfirm",
"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
}Body
application/json
Request body for the partner session exchange.
Response
Session created
Bearer token for subsequent requests. Scoped to the firm's accounts.
Trader accounts this session can see and trade.
Seconds until the token expires; re-login to refresh.
Required range:
x >= 0⌘I
Create a firm-scoped partner session
curl --request POST \
--url https://api.hyperprop.com/trade/partner/session \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"app_secret": "<string>",
"firm": "<string>"
}
'import requests
url = "https://api.hyperprop.com/trade/partner/session"
payload = {
"api_key": "<string>",
"app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"app_secret": "<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>',
app_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
app_secret: '<string>',
firm: '<string>'
})
};
fetch('https://api.hyperprop.com/trade/partner/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/partner/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>',
'app_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'app_secret' => '<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/partner/session"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"app_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"app_secret\": \"<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/partner/session")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"app_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"app_secret\": \"<string>\",\n \"firm\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/trade/partner/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 \"app_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"app_secret\": \"<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": 3600,
"organization_id": "7e8f9a0b-4c5d-4e6f-8a9b-0c1d2e3f4a51",
"organization_name": "FakePropFirm",
"organization_slug": "fakepropfirm",
"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
}