Feeds and signer keys
curl --request GET \
--url https://prices.rekt.trading/v1/feeds \
--header 'Authorization: Bearer <token>'import requests
url = "https://prices.rekt.trading/v1/feeds"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://prices.rekt.trading/v1/feeds', 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://prices.rekt.trading/v1/feeds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://prices.rekt.trading/v1/feeds"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://prices.rekt.trading/v1/feeds")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prices.rekt.trading/v1/feeds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"feeds": [
{
"symbol": "SOL/USD",
"feed_id": "<string>",
"quote_unit": "USD",
"exponent": -8,
"asset_class": "<string>",
"calendar": "<string>",
"halted": true,
"max_age_slots": 123
}
],
"cluster": "mainnet",
"ed25519_program_id": "<string>",
"instance_id": "<string>",
"policy_revision": 123,
"server_time_ms": 123,
"signer_set": {
"authority": "<string>",
"pubkeys": [
"<string>"
],
"threshold": 123
}
}{
"status": "<string>",
"reason": "<string>",
"error": "<string>",
"detail": "<string>",
"retry_after_ms": 123,
"retryable": true
}{
"status": "<string>",
"reason": "<string>",
"error": "<string>",
"detail": "<string>",
"retry_after_ms": 123,
"retryable": true
}Feeds
Feeds and signer keys
The feeds that the price service signs, its signer keys, and the feed_id of each feed. Fetch it once at start-up, not for each request. A market’s feed is market.feeds[0]. It equals the feed_id listed for its symbol.
GET
/
v1
/
feeds
Feeds and signer keys
curl --request GET \
--url https://prices.rekt.trading/v1/feeds \
--header 'Authorization: Bearer <token>'import requests
url = "https://prices.rekt.trading/v1/feeds"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://prices.rekt.trading/v1/feeds', 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://prices.rekt.trading/v1/feeds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://prices.rekt.trading/v1/feeds"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://prices.rekt.trading/v1/feeds")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prices.rekt.trading/v1/feeds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"feeds": [
{
"symbol": "SOL/USD",
"feed_id": "<string>",
"quote_unit": "USD",
"exponent": -8,
"asset_class": "<string>",
"calendar": "<string>",
"halted": true,
"max_age_slots": 123
}
],
"cluster": "mainnet",
"ed25519_program_id": "<string>",
"instance_id": "<string>",
"policy_revision": 123,
"server_time_ms": 123,
"signer_set": {
"authority": "<string>",
"pubkeys": [
"<string>"
],
"threshold": 123
}
}{
"status": "<string>",
"reason": "<string>",
"error": "<string>",
"detail": "<string>",
"retry_after_ms": 123,
"retryable": true
}{
"status": "<string>",
"reason": "<string>",
"error": "<string>",
"detail": "<string>",
"retry_after_ms": 123,
"retryable": true
}Authorizations
Response
The feeds.
The feeds that the price service signs, and its signer keys.
