List Orca Positions
curl --request GET \
--url https://api.defiorbit.xyz/v1/positions/orca \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.defiorbit.xyz/v1/positions/orca', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.defiorbit.xyz/v1/positions/orca"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.defiorbit.xyz/v1/positions/orca"
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.defiorbit.xyz/v1/positions/orca")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.defiorbit.xyz/v1/positions/orca")
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<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.defiorbit.xyz/v1/positions/orca",
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;
}{
"data": [
{
"position_id": "FUvNMzGMEwFmy6QreoZG7TijmRrDNhKFXJDQYzHM2uEr",
"chain_id": 101,
"wallet": "CqB5nxVwQkjjaq3qpzBcJRwych1sZJDeT37BgDSXwpyp",
"is_active": true,
"sub_protocol": "orca",
"position_state": {
"id": "FUvNMzGMEwFmy6QreoZG7TijmRrDNhKFXJDQYzHM2uEr",
"liquidity": "17770686851",
"tickLower": "-4928",
"tickUpper": "-2624",
"whirlpool": "whirlpoolAddress",
"positionMint": "positionMintAddress"
}
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 2,
"next_page": null,
"prev_page": null
},
"counts": {
"totalActive": 2,
"totalInactive": 2,
"total": 4,
"filtered": 2,
"errors": 0
},
"request_id": "req_..."
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "page must be a positive integer.",
"request_id": "req_..."
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Missing API key.",
"request_id": "req_..."
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient API credits.",
"request_id": "req_..."
}
}{
"error": {
"code": "ACCOUNT_SUSPENDED",
"message": "This organization is suspended.",
"request_id": "req_..."
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please try again later.",
"request_id": "req_..."
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"request_id": "req_..."
}
}List Orca Positions
All active Orca whirlpool (and DeFiTuna-wrapped) LP positions for a Solana wallet. Closed positions are visible with status=inactive.
Credits: 2 per position returned on this page.
These queries have their own credit cost.
| Query | Credits per returned position |
|---|---|
status=inactive | 1 |
full=true | 15 |
GET
https://api.defiorbit.xyz
/
v1
/
positions
/
orca
List Orca Positions
curl --request GET \
--url https://api.defiorbit.xyz/v1/positions/orca \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.defiorbit.xyz/v1/positions/orca', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.defiorbit.xyz/v1/positions/orca"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.defiorbit.xyz/v1/positions/orca"
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.defiorbit.xyz/v1/positions/orca")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.defiorbit.xyz/v1/positions/orca")
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<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.defiorbit.xyz/v1/positions/orca",
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;
}{
"data": [
{
"position_id": "FUvNMzGMEwFmy6QreoZG7TijmRrDNhKFXJDQYzHM2uEr",
"chain_id": 101,
"wallet": "CqB5nxVwQkjjaq3qpzBcJRwych1sZJDeT37BgDSXwpyp",
"is_active": true,
"sub_protocol": "orca",
"position_state": {
"id": "FUvNMzGMEwFmy6QreoZG7TijmRrDNhKFXJDQYzHM2uEr",
"liquidity": "17770686851",
"tickLower": "-4928",
"tickUpper": "-2624",
"whirlpool": "whirlpoolAddress",
"positionMint": "positionMintAddress"
}
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 2,
"next_page": null,
"prev_page": null
},
"counts": {
"totalActive": 2,
"totalInactive": 2,
"total": 4,
"filtered": 2,
"errors": 0
},
"request_id": "req_..."
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "page must be a positive integer.",
"request_id": "req_..."
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Missing API key.",
"request_id": "req_..."
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient API credits.",
"request_id": "req_..."
}
}{
"error": {
"code": "ACCOUNT_SUSPENDED",
"message": "This organization is suspended.",
"request_id": "req_..."
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please try again later.",
"request_id": "req_..."
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"request_id": "req_..."
}
}Authorizations
Query Parameters
Solana wallet.
Example:
"CqB5nxVwQkjjaq3qpzBcJRwych1sZJDeT37BgDSXwpyp"
Omit for active positions. Set to inactive for closed positions. Default: active.
Available options:
inactive Boolean. Include full=true for the detailed payload. Omit otherwise. On list endpoints this returns active positions only.
Chain ID.
Page. Default: 1.
Maximum 25. Default: 10.
Required range:
x <= 25