Batch Get Morpho Positions
curl --request POST \
--url https://api.defiorbit.xyz/v1/lending/morpho/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"wallets": [
"0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({wallets: ['0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495']})
};
fetch('https://api.defiorbit.xyz/v1/lending/morpho/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.defiorbit.xyz/v1/lending/morpho/batch"
payload = { "wallets": ["0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.defiorbit.xyz/v1/lending/morpho/batch"
payload := strings.NewReader("{\n \"wallets\": [\n \"0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.defiorbit.xyz/v1/lending/morpho/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"wallets\": [\n \"0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.defiorbit.xyz/v1/lending/morpho/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallets\": [\n \"0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495\"\n ]\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.defiorbit.xyz/v1/lending/morpho/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'wallets' => [
'0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"chain_id": 1,
"wallet": "0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495",
"positions": [
{
"marketId": "0xabababababababababababababababababababababababababababababababab",
"healthFactor": "2.5000",
"netValueUSD": "800.00"
}
],
"calculations": [
{
"healthFactor": "2.5000",
"netAPY": "3.20"
}
]
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 1,
"next_page": null,
"prev_page": null
},
"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_..."
}
}Batch Get Morpho Positions
Same as the list endpoint, but accepts multiple wallets in one POST (max 10). Returns one entry per wallet/chain pair. Optional market_id and target_health_factor in the body.
Credits: 15 per matching wallet/chain result when fewer than 100 match; 12 per result at 100 or more. Billing uses the matching count before pagination.
POST
https://api.defiorbit.xyz
/
v1
/
lending
/
morpho
/
batch
Batch Get Morpho Positions
curl --request POST \
--url https://api.defiorbit.xyz/v1/lending/morpho/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"wallets": [
"0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({wallets: ['0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495']})
};
fetch('https://api.defiorbit.xyz/v1/lending/morpho/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.defiorbit.xyz/v1/lending/morpho/batch"
payload = { "wallets": ["0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.defiorbit.xyz/v1/lending/morpho/batch"
payload := strings.NewReader("{\n \"wallets\": [\n \"0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.defiorbit.xyz/v1/lending/morpho/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"wallets\": [\n \"0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.defiorbit.xyz/v1/lending/morpho/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallets\": [\n \"0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495\"\n ]\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.defiorbit.xyz/v1/lending/morpho/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'wallets' => [
'0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"chain_id": 1,
"wallet": "0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495",
"positions": [
{
"marketId": "0xabababababababababababababababababababababababababababababababab",
"healthFactor": "2.5000",
"netValueUSD": "800.00"
}
],
"calculations": [
{
"healthFactor": "2.5000",
"netAPY": "3.20"
}
]
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 1,
"next_page": null,
"prev_page": null
},
"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
Page. Default: 1.
Maximum 25. Default: 10.
Required range:
x <= 25Body
application/json
Wallet addresses (comma-separated in the explorer; JSON array in the request body).
Example:
[
"0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495"
]
Chain ID.
Isolated Morpho market id.
Target health factor. Default: 1.5.