const res = await fetch('https://app.trdrs.co/api/market/logos/{kind}/{id}', {
headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
})
const data = await res.json()curl 'https://app.trdrs.co/api/market/logos/{kind}/{id}' \
-H "Authorization: Bearer $TRDRS_API_KEY"import requests
url = "https://app.trdrs.co/api/market/logos/{kind}/{id}"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/market/logos/{kind}/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://app.trdrs.co/api/market/logos/{kind}/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.trdrs.co/api/market/logos/{kind}/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/market/logos/{kind}/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Get a stock or exchange logo
Returns the logo of a US stock, by its symbol, or of a listing exchange, by its code, as a square image 128 pixels across for a dark or a light background. Use the URL exactly as the image src. The route is keyless on purpose: a logo is its brand’s public mark, and an <img> tag can’t carry a key. trdrs looks a logo up the first time anyone asks for it and serves its own copy from then on, so the first request for a logo can take a few seconds. A venue’s backend can also send it with its Venue key, which carries trader:read or trader:trade, naming one of its own traders in x-trdrs-trader: it then answers for that trader.
const res = await fetch('https://app.trdrs.co/api/market/logos/{kind}/{id}', {
headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
})
const data = await res.json()curl 'https://app.trdrs.co/api/market/logos/{kind}/{id}' \
-H "Authorization: Bearer $TRDRS_API_KEY"import requests
url = "https://app.trdrs.co/api/market/logos/{kind}/{id}"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/market/logos/{kind}/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://app.trdrs.co/api/market/logos/{kind}/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.trdrs.co/api/market/logos/{kind}/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/market/logos/{kind}/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Path Parameters
Query Parameters
Response
The logo, with an ETag. Keep it for a week, and show it for up to a month more while you revalidate it with If-None-Match.
The response is of type file.