curl --request GET \
--url https://perp-api.phoenix.trade/v1/view/exchange/markets \
--header 'Authorization: Bearer <token>'import requests
url = "https://perp-api.phoenix.trade/v1/view/exchange/markets"
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/markets', 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/markets",
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/markets"
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/markets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://perp-api.phoenix.trade/v1/view/exchange/markets")
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[
{
"assetId": 1,
"baseLotsDecimals": 123,
"fundingIntervalSeconds": 1,
"fundingPeriodSeconds": 1,
"isolatedOnly": true,
"leverageTiers": [
{
"limitOrderRiskFactor": 123,
"maxLeverage": 123,
"maxSizeBaseLots": 1,
"limitOrderRiskFactorBps": 1
}
],
"makerFee": 123,
"marketPubkey": "<string>",
"marketStatus": "uninitialized",
"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,
"status": "active",
"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
}
}
]List markets
Handles GET /v1/view/exchange/markets via get.v1.view.exchange.markets.
curl --request GET \
--url https://perp-api.phoenix.trade/v1/view/exchange/markets \
--header 'Authorization: Bearer <token>'import requests
url = "https://perp-api.phoenix.trade/v1/view/exchange/markets"
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/markets', 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/markets",
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/markets"
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/markets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://perp-api.phoenix.trade/v1/view/exchange/markets")
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[
{
"assetId": 1,
"baseLotsDecimals": 123,
"fundingIntervalSeconds": 1,
"fundingPeriodSeconds": 1,
"isolatedOnly": true,
"leverageTiers": [
{
"limitOrderRiskFactor": 123,
"maxLeverage": 123,
"maxSizeBaseLots": 1,
"limitOrderRiskFactorBps": 1
}
],
"makerFee": 123,
"marketPubkey": "<string>",
"marketStatus": "uninitialized",
"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,
"status": "active",
"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
}
}
]Authorizations
Bearer access token issued by /v1/auth/* login endpoints.
Response
Exchange market configurations
Numeric asset identifier.
x >= 0Base-lot decimal exponent.
Funding interval length in seconds.
x >= 0Funding period length in seconds.
x >= 0Whether this market only supports isolated margin positions
Configured leverage tiers.
Show child attributes
Show child attributes
Maker fee (percent).
The orderbook account pubkey (base58 encoded)
Current market status.
uninitialized, active, postOnly, paused, closed, tombstoned Maximum absolute funding rate per interval.
Maximum size for a single liquidation (in base lots)
x >= 0Maximum open interest allowed for this market (in base lots)
x >= 0Risk factors as percentages.
Show child attributes
Show child attributes
The spline collection PDA (derived from market_pubkey)
Market symbol (for example, "SOL-PERP").
Taker fee (percent).
Tick size in quote lots per base lot per tick.
x >= 0Commodity-specific metadata, present only for commodity markets.
Show child attributes
Show child attributes
Maximum absolute funding rate per interval as a percentage of notional at the current mark price.
Public market metadata configured off-chain.
Show child attributes
Show child attributes
Optional live stats snapshot for seeding clients before websocket updates.
Show child attributes
Show child attributes