private/create_vault
Registers a new vault on-chain from a signed action; the signing wallet becomes the vault’s curator and seeds the initial deposit from its funding subaccount. Inputs set the deposit asset, initial deposit amount, initial share price, management/performance fee rates (in basis points), max slippage, redemption cooldown, an optional benchmark asset for the high-water mark, and the max sequencer fee authorized. Requires the vault curator-create permission.
curl --request POST \
--url https://api.derive.xyz/v3/private/create_vault \
--header 'Content-Type: application/json' \
--data '
{
"cooldown_sec": 1,
"deposit_spot_asset": "<string>",
"initial_deposit": "<string>",
"initial_share_price_usd": "<string>",
"management_fee_bps": 1,
"manager_id": 1,
"max_fee_usd": "<string>",
"max_slippage_bps": 1,
"nonce": "<string>",
"performance_fee_bps": 1,
"signature": "<string>",
"signature_expiry_sec": 1,
"signer": "<string>",
"subaccount_id": 1,
"benchmark_asset": "<string>"
}
'import requests
url = "https://api.derive.xyz/v3/private/create_vault"
payload = {
"cooldown_sec": 1,
"deposit_spot_asset": "<string>",
"initial_deposit": "<string>",
"initial_share_price_usd": "<string>",
"management_fee_bps": 1,
"manager_id": 1,
"max_fee_usd": "<string>",
"max_slippage_bps": 1,
"nonce": "<string>",
"performance_fee_bps": 1,
"signature": "<string>",
"signature_expiry_sec": 1,
"signer": "<string>",
"subaccount_id": 1,
"benchmark_asset": "<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({
cooldown_sec: 1,
deposit_spot_asset: '<string>',
initial_deposit: '<string>',
initial_share_price_usd: '<string>',
management_fee_bps: 1,
manager_id: 1,
max_fee_usd: '<string>',
max_slippage_bps: 1,
nonce: '<string>',
performance_fee_bps: 1,
signature: '<string>',
signature_expiry_sec: 1,
signer: '<string>',
subaccount_id: 1,
benchmark_asset: '<string>'
})
};
fetch('https://api.derive.xyz/v3/private/create_vault', 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.derive.xyz/v3/private/create_vault",
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([
'cooldown_sec' => 1,
'deposit_spot_asset' => '<string>',
'initial_deposit' => '<string>',
'initial_share_price_usd' => '<string>',
'management_fee_bps' => 1,
'manager_id' => 1,
'max_fee_usd' => '<string>',
'max_slippage_bps' => 1,
'nonce' => '<string>',
'performance_fee_bps' => 1,
'signature' => '<string>',
'signature_expiry_sec' => 1,
'signer' => '<string>',
'subaccount_id' => 1,
'benchmark_asset' => '<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.derive.xyz/v3/private/create_vault"
payload := strings.NewReader("{\n \"cooldown_sec\": 1,\n \"deposit_spot_asset\": \"<string>\",\n \"initial_deposit\": \"<string>\",\n \"initial_share_price_usd\": \"<string>\",\n \"management_fee_bps\": 1,\n \"manager_id\": 1,\n \"max_fee_usd\": \"<string>\",\n \"max_slippage_bps\": 1,\n \"nonce\": \"<string>\",\n \"performance_fee_bps\": 1,\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 1,\n \"signer\": \"<string>\",\n \"subaccount_id\": 1,\n \"benchmark_asset\": \"<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.derive.xyz/v3/private/create_vault")
.header("Content-Type", "application/json")
.body("{\n \"cooldown_sec\": 1,\n \"deposit_spot_asset\": \"<string>\",\n \"initial_deposit\": \"<string>\",\n \"initial_share_price_usd\": \"<string>\",\n \"management_fee_bps\": 1,\n \"manager_id\": 1,\n \"max_fee_usd\": \"<string>\",\n \"max_slippage_bps\": 1,\n \"nonce\": \"<string>\",\n \"performance_fee_bps\": 1,\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 1,\n \"signer\": \"<string>\",\n \"subaccount_id\": 1,\n \"benchmark_asset\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.derive.xyz/v3/private/create_vault")
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 \"cooldown_sec\": 1,\n \"deposit_spot_asset\": \"<string>\",\n \"initial_deposit\": \"<string>\",\n \"initial_share_price_usd\": \"<string>\",\n \"management_fee_bps\": 1,\n \"manager_id\": 1,\n \"max_fee_usd\": \"<string>\",\n \"max_slippage_bps\": 1,\n \"nonce\": \"<string>\",\n \"performance_fee_bps\": 1,\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 1,\n \"signer\": \"<string>\",\n \"subaccount_id\": 1,\n \"benchmark_asset\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"op_uuid": "<string>",
"operation_id": 1
}Body
Fields common to every signed vault action. They appear alongside each endpoint's action-specific parameters in the same request object.
x >= 020-byte Ethereum address as a 0x-prefixed lowercase hex string.
42^0x[0-9a-fA-F]{40}$Initial deposit in the vault's deposit asset, as a USD decimal string (e.g. "15000").
Initial share price the vault is seeded at, in USD, as a decimal string (e.g. "1" or "100"). Must lie within the protocol's permitted range.
x >= 0x >= 0Maximum sequencer fee the signer authorises, in USD, as a decimal string (e.g. "1.5").
x >= 0x >= 00x-prefixed hex of the 65-byte EOA signature.
x >= 020-byte Ethereum address as a 0x-prefixed lowercase hex string.
42^0x[0-9a-fA-F]{40}$The subaccount the action is signed on; which subaccount applies depends on the specific method — see that method's reference.
x >= 0Spot asset to denominate the high-water mark in. Omit (or null) for the feed-less USD default; set it to charge performance fees only on outperformance measured against that asset.
42^0x[0-9a-fA-F]{40}$curl --request POST \
--url https://api.derive.xyz/v3/private/create_vault \
--header 'Content-Type: application/json' \
--data '
{
"cooldown_sec": 1,
"deposit_spot_asset": "<string>",
"initial_deposit": "<string>",
"initial_share_price_usd": "<string>",
"management_fee_bps": 1,
"manager_id": 1,
"max_fee_usd": "<string>",
"max_slippage_bps": 1,
"nonce": "<string>",
"performance_fee_bps": 1,
"signature": "<string>",
"signature_expiry_sec": 1,
"signer": "<string>",
"subaccount_id": 1,
"benchmark_asset": "<string>"
}
'import requests
url = "https://api.derive.xyz/v3/private/create_vault"
payload = {
"cooldown_sec": 1,
"deposit_spot_asset": "<string>",
"initial_deposit": "<string>",
"initial_share_price_usd": "<string>",
"management_fee_bps": 1,
"manager_id": 1,
"max_fee_usd": "<string>",
"max_slippage_bps": 1,
"nonce": "<string>",
"performance_fee_bps": 1,
"signature": "<string>",
"signature_expiry_sec": 1,
"signer": "<string>",
"subaccount_id": 1,
"benchmark_asset": "<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({
cooldown_sec: 1,
deposit_spot_asset: '<string>',
initial_deposit: '<string>',
initial_share_price_usd: '<string>',
management_fee_bps: 1,
manager_id: 1,
max_fee_usd: '<string>',
max_slippage_bps: 1,
nonce: '<string>',
performance_fee_bps: 1,
signature: '<string>',
signature_expiry_sec: 1,
signer: '<string>',
subaccount_id: 1,
benchmark_asset: '<string>'
})
};
fetch('https://api.derive.xyz/v3/private/create_vault', 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.derive.xyz/v3/private/create_vault",
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([
'cooldown_sec' => 1,
'deposit_spot_asset' => '<string>',
'initial_deposit' => '<string>',
'initial_share_price_usd' => '<string>',
'management_fee_bps' => 1,
'manager_id' => 1,
'max_fee_usd' => '<string>',
'max_slippage_bps' => 1,
'nonce' => '<string>',
'performance_fee_bps' => 1,
'signature' => '<string>',
'signature_expiry_sec' => 1,
'signer' => '<string>',
'subaccount_id' => 1,
'benchmark_asset' => '<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.derive.xyz/v3/private/create_vault"
payload := strings.NewReader("{\n \"cooldown_sec\": 1,\n \"deposit_spot_asset\": \"<string>\",\n \"initial_deposit\": \"<string>\",\n \"initial_share_price_usd\": \"<string>\",\n \"management_fee_bps\": 1,\n \"manager_id\": 1,\n \"max_fee_usd\": \"<string>\",\n \"max_slippage_bps\": 1,\n \"nonce\": \"<string>\",\n \"performance_fee_bps\": 1,\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 1,\n \"signer\": \"<string>\",\n \"subaccount_id\": 1,\n \"benchmark_asset\": \"<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.derive.xyz/v3/private/create_vault")
.header("Content-Type", "application/json")
.body("{\n \"cooldown_sec\": 1,\n \"deposit_spot_asset\": \"<string>\",\n \"initial_deposit\": \"<string>\",\n \"initial_share_price_usd\": \"<string>\",\n \"management_fee_bps\": 1,\n \"manager_id\": 1,\n \"max_fee_usd\": \"<string>\",\n \"max_slippage_bps\": 1,\n \"nonce\": \"<string>\",\n \"performance_fee_bps\": 1,\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 1,\n \"signer\": \"<string>\",\n \"subaccount_id\": 1,\n \"benchmark_asset\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.derive.xyz/v3/private/create_vault")
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 \"cooldown_sec\": 1,\n \"deposit_spot_asset\": \"<string>\",\n \"initial_deposit\": \"<string>\",\n \"initial_share_price_usd\": \"<string>\",\n \"management_fee_bps\": 1,\n \"manager_id\": 1,\n \"max_fee_usd\": \"<string>\",\n \"max_slippage_bps\": 1,\n \"nonce\": \"<string>\",\n \"performance_fee_bps\": 1,\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 1,\n \"signer\": \"<string>\",\n \"subaccount_id\": 1,\n \"benchmark_asset\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"op_uuid": "<string>",
"operation_id": 1
}