Get total earnings for user by date
curl --request GET \
--url https://clob.polymarket.com/rewards/user/total \
--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/total"
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/total', 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/total",
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/total"
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/total")
.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/total")
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[
{
"date": "2024-04-09T00:00:00Z",
"asset_address": "0x9c4E1703476E875070EE25b56A58B008CFb8FA78",
"maker_address": "0xD527CCdBEB6478488c848465F9947bDA3C2e6994",
"earnings": 1.59984,
"asset_rate": 0.999357
},
{
"date": "2024-04-09T00:00:00Z",
"asset_address": "0x69308FB512518e39F9b16112fA8d994F4e2Bf8bB",
"maker_address": "0xD527CCdBEB6478488c848465F9947bDA3C2e6994",
"earnings": 8.187219,
"asset_rate": 3.51
}
]获取用户指定日期的总收益
Returns the summed total rewards earnings for a user on a provided day, grouped by asset address.
Requires CLOB L2 Auth headers.
GET
/
rewards
/
user
/
total
Get total earnings for user by date
curl --request GET \
--url https://clob.polymarket.com/rewards/user/total \
--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/total"
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/total', 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/total",
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/total"
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/total")
.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/total")
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[
{
"date": "2024-04-09T00:00:00Z",
"asset_address": "0x9c4E1703476E875070EE25b56A58B008CFb8FA78",
"maker_address": "0xD527CCdBEB6478488c848465F9947bDA3C2e6994",
"earnings": 1.59984,
"asset_rate": 0.999357
},
{
"date": "2024-04-09T00:00:00Z",
"asset_address": "0x69308FB512518e39F9b16112fA8d994F4e2Bf8bB",
"maker_address": "0xD527CCdBEB6478488c848465F9947bDA3C2e6994",
"earnings": 8.187219,
"asset_rate": 3.51
}
]授权
Your API key
Ethereum address associated with the API key
HMAC signature of the request
API key passphrase
Unix timestamp of the request
查询参数
Date in YYYY-MM-DD format
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 earnings for
If true, aggregates both native and sponsored earnings
此页面对您有帮助吗?
⌘I