curl --request GET \
--url https://test.deribit.com/api/v2/private/set_member \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 59,
"method": "private/set_member",
"params": {
"member_id": 195,
"name": "Member1",
"is_active": true,
"accounts": [
85867
]
}
}
'import requests
url = "https://test.deribit.com/api/v2/private/set_member"
payload = {
"jsonrpc": "2.0",
"id": 59,
"method": "private/set_member",
"params": {
"member_id": 195,
"name": "Member1",
"is_active": True,
"accounts": [85867]
}
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 59,
method: 'private/set_member',
params: {member_id: 195, name: 'Member1', is_active: true, accounts: [85867]}
})
};
fetch('https://test.deribit.com/api/v2/private/set_member', 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://test.deribit.com/api/v2/private/set_member",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 59,
'method' => 'private/set_member',
'params' => [
'member_id' => 195,
'name' => 'Member1',
'is_active' => true,
'accounts' => [
85867
]
]
]),
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://test.deribit.com/api/v2/private/set_member"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 59,\n \"method\": \"private/set_member\",\n \"params\": {\n \"member_id\": 195,\n \"name\": \"Member1\",\n \"is_active\": true,\n \"accounts\": [\n 85867\n ]\n }\n}")
req, _ := http.NewRequest("GET", 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.get("https://test.deribit.com/api/v2/private/set_member")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 59,\n \"method\": \"private/set_member\",\n \"params\": {\n \"member_id\": 195,\n \"name\": \"Member1\",\n \"is_active\": true,\n \"accounts\": [\n 85867\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.deribit.com/api/v2/private/set_member")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 59,\n \"method\": \"private/set_member\",\n \"params\": {\n \"member_id\": 195,\n \"name\": \"Member1\",\n \"is_active\": true,\n \"accounts\": [\n 85867\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 59,
"result": {
"members": [
{
"member_id": 195,
"main_uid": 57874,
"name": "Member1",
"is_active": true,
"accounts": [
85867
],
"m_tstamp": 1690000000000
}
],
"is_direct_access_allowed": true
}
}private/set_member
Creates a new Direct Access member, or edits an existing one. Returns the resulting list of all members configured for the account.
This method is dedicated to Starbase. See Starbase Account Model for an explanation of Members, portfolios, and their relationship to Deribit accounts.
Omit member_id to create a new member; a non-empty accounts list is then required, and the
member cannot be created inactive. Pass an existing member_id to edit that member’s name or
accounts list, or to toggle its is_active state — toggling is_active and changing
name/accounts cannot be done in the same request, so a pure is_active toggle must resend
the member’s current name and accounts values.
Requires Direct Access trading to be enabled for the account.
Scope: account:read_write and mainaccount
curl --request GET \
--url https://test.deribit.com/api/v2/private/set_member \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 59,
"method": "private/set_member",
"params": {
"member_id": 195,
"name": "Member1",
"is_active": true,
"accounts": [
85867
]
}
}
'import requests
url = "https://test.deribit.com/api/v2/private/set_member"
payload = {
"jsonrpc": "2.0",
"id": 59,
"method": "private/set_member",
"params": {
"member_id": 195,
"name": "Member1",
"is_active": True,
"accounts": [85867]
}
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 59,
method: 'private/set_member',
params: {member_id: 195, name: 'Member1', is_active: true, accounts: [85867]}
})
};
fetch('https://test.deribit.com/api/v2/private/set_member', 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://test.deribit.com/api/v2/private/set_member",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 59,
'method' => 'private/set_member',
'params' => [
'member_id' => 195,
'name' => 'Member1',
'is_active' => true,
'accounts' => [
85867
]
]
]),
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://test.deribit.com/api/v2/private/set_member"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 59,\n \"method\": \"private/set_member\",\n \"params\": {\n \"member_id\": 195,\n \"name\": \"Member1\",\n \"is_active\": true,\n \"accounts\": [\n 85867\n ]\n }\n}")
req, _ := http.NewRequest("GET", 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.get("https://test.deribit.com/api/v2/private/set_member")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 59,\n \"method\": \"private/set_member\",\n \"params\": {\n \"member_id\": 195,\n \"name\": \"Member1\",\n \"is_active\": true,\n \"accounts\": [\n 85867\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.deribit.com/api/v2/private/set_member")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 59,\n \"method\": \"private/set_member\",\n \"params\": {\n \"member_id\": 195,\n \"name\": \"Member1\",\n \"is_active\": true,\n \"accounts\": [\n 85867\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 59,
"result": {
"members": [
{
"member_id": 195,
"main_uid": 57874,
"name": "Member1",
"is_active": true,
"accounts": [
85867
],
"m_tstamp": 1690000000000
}
],
"is_direct_access_allowed": true
}
}Query Parameters
ID of the member to edit. Omit to create a new member.
x >= 1195
Name of the member. Always required — must be sent in every request, even when only toggling is_active.
64"Member1"
Whether the member should be active. true by default. A member cannot be created inactive.
true
List of (sub)account user ids to grant the member Direct Access trading rights on. Defaults to []; creating a member requires a non-empty list. On edit the list is replaced wholesale — omitting accounts clears the member's accounts.
x >= 1[85867]
Response
Success response
The JSON-RPC version (2.0)
2.0 Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Name of the member.
64"Member1"
Whether the member is active. Only active members have Direct Access trading rights.
true
Member identifier. Only present when the request is made from the main account.
x >= 1195
User ID of the main account the member belongs to. Only present when the request is made from the main account.
x >= 157874
List of (sub)account user ids the member has Direct Access trading rights on. Only present when the request is made from the main account.
x >= 1[85867]
Timestamp of the last modification of the member, in milliseconds since the UNIX epoch. Only present when the request is made from the main account.
x >= 01690000000000
Whether Direct Access trading is enabled for the account.
true
The id that was sent in the request
Related topics
Account ModelStarbase API ChangelogProduction Readiness Checklistprivate/delete_memberprivate/get_membersWas this page helpful?