Update Group
curl --request PATCH \
--url https://api.{your-broker}.slate-labs.com/groups/{group_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"currency": "<string>",
"default_leverage": 500,
"margin_call_level": 260,
"stopout_level": 42.5,
"commission_type": "<string>",
"commission_value": 25,
"swap_enabled": true,
"swap_multiplier": 5.005,
"swap_free": true,
"swap_free_days": 182,
"is_islamic": true,
"max_exposure": 1,
"net_max_exposure": true,
"max_open_positions": 2,
"is_default": true,
"is_active": true
}
'import requests
url = "https://api.{your-broker}.slate-labs.com/groups/{group_id}"
payload = {
"name": "<string>",
"description": "<string>",
"currency": "<string>",
"default_leverage": 500,
"margin_call_level": 260,
"stopout_level": 42.5,
"commission_type": "<string>",
"commission_value": 25,
"swap_enabled": True,
"swap_multiplier": 5.005,
"swap_free": True,
"swap_free_days": 182,
"is_islamic": True,
"max_exposure": 1,
"net_max_exposure": True,
"max_open_positions": 2,
"is_default": True,
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
currency: '<string>',
default_leverage: 500,
margin_call_level: 260,
stopout_level: 42.5,
commission_type: '<string>',
commission_value: 25,
swap_enabled: true,
swap_multiplier: 5.005,
swap_free: true,
swap_free_days: 182,
is_islamic: true,
max_exposure: 1,
net_max_exposure: true,
max_open_positions: 2,
is_default: true,
is_active: true
})
};
fetch('https://api.{your-broker}.slate-labs.com/groups/{group_id}', 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/groups/{group_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'currency' => '<string>',
'default_leverage' => 500,
'margin_call_level' => 260,
'stopout_level' => 42.5,
'commission_type' => '<string>',
'commission_value' => 25,
'swap_enabled' => true,
'swap_multiplier' => 5.005,
'swap_free' => true,
'swap_free_days' => 182,
'is_islamic' => true,
'max_exposure' => 1,
'net_max_exposure' => true,
'max_open_positions' => 2,
'is_default' => true,
'is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.{your-broker}.slate-labs.com/groups/{group_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"default_leverage\": 500,\n \"margin_call_level\": 260,\n \"stopout_level\": 42.5,\n \"commission_type\": \"<string>\",\n \"commission_value\": 25,\n \"swap_enabled\": true,\n \"swap_multiplier\": 5.005,\n \"swap_free\": true,\n \"swap_free_days\": 182,\n \"is_islamic\": true,\n \"max_exposure\": 1,\n \"net_max_exposure\": true,\n \"max_open_positions\": 2,\n \"is_default\": true,\n \"is_active\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.{your-broker}.slate-labs.com/groups/{group_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"default_leverage\": 500,\n \"margin_call_level\": 260,\n \"stopout_level\": 42.5,\n \"commission_type\": \"<string>\",\n \"commission_value\": 25,\n \"swap_enabled\": true,\n \"swap_multiplier\": 5.005,\n \"swap_free\": true,\n \"swap_free_days\": 182,\n \"is_islamic\": true,\n \"max_exposure\": 1,\n \"net_max_exposure\": true,\n \"max_open_positions\": 2,\n \"is_default\": true,\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{your-broker}.slate-labs.com/groups/{group_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"default_leverage\": 500,\n \"margin_call_level\": 260,\n \"stopout_level\": 42.5,\n \"commission_type\": \"<string>\",\n \"commission_value\": 25,\n \"swap_enabled\": true,\n \"swap_multiplier\": 5.005,\n \"swap_free\": true,\n \"swap_free_days\": 182,\n \"is_islamic\": true,\n \"max_exposure\": 1,\n \"net_max_exposure\": true,\n \"max_open_positions\": 2,\n \"is_default\": true,\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"currency": "<string>",
"default_leverage": 123,
"margin_call_level": 123,
"stopout_level": 123,
"commission_type": "<string>",
"commission_value": 123,
"swap_enabled": true,
"swap_multiplier": 123,
"swap_free": true,
"swap_free_days": 123,
"is_islamic": true,
"is_default": true,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"max_exposure": 123,
"net_max_exposure": false,
"max_open_positions": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Instruments & Groups
Update Group
PATCH
/
groups
/
{group_id}
Update Group
curl --request PATCH \
--url https://api.{your-broker}.slate-labs.com/groups/{group_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"currency": "<string>",
"default_leverage": 500,
"margin_call_level": 260,
"stopout_level": 42.5,
"commission_type": "<string>",
"commission_value": 25,
"swap_enabled": true,
"swap_multiplier": 5.005,
"swap_free": true,
"swap_free_days": 182,
"is_islamic": true,
"max_exposure": 1,
"net_max_exposure": true,
"max_open_positions": 2,
"is_default": true,
"is_active": true
}
'import requests
url = "https://api.{your-broker}.slate-labs.com/groups/{group_id}"
payload = {
"name": "<string>",
"description": "<string>",
"currency": "<string>",
"default_leverage": 500,
"margin_call_level": 260,
"stopout_level": 42.5,
"commission_type": "<string>",
"commission_value": 25,
"swap_enabled": True,
"swap_multiplier": 5.005,
"swap_free": True,
"swap_free_days": 182,
"is_islamic": True,
"max_exposure": 1,
"net_max_exposure": True,
"max_open_positions": 2,
"is_default": True,
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
currency: '<string>',
default_leverage: 500,
margin_call_level: 260,
stopout_level: 42.5,
commission_type: '<string>',
commission_value: 25,
swap_enabled: true,
swap_multiplier: 5.005,
swap_free: true,
swap_free_days: 182,
is_islamic: true,
max_exposure: 1,
net_max_exposure: true,
max_open_positions: 2,
is_default: true,
is_active: true
})
};
fetch('https://api.{your-broker}.slate-labs.com/groups/{group_id}', 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/groups/{group_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'currency' => '<string>',
'default_leverage' => 500,
'margin_call_level' => 260,
'stopout_level' => 42.5,
'commission_type' => '<string>',
'commission_value' => 25,
'swap_enabled' => true,
'swap_multiplier' => 5.005,
'swap_free' => true,
'swap_free_days' => 182,
'is_islamic' => true,
'max_exposure' => 1,
'net_max_exposure' => true,
'max_open_positions' => 2,
'is_default' => true,
'is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.{your-broker}.slate-labs.com/groups/{group_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"default_leverage\": 500,\n \"margin_call_level\": 260,\n \"stopout_level\": 42.5,\n \"commission_type\": \"<string>\",\n \"commission_value\": 25,\n \"swap_enabled\": true,\n \"swap_multiplier\": 5.005,\n \"swap_free\": true,\n \"swap_free_days\": 182,\n \"is_islamic\": true,\n \"max_exposure\": 1,\n \"net_max_exposure\": true,\n \"max_open_positions\": 2,\n \"is_default\": true,\n \"is_active\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.{your-broker}.slate-labs.com/groups/{group_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"default_leverage\": 500,\n \"margin_call_level\": 260,\n \"stopout_level\": 42.5,\n \"commission_type\": \"<string>\",\n \"commission_value\": 25,\n \"swap_enabled\": true,\n \"swap_multiplier\": 5.005,\n \"swap_free\": true,\n \"swap_free_days\": 182,\n \"is_islamic\": true,\n \"max_exposure\": 1,\n \"net_max_exposure\": true,\n \"max_open_positions\": 2,\n \"is_default\": true,\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{your-broker}.slate-labs.com/groups/{group_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"default_leverage\": 500,\n \"margin_call_level\": 260,\n \"stopout_level\": 42.5,\n \"commission_type\": \"<string>\",\n \"commission_value\": 25,\n \"swap_enabled\": true,\n \"swap_multiplier\": 5.005,\n \"swap_free\": true,\n \"swap_free_days\": 182,\n \"is_islamic\": true,\n \"max_exposure\": 1,\n \"net_max_exposure\": true,\n \"max_open_positions\": 2,\n \"is_default\": true,\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"currency": "<string>",
"default_leverage": 123,
"margin_call_level": 123,
"stopout_level": 123,
"commission_type": "<string>",
"commission_value": 123,
"swap_enabled": true,
"swap_multiplier": 123,
"swap_free": true,
"swap_free_days": 123,
"is_islamic": true,
"is_default": true,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"max_exposure": 123,
"net_max_exposure": false,
"max_open_positions": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Required string length:
1 - 64Required range:
1 <= x <= 1000Required range:
20 <= x <= 500Required range:
5 <= x <= 80Required range:
0 <= x <= 50Required range:
0.01 <= x <= 10Required range:
0 <= x <= 365Required range:
x >= 0Required range:
x >= 1Response
Successful Response
⌘I