curl --request POST \
--url https://hip4-api.totalis.trade/v1/core-exits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"schema_version": 1,
"request_id": "0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a50",
"sent_at": "2026-10-16T12:00:00Z",
"command": {
"account": "0x1111111111111111111111111111111111111111",
"to": "0x3333333333333333333333333333333333333333",
"amount": "25000000",
"expiry": "1792152300",
"salt": "84190357266103877",
"signature": "0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab",
"purpose": "ORDER"
}
}
'import requests
url = "https://hip4-api.totalis.trade/v1/core-exits"
payload = {
"schema_version": 1,
"request_id": "0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a50",
"sent_at": "2026-10-16T12:00:00Z",
"command": {
"account": "0x1111111111111111111111111111111111111111",
"to": "0x3333333333333333333333333333333333333333",
"amount": "25000000",
"expiry": "1792152300",
"salt": "84190357266103877",
"signature": "0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab",
"purpose": "ORDER"
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
schema_version: 1,
request_id: '0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a50',
sent_at: '2026-10-16T12:00:00Z',
command: {
account: '0x1111111111111111111111111111111111111111',
to: '0x3333333333333333333333333333333333333333',
amount: '25000000',
expiry: '1792152300',
salt: '84190357266103877',
signature: '0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab',
purpose: 'ORDER'
}
})
};
fetch('https://hip4-api.totalis.trade/v1/core-exits', 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://hip4-api.totalis.trade/v1/core-exits",
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([
'schema_version' => 1,
'request_id' => '0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a50',
'sent_at' => '2026-10-16T12:00:00Z',
'command' => [
'account' => '0x1111111111111111111111111111111111111111',
'to' => '0x3333333333333333333333333333333333333333',
'amount' => '25000000',
'expiry' => '1792152300',
'salt' => '84190357266103877',
'signature' => '0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab',
'purpose' => 'ORDER'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://hip4-api.totalis.trade/v1/core-exits"
payload := strings.NewReader("{\n \"schema_version\": 1,\n \"request_id\": \"0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a50\",\n \"sent_at\": \"2026-10-16T12:00:00Z\",\n \"command\": {\n \"account\": \"0x1111111111111111111111111111111111111111\",\n \"to\": \"0x3333333333333333333333333333333333333333\",\n \"amount\": \"25000000\",\n \"expiry\": \"1792152300\",\n \"salt\": \"84190357266103877\",\n \"signature\": \"0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab\",\n \"purpose\": \"ORDER\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.post("https://hip4-api.totalis.trade/v1/core-exits")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"schema_version\": 1,\n \"request_id\": \"0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a50\",\n \"sent_at\": \"2026-10-16T12:00:00Z\",\n \"command\": {\n \"account\": \"0x1111111111111111111111111111111111111111\",\n \"to\": \"0x3333333333333333333333333333333333333333\",\n \"amount\": \"25000000\",\n \"expiry\": \"1792152300\",\n \"salt\": \"84190357266103877\",\n \"signature\": \"0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab\",\n \"purpose\": \"ORDER\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hip4-api.totalis.trade/v1/core-exits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schema_version\": 1,\n \"request_id\": \"0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a50\",\n \"sent_at\": \"2026-10-16T12:00:00Z\",\n \"command\": {\n \"account\": \"0x1111111111111111111111111111111111111111\",\n \"to\": \"0x3333333333333333333333333333333333333333\",\n \"amount\": \"25000000\",\n \"expiry\": \"1792152300\",\n \"salt\": \"84190357266103877\",\n \"signature\": \"0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab\",\n \"purpose\": \"ORDER\"\n }\n}"
response = http.request(request)
puts response.read_body{
"exit_id": "0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a2b",
"vault_address": "0x4444444444444444444444444444444444444444",
"status": "QUEUED",
"purpose": "ORDER",
"account": "0x1111111111111111111111111111111111111111",
"amount": "25000000",
"router_address": "0x3333333333333333333333333333333333333333",
"expiry": "1792152300",
"exit_digest": "0x7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e",
"activation_fee_accepted": false,
"operation": {
"operation_id": "0x4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d",
"status": "QUEUED",
"transaction_hash": null
},
"sent": null,
"credit": null,
"created_at": "2026-10-16T12:00:00Z",
"updated_at": "2026-10-16T12:00:00Z"
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "UNAUTHENTICATED",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "FORBIDDEN",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "IDENTITY_NOT_FOUND",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "IDEMPOTENCY_KEY_REUSED",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "RATE_LIMITED",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "BACKOFF"
}
}{
"error": {
"code": "AUTHORIZATION_UNAVAILABLE",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "BACKOFF"
}
}Create HyperCore exit
Moves free vault cash to the account’s own HyperCore spot balance by relaying its owner-signed Exit through the CoreExit router, which a wallet needs before a HyperCore order or withdrawal can spend it.
Requires a key for your account with funding:withdraw, sponsorship:use.
A wallet session for the account also works, with no scope limit, sent from its Origin.
curl --request POST \
--url https://hip4-api.totalis.trade/v1/core-exits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"schema_version": 1,
"request_id": "0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a50",
"sent_at": "2026-10-16T12:00:00Z",
"command": {
"account": "0x1111111111111111111111111111111111111111",
"to": "0x3333333333333333333333333333333333333333",
"amount": "25000000",
"expiry": "1792152300",
"salt": "84190357266103877",
"signature": "0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab",
"purpose": "ORDER"
}
}
'import requests
url = "https://hip4-api.totalis.trade/v1/core-exits"
payload = {
"schema_version": 1,
"request_id": "0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a50",
"sent_at": "2026-10-16T12:00:00Z",
"command": {
"account": "0x1111111111111111111111111111111111111111",
"to": "0x3333333333333333333333333333333333333333",
"amount": "25000000",
"expiry": "1792152300",
"salt": "84190357266103877",
"signature": "0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab",
"purpose": "ORDER"
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
schema_version: 1,
request_id: '0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a50',
sent_at: '2026-10-16T12:00:00Z',
command: {
account: '0x1111111111111111111111111111111111111111',
to: '0x3333333333333333333333333333333333333333',
amount: '25000000',
expiry: '1792152300',
salt: '84190357266103877',
signature: '0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab',
purpose: 'ORDER'
}
})
};
fetch('https://hip4-api.totalis.trade/v1/core-exits', 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://hip4-api.totalis.trade/v1/core-exits",
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([
'schema_version' => 1,
'request_id' => '0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a50',
'sent_at' => '2026-10-16T12:00:00Z',
'command' => [
'account' => '0x1111111111111111111111111111111111111111',
'to' => '0x3333333333333333333333333333333333333333',
'amount' => '25000000',
'expiry' => '1792152300',
'salt' => '84190357266103877',
'signature' => '0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab',
'purpose' => 'ORDER'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://hip4-api.totalis.trade/v1/core-exits"
payload := strings.NewReader("{\n \"schema_version\": 1,\n \"request_id\": \"0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a50\",\n \"sent_at\": \"2026-10-16T12:00:00Z\",\n \"command\": {\n \"account\": \"0x1111111111111111111111111111111111111111\",\n \"to\": \"0x3333333333333333333333333333333333333333\",\n \"amount\": \"25000000\",\n \"expiry\": \"1792152300\",\n \"salt\": \"84190357266103877\",\n \"signature\": \"0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab\",\n \"purpose\": \"ORDER\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.post("https://hip4-api.totalis.trade/v1/core-exits")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"schema_version\": 1,\n \"request_id\": \"0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a50\",\n \"sent_at\": \"2026-10-16T12:00:00Z\",\n \"command\": {\n \"account\": \"0x1111111111111111111111111111111111111111\",\n \"to\": \"0x3333333333333333333333333333333333333333\",\n \"amount\": \"25000000\",\n \"expiry\": \"1792152300\",\n \"salt\": \"84190357266103877\",\n \"signature\": \"0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab\",\n \"purpose\": \"ORDER\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hip4-api.totalis.trade/v1/core-exits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schema_version\": 1,\n \"request_id\": \"0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a50\",\n \"sent_at\": \"2026-10-16T12:00:00Z\",\n \"command\": {\n \"account\": \"0x1111111111111111111111111111111111111111\",\n \"to\": \"0x3333333333333333333333333333333333333333\",\n \"amount\": \"25000000\",\n \"expiry\": \"1792152300\",\n \"salt\": \"84190357266103877\",\n \"signature\": \"0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab\",\n \"purpose\": \"ORDER\"\n }\n}"
response = http.request(request)
puts response.read_body{
"exit_id": "0199a1b2-c3d4-7e5f-8a6b-7c8d9e0f1a2b",
"vault_address": "0x4444444444444444444444444444444444444444",
"status": "QUEUED",
"purpose": "ORDER",
"account": "0x1111111111111111111111111111111111111111",
"amount": "25000000",
"router_address": "0x3333333333333333333333333333333333333333",
"expiry": "1792152300",
"exit_digest": "0x7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e",
"activation_fee_accepted": false,
"operation": {
"operation_id": "0x4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d",
"status": "QUEUED",
"transaction_hash": null
},
"sent": null,
"credit": null,
"created_at": "2026-10-16T12:00:00Z",
"updated_at": "2026-10-16T12:00:00Z"
}{
"error": {
"code": "INVALID_REQUEST",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "UNAUTHENTICATED",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "FORBIDDEN",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "IDENTITY_NOT_FOUND",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "IDEMPOTENCY_KEY_REUSED",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "NEVER"
}
}{
"error": {
"code": "RATE_LIMITED",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "BACKOFF"
}
}{
"error": {
"code": "AUTHORIZATION_UNAVAILABLE",
"field_violations": [
{
"code": "REQUIRED",
"field": "<string>"
}
],
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry": "BACKOFF"
}
}Authorizations
Scoped API key (ttk_...), created in the Totalis app or by a wallet-session user through the API keys routes with a fresh wallet signature; those routes never accept a key. Each key acts for one account, yours or a maker's, and holds only scopes that account can use. Each operation lists the scopes it requires. Send no Origin.
Headers
Lowercase UUIDv7 naming this command, unique per caller and route. A retry with the same key and body returns the original result; the same key with a different body returns 409 IDEMPOTENCY_KEY_REUSED.
^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$Body
Response
Core exit durably accepted, not yet on chain: follow it with GET /v1/core-exits/{exit_id} until CREDITED. An exact replay of the same Idempotency-Key and body returns the stored exit before any dependency check.
The signed Exit's expiry in Unix seconds; null for an ABANDONED tombstone.
20^(0|[1-9][0-9]{0,18}|1[0-7][0-9]{18}|18[0-3][0-9]{17}|184[0-3][0-9]{16}|1844[0-5][0-9]{15}|18446[0-6][0-9]{14}|184467[0-3][0-9]{13}|1844674[0-3][0-9]{12}|184467440[0-6][0-9]{10}|1844674407[0-2][0-9]{9}|18446744073[0-6][0-9]{8}|1844674407370[0-8][0-9]{6}|18446744073709[0-4][0-9]{5}|184467440737095[0-4][0-9]{4}|18446744073709550[0-9]{3}|18446744073709551[0-5][0-9]{2}|1844674407370955160[0-9]|1844674407370955161[0-5])$Was this page helpful?

