Get aggregated information about staking for specific user. Requires associated x-api-key.
curl --request GET \
--url https://backend.swap.coffee/v1/partnership/staking/{master_address}/{address} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://backend.swap.coffee/v1/partnership/staking/{master_address}/{address}"
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://backend.swap.coffee/v1/partnership/staking/{master_address}/{address}', 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://backend.swap.coffee/v1/partnership/staking/{master_address}/{address}",
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://backend.swap.coffee/v1/partnership/staking/{master_address}/{address}"
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://backend.swap.coffee/v1/partnership/staking/{master_address}/{address}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.swap.coffee/v1/partnership/staking/{master_address}/{address}")
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{
"total_points": 123,
"locked_tokens": [
{
"token_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"asset_usd": 123,
"asset_raw": 123
}
],
"paid_rewards": [
{
"token_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"asset_usd": 123,
"asset_raw": 123
}
],
"positions": [
{
"id": 123,
"locked_asset_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"locked_asset_amount_raw": 123,
"locked_native": 123,
"locked_usd": 123,
"start_lock_seconds_utc": 123,
"end_lock_seconds_utc": 123,
"points_amount": 123,
"period_id": 123,
"available_periods": [
{
"period_id": 123,
"percentage": 123,
"lock_duration": 123
}
],
"earned_rewards": [
{
"token_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"asset_usd": 123,
"asset_raw": 123
}
]
}
]
}{
"error": "<string>"
}Partnership
Get aggregated information about staking for specific user. Requires associated x-api-key.
GET
/
v1
/
partnership
/
staking
/
{master_address}
/
{address}
Get aggregated information about staking for specific user. Requires associated x-api-key.
curl --request GET \
--url https://backend.swap.coffee/v1/partnership/staking/{master_address}/{address} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://backend.swap.coffee/v1/partnership/staking/{master_address}/{address}"
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://backend.swap.coffee/v1/partnership/staking/{master_address}/{address}', 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://backend.swap.coffee/v1/partnership/staking/{master_address}/{address}",
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://backend.swap.coffee/v1/partnership/staking/{master_address}/{address}"
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://backend.swap.coffee/v1/partnership/staking/{master_address}/{address}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.swap.coffee/v1/partnership/staking/{master_address}/{address}")
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{
"total_points": 123,
"locked_tokens": [
{
"token_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"asset_usd": 123,
"asset_raw": 123
}
],
"paid_rewards": [
{
"token_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"asset_usd": 123,
"asset_raw": 123
}
],
"positions": [
{
"id": 123,
"locked_asset_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"locked_asset_amount_raw": 123,
"locked_native": 123,
"locked_usd": 123,
"start_lock_seconds_utc": 123,
"end_lock_seconds_utc": 123,
"points_amount": 123,
"period_id": 123,
"available_periods": [
{
"period_id": 123,
"percentage": 123,
"lock_duration": 123
}
],
"earned_rewards": [
{
"token_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"asset_usd": 123,
"asset_raw": 123
}
]
}
]
}{
"error": "<string>"
}Authorizations
Path Parameters
Example:
"EQCMtrnKhK82Yw6xHrLm_rJLkMYxeYIilhdmn6BnVGZ1PnBM"
Example:
"UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV"
Increase total amount of existing partner token within claiming center. For internal usage only.Get generic statistic of dex aggregation.
⌘I