Staking Pools List
curl --request GET \
--url https://portal-api.magna.so/api/{portalId}/staking-poolsimport requests
url = "https://portal-api.magna.so/api/{portalId}/staking-pools"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://portal-api.magna.so/api/{portalId}/staking-pools', 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://portal-api.magna.so/api/{portalId}/staking-pools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://portal-api.magna.so/api/{portalId}/staking-pools"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://portal-api.magna.so/api/{portalId}/staking-pools")
.asString();require 'uri'
require 'net/http'
url = URI("https://portal-api.magna.so/api/{portalId}/staking-pools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"stakingPools": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "ETH Staking Pool",
"description": "Stake your ETH tokens to earn rewards",
"tokenId": "123e4567-e89b-12d3-a456-426614174001",
"contractId": "123e4567-e89b-12d3-a456-426614174002",
"status": "ACTIVE",
"totalStaked": "1000000000000000000000",
"totalRewardsDeposited": "50000000000000000000",
"periodFinish": "2024-12-31T23:59:59Z",
"minimumStakeAmount": "32000000000000000000",
"maxApy": "100",
"averageApy": "7",
"minimumStakeLength": {
"value": 1,
"period": "DAY"
},
"stakeWithdrawalDelay": {
"value": 1,
"period": "DAY"
},
"rewardWithdrawalDelay": {
"value": 1,
"period": "DAY"
},
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
]
}{
"errors": [
{
"path": "query.wallet",
"message": "Required"
}
]
}{
"error": "internal server error"
}Staking
Staking Pools List
Returns a list of staking pools
GET
/
api
/
{portalId}
/
staking-pools
Staking Pools List
curl --request GET \
--url https://portal-api.magna.so/api/{portalId}/staking-poolsimport requests
url = "https://portal-api.magna.so/api/{portalId}/staking-pools"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://portal-api.magna.so/api/{portalId}/staking-pools', 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://portal-api.magna.so/api/{portalId}/staking-pools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://portal-api.magna.so/api/{portalId}/staking-pools"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://portal-api.magna.so/api/{portalId}/staking-pools")
.asString();require 'uri'
require 'net/http'
url = URI("https://portal-api.magna.so/api/{portalId}/staking-pools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"stakingPools": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "ETH Staking Pool",
"description": "Stake your ETH tokens to earn rewards",
"tokenId": "123e4567-e89b-12d3-a456-426614174001",
"contractId": "123e4567-e89b-12d3-a456-426614174002",
"status": "ACTIVE",
"totalStaked": "1000000000000000000000",
"totalRewardsDeposited": "50000000000000000000",
"periodFinish": "2024-12-31T23:59:59Z",
"minimumStakeAmount": "32000000000000000000",
"maxApy": "100",
"averageApy": "7",
"minimumStakeLength": {
"value": 1,
"period": "DAY"
},
"stakeWithdrawalDelay": {
"value": 1,
"period": "DAY"
},
"rewardWithdrawalDelay": {
"value": 1,
"period": "DAY"
},
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
]
}{
"errors": [
{
"path": "query.wallet",
"message": "Required"
}
]
}{
"error": "internal server error"
}⌘I