Add delegate signer Orderly key
curl --request POST \
--url https://api.orderly.org/v1/delegate_orderly_key \
--header 'Content-Type: application/json' \
--data '
{
"message": {
"delegateContract": "<string>",
"brokerId": "<string>",
"chainId": 123,
"orderlyKey": "<string>",
"scope": "<string>",
"timestamp": 123,
"expiration": 123
},
"signature": "<string>",
"userAddress": "<string>"
}
'import requests
url = "https://api.orderly.org/v1/delegate_orderly_key"
payload = {
"message": {
"delegateContract": "<string>",
"brokerId": "<string>",
"chainId": 123,
"orderlyKey": "<string>",
"scope": "<string>",
"timestamp": 123,
"expiration": 123
},
"signature": "<string>",
"userAddress": "<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({
message: {
delegateContract: '<string>',
brokerId: '<string>',
chainId: 123,
orderlyKey: '<string>',
scope: '<string>',
timestamp: 123,
expiration: 123
},
signature: '<string>',
userAddress: '<string>'
})
};
fetch('https://api.orderly.org/v1/delegate_orderly_key', 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_orderly_key",
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' => '<string>',
'brokerId' => '<string>',
'chainId' => 123,
'orderlyKey' => '<string>',
'scope' => '<string>',
'timestamp' => 123,
'expiration' => 123
],
'signature' => '<string>',
'userAddress' => '<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.orderly.org/v1/delegate_orderly_key"
payload := strings.NewReader("{\n \"message\": {\n \"delegateContract\": \"<string>\",\n \"brokerId\": \"<string>\",\n \"chainId\": 123,\n \"orderlyKey\": \"<string>\",\n \"scope\": \"<string>\",\n \"timestamp\": 123,\n \"expiration\": 123\n },\n \"signature\": \"<string>\",\n \"userAddress\": \"<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.orderly.org/v1/delegate_orderly_key")
.header("Content-Type", "application/json")
.body("{\n \"message\": {\n \"delegateContract\": \"<string>\",\n \"brokerId\": \"<string>\",\n \"chainId\": 123,\n \"orderlyKey\": \"<string>\",\n \"scope\": \"<string>\",\n \"timestamp\": 123,\n \"expiration\": 123\n },\n \"signature\": \"<string>\",\n \"userAddress\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orderly.org/v1/delegate_orderly_key")
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\": \"<string>\",\n \"brokerId\": \"<string>\",\n \"chainId\": 123,\n \"orderlyKey\": \"<string>\",\n \"scope\": \"<string>\",\n \"timestamp\": 123,\n \"expiration\": 123\n },\n \"signature\": \"<string>\",\n \"userAddress\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"orderly_key": "ed25519:FRXntsPJBCy6dzKv9WPw4eYSw3rKU9Npz3T6UmvvJc9Z",
"id": 123
},
"timestamp": 1702989203989
}Delegate signer
Add delegate signer Orderly key
Limit: 1 requests per second
POST /v1/delegate_orderly_key
Adds an orderly key for a delegate signer after the delegate relationship has been authorized.
POST
/
v1
/
delegate_orderly_key
Add delegate signer Orderly key
curl --request POST \
--url https://api.orderly.org/v1/delegate_orderly_key \
--header 'Content-Type: application/json' \
--data '
{
"message": {
"delegateContract": "<string>",
"brokerId": "<string>",
"chainId": 123,
"orderlyKey": "<string>",
"scope": "<string>",
"timestamp": 123,
"expiration": 123
},
"signature": "<string>",
"userAddress": "<string>"
}
'import requests
url = "https://api.orderly.org/v1/delegate_orderly_key"
payload = {
"message": {
"delegateContract": "<string>",
"brokerId": "<string>",
"chainId": 123,
"orderlyKey": "<string>",
"scope": "<string>",
"timestamp": 123,
"expiration": 123
},
"signature": "<string>",
"userAddress": "<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({
message: {
delegateContract: '<string>',
brokerId: '<string>',
chainId: 123,
orderlyKey: '<string>',
scope: '<string>',
timestamp: 123,
expiration: 123
},
signature: '<string>',
userAddress: '<string>'
})
};
fetch('https://api.orderly.org/v1/delegate_orderly_key', 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_orderly_key",
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' => '<string>',
'brokerId' => '<string>',
'chainId' => 123,
'orderlyKey' => '<string>',
'scope' => '<string>',
'timestamp' => 123,
'expiration' => 123
],
'signature' => '<string>',
'userAddress' => '<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.orderly.org/v1/delegate_orderly_key"
payload := strings.NewReader("{\n \"message\": {\n \"delegateContract\": \"<string>\",\n \"brokerId\": \"<string>\",\n \"chainId\": 123,\n \"orderlyKey\": \"<string>\",\n \"scope\": \"<string>\",\n \"timestamp\": 123,\n \"expiration\": 123\n },\n \"signature\": \"<string>\",\n \"userAddress\": \"<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.orderly.org/v1/delegate_orderly_key")
.header("Content-Type", "application/json")
.body("{\n \"message\": {\n \"delegateContract\": \"<string>\",\n \"brokerId\": \"<string>\",\n \"chainId\": 123,\n \"orderlyKey\": \"<string>\",\n \"scope\": \"<string>\",\n \"timestamp\": 123,\n \"expiration\": 123\n },\n \"signature\": \"<string>\",\n \"userAddress\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orderly.org/v1/delegate_orderly_key")
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\": \"<string>\",\n \"brokerId\": \"<string>\",\n \"chainId\": 123,\n \"orderlyKey\": \"<string>\",\n \"scope\": \"<string>\",\n \"timestamp\": 123,\n \"expiration\": 123\n },\n \"signature\": \"<string>\",\n \"userAddress\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"orderly_key": "ed25519:FRXntsPJBCy6dzKv9WPw4eYSw3rKU9Npz3T6UmvvJc9Z",
"id": 123
},
"timestamp": 1702989203989
}Body
application/json
⌘I