Update Bot Rate Oracle Config
curl --request PUT \
--url http://localhost:8000/bot-orchestration/rate-oracle/config \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"rate_oracle_source": {
"name": "<string>"
},
"global_token": {
"global_token_name": "<string>",
"global_token_symbol": "<string>"
},
"rate_limits_share_pct": 50
}
'import requests
url = "http://localhost:8000/bot-orchestration/rate-oracle/config"
payload = {
"rate_oracle_source": { "name": "<string>" },
"global_token": {
"global_token_name": "<string>",
"global_token_symbol": "<string>"
},
"rate_limits_share_pct": 50
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rate_oracle_source: {name: '<string>'},
global_token: {global_token_name: '<string>', global_token_symbol: '<string>'},
rate_limits_share_pct: 50
})
};
fetch('http://localhost:8000/bot-orchestration/rate-oracle/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/bot-orchestration/rate-oracle/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'rate_oracle_source' => [
'name' => '<string>'
],
'global_token' => [
'global_token_name' => '<string>',
'global_token_symbol' => '<string>'
],
'rate_limits_share_pct' => 50
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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 := "http://localhost:8000/bot-orchestration/rate-oracle/config"
payload := strings.NewReader("{\n \"rate_oracle_source\": {\n \"name\": \"<string>\"\n },\n \"global_token\": {\n \"global_token_name\": \"<string>\",\n \"global_token_symbol\": \"<string>\"\n },\n \"rate_limits_share_pct\": 50\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.put("http://localhost:8000/bot-orchestration/rate-oracle/config")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"rate_oracle_source\": {\n \"name\": \"<string>\"\n },\n \"global_token\": {\n \"global_token_name\": \"<string>\",\n \"global_token_symbol\": \"<string>\"\n },\n \"rate_limits_share_pct\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/bot-orchestration/rate-oracle/config")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rate_oracle_source\": {\n \"name\": \"<string>\"\n },\n \"global_token\": {\n \"global_token_name\": \"<string>\",\n \"global_token_symbol\": \"<string>\"\n },\n \"rate_limits_share_pct\": 50\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"config": {
"account_name": "<string>",
"rate_oracle_source": {
"name": "<string>"
},
"global_token": {
"global_token_name": "<string>",
"global_token_symbol": "<string>"
},
"rate_limits_share_pct": 100
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Bot Orchestration
Update Bot Rate Oracle Config
Update the bot rate oracle source, global token and/or rate-limit share in an account’s conf_client.yml.
Bots pick the change up on their next deploy (running bots keep their copied config). Changing master_account’s global token also switches the API’s own valuation quote token.
Args: update_request: Configuration updates to apply account_name: Credentials profile whose conf_client.yml to update (default master_account)
PUT
/
bot-orchestration
/
rate-oracle
/
config
Update Bot Rate Oracle Config
curl --request PUT \
--url http://localhost:8000/bot-orchestration/rate-oracle/config \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"rate_oracle_source": {
"name": "<string>"
},
"global_token": {
"global_token_name": "<string>",
"global_token_symbol": "<string>"
},
"rate_limits_share_pct": 50
}
'import requests
url = "http://localhost:8000/bot-orchestration/rate-oracle/config"
payload = {
"rate_oracle_source": { "name": "<string>" },
"global_token": {
"global_token_name": "<string>",
"global_token_symbol": "<string>"
},
"rate_limits_share_pct": 50
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rate_oracle_source: {name: '<string>'},
global_token: {global_token_name: '<string>', global_token_symbol: '<string>'},
rate_limits_share_pct: 50
})
};
fetch('http://localhost:8000/bot-orchestration/rate-oracle/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/bot-orchestration/rate-oracle/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'rate_oracle_source' => [
'name' => '<string>'
],
'global_token' => [
'global_token_name' => '<string>',
'global_token_symbol' => '<string>'
],
'rate_limits_share_pct' => 50
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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 := "http://localhost:8000/bot-orchestration/rate-oracle/config"
payload := strings.NewReader("{\n \"rate_oracle_source\": {\n \"name\": \"<string>\"\n },\n \"global_token\": {\n \"global_token_name\": \"<string>\",\n \"global_token_symbol\": \"<string>\"\n },\n \"rate_limits_share_pct\": 50\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.put("http://localhost:8000/bot-orchestration/rate-oracle/config")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"rate_oracle_source\": {\n \"name\": \"<string>\"\n },\n \"global_token\": {\n \"global_token_name\": \"<string>\",\n \"global_token_symbol\": \"<string>\"\n },\n \"rate_limits_share_pct\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/bot-orchestration/rate-oracle/config")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rate_oracle_source\": {\n \"name\": \"<string>\"\n },\n \"global_token\": {\n \"global_token_name\": \"<string>\",\n \"global_token_symbol\": \"<string>\"\n },\n \"rate_limits_share_pct\": 50\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"config": {
"account_name": "<string>",
"rate_oracle_source": {
"name": "<string>"
},
"global_token": {
"global_token_name": "<string>",
"global_token_symbol": "<string>"
},
"rate_limits_share_pct": 100
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Body
application/json
Request model for updating the rate oracle configuration.
Was this page helpful?

