Get position
curl --request GET \
--url https://api.bendbasis.com/v1/positions/{position_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bendbasis.com/v1/positions/{position_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bendbasis.com/v1/positions/{position_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/positions/{position_id}",
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://api.bendbasis.com/v1/positions/{position_id}"
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://api.bendbasis.com/v1/positions/{position_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bendbasis.com/v1/positions/{position_id}")
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{
"data": {
"position_id": "de3e7930-4762-4b6d-80f0-13aa8a66ecfa",
"portfolio_id": "2f69612d-3b97-4820-babc-6c482a70fb68",
"asset": "BTC",
"status": "open",
"note": null,
"opened_at": "2026-09-01T08:00:00.000Z",
"closed_at": null,
"legs": [
{
"leg_id": "43bed8b5-8764-456d-9fd6-c7df9c960a76",
"side": "long",
"market_id": 15036,
"exchange": "binance",
"symbol": "BTCUSDT",
"leverage": 2,
"quantity": 0.1,
"open_price": 108000,
"mark_price": 108240.5,
"mark_price_updated_at": "2026-09-13T11:59:57.000Z",
"close_price": null,
"open_fee_paid": 4.32,
"close_fee_paid": null,
"funding": {
"calculated": 18.42,
"override": null
}
}
]
}
}{
"code": "VALIDATION_ERROR",
"message": "Invalid parameter"
}{
"code": "UNAUTHORIZED",
"message": "Valid API key required"
}{
"code": "FORBIDDEN",
"message": "API key does not grant the required scope"
}{
"code": "NOT_FOUND",
"message": "Funding market not found"
}Portfolio
Position
Get a position and its legs
GET
/
v1
/
positions
/
{position_id}
Get position
curl --request GET \
--url https://api.bendbasis.com/v1/positions/{position_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bendbasis.com/v1/positions/{position_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bendbasis.com/v1/positions/{position_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/positions/{position_id}",
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://api.bendbasis.com/v1/positions/{position_id}"
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://api.bendbasis.com/v1/positions/{position_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bendbasis.com/v1/positions/{position_id}")
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{
"data": {
"position_id": "de3e7930-4762-4b6d-80f0-13aa8a66ecfa",
"portfolio_id": "2f69612d-3b97-4820-babc-6c482a70fb68",
"asset": "BTC",
"status": "open",
"note": null,
"opened_at": "2026-09-01T08:00:00.000Z",
"closed_at": null,
"legs": [
{
"leg_id": "43bed8b5-8764-456d-9fd6-c7df9c960a76",
"side": "long",
"market_id": 15036,
"exchange": "binance",
"symbol": "BTCUSDT",
"leverage": 2,
"quantity": 0.1,
"open_price": 108000,
"mark_price": 108240.5,
"mark_price_updated_at": "2026-09-13T11:59:57.000Z",
"close_price": null,
"open_fee_paid": 4.32,
"close_fee_paid": null,
"funding": {
"calculated": 18.42,
"override": null
}
}
]
}
}{
"code": "VALIDATION_ERROR",
"message": "Invalid parameter"
}{
"code": "UNAUTHORIZED",
"message": "Valid API key required"
}{
"code": "FORBIDDEN",
"message": "API key does not grant the required scope"
}{
"code": "NOT_FOUND",
"message": "Funding market not found"
}curl "https://api.bendbasis.com/v1/positions/POSITION_ID" \
-H "Authorization: Bearer $BENDBASIS_API_KEY"
Was this page helpful?