Retrieve Rewards Information
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gnosispay.com/api/v1/rewards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.gnosispay.com/api/v1/rewards \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gnosispay.com/api/v1/rewards"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gnosispay.com/api/v1/rewards"
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://api.gnosispay.com/api/v1/rewards")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gnosispay.com/api/v1/rewards")
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{
"isOg": true,
"gnoBalance": 10.5,
"cashbackRate": 2.5
}{
"message": "<string>"
}{
"error": "<string>"
}Rewards
Retrieve Rewards Information
Returns user’s OG status, GNO balance of Safe, and calculated base cashback rate. Note that the cashbackRate returned does not include the +1% bonus for OG NFT holders - to get the total cashback rate, add 1% to the cashbackRate if isOg is true.
GET
/
api
/
v1
/
rewards
Retrieve Rewards Information
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gnosispay.com/api/v1/rewards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.gnosispay.com/api/v1/rewards \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gnosispay.com/api/v1/rewards"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gnosispay.com/api/v1/rewards"
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://api.gnosispay.com/api/v1/rewards")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gnosispay.com/api/v1/rewards")
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{
"isOg": true,
"gnoBalance": 10.5,
"cashbackRate": 2.5
}{
"message": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Successfully retrieved rewards information
Indicates if the user holds an OG NFT token. If true, the user gets an additional 1% cashback on top of the base cashbackRate.
Example:
true
User's GNO token balance in their Safe account
Example:
10.5
Base cashback rate calculated from GNO balance (0-4%). For OG NFT holders, add 1% to this rate to get the total cashback rate.
Example:
2.5