Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Polymarket Portfolio Value

Tài liệu API
https://api.sandbase.ai/v1/api/polymarket/value

Current USD value of a wallet's open positions, optionally limited to given markets.

Giá
$0.012USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 1 tùy chọn

Phòng thử nghiệm

Đầu vào
The wallet whose portfolio value to return. Required.
Comma-separated `condition_id`s (at most 20 distinct values); omit for the full portfolio.
Đầu raSẵn sàng

Đầu ra của bạn sẽ xuất hiện ở đây

Hoàn tất đầu vào, rồi nhấp Run.

README API

Polymarket Portfolio Value API

Returns the current USD value of a wallet's open positions on Polymarket. It needs a wallet address in user, and it can limit the total to specific markets with condition.

Use cases

  • Track the total size of a trader's open Polymarket portfolio over time.
  • Rank a list of wallets by the current value of their open positions.
  • Check how much of a wallet's value sits in one market by passing that market's condition_id.
  • Show a portfolio balance next to a wallet's positions in a dashboard.

Request

curl -X POST "https://api.sandbase.ai/v1/api/polymarket/value" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"user": "0xfe787d2da716d60e8acff57fb87eb13cd4d10319"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
userstringYesThe wallet whose portfolio value to return. Required.
conditionstringNoComma-separated condition_ids (at most 20 distinct values); omit for the full portfolio.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": {
    "proxy_wallet": "0xfe787d2da716d60e8acff57fb87eb13cd4d10319",
    "value": 185559.3014
  }
}

Response fields

FieldMeaning
data.proxy_walletThe wallet address the value belongs to. It matches the user you sent in this example.
data.valueCurrent USD value of the wallet's open positions. It covers the full portfolio, or only the markets listed in condition.

Notes

  • user is a wallet address in 0x hex format.
  • condition takes up to 20 distinct condition_id values separated by commas. Leave it out to value the full portfolio.
  • To see which positions make up the value, call Polymarket Wallet Positions.
  • To find condition_id values for markets, call Polymarket List markets.

Pricing

$0.012 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
Polymarket$0.012 mỗi lần gọiJSON
Polymarket$0.012 mỗi lần gọiJSON
Polymarket$0.012 mỗi lần gọiJSON
Polymarket$0.012 mỗi lần gọiJSON
Polymarket$0.012 mỗi lần gọiJSON
Polymarket$0.012 mỗi lần gọiJSON

Câu hỏi

FAQ

Làm thế nào để dùng API Polymarket Portfolio Value?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/polymarket/value với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API Polymarket Portfolio Value có giá bao nhiêu?

$0.012 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.

API Polymarket Portfolio Value chấp nhận những tham số nào?

Bắt buộc: user (string). Tùy chọn: condition (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Polymarket Portfolio Value trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của Polymarket không?

Không. Polymarket Portfolio Value chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Polymarket.