Market
curl --request GET \
--url https://api.bendbasis.com/v1/markets/{market_id}import requests
url = "https://api.bendbasis.com/v1/markets/{market_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.bendbasis.com/v1/markets/{market_id}', 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.bendbasis.com/v1/markets/{market_id}",
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.bendbasis.com/v1/markets/{market_id}"
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.bendbasis.com/v1/markets/{market_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bendbasis.com/v1/markets/{market_id}")
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": {
"market_id": 15036,
"exchange": "binance",
"symbol": "BTCUSDT",
"base_asset": "BTC",
"quote_asset": "USDT",
"funding_interval": 8,
"funding_rate_apr": {
"live": 2.83,
"1d": 5.96,
"3d": 6.75,
"7d": 5.44,
"15d": 7.17,
"30d": 7.53
},
"open_interest": 8214551820.078431,
"volume_24h": 10213075002.28
}
}{
"code": "VALIDATION_ERROR",
"message": "Invalid parameter"
}{
"code": "NOT_FOUND",
"message": "Funding market not found"
}Markets
Market
Retrieve a market by ID
GET
/
v1
/
markets
/
{market_id}
Market
curl --request GET \
--url https://api.bendbasis.com/v1/markets/{market_id}import requests
url = "https://api.bendbasis.com/v1/markets/{market_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.bendbasis.com/v1/markets/{market_id}', 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.bendbasis.com/v1/markets/{market_id}",
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.bendbasis.com/v1/markets/{market_id}"
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.bendbasis.com/v1/markets/{market_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bendbasis.com/v1/markets/{market_id}")
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": {
"market_id": 15036,
"exchange": "binance",
"symbol": "BTCUSDT",
"base_asset": "BTC",
"quote_asset": "USDT",
"funding_interval": 8,
"funding_rate_apr": {
"live": 2.83,
"1d": 5.96,
"3d": 6.75,
"7d": 5.44,
"15d": 7.17,
"30d": 7.53
},
"open_interest": 8214551820.078431,
"volume_24h": 10213075002.28
}
}{
"code": "VALIDATION_ERROR",
"message": "Invalid parameter"
}{
"code": "NOT_FOUND",
"message": "Funding market not found"
}Was this page helpful?