Skip to main content
GET
/
v1
/
view
/
exchange
Get exchange
curl --request GET \
  --url https://perp-api.phoenix.trade/v1/view/exchange \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://perp-api.phoenix.trade/v1/view/exchange"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://perp-api.phoenix.trade/v1/view/exchange', 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://perp-api.phoenix.trade/v1/view/exchange",
  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://perp-api.phoenix.trade/v1/view/exchange"

	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://perp-api.phoenix.trade/v1/view/exchange")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://perp-api.phoenix.trade/v1/view/exchange")

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
{
  "keys": {
    "activeTraderBuffer": [
      "<string>"
    ],
    "canonicalMint": "<string>",
    "currentAuthorities": {
      "adlAuthority": "<string>",
      "backstopAuthority": "<string>",
      "cancelAuthority": "<string>",
      "marketAuthority": "<string>",
      "oracleAuthority": "<string>",
      "riskAuthority": "<string>",
      "rootAuthority": "<string>"
    },
    "globalConfig": "<string>",
    "globalTraderIndex": [
      "<string>"
    ],
    "globalVault": "<string>",
    "pendingAuthorities": {
      "adlAuthority": "<string>",
      "backstopAuthority": "<string>",
      "cancelAuthority": "<string>",
      "marketAuthority": "<string>",
      "oracleAuthority": "<string>",
      "riskAuthority": "<string>",
      "rootAuthority": "<string>"
    },
    "perpAssetMap": "<string>",
    "withdrawQueue": "<string>"
  },
  "markets": [
    {
      "assetId": 1,
      "baseLotsDecimals": 123,
      "fundingIntervalSeconds": 1,
      "fundingPeriodSeconds": 1,
      "isolatedOnly": true,
      "leverageTiers": [
        {
          "limitOrderRiskFactor": 123,
          "maxLeverage": 123,
          "maxSizeBaseLots": 1,
          "limitOrderRiskFactorBps": 1
        }
      ],
      "makerFee": 123,
      "marketPubkey": "<string>",
      "maxFundingRatePerInterval": 123,
      "maxLiquidationSizeBaseLots": 1,
      "openInterestCapBaseLots": 1,
      "riskFactors": {
        "backstop": 123,
        "cancelOrder": 123,
        "highRisk": 123,
        "maintenance": 123,
        "upnl": 123,
        "upnlForWithdrawals": 123,
        "backstopBps": 1,
        "cancelOrderBps": 1,
        "highRiskBps": 1,
        "maintenanceBps": 1,
        "upnlBps": 1,
        "upnlForWithdrawalsBps": 1
      },
      "splinePubkey": "<string>",
      "symbol": "<string>",
      "takerFee": 123,
      "tickSize": 1,
      "commodityMetadata": {
        "afterHoursRadius": "<string>",
        "isAfterHours": true,
        "isCommodity": true,
        "isReopen": true,
        "executionPriceBand": {
          "max": "<string>",
          "min": "<string>"
        },
        "lastIndexExpiryTimestamp": 1,
        "lastKnownIndexPrice": "<string>",
        "markPriceBand": {
          "max": "<string>",
          "min": "<string>"
        }
      },
      "maxFundingRatePerIntervalPercentage": 123,
      "metadata": {
        "calendar": {
          "calendarUri": "<string>",
          "contentSha256": "<string>",
          "description": "<string>",
          "id": "<string>",
          "nextMarketTransitionUtc": "2023-11-07T05:31:56Z"
        },
        "coinGeckoId": "<string>",
        "coinMarketCapId": 123,
        "description": "<string>",
        "displayColor": "<string>",
        "logoUri": "<string>",
        "name": "<string>",
        "tokensXyzAssetId": "<string>"
      },
      "statsSnapshot": {
        "cumulativeFundingRate": 123,
        "fundingStartIntervalTimestamp": 1,
        "openInterestBaseLots": 1,
        "slot": 1,
        "slotIndex": 1
      }
    }
  ]
}
{
  "error": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer access token issued by /v1/auth/* login endpoints.

Response

Phoenix Eternal exchange configuration

Full exchange configuration response containing keys and market configs. Does NOT include live data like mark prices or current open interest.

keys
object
required

Exchange-level account keys and authorities.

markets
object[]
required

Static per-market configuration entries.