private/transfer_positions_debug
Takes the same params as private/transfer_positions and rebuilds both the maker and taker Actions without executing anything, returning for each side the EIP-712 encoded_data, encoded_data_hashed, action_hash, typed_data_hash, domain_separator, action_typehash, module, owner and expected_signer, plus the decoded action data (the maker’s priced legs, and the taker’s order_hash committing to them). Byte-compare these against your local computation to find why a signature is rejected. Requires a logged-in session; no transfer scope needed.
curl --request POST \
--url https://api.derive.xyz/v3/private/transfer_positions_debug \
--header 'Content-Type: application/json' \
--data '
{
"maker_params": {
"legs": [
{
"amount": "<string>",
"instrument_name": "<string>",
"price": "<string>"
}
],
"max_fee": "<string>",
"nonce": "<string>",
"signature": "<string>",
"signature_expiry_sec": 123,
"signer": "<string>",
"subaccount_id": 123
},
"taker_params": {
"legs": [
{
"amount": "<string>",
"instrument_name": "<string>",
"price": "<string>"
}
],
"max_fee": "<string>",
"nonce": "<string>",
"signature": "<string>",
"signature_expiry_sec": 123,
"signer": "<string>",
"subaccount_id": 123
},
"wallet": "<string>"
}
'import requests
url = "https://api.derive.xyz/v3/private/transfer_positions_debug"
payload = {
"maker_params": {
"legs": [
{
"amount": "<string>",
"instrument_name": "<string>",
"price": "<string>"
}
],
"max_fee": "<string>",
"nonce": "<string>",
"signature": "<string>",
"signature_expiry_sec": 123,
"signer": "<string>",
"subaccount_id": 123
},
"taker_params": {
"legs": [
{
"amount": "<string>",
"instrument_name": "<string>",
"price": "<string>"
}
],
"max_fee": "<string>",
"nonce": "<string>",
"signature": "<string>",
"signature_expiry_sec": 123,
"signer": "<string>",
"subaccount_id": 123
},
"wallet": "<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({
maker_params: {
legs: [{amount: '<string>', instrument_name: '<string>', price: '<string>'}],
max_fee: '<string>',
nonce: '<string>',
signature: '<string>',
signature_expiry_sec: 123,
signer: '<string>',
subaccount_id: 123
},
taker_params: {
legs: [{amount: '<string>', instrument_name: '<string>', price: '<string>'}],
max_fee: '<string>',
nonce: '<string>',
signature: '<string>',
signature_expiry_sec: 123,
signer: '<string>',
subaccount_id: 123
},
wallet: '<string>'
})
};
fetch('https://api.derive.xyz/v3/private/transfer_positions_debug', 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/transfer_positions_debug",
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([
'maker_params' => [
'legs' => [
[
'amount' => '<string>',
'instrument_name' => '<string>',
'price' => '<string>'
]
],
'max_fee' => '<string>',
'nonce' => '<string>',
'signature' => '<string>',
'signature_expiry_sec' => 123,
'signer' => '<string>',
'subaccount_id' => 123
],
'taker_params' => [
'legs' => [
[
'amount' => '<string>',
'instrument_name' => '<string>',
'price' => '<string>'
]
],
'max_fee' => '<string>',
'nonce' => '<string>',
'signature' => '<string>',
'signature_expiry_sec' => 123,
'signer' => '<string>',
'subaccount_id' => 123
],
'wallet' => '<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/transfer_positions_debug"
payload := strings.NewReader("{\n \"maker_params\": {\n \"legs\": [\n {\n \"amount\": \"<string>\",\n \"instrument_name\": \"<string>\",\n \"price\": \"<string>\"\n }\n ],\n \"max_fee\": \"<string>\",\n \"nonce\": \"<string>\",\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 123,\n \"signer\": \"<string>\",\n \"subaccount_id\": 123\n },\n \"taker_params\": {\n \"legs\": [\n {\n \"amount\": \"<string>\",\n \"instrument_name\": \"<string>\",\n \"price\": \"<string>\"\n }\n ],\n \"max_fee\": \"<string>\",\n \"nonce\": \"<string>\",\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 123,\n \"signer\": \"<string>\",\n \"subaccount_id\": 123\n },\n \"wallet\": \"<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/transfer_positions_debug")
.header("Content-Type", "application/json")
.body("{\n \"maker_params\": {\n \"legs\": [\n {\n \"amount\": \"<string>\",\n \"instrument_name\": \"<string>\",\n \"price\": \"<string>\"\n }\n ],\n \"max_fee\": \"<string>\",\n \"nonce\": \"<string>\",\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 123,\n \"signer\": \"<string>\",\n \"subaccount_id\": 123\n },\n \"taker_params\": {\n \"legs\": [\n {\n \"amount\": \"<string>\",\n \"instrument_name\": \"<string>\",\n \"price\": \"<string>\"\n }\n ],\n \"max_fee\": \"<string>\",\n \"nonce\": \"<string>\",\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 123,\n \"signer\": \"<string>\",\n \"subaccount_id\": 123\n },\n \"wallet\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.derive.xyz/v3/private/transfer_positions_debug")
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 \"maker_params\": {\n \"legs\": [\n {\n \"amount\": \"<string>\",\n \"instrument_name\": \"<string>\",\n \"price\": \"<string>\"\n }\n ],\n \"max_fee\": \"<string>\",\n \"nonce\": \"<string>\",\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 123,\n \"signer\": \"<string>\",\n \"subaccount_id\": 123\n },\n \"taker_params\": {\n \"legs\": [\n {\n \"amount\": \"<string>\",\n \"instrument_name\": \"<string>\",\n \"price\": \"<string>\"\n }\n ],\n \"max_fee\": \"<string>\",\n \"nonce\": \"<string>\",\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 123,\n \"signer\": \"<string>\",\n \"subaccount_id\": 123\n },\n \"wallet\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"maker_result": {
"action_hash": "<string>",
"action_typehash": "<string>",
"domain_separator": "<string>",
"encoded_data": "<string>",
"encoded_data_hashed": "<string>",
"expected_signer": "<string>",
"input_data": {
"data": {
"max_fee": "<string>",
"trades": [
{
"amount": "<string>",
"asset_address": "<string>",
"asset_sub_id": "<string>",
"price": "<string>"
}
]
},
"expiry": 1,
"module": "<string>",
"nonce": "<string>",
"owner": "<string>",
"signer": "<string>",
"subaccount_id": 1
},
"module": "<string>",
"owner": "<string>",
"typed_data_hash": "<string>",
"recovered_signer": "<string>"
},
"taker_result": {
"action_hash": "<string>",
"action_typehash": "<string>",
"domain_separator": "<string>",
"encoded_data": "<string>",
"encoded_data_hashed": "<string>",
"expected_signer": "<string>",
"input_data": {
"data": {
"max_fee": "<string>",
"order_hash": "<string>"
},
"expiry": 1,
"module": "<string>",
"nonce": "<string>",
"owner": "<string>",
"signer": "<string>",
"subaccount_id": 1
},
"module": "<string>",
"owner": "<string>",
"typed_data_hash": "<string>",
"recovered_signer": "<string>"
}
}Body
Params for private/transfer_positions.
Action info that needs to be signed by quoter or RFQ executor for a transfer. The quoter signs the legs hash + max fee; the executor signs the same legs hash + their own max fee.
Show child attributes
Show child attributes
Action info that needs to be signed by quoter or RFQ executor for a transfer. The quoter signs the legs hash + max fee; the executor signs the same legs hash + their own max fee.
Show child attributes
Show child attributes
20-byte Ethereum address as a 0x-prefixed lowercase hex string.
42^0x[0-9a-fA-F]{40}$Response
Success
private/transfer_positions_debug result: the maker and taker actions the route rebuilds, exactly as private/transfer_positions verifies them.
curl --request POST \
--url https://api.derive.xyz/v3/private/transfer_positions_debug \
--header 'Content-Type: application/json' \
--data '
{
"maker_params": {
"legs": [
{
"amount": "<string>",
"instrument_name": "<string>",
"price": "<string>"
}
],
"max_fee": "<string>",
"nonce": "<string>",
"signature": "<string>",
"signature_expiry_sec": 123,
"signer": "<string>",
"subaccount_id": 123
},
"taker_params": {
"legs": [
{
"amount": "<string>",
"instrument_name": "<string>",
"price": "<string>"
}
],
"max_fee": "<string>",
"nonce": "<string>",
"signature": "<string>",
"signature_expiry_sec": 123,
"signer": "<string>",
"subaccount_id": 123
},
"wallet": "<string>"
}
'import requests
url = "https://api.derive.xyz/v3/private/transfer_positions_debug"
payload = {
"maker_params": {
"legs": [
{
"amount": "<string>",
"instrument_name": "<string>",
"price": "<string>"
}
],
"max_fee": "<string>",
"nonce": "<string>",
"signature": "<string>",
"signature_expiry_sec": 123,
"signer": "<string>",
"subaccount_id": 123
},
"taker_params": {
"legs": [
{
"amount": "<string>",
"instrument_name": "<string>",
"price": "<string>"
}
],
"max_fee": "<string>",
"nonce": "<string>",
"signature": "<string>",
"signature_expiry_sec": 123,
"signer": "<string>",
"subaccount_id": 123
},
"wallet": "<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({
maker_params: {
legs: [{amount: '<string>', instrument_name: '<string>', price: '<string>'}],
max_fee: '<string>',
nonce: '<string>',
signature: '<string>',
signature_expiry_sec: 123,
signer: '<string>',
subaccount_id: 123
},
taker_params: {
legs: [{amount: '<string>', instrument_name: '<string>', price: '<string>'}],
max_fee: '<string>',
nonce: '<string>',
signature: '<string>',
signature_expiry_sec: 123,
signer: '<string>',
subaccount_id: 123
},
wallet: '<string>'
})
};
fetch('https://api.derive.xyz/v3/private/transfer_positions_debug', 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/transfer_positions_debug",
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([
'maker_params' => [
'legs' => [
[
'amount' => '<string>',
'instrument_name' => '<string>',
'price' => '<string>'
]
],
'max_fee' => '<string>',
'nonce' => '<string>',
'signature' => '<string>',
'signature_expiry_sec' => 123,
'signer' => '<string>',
'subaccount_id' => 123
],
'taker_params' => [
'legs' => [
[
'amount' => '<string>',
'instrument_name' => '<string>',
'price' => '<string>'
]
],
'max_fee' => '<string>',
'nonce' => '<string>',
'signature' => '<string>',
'signature_expiry_sec' => 123,
'signer' => '<string>',
'subaccount_id' => 123
],
'wallet' => '<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/transfer_positions_debug"
payload := strings.NewReader("{\n \"maker_params\": {\n \"legs\": [\n {\n \"amount\": \"<string>\",\n \"instrument_name\": \"<string>\",\n \"price\": \"<string>\"\n }\n ],\n \"max_fee\": \"<string>\",\n \"nonce\": \"<string>\",\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 123,\n \"signer\": \"<string>\",\n \"subaccount_id\": 123\n },\n \"taker_params\": {\n \"legs\": [\n {\n \"amount\": \"<string>\",\n \"instrument_name\": \"<string>\",\n \"price\": \"<string>\"\n }\n ],\n \"max_fee\": \"<string>\",\n \"nonce\": \"<string>\",\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 123,\n \"signer\": \"<string>\",\n \"subaccount_id\": 123\n },\n \"wallet\": \"<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/transfer_positions_debug")
.header("Content-Type", "application/json")
.body("{\n \"maker_params\": {\n \"legs\": [\n {\n \"amount\": \"<string>\",\n \"instrument_name\": \"<string>\",\n \"price\": \"<string>\"\n }\n ],\n \"max_fee\": \"<string>\",\n \"nonce\": \"<string>\",\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 123,\n \"signer\": \"<string>\",\n \"subaccount_id\": 123\n },\n \"taker_params\": {\n \"legs\": [\n {\n \"amount\": \"<string>\",\n \"instrument_name\": \"<string>\",\n \"price\": \"<string>\"\n }\n ],\n \"max_fee\": \"<string>\",\n \"nonce\": \"<string>\",\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 123,\n \"signer\": \"<string>\",\n \"subaccount_id\": 123\n },\n \"wallet\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.derive.xyz/v3/private/transfer_positions_debug")
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 \"maker_params\": {\n \"legs\": [\n {\n \"amount\": \"<string>\",\n \"instrument_name\": \"<string>\",\n \"price\": \"<string>\"\n }\n ],\n \"max_fee\": \"<string>\",\n \"nonce\": \"<string>\",\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 123,\n \"signer\": \"<string>\",\n \"subaccount_id\": 123\n },\n \"taker_params\": {\n \"legs\": [\n {\n \"amount\": \"<string>\",\n \"instrument_name\": \"<string>\",\n \"price\": \"<string>\"\n }\n ],\n \"max_fee\": \"<string>\",\n \"nonce\": \"<string>\",\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 123,\n \"signer\": \"<string>\",\n \"subaccount_id\": 123\n },\n \"wallet\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"maker_result": {
"action_hash": "<string>",
"action_typehash": "<string>",
"domain_separator": "<string>",
"encoded_data": "<string>",
"encoded_data_hashed": "<string>",
"expected_signer": "<string>",
"input_data": {
"data": {
"max_fee": "<string>",
"trades": [
{
"amount": "<string>",
"asset_address": "<string>",
"asset_sub_id": "<string>",
"price": "<string>"
}
]
},
"expiry": 1,
"module": "<string>",
"nonce": "<string>",
"owner": "<string>",
"signer": "<string>",
"subaccount_id": 1
},
"module": "<string>",
"owner": "<string>",
"typed_data_hash": "<string>",
"recovered_signer": "<string>"
},
"taker_result": {
"action_hash": "<string>",
"action_typehash": "<string>",
"domain_separator": "<string>",
"encoded_data": "<string>",
"encoded_data_hashed": "<string>",
"expected_signer": "<string>",
"input_data": {
"data": {
"max_fee": "<string>",
"order_hash": "<string>"
},
"expiry": 1,
"module": "<string>",
"nonce": "<string>",
"owner": "<string>",
"signer": "<string>",
"subaccount_id": 1
},
"module": "<string>",
"owner": "<string>",
"typed_data_hash": "<string>",
"recovered_signer": "<string>"
}
}