{"openapi":"3.1.0","info":{"title":"Port_ API","version":"1"},"servers":[{"url":"https://getport.app"}],"components":{"securitySchemes":{"key":{"type":"http","scheme":"bearer"}}},"security":[{"key":[]}],"paths":{"/api/v1/me":{"get":{"operationId":"me","summary":"Who the key belongs to, their tier, wallet count and limit, and the key itself.","responses":{"200":{"description":"Who the key belongs to, their tier, wallet count and limit, and the key itself.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string"},"tier":{"type":"string","enum":["free","pro"]},"walletCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"walletLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"key":{"type":"object","properties":{"name":{"type":"string"},"hint":{"type":"string"},"mayRefresh":{"type":"boolean"},"expiresAt":{"type":["string","null"]},"via":{"type":"string","enum":["key","sign-in"]}},"required":["name","hint","mayRefresh","expiresAt"]}},"required":["userId","email","tier","walletCount","walletLimit","key"]},"asOf":{"type":["string","null"]},"notCounted":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"string"}},"generatedAt":{"type":"string"}},"required":["data","asOf","notCounted","sources","generatedAt"]}}}}}}},"/api/v1/wallets":{"get":{"operationId":"wallets","summary":"Every wallet on the account, with its group and nickname.","responses":{"200":{"description":"Every wallet on the account, with its group and nickname.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"wallets":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"family":{"type":"string","enum":["evm","svm","cex","btc","move","tvm","near"]},"label":{"type":["string","null"]},"kind":{"type":"string"},"group":{"type":["string","null"]},"excluded":{"type":"boolean"},"paused":{"type":"boolean"},"verified":{"type":"boolean"}},"required":["address","family","label","kind","group","excluded","verified"]}}},"required":["wallets"]},"asOf":{"type":["string","null"]},"notCounted":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"string"}},"generatedAt":{"type":"string"}},"required":["data","asOf","notCounted","sources","generatedAt"]}}}}}}},"/api/v1/port":{"get":{"operationId":"port","summary":"The headline: net worth, its parts, the figure per wallet and what is not counted.","responses":{"200":{"description":"The headline: net worth, its parts, the figure per wallet and what is not counted.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"netWorthUsd":{"type":"string"},"parts":{"type":"object","properties":{"spotUsd":{"type":"string"},"venueUsd":{"type":"string"},"perpsUsd":{"type":"string"}},"required":["spotUsd","venueUsd","perpsUsd"]},"byWallet":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"family":{"type":"string","enum":["evm","svm","cex","btc","move","tvm","near"]},"label":{"type":["string","null"]},"totalUsd":{"type":"string"},"tokensUsd":{"type":"string"},"defiUsd":{"type":"string"}},"required":["address","family","label","totalUsd","tokensUsd","defiUsd"]}},"hidden":{"type":"object","properties":{"spam":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dust":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"airdrop":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"thin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unpriced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stale":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["spam","dust","airdrop","thin","unpriced","stale"]},"chains":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"chainId":{"type":"string"},"name":{"type":"string"},"refreshedAt":{"type":["string","null"]},"refreshing":{"type":"boolean"},"incomplete":{"type":["string","null"]}},"required":["address","chainId","name","refreshedAt","refreshing","incomplete"]}}},"required":["netWorthUsd","parts","byWallet","hidden","chains"]},"asOf":{"type":["string","null"]},"notCounted":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"string"}},"generatedAt":{"type":"string"}},"required":["data","asOf","notCounted","sources","generatedAt"]}}}}}}},"/api/v1/holdings":{"get":{"operationId":"holdings","summary":"Every holding row with its amount, its price and the confidence behind it, paged at 500.","description":"Pages end when `cursor` is null; pass it back as `?cursor=` for the next one. The cursor is opaque, so never build one. `total` counts every row the wallets hold, folded ones included and before any `?chain=` filter, so the pages add up to it only with `?hidden=1` and no chain. `complete: false` means the server also capped the rows it read for a port this size, and then the pages end short of `total` whatever you ask. `counted` says whether a row is inside the headline, and `hiddenReason` why the app folds it; the default page is the rows with no `hiddenReason`. The two differ: a small row is counted and folded, and a bought token quoted below the confidence bar is on screen and not counted. `/port` is still the total, because DeFi, venue balances and perp equity are on no holdings row.","responses":{"200":{"description":"Every holding row with its amount, its price and the confidence behind it, paged at 500.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string"},"tokenAddress":{"type":"string"},"symbol":{"type":["string","null"]},"name":{"type":["string","null"]},"decimals":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"logoUrl":{"type":["string","null"]},"rawAmount":{"type":"string"},"amount":{"type":["string","null"]},"acquiredVia":{"type":"string","enum":["swap","transfer","airdrop","unknown"]},"protocol":{"type":["string","null"]},"side":{"default":"asset","type":"string","enum":["asset","liability"]},"price":{"anyOf":[{"type":"object","properties":{"usd":{"type":"string"},"liquidityUsd":{"type":["string","null"]},"confidence":{"type":"number","minimum":0,"maximum":1},"source":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["usd","liquidityUsd","confidence","source","at"]},{"type":"null"}]},"valueUsd":{"type":["string","null"]},"change24hPct":{"type":["string","null"]},"spark":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]},"spam":{"type":"boolean"},"spamReason":{"type":["string","null"]},"hiddenByYou":{"type":"boolean"},"unsellable":{"type":["string","null"]},"walletAddress":{"type":"string"},"counted":{"type":"boolean"},"hiddenReason":{"type":["string","null"]}},"required":["chainId","tokenAddress","symbol","name","decimals","logoUrl","rawAmount","amount","acquiredVia","protocol","side","price","valueUsd","change24hPct","spark","walletAddress","counted","hiddenReason"]}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cursor":{"type":["string","null"]},"complete":{"type":"boolean"}},"required":["rows","total","cursor"]},"asOf":{"type":["string","null"]},"notCounted":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"string"}},"generatedAt":{"type":"string"}},"required":["data","asOf","notCounted","sources","generatedAt"]}}}}},"parameters":[{"name":"wallet","in":"query","required":false,"description":"One wallet address, to read only its rows.","schema":{"type":"string"}},{"name":"chain","in":"query","required":false,"description":"One chain id, to read only its rows.","schema":{"type":"string"}},{"name":"hidden","in":"query","required":false,"description":"Set to 1 or true to include the rows the product folds. Each one says why.","schema":{"type":"boolean"}},{"name":"cursor","in":"query","required":false,"description":"The cursor from the previous page.","schema":{"type":"string"}}]}},"/api/v1/positions":{"get":{"operationId":"positions","summary":"DeFi accounts: one protocol on one chain in one wallet, with what is inside it.","responses":{"200":{"description":"DeFi accounts: one protocol on one chain in one wallet, with what is inside it.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"positions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"walletAddress":{"type":"string"},"chainId":{"type":"string"},"protocol":{"type":"string"},"category":{"type":"string","enum":["staking","lending","liquidity","perps","vault","other"]},"detail":{"type":"string"},"valueUsd":{"type":"string"},"counted":{"type":"boolean"},"meta":{"type":"string"},"direction":{"type":"string","enum":["up","down","neutral"]},"claimableUsd":{"type":["string","null"]},"healthFactor":{"type":["number","null"]},"lltvPct":{"type":["number","null"]},"progressPct":{"type":["number","null"]},"unlocksAt":{"type":["string","null"]},"gradual":{"type":"boolean"},"yield30dUsd":{"type":["string","null"]},"url":{"type":["string","null"]},"source":{"type":"string","enum":["interpreted","bought","unrecognised"]},"liability":{"type":"boolean"},"venue":{"type":"boolean"},"kind":{"type":"string","enum":["supplied","borrowed","collateral","staked","locked","reward","liquidity","vault","spot","other"]},"amount":{"type":["string","null"]},"symbol":{"type":["string","null"]},"logoUrl":{"type":["string","null"]},"asOf":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"supplyApy":{"type":["number","null"]},"borrowApy":{"type":["number","null"]},"maxLtvPct":{"type":["number","null"]},"ratesAsOf":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"change24hPct":{"type":["string","null"]},"positionKey":{"type":["string","null"]},"heldToken":{"type":["string","null"]},"backs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"range":{"anyOf":[{"type":"object","properties":{"lower":{"type":["number","null"]},"upper":{"type":["number","null"]},"current":{"type":"number"},"inRange":{"type":"boolean"},"base":{"type":"string"},"quote":{"type":"string"},"band":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"}},"required":["start","end"]},"at":{"type":"number"},"beyond":{"type":"boolean"}},"required":["lower","upper","current","inRange","base","quote","band","at","beyond"]},{"type":"null"}]},"maturesAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"spam":{"type":"boolean"},"spamReason":{"type":["string","null"]},"hiddenByYou":{"type":"boolean"}},"required":["id","walletAddress","chainId","protocol","category","detail","valueUsd","meta","direction"]}}},"required":["positions"]},"asOf":{"type":["string","null"]},"notCounted":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"string"}},"generatedAt":{"type":"string"}},"required":["data","asOf","notCounted","sources","generatedAt"]}}}}}}},"/api/v1/perps":{"get":{"operationId":"perps","summary":"Perp positions, orders and fills per venue, with when each venue was last read.","responses":{"200":{"description":"Perp positions, orders and fills per venue, with when each venue was last read.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"positions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"walletAddress":{"type":"string"},"venue":{"type":"string"},"market":{"type":"string"},"side":{"type":"string","enum":["long","short"]},"leverage":{"type":"number"},"size":{"type":"string"},"sizeAsset":{"type":"string"},"entryUsd":{"type":"string"},"markUsd":{"type":"string"},"liquidationUsd":{"type":["string","null"]},"fundingUsd":{"type":"string"},"unrealisedUsd":{"type":"string"},"marginUsd":{"type":"string"},"notionalUsd":{"type":"string"},"marginMode":{"type":"string","enum":["cross","isolated"]},"roePct":{"type":"number"},"maxLeverage":{"type":"number"},"liqDistancePct":{"type":["number","null"]},"fundingHourlyPct":{"type":["number","null"]},"fundingDailyUsd":{"type":["string","null"]},"markChange24hPct":{"type":["number","null"]},"subAccount":{"type":["string","null"]},"dex":{"type":"string"},"inVenueRows":{"type":"boolean"},"logoUrl":{"type":["string","null"]},"quoteCurrency":{"type":"string"}},"required":["id","walletAddress","venue","market","side","leverage","size","sizeAsset","entryUsd","markUsd","liquidationUsd","fundingUsd","unrealisedUsd","marginUsd"]}},"orders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"walletAddress":{"type":"string"},"venue":{"type":"string"},"market":{"type":"string"},"kind":{"type":"string","enum":["limit","stop","take_profit"]},"side":{"type":"string","enum":["buy","sell"]},"size":{"type":"string"},"sizeAsset":{"type":"string"},"priceUsd":{"type":"string"},"status":{"type":"string","enum":["open","trigger"]},"reduceOnly":{"type":"boolean"},"triggerCondition":{"type":["string","null"]}},"required":["id","walletAddress","venue","market","kind","side","size","sizeAsset","priceUsd","status"]}},"fills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"walletAddress":{"type":"string"},"venue":{"type":"string"},"market":{"type":"string"},"action":{"type":"string"},"size":{"type":"string"},"sizeAsset":{"type":"string"},"priceUsd":{"type":"string"},"feeUsd":{"type":"string"},"realisedUsd":{"type":["string","null"]}},"required":["id","at","walletAddress","venue","market","action","size","sizeAsset","priceUsd","feeUsd","realisedUsd"]}},"equityUsd":{"type":"string"},"marginUsedPct":{"type":"number"},"funding7dUsd":{"type":"string"},"fees30dUsd":{"type":"string"},"maintenanceMarginUsd":{"type":"string"},"marginRatioPct":{"type":"number"},"withdrawableUsd":{"type":"string"},"notionalUsd":{"type":"string"},"accountLeverage":{"type":"number"},"fundingDailyUsd":{"type":"string"},"funding7dMeasured":{"type":"boolean"},"vaults":{"type":"array","items":{"type":"object","properties":{"walletAddress":{"type":"string"},"address":{"type":"string"},"equityUsd":{"type":"string"},"lockedUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["walletAddress","address","equityUsd","lockedUntil"]}},"subAccounts":{"type":"array","items":{"type":"object","properties":{"walletAddress":{"type":"string"},"name":{"type":"string"},"equityUsd":{"type":"string"}},"required":["walletAddress","name","equityUsd"]}},"equityHistory":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"equityUsd":{"type":"string"}},"required":["at","equityUsd"]}},"pnlHistory":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"pnlUsd":{"type":"string"}},"required":["at","pnlUsd"]}},"netFlow7dUsd":{"type":["string","null"]},"volume7dUsd":{"type":"string"},"liquidations":{"type":"array","items":{"type":"object","properties":{"walletAddress":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"leverageType":{"type":"string","enum":["cross","isolated"]},"accountValueUsd":{"type":"string"},"positions":{"type":"array","items":{"type":"object","properties":{"market":{"type":"string"},"size":{"type":"string"},"side":{"type":"string","enum":["long","short"]}},"required":["market","size","side"]}}},"required":["walletAddress","at","leverageType","accountValueUsd","positions"]}},"asOf":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"venues":{"type":"array","items":{"type":"object","properties":{"venue":{"type":"string"},"equityUsd":{"type":"string"},"maintenanceMarginUsd":{"type":"string"},"marginRatioPct":{"type":"number"},"notionalUsd":{"type":"string"},"positions":{"type":"number"},"unpriced":{"type":"number"},"withheld":{"type":"number"},"private":{"type":"number"},"queuedUsd":{"type":"string"},"asOf":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["venue","equityUsd","maintenanceMarginUsd","marginRatioPct","notionalUsd","positions","asOf"]}},"accounts":{"type":"array","items":{"type":"object","properties":{"walletAddress":{"type":"string"},"venue":{"type":"string"},"subAccount":{"type":["string","null"]},"equityUsd":{"type":"string"},"inVenueRows":{"type":"boolean"}},"required":["walletAddress","venue","subAccount","equityUsd","inVenueRows"]}}},"required":["positions","orders","fills","equityUsd","marginUsedPct","funding7dUsd","fees30dUsd"]},"asOf":{"type":["string","null"]},"notCounted":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"string"}},"generatedAt":{"type":"string"}},"required":["data","asOf","notCounted","sources","generatedAt"]}}}}}}},"/api/v1/predictions":{"get":{"operationId":"predictions","summary":"Polymarket and Limitless positions grouped by event, with whether the chain agreed on each.","responses":{"200":{"description":"Polymarket and Limitless positions grouped by event, with whether the chain agreed on each.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"positions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"walletAddress":{"type":"string"},"venue":{"type":"string"},"eventLabel":{"type":["string","null"]},"eventId":{"type":["string","null"]},"eventIcon":{"type":["string","null"]},"eventMarketCount":{"type":"number"},"conditionId":{"type":"string"},"tokenId":{"type":"string"},"mergeable":{"type":"boolean"},"redeemable":{"type":"boolean"},"question":{"type":"string"},"outcomeLabel":{"type":"string"},"outcomeIndex":{"type":"number"},"imageUrl":{"type":["string","null"]},"status":{"type":"string","enum":["open","suspended","resolved","cancelled","pending"]},"closesAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"shares":{"type":"string"},"avgEntryUsd":{"type":"string"},"costUsd":{"type":"string"},"markUsd":{"type":["string","null"]},"valueUsd":{"type":["string","null"]},"unrealisedUsd":{"type":["string","null"]},"realisedUsd":{"type":"string"},"won":{"type":["boolean","null"]},"claimableUsd":{"type":["string","null"]},"verified":{"type":"boolean"},"confidence":{"type":"number"},"url":{"type":["string","null"]},"marketUrl":{"type":["string","null"]}},"required":["id","walletAddress","venue","eventLabel","eventId","eventIcon","eventMarketCount","conditionId","tokenId","mergeable","redeemable","question","outcomeLabel","outcomeIndex","imageUrl","status","closesAt","resolvedAt","shares","avgEntryUsd","costUsd","markUsd","valueUsd","unrealisedUsd","realisedUsd","won","claimableUsd","verified","confidence","url"]}},"openUsd":{"type":"string"},"openCostUsd":{"type":"string"},"claimableUsd":{"type":"string"},"realisedUsd":{"type":"string"},"unverified":{"type":"number"},"asOf":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["positions","openUsd","openCostUsd","claimableUsd","realisedUsd","unverified","asOf"]},"asOf":{"type":["string","null"]},"notCounted":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"string"}},"generatedAt":{"type":"string"}},"required":["data","asOf","notCounted","sources","generatedAt"]}}}}}}},"/api/v1/nfts":{"get":{"operationId":"nfts","summary":"NFTs at floor, with their own total, which is not in net worth.","responses":{"200":{"description":"NFTs at floor, with their own total, which is not in net worth.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"nfts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"walletAddress":{"type":"string"},"chainId":{"type":"string"},"name":{"type":"string"},"collection":{"type":"string"},"imageUrl":{"type":["string","null"]},"contract":{"type":"string"},"floorLabel":{"type":"string"},"floorUsd":{"type":["string","null"]},"costUsd":{"type":["string","null"]},"spam":{"type":"boolean"},"spamReason":{"type":["string","null"]},"hiddenByYou":{"type":"boolean"}},"required":["id","walletAddress","chainId","name","collection","imageUrl","floorLabel","floorUsd"]}},"floorTotalUsd":{"type":"string"},"note":{"type":"string","const":"Floors are not in net worth."},"folded":{"type":"object","properties":{"phishing":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"hiddenByYou":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["phishing","hiddenByYou"]}},"required":["nfts","floorTotalUsd","note"]},"asOf":{"type":["string","null"]},"notCounted":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"string"}},"generatedAt":{"type":"string"}},"required":["data","asOf","notCounted","sources","generatedAt"]}}}}},"parameters":[{"name":"hidden","in":"query","required":false,"description":"Set to 1 or true to include pieces with a phishing name and collections you hid.","schema":{"type":"boolean"}}]}},"/api/v1/pnl":{"get":{"operationId":"pnl","summary":"Trading profit from the ledger: realised and unrealised on swaps and fills, first in first out, with the open lots and what is missing.","responses":{"200":{"description":"Trading profit from the ledger: realised and unrealised on swaps and fills, first in first out, with the open lots and what is missing.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"method":{"type":"string","enum":["FIFO","LIFO","HIFO","average"]},"realised30dUsd":{"type":"string"},"realisedYtdUsd":{"type":"string"},"unrealisedUsd":{"type":"string"},"feesYtdUsd":{"type":"string"},"fundingYtdUsd":{"type":"string"},"byMonth":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"realisedUsd":{"type":"string"}},"required":["month","realisedUsd"]}},"byAsset":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string"},"chainId":{"type":"string"},"realisedUsd":{"type":"string"}},"required":["symbol","chainId","realisedUsd"]}},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"share":{"type":"number"}},"required":["source","share"]}},"unrealisedByWallet":{"type":"array","items":{"type":"object","properties":{"walletAddress":{"type":"string"},"unrealisedUsd":{"type":"string"}},"required":["walletAddress","unrealisedUsd"]}},"lots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"symbol":{"type":"string"},"tokenAddress":{"type":"string"},"chainId":{"type":"string"},"walletAddress":{"type":"string"},"acquiredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"amount":{"type":"string"},"costUsd":{"type":"string"},"unitCostUsd":{"type":"string"},"unitNowUsd":{"type":"string"},"unrealisedUsd":{"type":"string"},"logoUrl":{"type":["string","null"]}},"required":["id","symbol","chainId","walletAddress","acquiredAt","amount","costUsd","unitCostUsd","unitNowUsd","unrealisedUsd"]}},"trades":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"action":{"type":"string"},"symbol":{"type":"string"},"amount":{"type":["string","null"]},"qty":{"type":["string","null"]},"priceUsd":{"type":["string","null"]},"proceedsUsd":{"type":"string"},"realisedUsd":{"type":"string"},"walletAddress":{"type":"string"},"logoUrl":{"type":["string","null"]}},"required":["id","at","action","symbol","amount","priceUsd","proceedsUsd","realisedUsd","walletAddress"]}},"fees":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"detail":{"type":"string"},"usd":{"type":"string"}},"required":["label","detail","usd"]}},"trades30dCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"complete":{"type":"boolean"},"pricedEvents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unpricedEvents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unmatchedSales":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unplacedMoves":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"income":{"type":"object","properties":{"events":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"valuedEvents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unvaluedEvents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ytdUsd":{"type":"string"},"allUsd":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"kind":{"type":"string"},"symbol":{"type":"string"},"chainId":{"type":"string"},"walletAddress":{"type":"string"},"amount":{"type":"string"},"priceUsd":{"type":["string","null"]},"usd":{"type":["string","null"]},"logoUrl":{"type":["string","null"]}},"required":["id","at","kind","symbol","chainId","walletAddress","amount","priceUsd","usd"]}}},"required":["events","valuedEvents","unvaluedEvents","ytdUsd","allUsd","rows"]},"hiddenByYou":{"type":"object","properties":{"tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lotCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tradeCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"incomeCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"realisedYtdUsd":{"type":"string"},"unrealisedUsd":{"type":"string"},"lots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"symbol":{"type":"string"},"tokenAddress":{"type":"string"},"chainId":{"type":"string"},"walletAddress":{"type":"string"},"acquiredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"amount":{"type":"string"},"costUsd":{"type":"string"},"unitCostUsd":{"type":"string"},"unitNowUsd":{"type":"string"},"unrealisedUsd":{"type":"string"},"logoUrl":{"type":["string","null"]}},"required":["id","symbol","chainId","walletAddress","acquiredAt","amount","costUsd","unitCostUsd","unitNowUsd","unrealisedUsd"]}},"trades":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"action":{"type":"string"},"symbol":{"type":"string"},"amount":{"type":["string","null"]},"qty":{"type":["string","null"]},"priceUsd":{"type":["string","null"]},"proceedsUsd":{"type":"string"},"realisedUsd":{"type":"string"},"walletAddress":{"type":"string"},"logoUrl":{"type":["string","null"]}},"required":["id","at","action","symbol","amount","priceUsd","proceedsUsd","realisedUsd","walletAddress"]}},"income":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"kind":{"type":"string"},"symbol":{"type":"string"},"chainId":{"type":"string"},"walletAddress":{"type":"string"},"amount":{"type":"string"},"priceUsd":{"type":["string","null"]},"usd":{"type":["string","null"]},"logoUrl":{"type":["string","null"]}},"required":["id","at","kind","symbol","chainId","walletAddress","amount","priceUsd","usd"]}}},"required":["tokens","lotCount","tradeCount","incomeCount","realisedYtdUsd","unrealisedUsd","lots","trades","income"]},"viewableFrom":{"type":["string","null"]}},"required":["method","realised30dUsd","realisedYtdUsd","unrealisedUsd","feesYtdUsd","fundingYtdUsd","byMonth","byAsset","bySource","lots"]},"asOf":{"type":["string","null"]},"notCounted":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"string"}},"generatedAt":{"type":"string"}},"required":["data","asOf","notCounted","sources","generatedAt"]}}}}}}},"/api/v1/activity":{"get":{"operationId":"activity","summary":"The ledger, newest first, paged.","description":"A page can come back empty with a cursor that is not null. Keep paging until the cursor is null. Transactions that arrived unasked or carry a phishing name are left out unless `hidden` is set, as the Activity page folds them, and `folded` counts them. Your plan decides how far back this reads: rows older than `viewableFrom` are not returned and the cursor ends there. Null means all of it. PnL is computed over everything either way.","responses":{"200":{"description":"The ledger, newest first, paged.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"kind":{"type":"string","enum":["swap","send","receive","claim","stake","mint","buy","sell","short","long"]},"title":{"type":"string"},"walletAddress":{"type":"string"},"chainId":{"type":"string"},"valueLabel":{"type":["string","null"]},"direction":{"type":"string","enum":["up","down","neutral"]},"txUrl":{"type":["string","null"]},"groupId":{"type":"string"},"type":{"type":"string"},"subtype":{"type":"string"},"amount":{"type":["string","null"]},"symbol":{"type":["string","null"]},"tokenAddress":{"type":["string","null"]},"usdAt":{"type":["string","null"]},"counterparty":{"type":["string","null"]},"counterpartyLabel":{"type":["string","null"]},"spam":{"type":"boolean"},"spamReason":{"type":["string","null"]}},"required":["id","at","kind","title","walletAddress","chainId","valueLabel","direction","txUrl"]}},"cursor":{"type":["string","null"]},"folded":{"type":"object","properties":{"phishing":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unsolicited":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["phishing","unsolicited"]},"viewableFrom":{"type":["string","null"]}},"required":["events","cursor"]},"asOf":{"type":["string","null"]},"notCounted":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"string"}},"generatedAt":{"type":"string"}},"required":["data","asOf","notCounted","sources","generatedAt"]}}}}},"parameters":[{"name":"cursor","in":"query","required":false,"description":"The cursor from the previous page.","schema":{"type":"string"}},{"name":"hidden","in":"query","required":false,"description":"Set to 1 or true to include what the Activity page folds: phishing names and what arrived unasked.","schema":{"type":"boolean"}}]}},"/api/v1/briefing":{"get":{"operationId":"briefing","summary":"The daily briefing as the server wrote it.","description":"Answers 404 `no_briefing` when none has been written yet, or none for that day. That is the normal answer for a new account, not a fault.","responses":{"200":{"description":"The daily briefing as the server wrote it.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"day":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"greeting":{"type":"string"},"summary":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"strong":{"type":"boolean"},"money":{"type":"boolean"}},"required":["text"]}},"stories":{"type":"array","items":{"type":"object","properties":{"tone":{"type":"string","enum":["up","down","warn","muted"]},"title":{"type":"string"},"body":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"strong":{"type":"boolean"},"money":{"type":"boolean"}},"required":["text"]}},"facts":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"]}},"mark":{"anyOf":[{"type":"object","properties":{"path":{"type":["string","null"]},"mono":{"type":"string"},"tint":{"type":"string"}},"required":["path","mono","tint"]},{"type":"null"}]},"action":{"type":"object","properties":{"label":{"type":"string"},"to":{"type":"string"}},"required":["label","to"]}},"required":["tone","title","body","facts","action"]}},"complete":{"type":"boolean"},"news":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":400},"link":{"type":"string","pattern":"^https?:\\/\\/"},"source":{"type":"string","maxLength":120},"site":{"type":"string","maxLength":200},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["title","link","source","site","at"]}}},"required":["day","at","greeting","summary","stories","complete"]},"asOf":{"type":["string","null"]},"notCounted":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"string"}},"generatedAt":{"type":"string"}},"required":["data","asOf","notCounted","sources","generatedAt"]}}}}},"parameters":[{"name":"day","in":"query","required":false,"description":"A day as YYYY-MM-DD. Defaults to the latest.","schema":{"type":"string"}}]}},"/api/v1/alerts":{"get":{"operationId":"alerts","summary":"Alerts that have fired, newest first.","responses":{"200":{"description":"Alerts that have fired, newest first.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"alerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ruleId":{"type":["string","null"]},"kind":{"type":"string"},"body":{"type":"string"},"scope":{"type":"string"},"at":{"type":"string"},"readAt":{"type":["string","null"]}},"required":["id","ruleId","kind","body","scope","at","readAt"]}}},"required":["alerts"]},"asOf":{"type":["string","null"]},"notCounted":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"string"}},"generatedAt":{"type":"string"}},"required":["data","asOf","notCounted","sources","generatedAt"]}}}}}}},"/api/v1/refresh":{"post":{"operationId":"refresh","summary":"Queues a fresh read of every wallet.","description":"Needs a key made with refresh allowed, or it answers 403 `refresh_not_allowed`. Counts against your plan's refreshes a day (3 a day on Pro+ and Ultra), and answers 202 with how many wallets were queued.","responses":{"202":{"description":"Queues a fresh read of every wallet.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["queued"]},"asOf":{"type":["string","null"]},"notCounted":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"string"}},"generatedAt":{"type":"string"}},"required":["data","asOf","notCounted","sources","generatedAt"]}}}}}}}}}