Delegate signer
curl --request POST \
--url https://api.orderly.org/v1/delegate_signer \
--header 'Content-Type: application/json' \
--data '
{
"message": {
"delegateContract": "0xaddress",
"brokerId": "woofi_pro",
"chainId": 421613,
"timestamp": 1704879369551,
"registrationNonce": 161111791392,
"txHash": "0xtxhash"
},
"signature": "0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b",
"userAddress": "0xDd3287043493E0a08d2B348397554096728B459c"
}
'import requests
url = "https://api.orderly.org/v1/delegate_signer"
payload = {
"message": {
"delegateContract": "0xaddress",
"brokerId": "woofi_pro",
"chainId": 421613,
"timestamp": 1704879369551,
"registrationNonce": 161111791392,
"txHash": "0xtxhash"
},
"signature": "0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b",
"userAddress": "0xDd3287043493E0a08d2B348397554096728B459c"
}
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({
message: {
delegateContract: '0xaddress',
brokerId: 'woofi_pro',
chainId: 421613,
timestamp: 1704879369551,
registrationNonce: 161111791392,
txHash: '0xtxhash'
},
signature: '0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b',
userAddress: '0xDd3287043493E0a08d2B348397554096728B459c'
})
};
fetch('https://api.orderly.org/v1/delegate_signer', 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.orderly.org/v1/delegate_signer",
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([
'message' => [
'delegateContract' => '0xaddress',
'brokerId' => 'woofi_pro',
'chainId' => 421613,
'timestamp' => 1704879369551,
'registrationNonce' => 161111791392,
'txHash' => '0xtxhash'
],
'signature' => '0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b',
'userAddress' => '0xDd3287043493E0a08d2B348397554096728B459c'
]),
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.orderly.org/v1/delegate_signer"
payload := strings.NewReader("{\n \"message\": {\n \"delegateContract\": \"0xaddress\",\n \"brokerId\": \"woofi_pro\",\n \"chainId\": 421613,\n \"timestamp\": 1704879369551,\n \"registrationNonce\": 161111791392,\n \"txHash\": \"0xtxhash\"\n },\n \"signature\": \"0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b\",\n \"userAddress\": \"0xDd3287043493E0a08d2B348397554096728B459c\"\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.orderly.org/v1/delegate_signer")
.header("Content-Type", "application/json")
.body("{\n \"message\": {\n \"delegateContract\": \"0xaddress\",\n \"brokerId\": \"woofi_pro\",\n \"chainId\": 421613,\n \"timestamp\": 1704879369551,\n \"registrationNonce\": 161111791392,\n \"txHash\": \"0xtxhash\"\n },\n \"signature\": \"0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b\",\n \"userAddress\": \"0xDd3287043493E0a08d2B348397554096728B459c\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orderly.org/v1/delegate_signer")
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 \"message\": {\n \"delegateContract\": \"0xaddress\",\n \"brokerId\": \"woofi_pro\",\n \"chainId\": 421613,\n \"timestamp\": 1704879369551,\n \"registrationNonce\": 161111791392,\n \"txHash\": \"0xtxhash\"\n },\n \"signature\": \"0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b\",\n \"userAddress\": \"0xDd3287043493E0a08d2B348397554096728B459c\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"timestamp": 1702989203989,
"data": {
"user_id": 100338,
"account_id": "0xd890c9b8b86fba7312b919e32bbabd619228b32d59f6d0f68fdf4451a684a654",
"valid_signer": "0xc6c4c5c41efa74ebc63c675dcf7034e8382f3a42"
}
}Delegate signer
Delegate signer
Limit: 1 requests per second
POST /v1/delegate_signer
Registers a delegate signer relationship for an account using a wallet-signed message.
POST
/
v1
/
delegate_signer
Delegate signer
curl --request POST \
--url https://api.orderly.org/v1/delegate_signer \
--header 'Content-Type: application/json' \
--data '
{
"message": {
"delegateContract": "0xaddress",
"brokerId": "woofi_pro",
"chainId": 421613,
"timestamp": 1704879369551,
"registrationNonce": 161111791392,
"txHash": "0xtxhash"
},
"signature": "0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b",
"userAddress": "0xDd3287043493E0a08d2B348397554096728B459c"
}
'import requests
url = "https://api.orderly.org/v1/delegate_signer"
payload = {
"message": {
"delegateContract": "0xaddress",
"brokerId": "woofi_pro",
"chainId": 421613,
"timestamp": 1704879369551,
"registrationNonce": 161111791392,
"txHash": "0xtxhash"
},
"signature": "0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b",
"userAddress": "0xDd3287043493E0a08d2B348397554096728B459c"
}
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({
message: {
delegateContract: '0xaddress',
brokerId: 'woofi_pro',
chainId: 421613,
timestamp: 1704879369551,
registrationNonce: 161111791392,
txHash: '0xtxhash'
},
signature: '0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b',
userAddress: '0xDd3287043493E0a08d2B348397554096728B459c'
})
};
fetch('https://api.orderly.org/v1/delegate_signer', 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.orderly.org/v1/delegate_signer",
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([
'message' => [
'delegateContract' => '0xaddress',
'brokerId' => 'woofi_pro',
'chainId' => 421613,
'timestamp' => 1704879369551,
'registrationNonce' => 161111791392,
'txHash' => '0xtxhash'
],
'signature' => '0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b',
'userAddress' => '0xDd3287043493E0a08d2B348397554096728B459c'
]),
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.orderly.org/v1/delegate_signer"
payload := strings.NewReader("{\n \"message\": {\n \"delegateContract\": \"0xaddress\",\n \"brokerId\": \"woofi_pro\",\n \"chainId\": 421613,\n \"timestamp\": 1704879369551,\n \"registrationNonce\": 161111791392,\n \"txHash\": \"0xtxhash\"\n },\n \"signature\": \"0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b\",\n \"userAddress\": \"0xDd3287043493E0a08d2B348397554096728B459c\"\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.orderly.org/v1/delegate_signer")
.header("Content-Type", "application/json")
.body("{\n \"message\": {\n \"delegateContract\": \"0xaddress\",\n \"brokerId\": \"woofi_pro\",\n \"chainId\": 421613,\n \"timestamp\": 1704879369551,\n \"registrationNonce\": 161111791392,\n \"txHash\": \"0xtxhash\"\n },\n \"signature\": \"0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b\",\n \"userAddress\": \"0xDd3287043493E0a08d2B348397554096728B459c\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orderly.org/v1/delegate_signer")
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 \"message\": {\n \"delegateContract\": \"0xaddress\",\n \"brokerId\": \"woofi_pro\",\n \"chainId\": 421613,\n \"timestamp\": 1704879369551,\n \"registrationNonce\": 161111791392,\n \"txHash\": \"0xtxhash\"\n },\n \"signature\": \"0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b\",\n \"userAddress\": \"0xDd3287043493E0a08d2B348397554096728B459c\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"timestamp": 1702989203989,
"data": {
"user_id": 100338,
"account_id": "0xd890c9b8b86fba7312b919e32bbabd619228b32d59f6d0f68fdf4451a684a654",
"valid_signer": "0xc6c4c5c41efa74ebc63c675dcf7034e8382f3a42"
}
}Body
application/json
Show child attributes
Show child attributes
Signature generated by signing the message object.
Example:
"0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b"
Address of the wallet that signed the message object.
Example:
"0xDd3287043493E0a08d2B348397554096728B459c"
⌘I