Get open requests
curl --request GET \
--url https://hedgin.xyz/api/external/v1/vaults/{vault}/requests \
--header 'Authorization: Bearer <token>'import requests
url = "https://hedgin.xyz/api/external/v1/vaults/{vault}/requests"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://hedgin.xyz/api/external/v1/vaults/{vault}/requests', 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://hedgin.xyz/api/external/v1/vaults/{vault}/requests",
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://hedgin.xyz/api/external/v1/vaults/{vault}/requests"
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://hedgin.xyz/api/external/v1/vaults/{vault}/requests")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://hedgin.xyz/api/external/v1/vaults/{vault}/requests")
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{
"vault": "So11111111111111111111111111111111111111112",
"data": {
"deposits": [
{
"owner": "So11111111111111111111111111111111111111112",
"amount": "1000000",
"epoch": "<string>",
"createdTs": 123,
"state": "pending",
"cancellable": true
}
],
"withdrawals": [
{
"owner": "So11111111111111111111111111111111111111112",
"shares": "1000000",
"epoch": "<string>",
"createdTs": 123,
"state": "pending",
"cancellable": true
}
]
}
}{
"error": {
"code": "Validation",
"message": "vault must be a public key"
}
}{
"error": {
"code": "Unauthorized",
"message": "Invalid API key"
}
}{
"error": {
"code": "Forbidden",
"message": "Action is not enabled for this key"
}
}{
"error": {
"code": "NotFound",
"message": "Vault not found"
}
}{
"error": {
"code": "RateLimited",
"message": "Too many requests, slow down"
}
}{
"error": {
"code": "Internal",
"message": "Service temporarily unavailable"
}
}{
"error": {
"code": "RpcUnavailable",
"message": "Service temporarily unavailable"
}
}Vault reads
Get open requests
Requires key scope read.
Returns open deposit and withdrawal requests. The data can be up to 10 seconds old.
GET
/
vaults
/
{vault}
/
requests
Get open requests
curl --request GET \
--url https://hedgin.xyz/api/external/v1/vaults/{vault}/requests \
--header 'Authorization: Bearer <token>'import requests
url = "https://hedgin.xyz/api/external/v1/vaults/{vault}/requests"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://hedgin.xyz/api/external/v1/vaults/{vault}/requests', 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://hedgin.xyz/api/external/v1/vaults/{vault}/requests",
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://hedgin.xyz/api/external/v1/vaults/{vault}/requests"
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://hedgin.xyz/api/external/v1/vaults/{vault}/requests")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://hedgin.xyz/api/external/v1/vaults/{vault}/requests")
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{
"vault": "So11111111111111111111111111111111111111112",
"data": {
"deposits": [
{
"owner": "So11111111111111111111111111111111111111112",
"amount": "1000000",
"epoch": "<string>",
"createdTs": 123,
"state": "pending",
"cancellable": true
}
],
"withdrawals": [
{
"owner": "So11111111111111111111111111111111111111112",
"shares": "1000000",
"epoch": "<string>",
"createdTs": 123,
"state": "pending",
"cancellable": true
}
]
}
}{
"error": {
"code": "Validation",
"message": "vault must be a public key"
}
}{
"error": {
"code": "Unauthorized",
"message": "Invalid API key"
}
}{
"error": {
"code": "Forbidden",
"message": "Action is not enabled for this key"
}
}{
"error": {
"code": "NotFound",
"message": "Vault not found"
}
}{
"error": {
"code": "RateLimited",
"message": "Too many requests, slow down"
}
}{
"error": {
"code": "Internal",
"message": "Service temporarily unavailable"
}
}{
"error": {
"code": "RpcUnavailable",
"message": "Service temporarily unavailable"
}
}Authorizations
API key issued by a Hedgin administrator, in the form hv1_<id>_<secret>. <id> is 1 to 48 characters and <secret> is 32 to 128 characters, both from [A-Za-z0-9_-].
Path Parameters
Vault public key. Must be in the key's allowlist when the key has one, and the key's manager must be the vault's current on-chain authority. Base58 Solana public key. The server decodes it and rejects anything that is not 32 bytes.
Pattern:
^[1-9A-HJ-NP-Za-km-z]{32,44}$Example:
"So11111111111111111111111111111111111111112"
