Get exchange snapshot
curl --request GET \
--url https://perp-api.phoenix.trade/v1/exchange/snapshot \
--header 'Authorization: Bearer <token>'import requests
url = "https://perp-api.phoenix.trade/v1/exchange/snapshot"
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/exchange/snapshot', 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/exchange/snapshot",
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/exchange/snapshot"
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/exchange/snapshot")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://perp-api.phoenix.trade/v1/exchange/snapshot")
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{
"exchange": {
"active": true,
"activeTraderBuffer": [
"<string>"
],
"canonicalMint": "<string>",
"currentAuthorities": {
"adlAuthority": "<string>",
"backstopAuthority": "<string>",
"cancelAuthority": "<string>",
"marketAuthority": "<string>",
"oracleAuthority": "<string>",
"riskAuthority": "<string>",
"rootAuthority": "<string>"
},
"exchangeStatusBits": 1,
"exchangeStatusFeatures": [
"<string>"
],
"gated": true,
"globalConfig": "<string>",
"globalTraderIndex": [
"<string>"
],
"globalVault": "<string>",
"perpAssetMap": "<string>",
"programId": "<string>",
"usdcMint": "<string>",
"withdrawQueue": "<string>",
"withdrawalsAvailable": true
},
"markets": [
{
"assetId": 1,
"baseLotsDecimals": 123,
"fundingConfig": {
"fundingIntervalSeconds": 1,
"fundingPeriodSeconds": 1,
"maxFundingRatePerInterval": 123
},
"isolatedOnly": true,
"leverageTiers": [
{
"limitOrderRiskFactor": 1,
"maxLeverage": 1,
"maxSizeBaseLots": 1
}
],
"makerFee": 123,
"markPriceParameters": {
"adjustedExchangeSpotPriceWeight": 1,
"bookPriceRadius": 1,
"bookPriceStaleThreshold": 1,
"bookPriceWeight": 1,
"commoditiesAfterHoursRadius": 1,
"commoditiesAfterHoursRadiusBps": 1,
"emaDiffRadius": 1,
"emaPeriodSlots": 1,
"exchangePerpPriceWeight": 1,
"minOracleResponses": 1,
"oracleDivergenceRadius": 1,
"perpPriceStaleThreshold": 1,
"riskActionPriceValidityRules": [
[
[]
]
],
"spotPriceStaleThreshold": 1,
"bookHardStaleMultiplier": 1,
"oracleHardStaleMultiplier": 1
},
"marketPubkey": "<string>",
"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": {
"lower": "<string>",
"upper": "<string>"
},
"lastIndexExpiryTimestamp": 1,
"lastKnownIndexPrice": "<string>",
"markPriceBand": {
"lower": "<string>",
"upper": "<string>"
}
},
"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>"
}
}
],
"slot": 1,
"slotIndex": 1,
"version": 1,
"sequenceNumber": 1
}Exchange
Get exchange snapshot
Handles GET /v1/exchange/snapshot via get.v1.exchange.snapshot.
GET
/
v1
/
exchange
/
snapshot
Get exchange snapshot
curl --request GET \
--url https://perp-api.phoenix.trade/v1/exchange/snapshot \
--header 'Authorization: Bearer <token>'import requests
url = "https://perp-api.phoenix.trade/v1/exchange/snapshot"
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/exchange/snapshot', 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/exchange/snapshot",
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/exchange/snapshot"
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/exchange/snapshot")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://perp-api.phoenix.trade/v1/exchange/snapshot")
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{
"exchange": {
"active": true,
"activeTraderBuffer": [
"<string>"
],
"canonicalMint": "<string>",
"currentAuthorities": {
"adlAuthority": "<string>",
"backstopAuthority": "<string>",
"cancelAuthority": "<string>",
"marketAuthority": "<string>",
"oracleAuthority": "<string>",
"riskAuthority": "<string>",
"rootAuthority": "<string>"
},
"exchangeStatusBits": 1,
"exchangeStatusFeatures": [
"<string>"
],
"gated": true,
"globalConfig": "<string>",
"globalTraderIndex": [
"<string>"
],
"globalVault": "<string>",
"perpAssetMap": "<string>",
"programId": "<string>",
"usdcMint": "<string>",
"withdrawQueue": "<string>",
"withdrawalsAvailable": true
},
"markets": [
{
"assetId": 1,
"baseLotsDecimals": 123,
"fundingConfig": {
"fundingIntervalSeconds": 1,
"fundingPeriodSeconds": 1,
"maxFundingRatePerInterval": 123
},
"isolatedOnly": true,
"leverageTiers": [
{
"limitOrderRiskFactor": 1,
"maxLeverage": 1,
"maxSizeBaseLots": 1
}
],
"makerFee": 123,
"markPriceParameters": {
"adjustedExchangeSpotPriceWeight": 1,
"bookPriceRadius": 1,
"bookPriceStaleThreshold": 1,
"bookPriceWeight": 1,
"commoditiesAfterHoursRadius": 1,
"commoditiesAfterHoursRadiusBps": 1,
"emaDiffRadius": 1,
"emaPeriodSlots": 1,
"exchangePerpPriceWeight": 1,
"minOracleResponses": 1,
"oracleDivergenceRadius": 1,
"perpPriceStaleThreshold": 1,
"riskActionPriceValidityRules": [
[
[]
]
],
"spotPriceStaleThreshold": 1,
"bookHardStaleMultiplier": 1,
"oracleHardStaleMultiplier": 1
},
"marketPubkey": "<string>",
"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": {
"lower": "<string>",
"upper": "<string>"
},
"lastIndexExpiryTimestamp": 1,
"lastKnownIndexPrice": "<string>",
"markPriceBand": {
"lower": "<string>",
"upper": "<string>"
}
},
"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>"
}
}
],
"slot": 1,
"slotIndex": 1,
"version": 1,
"sequenceNumber": 1
}Authorizations
Bearer access token issued by /v1/auth/* login endpoints.
Response
200 - application/json
Exchange snapshot
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Wrapper for unsigned 64-bit values that must be JSON-safe for consumers
written in JavaScript/TypeScript. Mirrors [JsSafeI64] but for unsigned
Phoenix quantities such as base lots, quote lots, and slots.
Required range:
x >= 0⌘I