Get wallet approvals
curl --request GET \
--url https://data-api.polymarket.com/v2/approvals \
--header 'Authorization: Bearer <token>'import requests
url = "https://data-api.polymarket.com/v2/approvals"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://data-api.polymarket.com/v2/approvals', 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://data-api.polymarket.com/v2/approvals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://data-api.polymarket.com/v2/approvals"
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://data-api.polymarket.com/v2/approvals")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api.polymarket.com/v2/approvals")
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{
"data": {
"address": "<string>",
"chain_id": 123,
"checked_at": "<string>",
"contracts": [
{
"approved": true,
"feature": "<string>",
"id": "<string>",
"spender": "<string>",
"standard": "<string>",
"token": "<string>",
"amount": "<string>"
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}获取钱包授权状态
Polygon token/operator approval state for one wallet.
?user= must be an EVM address. The complete served catalog is returned in
canonical order under { data }; this endpoint is not paginated.
GET
/
v2
/
approvals
Get wallet approvals
curl --request GET \
--url https://data-api.polymarket.com/v2/approvals \
--header 'Authorization: Bearer <token>'import requests
url = "https://data-api.polymarket.com/v2/approvals"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://data-api.polymarket.com/v2/approvals', 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://data-api.polymarket.com/v2/approvals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://data-api.polymarket.com/v2/approvals"
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://data-api.polymarket.com/v2/approvals")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api.polymarket.com/v2/approvals")
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{
"data": {
"address": "<string>",
"chain_id": 123,
"checked_at": "<string>",
"contracts": [
{
"approved": true,
"feature": "<string>",
"id": "<string>",
"spender": "<string>",
"standard": "<string>",
"token": "<string>",
"amount": "<string>"
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
查询参数
The proxy wallet whose approval state to return. Required EVM address.
响应
Approval state for the wallet
{ "data": T }; the envelope for endpoints that don't paginate.
There is no pagination key: an aggregate or bounded list has no next page.
Paginated feeds return a *Page shape ({ data, pagination }) instead.
Non-paginated approval snapshot for one Polygon proxy wallet.
Show child attributes
Show child attributes
此页面对您有帮助吗?