Serve public wallet position lifecycle and settlement flags

This commit is contained in:
2026-12-05 04:44:37 +08:00
parent 31af9ad9cf
commit 629d5d2548
10 changed files with 453 additions and 1 deletions
+2
View File
@@ -423,3 +423,5 @@ sequenceDiagram
E-->>H: true E-->>H: true
H-->>C: 200,neg_risk 为真 H-->>C: 200,neg_risk 为真
``` ```
GET /v2/positions 查询钱包或单一市场的当前持仓、待赎回份额、互补仓位及已退出记录。用 pagination.next_cursor 续读时沿用原钱包或市场与筛选条件。
+16 -1
View File
@@ -329,7 +329,12 @@ fn respond(mut req: Request, engine: &Mutex<Exchange>) -> std::io::Result<()> {
if req.method() == &Method::Get if req.method() == &Method::Get
&& matches!( && matches!(
path, path,
"/v2/prices-history" | "/v2/trades" | "/v2/resolutions" | "/v2/value" | "/v2/oi" "/v2/prices-history"
| "/v2/trades"
| "/v2/resolutions"
| "/v2/value"
| "/v2/oi"
| "/v2/positions"
) )
{ {
let (status, body) = data_page(path, params, engine); let (status, body) = data_page(path, params, engine);
@@ -473,6 +478,7 @@ fn respond(mut req: Request, engine: &Mutex<Exchange>) -> std::io::Result<()> {
| "/market-clarifications" | "/market-clarifications"
| "/v2/oi" | "/v2/oi"
| "/v2/value" | "/v2/value"
| "/v2/positions"
| "/v2/trades" | "/v2/trades"
| "/v2/resolutions" | "/v2/resolutions"
| "/v2/prices-history", | "/v2/prices-history",
@@ -514,6 +520,7 @@ fn read_page<Q: serde::de::DeserializeOwned>(
fn data_page(path: &str, params: &str, engine: &Mutex<Exchange>) -> (u16, Value) { fn data_page(path: &str, params: &str, engine: &Mutex<Exchange>) -> (u16, Value) {
let page = match path { let page = match path {
"/v2/oi" => read_page(params, engine, Exchange::public_open_interest), "/v2/oi" => read_page(params, engine, Exchange::public_open_interest),
"/v2/positions" => read_page(params, engine, Exchange::public_positions),
"/v2/value" => read_page(params, engine, Exchange::public_portfolio_value), "/v2/value" => read_page(params, engine, Exchange::public_portfolio_value),
"/v2/trades" => read_page(params, engine, Exchange::public_trade_feed), "/v2/trades" => read_page(params, engine, Exchange::public_trade_feed),
"/v2/resolutions" => read_page(params, engine, Exchange::public_resolutions), "/v2/resolutions" => read_page(params, engine, Exchange::public_resolutions),
@@ -529,6 +536,10 @@ fn data_page(path: &str, params: &str, engine: &Mutex<Exchange>) -> (u16, Value)
503, 503,
json!({"code":"unavailable","error":"open interest unavailable","retryable":true}), json!({"code":"unavailable","error":"open interest unavailable","retryable":true}),
), ),
Err(HistoryError::Unavailable) if path == "/v2/positions" => (
503,
json!({"code":"unavailable","error":"positions unavailable","retryable":true}),
),
Err(HistoryError::Unavailable) if path == "/v2/value" => ( Err(HistoryError::Unavailable) if path == "/v2/value" => (
503, 503,
json!({"code":"unavailable","error":"portfolio valuation unavailable","retryable":true}), json!({"code":"unavailable","error":"portfolio valuation unavailable","retryable":true}),
@@ -695,6 +706,10 @@ mod tests {
("GET","/v2/oi",String::new(),503,None), ("GET","/v2/oi",String::new(),503,None),
("POST","/v2/oi",String::new(),405,None), ("POST","/v2/oi",String::new(),405,None),
("GET","/v2/value?user=0x0000000000000000000000000000000000000001",String::new(),200,Some(json!({"data":{"proxy_wallet":"0x0000000000000000000000000000000000000001","value":0}}))), ("GET","/v2/value?user=0x0000000000000000000000000000000000000001",String::new(),200,Some(json!({"data":{"proxy_wallet":"0x0000000000000000000000000000000000000001","value":0}}))),
("GET","/v2/positions?user=0x0000000000000000000000000000000000000001",String::new(),200,Some(json!({"data":[],"pagination":{"limit":100,"offset":0,"has_more":false,"next_cursor":null}}))),
("GET","/v2/positions",String::new(),400,None),
("GET","/v2/positions?user=unpriced-owner&cursor=invalid",String::new(),400,None),
("POST","/v2/positions",String::new(),405,None),
("GET","/v2/value",String::new(),400,None), ("GET","/v2/value",String::new(),400,None),
("GET","/v2/value?user=unpriced-owner",String::new(),503,None), ("GET","/v2/value?user=unpriced-owner",String::new(),503,None),
("GET","/v2/value?user=a&condition=",String::new(),400,None), ("GET","/v2/value?user=a&condition=",String::new(),400,None),
+22
View File
@@ -1434,3 +1434,25 @@ sequenceDiagram
E-->>C: 返回本次两侧销毁量和实付金额 E-->>C: 返回本次两侧销毁量和实付金额
end end
``` ```
### 公开持仓生命周期
```mermaid
flowchart LR
cli["cli/market_http.rs"] --> positions["portfolio/positions.rs"]
positions --> sql["portfolio/positions.sql"]
positions --> mark["portfolio.rs 中的估值"]
```
```mermaid
sequenceDiagram
participant H as HTTP
participant P as public_positions
participant D as SQLite
H->>P: 钱包或市场、持仓状态和游标
P->>D: 清理到期任务并读取同一快照中的仓位与市场
D-->>P: 持仓、配对份额、裁决和目录
P->>P: 按排序键保留一页、签署下一页游标
P-->>H: data 和 pagination
```
+1
View File
@@ -54,6 +54,7 @@ pub use gamma_directory::DirectoryKey;
pub use gamma_list::DirectoryResource; pub use gamma_list::DirectoryResource;
pub use open_interest::InterestQuery; pub use open_interest::InterestQuery;
pub use portfolio::http::ValueQuery; pub use portfolio::http::ValueQuery;
pub use portfolio::positions::PositionQuery;
pub use prices_history::http::HistoryQuery; pub use prices_history::http::HistoryQuery;
pub use prices_history::legacy::ClobHistoryQuery; pub use prices_history::legacy::ClobHistoryQuery;
pub use public_trades::http::TradeQuery; pub use public_trades::http::TradeQuery;
+1
View File
@@ -1,4 +1,5 @@
pub(crate) mod http; pub(crate) mod http;
pub(crate) mod positions;
mod protocol; mod protocol;
use crate::{ use crate::{
+288
View File
@@ -0,0 +1,288 @@
use crate::{
assets, expiry,
inventory::{decimal, UNIT},
validation::{condition_filter, hex_id, identifier},
Exchange, MarketDataError,
};
use data_encoding::BASE64URL_NOPAD;
use hmac::{Hmac, Mac};
use rusqlite::{params, Connection, TransactionBehavior};
use serde::{Deserialize, Serialize};
use serde_json::{json, Value};
use sha2::Sha256;
use std::collections::BTreeMap;
#[derive(Deserialize)]
#[serde(deny_unknown_fields)]
pub struct PositionQuery {
user: Option<String>,
#[serde(alias = "condition_id", alias = "conditionId")]
condition: Option<String>,
status: Option<String>,
#[serde(alias = "sortBy")]
sort_by: Option<String>,
#[serde(alias = "sortDirection")]
sort_direction: Option<String>,
#[serde(alias = "includeArchived")]
include_archived: Option<bool>,
limit: Option<u32>,
cursor: Option<String>,
}
#[derive(Serialize, Deserialize, PartialEq, Eq)]
struct Selection {
user: Option<String>,
conditions: Option<String>,
status: String,
sort: String,
direction: String,
archived: bool,
}
#[derive(Serialize, Deserialize)]
struct Cursor {
selection: Selection,
limit: u32,
offset: u64,
last: Key,
}
// Negate only the numeric rank for descending order. Identity is a stable
// tie-breaker regardless of direction or changes elsewhere in the portfolio.
type Key = (bool, i64, String, String, String);
fn invalid(message: &str) -> MarketDataError {
MarketDataError::Invalid(message.to_owned())
}
impl Cursor {
fn mac(db: &Connection) -> Result<Hmac<Sha256>, MarketDataError> {
let secret: Vec<u8> = db.query_row(
"SELECT secret FROM trade_cursor_key WHERE singleton=1",
[],
|row| row.get(0),
)?;
let mut mac =
Hmac::<Sha256>::new_from_slice(&secret).map_err(|_| MarketDataError::Unavailable)?;
mac.update(b"eventbook:/v2/positions:v1\0");
Ok(mac)
}
fn decode(db: &Connection, encoded: &str) -> Result<Self, MarketDataError> {
let bad = || invalid("invalid position cursor");
if encoded.len() > 8192 {
return Err(bad());
}
let bytes = BASE64URL_NOPAD
.decode(encoded.as_bytes())
.map_err(|_| bad())?;
let split = bytes.len().checked_sub(32).ok_or_else(bad)?;
let (payload, signature) = bytes.split_at(split);
let mut mac = Self::mac(db)?;
mac.update(payload);
mac.verify_slice(signature).map_err(|_| bad())?;
serde_json::from_slice(payload).map_err(|_| bad())
}
fn encode(&self, db: &Connection) -> Result<String, MarketDataError> {
let mut bytes = serde_json::to_vec(self).map_err(|_| MarketDataError::Unavailable)?;
let mut mac = Self::mac(db)?;
mac.update(&bytes);
bytes.extend_from_slice(&mac.finalize().into_bytes());
Ok(BASE64URL_NOPAD.encode(&bytes))
}
}
impl Exchange {
pub fn public_positions(&self, query: PositionQuery) -> Result<Value, MarketDataError> {
let tx = expiry::transaction(&self.db, TransactionBehavior::Deferred)
.map_err(|_| MarketDataError::Unavailable)?;
let mut user = query.user;
let wallet = user.as_deref().is_some_and(|id| hex_id(id, 40));
if let Some(id) = &mut user {
if wallet {
id.make_ascii_lowercase();
if super::protocol::CONTRACTS
.iter()
.any(|c| c.eq_ignore_ascii_case(id))
{
return Err(invalid("protocol contract is not a user"));
}
} else {
identifier(id).map_err(|_| invalid("invalid user"))?;
if !tx.query_row(
"SELECT EXISTS(SELECT 1 FROM accounts WHERE id=?1)",
[&*id],
|r| r.get::<_, bool>(0),
)? {
return Err(invalid("invalid user"));
}
}
}
let conditions = condition_filter(query.condition.as_deref(), &tx)?;
if user.is_none() {
let count = conditions
.as_ref()
.map(|s| serde_json::from_str::<Vec<String>>(s))
.transpose()
.map_err(|_| MarketDataError::Unavailable)?
.map_or(0, |ids| ids.len());
if count != 1 {
return Err(invalid("expected a user or exactly one condition"));
}
}
let cursor = query
.cursor
.as_deref()
.map(|encoded| Cursor::decode(&tx, encoded))
.transpose()?;
let prior = cursor.as_ref().map(|p| &p.selection);
let mut status = query
.status
.or_else(|| prior.map(|s| s.status.clone()))
.unwrap_or_else(|| "OPEN".into());
if !matches!(
status.as_str(),
"OPEN" | "CLOSED" | "REDEEMABLE" | "REDEEMABLE_LOST" | "MERGEABLE"
) || (user.is_none() && status == "REDEEMABLE_LOST")
{
return Err(invalid("invalid position status"));
}
if user.is_none() && status == "MERGEABLE" {
status = "OPEN".into();
}
if status == "CLOSED" && query.include_archived.is_some() {
return Err(invalid("include_archived is unavailable for CLOSED"));
}
let sort = query
.sort_by
.or_else(|| prior.map(|s| s.sort.clone()))
.unwrap_or_else(|| {
if status == "MERGEABLE" {
"TOKENS".into()
} else {
"CURRENT_VALUE".into()
}
});
let direction = query
.sort_direction
.or_else(|| prior.map(|s| s.direction.clone()))
.unwrap_or_else(|| "DESC".into());
if !matches!(sort.as_str(), "CURRENT_VALUE" | "PRICE" | "TOKENS")
|| !matches!(direction.as_str(), "ASC" | "DESC")
{
return Err(invalid("invalid or unsupported position sort"));
}
let selection = Selection {
user,
conditions,
status,
sort,
direction,
archived: query
.include_archived
.or_else(|| prior.map(|s| s.archived))
.unwrap_or(false),
};
let limit = cursor
.as_ref()
.map_or(query.limit.unwrap_or(100), |p| p.limit);
if limit > 1000 || cursor.as_ref().is_some_and(|p| p.selection != selection) {
return Err(invalid("invalid position limit or cursor filters"));
}
let offset = cursor.as_ref().map_or(0, |p| p.offset);
let mut page = BTreeMap::new();
if limit != 0 {
let mut stmt = tx.prepare_cached(include_str!("positions.sql"))?;
let mut rows = stmt.query(params![
selection.user,
wallet,
selection.conditions,
selection.status,
selection.archived
])?;
while let Some(row) = rows.next()? {
let account: String = row.get(0)?;
let market: String = row.get(1)?;
let outcome: String = row.get(2)?;
let size: i64 = row.get(3)?;
let phase: String = row.get(4)?;
let payout: Option<i64> = row.get(5)?;
let mark = super::price(&tx, &market, &outcome, &phase, payout)
.map_err(|_| MarketDataError::Unavailable)?
.map(|(price, _)| price);
let value = super::holding_value(size, mark);
let rank = match selection.sort.as_str() {
"TOKENS" => size,
"PRICE" => mark.unwrap_or(0),
_ => value
.unwrap_or(0)
.try_into()
.map_err(|_| MarketDataError::Unavailable)?,
};
let rank = if selection.direction == "DESC" {
-rank
} else {
rank
};
let losing = selection.status == "REDEEMABLE" && payout == Some(0);
let key = (
losing,
rank,
account.clone(),
market.clone(),
outcome.clone(),
);
if cursor.as_ref().is_some_and(|p| key <= p.last) {
continue;
}
let yes = outcome == "YES";
let opposite = if yes { "NO" } else { "YES" };
let redeemable = size > 0 && phase == "resolved";
let status = if selection.status == "CLOSED" {
"CLOSED"
} else if redeemable {
"REDEEMABLE"
} else {
"OPEN"
};
page.insert(key, json!({
"proxy_wallet": account, "condition_id": market,
"token_id": assets::id(&market,&outcome), "opposite_token_id": assets::id(&market,opposite),
"current_size": decimal(size.into(),UNIT),
"current_price": mark.map(|p| decimal(p.into(),UNIT)),
"current_value": value.map(|v| decimal(v,UNIT)),
"status": status, "redeemable": redeemable, "mergeable": row.get::<_, bool>(7)?,
"archived": row.get::<_, bool>(6)?, "negative_risk": row.get::<_, bool>(12)?,
"title": row.get::<_, String>(8)?, "slug": row.get::<_, String>(9)?,
"outcome": row.get::<_, String>(if yes {10} else {11})?,
"opposite_outcome": row.get::<_, String>(if yes {11} else {10})?,
"outcome_index": if yes {0} else {1}
}));
if page.len() > limit as usize + 1 {
page.pop_last();
}
}
}
let has_more = page.len() > limit as usize;
let next = if has_more {
page.pop_last();
let token = Cursor {
selection,
limit,
offset: offset.saturating_add(u64::from(limit)),
last: page.last_key_value().expect("nonempty page").0.clone(),
}
.encode(&tx)?;
Some(token)
} else {
None
};
let data: Vec<_> = page.into_values().collect();
tx.commit()?;
Ok(
json!({"data":data,"pagination":{"limit":limit,"offset":offset,"has_more":has_more,"next_cursor":next}}),
)
}
}
@@ -0,0 +1,23 @@
WITH held AS (
SELECT p.*,p.available+p.reserved AS size,
COALESCE(v.active,1) AS active, COALESCE(v.archived,0) AS archived
FROM position_units p LEFT JOIN market_visibility v USING(market)
WHERE (?1 IS NULL OR CASE WHEN ?2 THEN p.account COLLATE NOCASE=?1 ELSE p.account=?1 END)
AND (?3 IS NULL OR p.market IN (SELECT value FROM json_each(?3)))
)
SELECT p.account,p.market,p.outcome,p.size,p.phase,p.payout_per_share,p.archived,
p.phase<>'resolved' AND p.size>=100000 AND COALESCE(other.size,0)>=100000 AS mergeable,
w.question,w.slug,w.yes_label,w.no_label,n.market IS NOT NULL AS negative_risk
FROM held p
JOIN market_wire_metadata w ON w.market=p.market
LEFT JOIN held other ON other.account=p.account AND other.market=p.market AND other.outcome<>p.outcome
LEFT JOIN neg_risk_members n ON n.market=p.market
WHERE CASE ?4
WHEN 'CLOSED' THEN p.size<100000
ELSE p.active AND (?5 OR NOT p.archived) AND p.size>=100000 AND CASE ?4
WHEN 'OPEN' THEN 1
WHEN 'REDEEMABLE' THEN p.phase='resolved'
WHEN 'REDEEMABLE_LOST' THEN p.phase='resolved' AND p.payout_per_share=0
WHEN 'MERGEABLE' THEN mergeable
END
END
+66
View File
@@ -4176,3 +4176,69 @@ fn order_submission_terms_survive_fills_cancel_retries_and_legacy_upgrade() {
assert_eq!(e.execute(cmd.clone()).unwrap()["orders"][0], expected); assert_eq!(e.execute(cmd.clone()).unwrap()["orders"][0], expected);
} }
} }
#[test]
fn public_positions_walk_a_mergeable_pair_and_held_settlement() {
let dir = tempdir().unwrap();
let path = dir.path().join("positions.db");
let mut e = Exchange::open(&path).unwrap();
setup(&mut e);
let read =
|engine: &Exchange, query| engine.public_positions(serde_json::from_value(query).unwrap());
for cmd in [
json!({"op":"list","id":"dust-list","market":"dust","rules":"dust"}),
json!({"op":"split","id":"dust-split","market":"dust","account":"bob","qty_micros":8800}),
json!({"op":"close","id":"dust-close","market":"dust"}),
json!({"op":"finalize","id":"dust-win","market":"dust","winner":"YES"}),
] {
e.execute(cmd).unwrap();
}
assert_eq!(
read(&e, json!({"user":"bob","condition":"dust"})).unwrap()["data"],
json!([])
);
let dust = read(
&e,
json!({"user":"bob","condition":"dust","status":"CLOSED"}),
)
.unwrap();
let winning_dust = dust["data"]
.as_array()
.unwrap()
.iter()
.find(|row| row["token_id"] == "eb:YES:dust")
.unwrap();
assert_eq!(winning_dust["current_size"], 0.0088);
assert_eq!(winning_dust["redeemable"], true);
let first = read(&e, json!({"user":"alice","status":"MERGEABLE","limit":1})).unwrap();
assert_eq!(first["data"][0]["mergeable"], true);
let cursor = first["pagination"]["next_cursor"].as_str().unwrap();
assert!(read(&e, json!({"user":"bob","cursor":cursor})).is_err());
assert!(read(&e, json!({"user":"alice","status":"OPEN","cursor":cursor})).is_err());
drop(e);
let mut e = Exchange::open(path).unwrap();
let next = read(&e, json!({"user":"alice","cursor":cursor,"limit":5})).unwrap();
assert_eq!(next["pagination"]["limit"], 1);
assert_eq!(next["pagination"]["offset"], 1);
assert_eq!(next["pagination"]["has_more"], false);
assert_ne!(next["data"][0]["token_id"], first["data"][0]["token_id"]);
e.execute(json!({"op":"close","id":"close","market":"e"}))
.unwrap();
e.execute(json!({"op":"finalize","id":"win","market":"e","winner":"YES"}))
.unwrap();
let held = read(&e, json!({"user":"alice","condition":"e","status":"OPEN"})).unwrap();
assert_eq!(held["data"][0]["status"], "REDEEMABLE");
assert_eq!(held["data"][0]["current_value"], 10);
assert_eq!(held["data"][0]["mergeable"], false);
let lost = read(&e, json!({"user":"alice","status":"REDEEMABLE_LOST"})).unwrap();
assert_eq!(lost["data"].as_array().unwrap().len(), 1);
assert_eq!(lost["data"][0]["token_id"], "eb:NO:e");
e.execute(json!({"op":"redeem","id":"claim","market":"e","account":"alice"}))
.unwrap();
assert_eq!(
read(&e, json!({"user":"alice"})).unwrap()["data"],
json!([])
);
let closed = read(&e, json!({"user":"alice","status":"CLOSED"})).unwrap();
assert_eq!(closed["data"].as_array().unwrap().len(), 2);
}
@@ -0,0 +1,27 @@
[
{"status":"OPEN","request":"https://data-api.polymarket.com/v2/positions?user=0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d&status=OPEN&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:57 GMT","http_status":200,"data":[{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x016124720ad566f88bc302b21b492db296000000000000000000000000000000","token_id":"623948551310085686003807523523823512265834388288292452103061352323364159488","current_size":15.1515,"current_value":15.0757,"current_price":0.995,"status":"OPEN","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x016bf4066e82571228813b876d04127934000000000000000000000000000000","token_id":"643049684020821311351796507355633171121115944121291300545830924465303715840","current_size":8.9285,"current_value":4.5982,"current_price":0.515,"status":"OPEN","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0xdc8c47c5b5d38a0da237b5a82f500ebc5cf5150de902962ac6ff76051ffe9159","token_id":"49932611791842248277648635261891267637049151266001723816279042019553905945029","current_size":18.8333,"current_value":0.9322,"current_price":0.0495,"status":"OPEN","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x01f91615c9f752dc4e9138a6d1c9ded081000000000000000000000000000000","token_id":"892410193561107172609378383902568085199971906757190112078441271767169236993","current_size":59.4884,"current_value":0.0297,"current_price":0.0005,"status":"OPEN","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x01eee4e05ca8e4c40c00966bddccf9acb1000000000000000000000000000000","token_id":"874402096953853186496076533822258356735156175384049251327656694874617413633","current_size":10.8695,"current_value":0.0054,"current_price":0.0005,"status":"OPEN","mergeable":false,"redeemable":false,"archived":false}],"has_more":true},
{"status":"REDEEMABLE","request":"https://data-api.polymarket.com/v2/positions?user=0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d&status=REDEEMABLE&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:57 GMT","http_status":200,"data":[{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x73cbafa706ecd442f1d425760bf6990956d02f80a05218e2572ed8ff7d86600b","token_id":"100763846727527357412896243147875965206285074082132692057261517775218157995567","current_size":6.0,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x4b447aa24c5102be629d34e69972b4b8e9dad5692fb254627a66872add7ba02d","token_id":"103877075039694027145965660409462575325733871480609040594710427223250156456853","current_size":5.0847,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x7a7f7d7dcf69d3da887bf3732e7b4b2e8027ddad31395723d59ff759fe9bde56","token_id":"104746504118717300110262411640865393647451671620802814999140848418915045458343","current_size":4.8873,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x1737056c8ea1cc123713358625034c7bfa7cd5774ef640be9b8b199b9ace1552","token_id":"105214925774848454231506621805852425090385120703591449046381705680407825366975","current_size":11.6279,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0xe1ae15398ca106ac2e444ba2258b108889b532e0990f89b1e7822b4ffb799eaf","token_id":"105426785463374522069343252785158212507372409184321993521191917200251587638020","current_size":30.9246,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false}],"has_more":true},
{"status":"REDEEMABLE_LOST","request":"https://data-api.polymarket.com/v2/positions?user=0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d&status=REDEEMABLE_LOST&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:57 GMT","http_status":200,"data":[{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x73cbafa706ecd442f1d425760bf6990956d02f80a05218e2572ed8ff7d86600b","token_id":"100763846727527357412896243147875965206285074082132692057261517775218157995567","current_size":6.0,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x4b447aa24c5102be629d34e69972b4b8e9dad5692fb254627a66872add7ba02d","token_id":"103877075039694027145965660409462575325733871480609040594710427223250156456853","current_size":5.0847,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x7a7f7d7dcf69d3da887bf3732e7b4b2e8027ddad31395723d59ff759fe9bde56","token_id":"104746504118717300110262411640865393647451671620802814999140848418915045458343","current_size":4.8873,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x1737056c8ea1cc123713358625034c7bfa7cd5774ef640be9b8b199b9ace1552","token_id":"105214925774848454231506621805852425090385120703591449046381705680407825366975","current_size":11.6279,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0xe1ae15398ca106ac2e444ba2258b108889b532e0990f89b1e7822b4ffb799eaf","token_id":"105426785463374522069343252785158212507372409184321993521191917200251587638020","current_size":30.9246,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false}],"has_more":true},
{"status":"MERGEABLE","request":"https://data-api.polymarket.com/v2/positions?user=0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d&status=MERGEABLE&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:57 GMT","http_status":200,"data":[],"has_more":false},
{"status":"CLOSED","request":"https://data-api.polymarket.com/v2/positions?user=0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d&status=CLOSED&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:57 GMT","http_status":200,"data":[{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x738bf8bbf91b9dfd7e7d17e361ecfea7176ef33d383b6028ce9668fd69c4467d","token_id":"64620987201699714450904116765860966371545498125118736828680924169103742549403","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x6dec4720e43ba8dd413f37760e97af043c54926dfbae4ffccd732cca308068ed","token_id":"75330054133399519852942415648680462506229215995803834711708101333223557605575","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x0b0e47715d9901114b4c59b2908251b15a315207f7ab9b9799de81c831828b1a","token_id":"72888742932028991999466800216526896647951096092660478043802178498251332433741","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x6fa1a21ce8cb9f6aa46edf5cf83e854afa2f7c96c535f06f0621d5f2016f3a89","token_id":"86843952992160665672559618028215743820638930427178683578703356678040675334819","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xbc79e27f2c94124aeefb08d74b4e4fd3ac834e4d","condition_id":"0x584f4cbc22ad93f05c1bde730a3b0c90a0ca3aee5d645d7641d4603b43ee305e","token_id":"55777510390318665492467086761401190607530819299865696880260617846434456780822","current_size":0.0088,"current_value":0.0088,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":true,"archived":false}],"has_more":true},
{"status":"OPEN","request":"https://data-api.polymarket.com/v2/positions?user=0xf7ca80f9a8f7c060a95392779210f74f2c356c84&status=OPEN&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:57 GMT","http_status":200,"data":[{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x01c1a020b58e05a3009ee507a3ff4f0729000000000000000000000000000000","token_id":"794419493339223664676140421620832224698646438653725751911329865844933001216","current_size":124.78,"current_value":123.8441,"current_price":0.9925,"status":"OPEN","mergeable":true,"redeemable":false,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x01c1a020b58e05a3009ee507a3ff4f0729000000000000000000000000000000","token_id":"794419493339223664676140421620832224698646438653725751911329865844933001217","current_size":125.41,"current_value":0.9405,"current_price":0.0075,"status":"OPEN","mergeable":true,"redeemable":false,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x637c9bdf7f8890c61c2d9488f8257575d8dfbc8e5708dae5f9aeaf47eb732959","token_id":"7802863854525654123138575151927839237553910654992019912159611729274188962237","current_size":0.29,"current_value":0.29,"current_price":1.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x2354b05ead4943bd86185e11fde68d4211e96cdc17a5d5c73f1116f21768fb70","token_id":"41775945706322230419100317170276564072148810772947737407607911013106626106551","current_size":0.27,"current_value":0.27,"current_price":1.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x6cddabbdd2162d82cbc45f20bbabf25cffa07f82da3fa981881d924701b79dbb","token_id":"100039973924308094011065672661860176642793653560164320857887841908176930183682","current_size":80.726,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false}],"has_more":true},
{"status":"REDEEMABLE","request":"https://data-api.polymarket.com/v2/positions?user=0xf7ca80f9a8f7c060a95392779210f74f2c356c84&status=REDEEMABLE&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:57 GMT","http_status":200,"data":[{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x637c9bdf7f8890c61c2d9488f8257575d8dfbc8e5708dae5f9aeaf47eb732959","token_id":"7802863854525654123138575151927839237553910654992019912159611729274188962237","current_size":0.29,"current_value":0.29,"current_price":1.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x2354b05ead4943bd86185e11fde68d4211e96cdc17a5d5c73f1116f21768fb70","token_id":"41775945706322230419100317170276564072148810772947737407607911013106626106551","current_size":0.27,"current_value":0.27,"current_price":1.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x6cddabbdd2162d82cbc45f20bbabf25cffa07f82da3fa981881d924701b79dbb","token_id":"100039973924308094011065672661860176642793653560164320857887841908176930183682","current_size":80.726,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x1d02405b049b76beba2320c827e9bc7024ce076d5f690aaafaddb37ef4618312","token_id":"100116739742939922754784677284710427936553332398602782242024802232507374504067","current_size":526.5287,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x15e6b013a3543a0383f89abb8830afd2e8be0c842849170aaa600ae3dfbaaa6c","token_id":"100393779853577963580513954385583070858358777009499003882127685996315097055067","current_size":200.0,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false}],"has_more":true},
{"status":"REDEEMABLE_LOST","request":"https://data-api.polymarket.com/v2/positions?user=0xf7ca80f9a8f7c060a95392779210f74f2c356c84&status=REDEEMABLE_LOST&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:57 GMT","http_status":200,"data":[{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x6cddabbdd2162d82cbc45f20bbabf25cffa07f82da3fa981881d924701b79dbb","token_id":"100039973924308094011065672661860176642793653560164320857887841908176930183682","current_size":80.726,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x1d02405b049b76beba2320c827e9bc7024ce076d5f690aaafaddb37ef4618312","token_id":"100116739742939922754784677284710427936553332398602782242024802232507374504067","current_size":526.5287,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x15e6b013a3543a0383f89abb8830afd2e8be0c842849170aaa600ae3dfbaaa6c","token_id":"100393779853577963580513954385583070858358777009499003882127685996315097055067","current_size":200.0,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0xab1b6f5658808737521e83c0967158c1982116c46283ecece415375eb34ac7c7","token_id":"101285568154310971208307776855119673478596477267029240818545990219942975297335","current_size":100.0,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0xb0e7e2a75362969bf6a6a12cfeda88080fca19cf83fb5e07ada602fba135c993","token_id":"101529303986380227797820995397675670838146600395802452608313597769581050384853","current_size":80.0,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false}],"has_more":true},
{"status":"MERGEABLE","request":"https://data-api.polymarket.com/v2/positions?user=0xf7ca80f9a8f7c060a95392779210f74f2c356c84&status=MERGEABLE&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:58 GMT","http_status":200,"data":[{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x01c1a020b58e05a3009ee507a3ff4f0729000000000000000000000000000000","token_id":"794419493339223664676140421620832224698646438653725751911329865844933001217","current_size":125.41,"current_value":0.9405,"current_price":0.0075,"status":"OPEN","mergeable":true,"redeemable":false,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x01c1a020b58e05a3009ee507a3ff4f0729000000000000000000000000000000","token_id":"794419493339223664676140421620832224698646438653725751911329865844933001216","current_size":124.78,"current_value":123.8441,"current_price":0.9925,"status":"OPEN","mergeable":true,"redeemable":false,"archived":false}],"has_more":false},
{"status":"CLOSED","request":"https://data-api.polymarket.com/v2/positions?user=0xf7ca80f9a8f7c060a95392779210f74f2c356c84&status=CLOSED&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:58 GMT","http_status":200,"data":[{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0xe9981200d697d4729963dada67485373d8b79a53eb255939a7069e42d46d4f6c","token_id":"99975885905088265651270566134319140793798341996806903249122353498509388749063","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0xd8f6e1a887b882f35b3bbf7fb85b9d826870a9a1920c00caaa53bd949cffa949","token_id":"105306919281568750525162884908349813267467919393753767766216631616424696605401","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0xb8dc298e91d22304a5cbff5742ff1aaff244a65abf3c9996bc4a280b43b0c0b9","token_id":"88695616369657695855103828387547750759012457957971788345643843623803550935910","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0xfdce02fefc76b251a487dc9c98d37f78827e40eb70d6d255b2286c003bf7484c","token_id":"7013566801704553053137262927590994113649140483746153978660013661321438752729","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xf7ca80f9a8f7c060a95392779210f74f2c356c84","condition_id":"0x392bf5a52839711126181d97eb499caaac15fdecd0e56d44042f958c54a59220","token_id":"31995302506920258679115983355300175302934302898810308908401438376519603649683","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false}],"has_more":true},
{"status":"OPEN","request":"https://data-api.polymarket.com/v2/positions?user=0x234d32aa641177b3b6f7f646c5ef2d4c884d5898&status=OPEN&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:58 GMT","http_status":200,"data":[{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0x016bf4066e82571228813b876d04127934000000000000000000000000000000","token_id":"643049684020821311351796507355633171121115944121291300545830924465303715841","current_size":4.4444,"current_value":2.2444,"current_price":0.505,"status":"OPEN","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0x016124720ad566f88bc302b21b492db296000000000000000000000000000000","token_id":"623948551310085686003807523523823512265834388288292452103061352323364159489","current_size":7.1428,"current_value":0.0357,"current_price":0.005,"status":"OPEN","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0xf5351030d387eb7c021652d6f891f772cff8b0063ceb03e58f8c0b6c4d71f04f","token_id":"100068124601642237151788915119212498183404504460402310236684671438891194396112","current_size":2.8571,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0xeaadc51d3e5083118368ddde5c2b66654223707abf104d035fd7de9461c793a7","token_id":"100150378208475896629216696395655000392920954575626044733969466382236387653470","current_size":15.8871,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0xbe22ebd236997b54936b94f0b4a310c003732eb50dc78a93821b71a130d9178f","token_id":"100163301955613618223861608386405333660480045417003308533532425336949272565405","current_size":6.6666,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false}],"has_more":true},
{"status":"REDEEMABLE","request":"https://data-api.polymarket.com/v2/positions?user=0x234d32aa641177b3b6f7f646c5ef2d4c884d5898&status=REDEEMABLE&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:58 GMT","http_status":200,"data":[{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0xf5351030d387eb7c021652d6f891f772cff8b0063ceb03e58f8c0b6c4d71f04f","token_id":"100068124601642237151788915119212498183404504460402310236684671438891194396112","current_size":2.8571,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0xeaadc51d3e5083118368ddde5c2b66654223707abf104d035fd7de9461c793a7","token_id":"100150378208475896629216696395655000392920954575626044733969466382236387653470","current_size":15.8871,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0xbe22ebd236997b54936b94f0b4a310c003732eb50dc78a93821b71a130d9178f","token_id":"100163301955613618223861608386405333660480045417003308533532425336949272565405","current_size":6.6666,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0x50eed781c1dd0a60b90ad26c1663a866de2ba07768651b51b7ec8c5789c95d5a","token_id":"100367409921233883296261093339211137996368453206234319171305571116788301736111","current_size":4.1666,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0x2d899daacd8b355a453ac10932b8fc8f24b20afabdaa7ff57604faf2814194ee","token_id":"100418145250952185995386017588754248391407603189163355707143814476900315526896","current_size":3.3333,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false}],"has_more":true},
{"status":"REDEEMABLE_LOST","request":"https://data-api.polymarket.com/v2/positions?user=0x234d32aa641177b3b6f7f646c5ef2d4c884d5898&status=REDEEMABLE_LOST&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:58 GMT","http_status":200,"data":[{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0xf5351030d387eb7c021652d6f891f772cff8b0063ceb03e58f8c0b6c4d71f04f","token_id":"100068124601642237151788915119212498183404504460402310236684671438891194396112","current_size":2.8571,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0xeaadc51d3e5083118368ddde5c2b66654223707abf104d035fd7de9461c793a7","token_id":"100150378208475896629216696395655000392920954575626044733969466382236387653470","current_size":15.8871,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0xbe22ebd236997b54936b94f0b4a310c003732eb50dc78a93821b71a130d9178f","token_id":"100163301955613618223861608386405333660480045417003308533532425336949272565405","current_size":6.6666,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0x50eed781c1dd0a60b90ad26c1663a866de2ba07768651b51b7ec8c5789c95d5a","token_id":"100367409921233883296261093339211137996368453206234319171305571116788301736111","current_size":4.1666,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0x2d899daacd8b355a453ac10932b8fc8f24b20afabdaa7ff57604faf2814194ee","token_id":"100418145250952185995386017588754248391407603189163355707143814476900315526896","current_size":3.3333,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false}],"has_more":true},
{"status":"MERGEABLE","request":"https://data-api.polymarket.com/v2/positions?user=0x234d32aa641177b3b6f7f646c5ef2d4c884d5898&status=MERGEABLE&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:58 GMT","http_status":200,"data":[],"has_more":false},
{"status":"CLOSED","request":"https://data-api.polymarket.com/v2/positions?user=0x234d32aa641177b3b6f7f646c5ef2d4c884d5898&status=CLOSED&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:58 GMT","http_status":200,"data":[{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0x6bbb7ea04dc336e578662000c6929bebacf36ff47652aabb1b9a06d35a957b4d","token_id":"32250452259858625197208821141035109957279303585472265423681761943649363177306","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0xc7a02400f015eff5bd1b43d96a27ddd3831b83370d1592e1ac3f432ef5c83ec9","token_id":"36368021161523860163338053935989864202333714982664338848644977086573258801930","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0x35cfa37bab442283afa3b0f722c2057c0aad24a4473c2f8b0007ceec1adf25f6","token_id":"57962399175893558324976286608643798416417838125923251650067757839664970395717","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0xdd228d32d0f3b15ad1768a78a317bc51456f5b2f57917567239e1fd67983cb90","token_id":"38346828385519716434059560916428795367702672794427008722087251895584250368963","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0x234d32aa641177b3b6f7f646c5ef2d4c884d5898","condition_id":"0xa1f529ba68ee418003297582f04b5b8fe99081551c34779cc4b8356deec548ef","token_id":"93031934626579772395730415777505121846594645275192433981225161762801687539627","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false}],"has_more":true},
{"status":"OPEN","request":"https://data-api.polymarket.com/v2/positions?user=0xb6c9344216d8139ebda93f9648bcbe1240936e57&status=OPEN&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:58 GMT","http_status":200,"data":[{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0x9ca22f7af33ec67d48965de02eadfe5d6523f712e973f4b3519139973c4bec29","token_id":"90489244946727857927478579210986058033850864162778431818016847041565184722190","current_size":33.3333,"current_value":29.8333,"current_price":0.895,"status":"OPEN","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0x7586a96520578acaaaa4ea84a2582f197f84255da1f3392a7aa300386c187b37","token_id":"20006732765674855733524007935991362439352594042415161039767275461950712817548","current_size":44.453,"current_value":4.3119,"current_price":0.097,"status":"OPEN","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0x684e5b72d4e407695397a79ed75ef37273c2655ca2548791a4153233d3744696","token_id":"11876606915924142133615854761923277060697657209957870741155164849437788272266","current_size":154.1538,"current_value":3.7767,"current_price":0.0245,"status":"OPEN","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0x63da7b2d523ba263304447b6f0ef4a6ea180b89ae91f8f256bbd8397b0c03888","token_id":"54142434400360599628100949386530479498068835619855720955715377508216403661205","current_size":1.9607,"current_value":1.9607,"current_price":1.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0x75743159df076ee110ede9e386bf9cad91df081c8bd04f3f05e5d7c141a51f33","token_id":"12288525947764397960021713424576849007970406950510265136663237558531782770669","current_size":79.06,"current_value":1.8974,"current_price":0.024,"status":"OPEN","mergeable":false,"redeemable":false,"archived":false}],"has_more":true},
{"status":"REDEEMABLE","request":"https://data-api.polymarket.com/v2/positions?user=0xb6c9344216d8139ebda93f9648bcbe1240936e57&status=REDEEMABLE&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:59 GMT","http_status":200,"data":[{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0x63da7b2d523ba263304447b6f0ef4a6ea180b89ae91f8f256bbd8397b0c03888","token_id":"54142434400360599628100949386530479498068835619855720955715377508216403661205","current_size":1.9607,"current_value":1.9607,"current_price":1.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0x89e9eec16f900a6b24f54d0287d8fcae2cb033d2aff7f7e70b76ff39d2096746","token_id":"6190838905626139275138287078725780734402030701897525505916200372078494079316","current_size":1.8181,"current_value":1.8181,"current_price":1.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0xb67a10d8e7aa0ecefdec67617bfe7de13a5e4450a6366babdc11a0be61095fec","token_id":"105220676801298290597520454980520144355742641714821188587322329229931781495341","current_size":41.6666,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0x3e518a48b72535b40c6aec922930a2ca4c3a84374b1fd3a755309bccc4edc9d8","token_id":"106675605315891515362400993057244154389996801258820216339420752929151210370605","current_size":25.641,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0x69aeb202063d522a2138eea4af2b246ded0b5f0a369e3533844d3c3a91126b7a","token_id":"106777711314668536375213333774224943218460456889313536158654065973760832135255","current_size":13.3333,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false}],"has_more":true},
{"status":"REDEEMABLE_LOST","request":"https://data-api.polymarket.com/v2/positions?user=0xb6c9344216d8139ebda93f9648bcbe1240936e57&status=REDEEMABLE_LOST&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:59 GMT","http_status":200,"data":[{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0xb67a10d8e7aa0ecefdec67617bfe7de13a5e4450a6366babdc11a0be61095fec","token_id":"105220676801298290597520454980520144355742641714821188587322329229931781495341","current_size":41.6666,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0x3e518a48b72535b40c6aec922930a2ca4c3a84374b1fd3a755309bccc4edc9d8","token_id":"106675605315891515362400993057244154389996801258820216339420752929151210370605","current_size":25.641,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0x69aeb202063d522a2138eea4af2b246ded0b5f0a369e3533844d3c3a91126b7a","token_id":"106777711314668536375213333774224943218460456889313536158654065973760832135255","current_size":13.3333,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0xcd231ad5fb3feb95c4f270e5f5445ba739a0d62413b4fcd449bbfacc0e2fb0d0","token_id":"111167256144913771457317512438671267306129441178434599434929288584618561589335","current_size":6.7567,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0x0fd33cd06a60ca6445ca184deda2da5751d090eca6f50835392edfa667d6ba5a","token_id":"111378315534273870693607410636433225023407397602928550105530263480212651559012","current_size":14.4927,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false}],"has_more":true},
{"status":"MERGEABLE","request":"https://data-api.polymarket.com/v2/positions?user=0xb6c9344216d8139ebda93f9648bcbe1240936e57&status=MERGEABLE&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:59 GMT","http_status":200,"data":[],"has_more":false},
{"status":"CLOSED","request":"https://data-api.polymarket.com/v2/positions?user=0xb6c9344216d8139ebda93f9648bcbe1240936e57&status=CLOSED&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:59 GMT","http_status":200,"data":[{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0x258ff19b4baff0ed24bc28f58e83c8be6f2f91d9134700703e0aa51810c51a63","token_id":"1689950543806317773337530280926430142670579667870391801780343754845480907767","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0xcceae66d81c60f90c9679ab531b865bd7e9f95cc54f7b0634a24095519b10d65","token_id":"107409796822153809778143872196236532785178617102787858261374110829112218839748","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0x72bee1e573407d221b7fe3a8b5494fa159118cef5b4fc1155df8b62a1891e22f","token_id":"67769739493433108294547688091351634385240379761911714880507494310949784810747","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0x09685805d0cf45bac3bdcabfc78866b2ca98aa45561ade9e73ec234366d12fbe","token_id":"50502754578080065229596734683657247352680854573482409167312994130978096359720","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false},{"proxy_wallet":"0xb6c9344216d8139ebda93f9648bcbe1240936e57","condition_id":"0xb24de8e22e871ba3bbedb6c6c8ee70b1ac54875efd9e61981075b0b4ba6f8293","token_id":"102466397314063543880416078637408206323333520330416790306498580370424355602908","current_size":0.0,"current_value":0.0,"current_price":1.0,"status":"CLOSED","mergeable":false,"redeemable":false,"archived":false}],"has_more":true},
{"status":"OPEN","request":"https://data-api.polymarket.com/v2/positions?user=0x0000000000000000000000000000000000000001&status=OPEN&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:59 GMT","http_status":200,"data":[{"proxy_wallet":"0x0000000000000000000000000000000000000001","condition_id":"0x87822b3d4ccba1835d698354b01c050b55f20c5f34b14908bff4ea5a6d58af4c","token_id":"29677413448356631423250052573262008356913370083986817030510370064664558041792","current_size":10.0,"current_value":10.0,"current_price":1.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0x0000000000000000000000000000000000000001","condition_id":"0xc587bda904f031a973ad3cb57128ca011bfab0f45e6cb3734ed2227c4d4be419","token_id":"69119940120690198080427862456277899176151352667092917892731174838615809844766","current_size":5000.0,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false}],"has_more":false},
{"status":"REDEEMABLE","request":"https://data-api.polymarket.com/v2/positions?user=0x0000000000000000000000000000000000000001&status=REDEEMABLE&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:59 GMT","http_status":200,"data":[{"proxy_wallet":"0x0000000000000000000000000000000000000001","condition_id":"0x87822b3d4ccba1835d698354b01c050b55f20c5f34b14908bff4ea5a6d58af4c","token_id":"29677413448356631423250052573262008356913370083986817030510370064664558041792","current_size":10.0,"current_value":10.0,"current_price":1.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false},{"proxy_wallet":"0x0000000000000000000000000000000000000001","condition_id":"0xc587bda904f031a973ad3cb57128ca011bfab0f45e6cb3734ed2227c4d4be419","token_id":"69119940120690198080427862456277899176151352667092917892731174838615809844766","current_size":5000.0,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false}],"has_more":false},
{"status":"REDEEMABLE_LOST","request":"https://data-api.polymarket.com/v2/positions?user=0x0000000000000000000000000000000000000001&status=REDEEMABLE_LOST&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:59 GMT","http_status":200,"data":[{"proxy_wallet":"0x0000000000000000000000000000000000000001","condition_id":"0xc587bda904f031a973ad3cb57128ca011bfab0f45e6cb3734ed2227c4d4be419","token_id":"69119940120690198080427862456277899176151352667092917892731174838615809844766","current_size":5000.0,"current_value":0.0,"current_price":0.0,"status":"REDEEMABLE","mergeable":false,"redeemable":true,"archived":false}],"has_more":false},
{"status":"MERGEABLE","request":"https://data-api.polymarket.com/v2/positions?user=0x0000000000000000000000000000000000000001&status=MERGEABLE&limit=5","observed_at":"Fri, 04 Dec 2026 20:39:59 GMT","http_status":200,"data":[],"has_more":false},
{"status":"CLOSED","request":"https://data-api.polymarket.com/v2/positions?user=0x0000000000000000000000000000000000000001&status=CLOSED&limit=5","observed_at":"Fri, 04 Dec 2026 20:40:00 GMT","http_status":200,"data":[{"proxy_wallet":"0x0000000000000000000000000000000000000001","condition_id":"0x94aa22f01a34a4b127130126790bd0d81c04fff5f838a985e57fe1d9b0ffd9d8","token_id":"27425216295922979944979664970690470308097061041637644521425228902515084341296","current_size":0.0,"current_value":0.0,"current_price":0.0,"status":"CLOSED","mergeable":false,"redeemable":true,"archived":false}],"has_more":false}
]
+7
View File
@@ -466,3 +466,10 @@ SDK 使用 `GET /neg-risk?token_id=…`,也可以从已缓存的 CLOB 市场
用空数据库重放[原单状态样例](examples/order-status.jsonl)。卖方以 0.60 挂 5 份 post-only 卖单,买方按金额吃掉 2 份。卖方撤回余单后,按原订单号查询,累计成交仍为 2,可成交余量为 0,`order_type` 为 GTC。买方的原单类型为 FAK。按卖方订单号查询 `trades`,这笔执行的份额也是 2。重启和重发相同命令沿用原回执与受理时间。 用空数据库重放[原单状态样例](examples/order-status.jsonl)。卖方以 0.60 挂 5 份 post-only 卖单,买方按金额吃掉 2 份。卖方撤回余单后,按原订单号查询,累计成交仍为 2,可成交余量为 0,`order_type` 为 GTC。买方的原单类型为 FAK。按卖方订单号查询 `trades`,这笔执行的份额也是 2。重启和重发相同命令沿用原回执与受理时间。
`open_orders` 的列表和精确查询均返回 `created_at`(Unix 秒)、`order_type` 和本地扩展 `post_only`。升级已有数据库时,用已受理的命令回执和 GTD 截止记录恢复提交指令;没有原始时钟记录的受理时间为 null。缺少原始回执的历史行仍可查询,未知字段保留为 null。官方当前将累计成交和逐笔对账分别放在订单的 size_matched 和账户成交记录;其单笔订单 HTTP 接口需要账户认证。本地验证使用可信操作员的 JSONL 接口,订单号与账户是模拟环境的标识。生产私有接口尚未实测。[官方订单查询](https://docs.polymarket.com/trading/manage-orders) `open_orders` 的列表和精确查询均返回 `created_at`(Unix 秒)、`order_type` 和本地扩展 `post_only`。升级已有数据库时,用已受理的命令回执和 GTD 截止记录恢复提交指令;没有原始时钟记录的受理时间为 null。缺少原始回执的历史行仍可查询,未知字段保留为 null。官方当前将累计成交和逐笔对账分别放在订单的 size_matched 和账户成交记录;其单笔订单 HTTP 接口需要账户认证。本地验证使用可信操作员的 JSONL 接口,订单号与账户是模拟环境的标识。生产私有接口尚未实测。[官方订单查询](https://docs.polymarket.com/trading/manage-orders)
### Data API 持仓生命周期
公开 GET /v2/positions 已接入本地账本。可按钱包查询,或用一个市场查持有人,也可对钱包附加市场条件。OPEN 包含仍持有的已裁决资产,REDEEMABLE 保留待兑付的胜负两侧,REDEEMABLE_LOST 选出尚未核销的零兑付资产。MERGEABLE 返回持有互补份额的两侧,CLOSED 查询已经退出或低于 0.1 份的仓位。当前持仓使用 0.1 份下限。游标由本地签名,绑定查询、页大小及最后一行的排序键。逐页使用各自的已提交快照,仓位变动可能改变后续排序。
这一版返回数量、估值、配对与赎回标记、结果身份和目录标题。本地支持份额、价格和当前价值排序。成本、盈亏、历史总入场量、跨钱包关闭记录、事件和时间筛选仍待接入。实测 0.0088 份已裁决余额出现在 CLOSED,仍标记 redeemable。用相同条件查询 OPEN 和 REDEEMABLE 均为空,即使传入 filter_amount=0。生产响应中的姓名和签名游标未保存在样本里。[公开生产响应摘要](examples/public-position-lifecycle.json) · [官方持仓规范](https://data-api.polymarket.com/v2/openapi.json)