Get reward percentages for user
curl --request GET \
--url https://clob.polymarket.com/rewards/user/percentages \
--header 'POLY_ADDRESS: <api-key>' \
--header 'POLY_API_KEY: <api-key>' \
--header 'POLY_PASSPHRASE: <api-key>' \
--header 'POLY_SIGNATURE: <api-key>' \
--header 'POLY_TIMESTAMP: <api-key>'import requests
url = "https://clob.polymarket.com/rewards/user/percentages"
headers = {
"POLY_API_KEY": "<api-key>",
"POLY_ADDRESS": "<api-key>",
"POLY_SIGNATURE": "<api-key>",
"POLY_PASSPHRASE": "<api-key>",
"POLY_TIMESTAMP": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
POLY_API_KEY: '<api-key>',
POLY_ADDRESS: '<api-key>',
POLY_SIGNATURE: '<api-key>',
POLY_PASSPHRASE: '<api-key>',
POLY_TIMESTAMP: '<api-key>'
}
};
fetch('https://clob.polymarket.com/rewards/user/percentages', 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://clob.polymarket.com/rewards/user/percentages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"POLY_ADDRESS: <api-key>",
"POLY_API_KEY: <api-key>",
"POLY_PASSPHRASE: <api-key>",
"POLY_SIGNATURE: <api-key>",
"POLY_TIMESTAMP: <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://clob.polymarket.com/rewards/user/percentages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("POLY_API_KEY", "<api-key>")
req.Header.Add("POLY_ADDRESS", "<api-key>")
req.Header.Add("POLY_SIGNATURE", "<api-key>")
req.Header.Add("POLY_PASSPHRASE", "<api-key>")
req.Header.Add("POLY_TIMESTAMP", "<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://clob.polymarket.com/rewards/user/percentages")
.header("POLY_API_KEY", "<api-key>")
.header("POLY_ADDRESS", "<api-key>")
.header("POLY_SIGNATURE", "<api-key>")
.header("POLY_PASSPHRASE", "<api-key>")
.header("POLY_TIMESTAMP", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://clob.polymarket.com/rewards/user/percentages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["POLY_API_KEY"] = '<api-key>'
request["POLY_ADDRESS"] = '<api-key>'
request["POLY_SIGNATURE"] = '<api-key>'
request["POLY_PASSPHRASE"] = '<api-key>'
request["POLY_TIMESTAMP"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"0x296ea2f3ad438ce7ead77f40d0159bf3e5d8be146f6f615fa253b00e02243f5c": 20,
"0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af": 20
}
获取用户奖励比例
Returns the real-time percentages of rewards that a user is earning per market.
The response is a map of condition_id to the percentage of total rewards the user is currently earning in that market.
Requires CLOB L2 Auth headers.
GET
/
rewards
/
user
/
percentages
Get reward percentages for user
curl --request GET \
--url https://clob.polymarket.com/rewards/user/percentages \
--header 'POLY_ADDRESS: <api-key>' \
--header 'POLY_API_KEY: <api-key>' \
--header 'POLY_PASSPHRASE: <api-key>' \
--header 'POLY_SIGNATURE: <api-key>' \
--header 'POLY_TIMESTAMP: <api-key>'import requests
url = "https://clob.polymarket.com/rewards/user/percentages"
headers = {
"POLY_API_KEY": "<api-key>",
"POLY_ADDRESS": "<api-key>",
"POLY_SIGNATURE": "<api-key>",
"POLY_PASSPHRASE": "<api-key>",
"POLY_TIMESTAMP": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
POLY_API_KEY: '<api-key>',
POLY_ADDRESS: '<api-key>',
POLY_SIGNATURE: '<api-key>',
POLY_PASSPHRASE: '<api-key>',
POLY_TIMESTAMP: '<api-key>'
}
};
fetch('https://clob.polymarket.com/rewards/user/percentages', 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://clob.polymarket.com/rewards/user/percentages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"POLY_ADDRESS: <api-key>",
"POLY_API_KEY: <api-key>",
"POLY_PASSPHRASE: <api-key>",
"POLY_SIGNATURE: <api-key>",
"POLY_TIMESTAMP: <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://clob.polymarket.com/rewards/user/percentages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("POLY_API_KEY", "<api-key>")
req.Header.Add("POLY_ADDRESS", "<api-key>")
req.Header.Add("POLY_SIGNATURE", "<api-key>")
req.Header.Add("POLY_PASSPHRASE", "<api-key>")
req.Header.Add("POLY_TIMESTAMP", "<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://clob.polymarket.com/rewards/user/percentages")
.header("POLY_API_KEY", "<api-key>")
.header("POLY_ADDRESS", "<api-key>")
.header("POLY_SIGNATURE", "<api-key>")
.header("POLY_PASSPHRASE", "<api-key>")
.header("POLY_TIMESTAMP", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://clob.polymarket.com/rewards/user/percentages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["POLY_API_KEY"] = '<api-key>'
request["POLY_ADDRESS"] = '<api-key>'
request["POLY_SIGNATURE"] = '<api-key>'
request["POLY_PASSPHRASE"] = '<api-key>'
request["POLY_TIMESTAMP"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"0x296ea2f3ad438ce7ead77f40d0159bf3e5d8be146f6f615fa253b00e02243f5c": 20,
"0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af": 20
}
授权
Your API key
Ethereum address associated with the API key
HMAC signature of the request
API key passphrase
Unix timestamp of the request
查询参数
Signature type for address derivation (required for API KEY auth):
- 0: EOA
- 1: POLY_PROXY
- 2: POLY_GNOSIS_SAFE
可用选项:
0, 1, 2 Maker address to query percentages for
响应
Successfully retrieved reward percentages
Map of condition_id to reward percentage
此页面对您有帮助吗?
⌘I