List Markets
curl --request GET \
--url https://api.whop.com/api/v1/trades/marketsimport requests
url = "https://api.whop.com/api/v1/trades/markets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.whop.com/api/v1/trades/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://api.whop.com/api/v1/trades/markets",
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://api.whop.com/api/v1/trades/markets"
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://api.whop.com/api/v1/trades/markets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/trades/markets")
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{
"data": [
{
"change_24h_percentage": null,
"id": "BTC",
"instrument_type": "perpetual",
"logo_url": null,
"max_leverage": 40,
"price": {
"amount": "80155.500000",
"currency": "usd",
"decimals": 6,
"display_decimals": 6
},
"size_decimals": 5,
"volume_24h": null
},
{
"change_24h_percentage": null,
"id": "BTC",
"instrument_type": "spot",
"logo_url": null,
"max_leverage": null,
"price": {
"amount": "80065.50000000",
"currency": "usd",
"decimals": 8,
"display_decimals": 8
},
"size_decimals": 5,
"volume_24h": {
"amount": "21622161986.44",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
}
},
{
"change_24h_percentage": null,
"id": "ETH",
"instrument_type": "perpetual",
"logo_url": null,
"max_leverage": 25,
"price": {
"amount": "2322.350000",
"currency": "usd",
"decimals": 6,
"display_decimals": 6
},
"size_decimals": 4,
"volume_24h": null
},
{
"change_24h_percentage": 1.4235,
"id": "NVDA",
"instrument_type": "spot",
"logo_url": "https://cdn.zerion.io/nvda.png",
"max_leverage": null,
"price": {
"amount": "191.27000000",
"currency": "usd",
"decimals": 8,
"display_decimals": 8
},
"size_decimals": 8,
"volume_24h": {
"amount": "34341055.48",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
}
},
{
"change_24h_percentage": null,
"id": "SOL",
"instrument_type": "perpetual",
"logo_url": null,
"max_leverage": 20,
"price": {
"amount": "101.325000",
"currency": "usd",
"decimals": 6,
"display_decimals": 6
},
"size_decimals": 2,
"volume_24h": null
},
{
"change_24h_percentage": null,
"id": "SOL",
"instrument_type": "spot",
"logo_url": null,
"max_leverage": null,
"price": {
"amount": "101.23500000",
"currency": "usd",
"decimals": 8,
"display_decimals": 8
},
"size_decimals": 3,
"volume_24h": null
},
{
"change_24h_percentage": null,
"id": "XAUT",
"instrument_type": "spot",
"logo_url": null,
"max_leverage": null,
"price": {
"amount": "4012.85000000",
"currency": "usd",
"decimals": 8,
"display_decimals": 8
},
"size_decimals": 2,
"volume_24h": null
},
{
"change_24h_percentage": null,
"id": "xyz:TSLA",
"instrument_type": "perpetual",
"logo_url": null,
"max_leverage": 20,
"price": {
"amount": "441.500000",
"currency": "usd",
"decimals": 6,
"display_decimals": 6
},
"size_decimals": 3,
"volume_24h": null
}
],
"page_info": {
"end_cursor": null,
"has_next_page": false,
"has_previous_page": false,
"start_cursor": "MQ"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}거래
List Markets
Returns every market you can trade on Whop.
- Spot: listed by symbol:
BTC,SOLandXAUT(gold), and tokenized stocks by ticker, such asAAPL, with their 24-hour change and logo. Spot markets also carryvolume_24h, the value traded across exchanges over the last 24 hours. - Perpetuals: such as
BTC, and stock and commodity perpetuals from Hyperliquid’sxyzexchange, such asxyz:TSLA. Send theidasmarketwhen you create a trade.
The same symbol can appear twice, once as a perpetual and once as spot, so use id together with instrument_type to tell them apart. Results are sorted by id, then instrument_type.
This endpoint is public: no API key is needed, and each IP address can make up to 60 requests a minute.
GET
/
trades
/
markets
List Markets
curl --request GET \
--url https://api.whop.com/api/v1/trades/marketsimport requests
url = "https://api.whop.com/api/v1/trades/markets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.whop.com/api/v1/trades/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://api.whop.com/api/v1/trades/markets",
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://api.whop.com/api/v1/trades/markets"
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://api.whop.com/api/v1/trades/markets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/trades/markets")
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{
"data": [
{
"change_24h_percentage": null,
"id": "BTC",
"instrument_type": "perpetual",
"logo_url": null,
"max_leverage": 40,
"price": {
"amount": "80155.500000",
"currency": "usd",
"decimals": 6,
"display_decimals": 6
},
"size_decimals": 5,
"volume_24h": null
},
{
"change_24h_percentage": null,
"id": "BTC",
"instrument_type": "spot",
"logo_url": null,
"max_leverage": null,
"price": {
"amount": "80065.50000000",
"currency": "usd",
"decimals": 8,
"display_decimals": 8
},
"size_decimals": 5,
"volume_24h": {
"amount": "21622161986.44",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
}
},
{
"change_24h_percentage": null,
"id": "ETH",
"instrument_type": "perpetual",
"logo_url": null,
"max_leverage": 25,
"price": {
"amount": "2322.350000",
"currency": "usd",
"decimals": 6,
"display_decimals": 6
},
"size_decimals": 4,
"volume_24h": null
},
{
"change_24h_percentage": 1.4235,
"id": "NVDA",
"instrument_type": "spot",
"logo_url": "https://cdn.zerion.io/nvda.png",
"max_leverage": null,
"price": {
"amount": "191.27000000",
"currency": "usd",
"decimals": 8,
"display_decimals": 8
},
"size_decimals": 8,
"volume_24h": {
"amount": "34341055.48",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
}
},
{
"change_24h_percentage": null,
"id": "SOL",
"instrument_type": "perpetual",
"logo_url": null,
"max_leverage": 20,
"price": {
"amount": "101.325000",
"currency": "usd",
"decimals": 6,
"display_decimals": 6
},
"size_decimals": 2,
"volume_24h": null
},
{
"change_24h_percentage": null,
"id": "SOL",
"instrument_type": "spot",
"logo_url": null,
"max_leverage": null,
"price": {
"amount": "101.23500000",
"currency": "usd",
"decimals": 8,
"display_decimals": 8
},
"size_decimals": 3,
"volume_24h": null
},
{
"change_24h_percentage": null,
"id": "XAUT",
"instrument_type": "spot",
"logo_url": null,
"max_leverage": null,
"price": {
"amount": "4012.85000000",
"currency": "usd",
"decimals": 8,
"display_decimals": 8
},
"size_decimals": 2,
"volume_24h": null
},
{
"change_24h_percentage": null,
"id": "xyz:TSLA",
"instrument_type": "perpetual",
"logo_url": null,
"max_leverage": 20,
"price": {
"amount": "441.500000",
"currency": "usd",
"decimals": 6,
"display_decimals": 6
},
"size_decimals": 3,
"volume_24h": null
}
],
"page_info": {
"end_cursor": null,
"has_next_page": false,
"has_previous_page": false,
"start_cursor": "MQ"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}
