Get Customer Risk Profile For Tab
curl --request GET \
--url https://api.{your-broker}.slate-labs.com/risk/customers/{customer_id}/profileimport requests
url = "https://api.{your-broker}.slate-labs.com/risk/customers/{customer_id}/profile"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.{your-broker}.slate-labs.com/risk/customers/{customer_id}/profile', 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.{your-broker}.slate-labs.com/risk/customers/{customer_id}/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.{your-broker}.slate-labs.com/risk/customers/{customer_id}/profile"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.{your-broker}.slate-labs.com/risk/customers/{customer_id}/profile")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{your-broker}.slate-labs.com/risk/customers/{customer_id}/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"classification": "<string>",
"risk_flags": [
"<string>"
],
"classification_changed_at": "2023-11-07T05:31:56Z",
"last_computed_at": "2023-11-07T05:31:56Z",
"metrics": {
"trades_30d": {
"total": 123,
"winning": 123,
"losing": 123,
"win_rate": 123
},
"pnl_30d": {
"total_usd": 123,
"gross_wins_usd": 123,
"gross_losses_usd": 123,
"profit_factor": 123,
"avg_trade_pnl_usd": 123
},
"timing_30d": {
"avg_hold_seconds": 123,
"median_hold_seconds": 123,
"min_hold_seconds": 123
},
"latency_30d": {
"trades_under_60s": 123,
"trades_under_300s": 123,
"pct_trades_under_60s": 123,
"short_hold_win_rate": 123,
"trades_around_news": 123
},
"concentration_30d": {
"primary_symbol": "<string>",
"primary_symbol_pct": 123,
"symbol_count": 123
},
"lifetime": {
"total_trades": 123,
"total_pnl_usd": 123,
"win_rate": 123
}
},
"rule_thresholds": {
"min_trades_to_classify": 123,
"watchlist": {},
"toxic": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Risk
Get Customer Risk Profile For Tab
Single-payload risk profile for the CRM customer-detail Risk tab.
GET
/
risk
/
customers
/
{customer_id}
/
profile
Get Customer Risk Profile For Tab
curl --request GET \
--url https://api.{your-broker}.slate-labs.com/risk/customers/{customer_id}/profileimport requests
url = "https://api.{your-broker}.slate-labs.com/risk/customers/{customer_id}/profile"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.{your-broker}.slate-labs.com/risk/customers/{customer_id}/profile', 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.{your-broker}.slate-labs.com/risk/customers/{customer_id}/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.{your-broker}.slate-labs.com/risk/customers/{customer_id}/profile"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.{your-broker}.slate-labs.com/risk/customers/{customer_id}/profile")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{your-broker}.slate-labs.com/risk/customers/{customer_id}/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"classification": "<string>",
"risk_flags": [
"<string>"
],
"classification_changed_at": "2023-11-07T05:31:56Z",
"last_computed_at": "2023-11-07T05:31:56Z",
"metrics": {
"trades_30d": {
"total": 123,
"winning": 123,
"losing": 123,
"win_rate": 123
},
"pnl_30d": {
"total_usd": 123,
"gross_wins_usd": 123,
"gross_losses_usd": 123,
"profit_factor": 123,
"avg_trade_pnl_usd": 123
},
"timing_30d": {
"avg_hold_seconds": 123,
"median_hold_seconds": 123,
"min_hold_seconds": 123
},
"latency_30d": {
"trades_under_60s": 123,
"trades_under_300s": 123,
"pct_trades_under_60s": 123,
"short_hold_win_rate": 123,
"trades_around_news": 123
},
"concentration_30d": {
"primary_symbol": "<string>",
"primary_symbol_pct": 123,
"symbol_count": 123
},
"lifetime": {
"total_trades": 123,
"total_pnl_usd": 123,
"win_rate": 123
}
},
"rule_thresholds": {
"min_trades_to_classify": 123,
"watchlist": {},
"toxic": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Path Parameters
Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I