List borrow positions for users
curl --request GET \
--url https://api.jup.ag/lend/v1/borrow/positions \
--header 'x-api-key: <api-key>'import requests
url = "https://api.jup.ag/lend/v1/borrow/positions"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.jup.ag/lend/v1/borrow/positions', 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.jup.ag/lend/v1/borrow/positions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.jup.ag/lend/v1/borrow/positions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.jup.ag/lend/v1/borrow/positions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jup.ag/lend/v1/borrow/positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": 3518,
"vaultId": 8,
"address": "9tjzV49wccwf9A8J5fZ5josjWYnS41fUpNmcwqcqYrPF",
"supply": "0",
"beforeSupply": "0",
"borrow": "0",
"beforeBorrow": "0",
"isLiquidated": false,
"supplyLiquidation": "0",
"borrowLiquidation": "0",
"isSupplyPosition": true,
"tick": -2147483648,
"tickId": 1,
"dustBorrow": "0",
"ownerAddress": "HYbxGkNvEwvZ14RzJHPB9h3dWfXjxwAEhkyzJRHx1hBf",
"vault": {
"id": 8,
"address": "DchXYJwVjPaEUxCiySXVbNyNppAFbQM7Ku76uKvyaDNT"
},
"config": {}
}
]Borrow
Positions
Request the borrow positions of one or multiple users
GET
/
borrow
/
positions
List borrow positions for users
curl --request GET \
--url https://api.jup.ag/lend/v1/borrow/positions \
--header 'x-api-key: <api-key>'import requests
url = "https://api.jup.ag/lend/v1/borrow/positions"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.jup.ag/lend/v1/borrow/positions', 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.jup.ag/lend/v1/borrow/positions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.jup.ag/lend/v1/borrow/positions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.jup.ag/lend/v1/borrow/positions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jup.ag/lend/v1/borrow/positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": 3518,
"vaultId": 8,
"address": "9tjzV49wccwf9A8J5fZ5josjWYnS41fUpNmcwqcqYrPF",
"supply": "0",
"beforeSupply": "0",
"borrow": "0",
"beforeBorrow": "0",
"isLiquidated": false,
"supplyLiquidation": "0",
"borrowLiquidation": "0",
"isSupplyPosition": true,
"tick": -2147483648,
"tickId": 1,
"dustBorrow": "0",
"ownerAddress": "HYbxGkNvEwvZ14RzJHPB9h3dWfXjxwAEhkyzJRHx1hBf",
"vault": {
"id": 8,
"address": "DchXYJwVjPaEUxCiySXVbNyNppAFbQM7Ku76uKvyaDNT"
},
"config": {}
}
]Authorizations
Get API key via https://developers.jup.ag/portal
Query Parameters
Comma-separated Solana wallet addresses.
Lend market identifier. Defaults to main.
Available options:
main, ethena Response
200 - application/json
Borrow positions for the requested users
NFT / position id.
Position NFT mint address.
Serialized vault data from serializedVault() in app/core/borrowing.ts.
Show child attributes
Show child attributes
Key/value position config from the database, keyed in camelCase.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
