public/get_currency
Returns the full detail record for one currency named by the required currency parameter: supported instrument types, risk managers, current and 24h spot price, margin collateral discounts, lending APYs and totals, per-manager open-interest caps and current OI, and protocol asset addresses. Returns a not-found error for unknown currencies. Public endpoint.
curl --request POST \
--url https://api.derive.xyz/v3/public/get_currency \
--header 'Content-Type: application/json' \
--data '
{
"currency": "<string>"
}
'import requests
url = "https://api.derive.xyz/v3/public/get_currency"
payload = { "currency": "<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({currency: '<string>'})
};
fetch('https://api.derive.xyz/v3/public/get_currency', 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.derive.xyz/v3/public/get_currency",
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([
'currency' => '<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.derive.xyz/v3/public/get_currency"
payload := strings.NewReader("{\n \"currency\": \"<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.derive.xyz/v3/public/get_currency")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.derive.xyz/v3/public/get_currency")
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 \"currency\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"currency": "<string>",
"managers": [
{
"risk_universe_id": 1,
"pm": 1,
"risk_universe_name": "<string>",
"sm": 1
}
],
"market_type": "ALL",
"spot": [
{
"address": "<string>",
"erc20": {
"decimals": 1,
"underlying_erc20": "<string>"
},
"min_deposit_usd": "<string>",
"name": "<string>",
"universes": [
{
"oi": {
"current_open_interest": "<string>",
"interest_cap": "<string>"
},
"pm2_im_discount": "<string>",
"pm2_mm_discount": "<string>",
"risk_universe_id": 1,
"srm_im_discount": "<string>",
"srm_mm_discount": "<string>",
"lending": {
"borrow_apy": "<string>",
"supply_apy": "<string>",
"total_borrow": "<string>",
"total_borrow_cap": "<string>"
}
}
]
}
],
"spot_price": "<string>",
"option": {
"address": "<string>",
"name": "<string>",
"universes": [
{
"oi": {
"current_open_interest": "<string>",
"interest_cap": "<string>"
},
"risk_universe_id": 1,
"risk_universe_name": "<string>",
"srm_perp_margin_requirements": {
"im_perp_req": "<string>",
"max_leverage": "<string>",
"mm_perp_req": "<string>"
}
}
]
},
"perp": {
"address": "<string>",
"name": "<string>",
"universes": [
{
"oi": {
"current_open_interest": "<string>",
"interest_cap": "<string>"
},
"risk_universe_id": 1,
"risk_universe_name": "<string>",
"srm_perp_margin_requirements": {
"im_perp_req": "<string>",
"max_leverage": "<string>",
"mm_perp_req": "<string>"
}
}
]
},
"spot_price_24h": "<string>"
}{
"error": {
"code": 123,
"message": "<string>",
"data": "<string>"
}
}Body
Response
Success
A currency's spot price and its assets grouped by type. Managers risking the currency are listed per universe under managers; asset-level risk — OI, lending, and discounts — lives under each asset's universes.
Managers risk-pricing this currency, one entry per universe where at least one manager covers it.
Show child attributes
Show child attributes
Which instrument/collateral classes the currency is enabled for.
ALL, SRM_BASE_ONLY, SRM_OPTION_ONLY, SRM_PERP_ONLY, CASH Every spot asset registered to this currency (e.g. lending "USDC" and non-lending "USDC-NL").
Show child attributes
Show child attributes
The option asset for this currency, if one is registered.
Show child attributes
Show child attributes
The perp asset for this currency, if one is registered.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.derive.xyz/v3/public/get_currency \
--header 'Content-Type: application/json' \
--data '
{
"currency": "<string>"
}
'import requests
url = "https://api.derive.xyz/v3/public/get_currency"
payload = { "currency": "<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({currency: '<string>'})
};
fetch('https://api.derive.xyz/v3/public/get_currency', 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.derive.xyz/v3/public/get_currency",
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([
'currency' => '<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.derive.xyz/v3/public/get_currency"
payload := strings.NewReader("{\n \"currency\": \"<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.derive.xyz/v3/public/get_currency")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.derive.xyz/v3/public/get_currency")
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 \"currency\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"currency": "<string>",
"managers": [
{
"risk_universe_id": 1,
"pm": 1,
"risk_universe_name": "<string>",
"sm": 1
}
],
"market_type": "ALL",
"spot": [
{
"address": "<string>",
"erc20": {
"decimals": 1,
"underlying_erc20": "<string>"
},
"min_deposit_usd": "<string>",
"name": "<string>",
"universes": [
{
"oi": {
"current_open_interest": "<string>",
"interest_cap": "<string>"
},
"pm2_im_discount": "<string>",
"pm2_mm_discount": "<string>",
"risk_universe_id": 1,
"srm_im_discount": "<string>",
"srm_mm_discount": "<string>",
"lending": {
"borrow_apy": "<string>",
"supply_apy": "<string>",
"total_borrow": "<string>",
"total_borrow_cap": "<string>"
}
}
]
}
],
"spot_price": "<string>",
"option": {
"address": "<string>",
"name": "<string>",
"universes": [
{
"oi": {
"current_open_interest": "<string>",
"interest_cap": "<string>"
},
"risk_universe_id": 1,
"risk_universe_name": "<string>",
"srm_perp_margin_requirements": {
"im_perp_req": "<string>",
"max_leverage": "<string>",
"mm_perp_req": "<string>"
}
}
]
},
"perp": {
"address": "<string>",
"name": "<string>",
"universes": [
{
"oi": {
"current_open_interest": "<string>",
"interest_cap": "<string>"
},
"risk_universe_id": 1,
"risk_universe_name": "<string>",
"srm_perp_margin_requirements": {
"im_perp_req": "<string>",
"max_leverage": "<string>",
"mm_perp_req": "<string>"
}
}
]
},
"spot_price_24h": "<string>"
}{
"error": {
"code": 123,
"message": "<string>",
"data": "<string>"
}
}