diff --git a/openapi/markets.json b/openapi/markets.json index 3ab3986..c8d398f 100644 --- a/openapi/markets.json +++ b/openapi/markets.json @@ -1,2850 +1,1355 @@ { - "openapi": "3.1.1", - "x-mcp": { - "enabled": true - }, "info": { "title": "Markets & Positions API (Beta)", "version": "0.0.1" }, "servers": [ { - "url": "https://markets.dial.to/api" + "url": "http://markets.dial.to/api" } ], - "paths": { - "/v0/markets": { - "get": { - "operationId": "marketsV0Api.listMarkets", - "summary": "List all markets", - "description": "Returns real-time market data from supported protocols, such as Jupiter, Kamino, MarginFi, Lulo and many more. For more information, please check our [Protocol Support Roadmap](/markets/supported-protocols).\n\n**Note:** Some providers (e.g. Kamino) may return large responses with 100+ markets. For better performance in the API playground, consider filtering by both `type` and `provider` parameters.", - "tags": ["Markets"], - "parameters": [ - { - "name": "type", - "in": "query", - "schema": { - "type": "string", - "description": "Comma separated list of market types (`lending`, `yield`, `loop`, `perpetual`, `prediction`)." - }, - "example": "yield, lending", - "allowEmptyValue": true, - "allowReserved": true + "security": [ + { + "apiKey": [] + } + ], + "components": { + "securitySchemes": { + "apiKey": { + "type": "apiKey", + "name": "x-dialect-client-key", + "in": "header", + "description": "Client key for the Markets API", + "x-default": "pk_demo" + } + }, + "schemas": { + "LendingPositionWithMarket": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - { - "name": "provider", - "in": "query", - "schema": { - "type": "string", - "description": "Comma separated list of provider IDs (`marginfi`, `kamino`, `lulo`, `jupiter`, `defituna`, `carrot`, `dflow`)." + "type": { + "const": "lending" + }, + "marketId": { + "type": "string" + }, + "ownerAddress": { + "type": "string" + }, + "bundleId": { + "type": "string", + "description": "Identifier for positions bundled into one logical structure, such as position or market" + }, + "websiteUrl": { + "type": "string", + "format": "uri" + }, + "side": { + "enum": [ + "deposit", + "borrow" + ] + }, + "rewards": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tokenAddress": { + "type": "string" + }, + "amount": { + "type": "number" + }, + "amountUsd": { + "type": "number" + } + }, + "required": [ + "tokenAddress", + "amount" + ] + } + }, + "additionalData": { + "type": "object", + "propertyNames": { + "type": "string" }, - "example": "marginfi, kamino", - "allowEmptyValue": true, - "allowReserved": true + "additionalProperties": {} }, - { - "name": "cursor", - "in": "query", - "schema": { - "type": "string", - "description": "Cursor for pagination (market ID to start after)" + "actions": { + "type": "object", + "properties": { + "deposit": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + }, + "withdraw": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + }, + "borrow": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + }, + "repay": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + } } }, - { - "name": "limit", - "in": "query", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 200, - "default": 50, - "description": "Number of markets to return (default: 50, max: 200)" + "amount": { + "type": "number" + }, + "amountUsd": { + "type": "number" + }, + "ltv": { + "type": "number", + "minimum": 0, + "maximum": 100, + "description": "Current Loan-to-Value of the position, expressed as a percentage ratio of deposited value" + }, + "liquidationPrice": { + "type": "number", + "description": "Deposited token price expressed in borrowed token units at which the position becomes liquidatable" + }, + "market": { + "$ref": "#/components/schemas/LendingMarket" + } + }, + "required": [ + "id", + "type", + "marketId", + "ownerAddress", + "side", + "amount", + "market" + ] + }, + "YieldPositionWithMarket": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "const": "yield" + }, + "marketId": { + "type": "string" + }, + "ownerAddress": { + "type": "string" + }, + "websiteUrl": { + "type": "string", + "format": "uri" + }, + "bundleId": { + "type": "string", + "description": "Identifier for positions bundled into one logical structure, such as position or market" + }, + "rewards": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tokenAddress": { + "type": "string" + }, + "amount": { + "type": "number" + }, + "amountUsd": { + "type": "number" + } + }, + "required": [ + "tokenAddress", + "amount" + ] } }, - { - "name": "filters", - "in": "query", - "schema": { - "type": "string", - "description": "URL-encoded JSON object for filtering markets. Use with `type=prediction`.\n\nStatus options:\n- `open` \n- `closed`\n- `settled`\n\nExamples:\n- `{\"prediction\":{\"status\":[\"open\"]}}`\n- `{\"prediction\":{\"status\":[\"open\", \"closed\"]}}`" + "additionalData": { + "type": "object", + "propertyNames": { + "type": "string" }, - "allowEmptyValue": true, - "allowReserved": true + "additionalProperties": {} }, - { - "name": "asset", - "in": "query", - "schema": { - "type": "string", - "description": "Filter by token mint address (comma-separated). Not supported for prediction markets. Requires an explicit `type` filter that excludes prediction (e.g. `type=lending,yield,loop,perpetual`)." + "amount": { + "type": "number" + }, + "amountUsd": { + "type": "number" + }, + "market": { + "$ref": "#/components/schemas/YieldMarket" + } + }, + "required": [ + "id", + "type", + "marketId", + "ownerAddress", + "amount", + "market" + ] + }, + "LendingMarket": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "const": "lending" + }, + "productName": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "enum": [ + "kamino", + "lulo", + "marginfi", + "jupiter", + "defituna", + "carrot", + "dflow" + ] + }, + "name": { + "type": "string" + }, + "icon": { + "type": "string" + } }, - "allowEmptyValue": true, - "allowReserved": true + "required": [ + "id", + "name", + "icon" + ] + }, + "token": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "address", + "symbol", + "decimals", + "icon" + ] + }, + "borrowToken": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "address", + "symbol", + "decimals", + "icon" + ] + }, + "websiteUrl": { + "type": "string", + "format": "uri" + }, + "depositApy": { + "type": "number", + "description": "Total percentage ratio APY **including** rewards" + }, + "baseDepositApy": { + "type": "number", + "description": "APY percentage ratio excluding rewards" + }, + "baseDepositApy30d": { + "type": "number", + "description": "30-day average APY percentage ratio excluding rewards" + }, + "baseDepositApy90d": { + "type": "number", + "description": "90-day average APY percentage ratio excluding rewards" + }, + "baseDepositApy180d": { + "type": "number", + "description": "180-day average APY percentage ratio excluding rewards" + }, + "borrowApy": { + "type": "number", + "description": "Total percentage ratio APY **including** rewards" + }, + "baseBorrowApy": { + "type": "number", + "description": "APY percentage ratio excluding rewards" + }, + "baseBorrowApy30d": { + "type": "number", + "description": "30-day average APY percentage ratio excluding rewards" + }, + "baseBorrowApy90d": { + "type": "number", + "description": "90-day average APY percentage ratio excluding rewards" + }, + "baseBorrowApy180d": { + "type": "number", + "description": "180-day average APY percentage ratio excluding rewards" + }, + "totalDeposit": { + "type": "number" + }, + "totalDepositUsd": { + "type": "number" + }, + "totalBorrow": { + "type": "number" + }, + "totalBorrowUsd": { + "type": "number" + }, + "maxDeposit": { + "type": "number" + }, + "maxBorrow": { + "type": "number" + }, + "rewards": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "const": "deposit" + }, + "apy": { + "type": "number" + }, + "token": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "address", + "symbol", + "decimals", + "icon" + ] + }, + "marketAction": { + "type": "string" + } + }, + "required": [ + "type", + "apy", + "token", + "marketAction" + ], + "title": "Deposit Reward", + "description": "Reward for depositing" + }, + { + "type": "object", + "properties": { + "type": { + "const": "borrow" + }, + "apy": { + "type": "number" + }, + "token": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "address", + "symbol", + "decimals", + "icon" + ] + }, + "marketAction": { + "type": "string" + } + }, + "required": [ + "type", + "apy", + "token", + "marketAction" + ], + "title": "Borrow Reward", + "description": "Reward for borrowing" + } + ] + } + }, + "maxLtv": { + "type": "number", + "minimum": 0, + "maximum": 1, + "description": "Maximum Loan-to-Value allowed when borrowing, expressed as a percentage ratio of deposited value" + }, + "liquidationLtv": { + "type": "number", + "minimum": 0, + "maximum": 1, + "description": "Loan-to-Value percentage ratio of deposited value at which the position becomes liquidatable" + }, + "liquidationPenalty": { + "type": "number", + "minimum": 0, + "maximum": 1, + "description": "Percentage ratio of deposited value taken as a penalty and given to liquidators when position is liquidated" + }, + "additionalData": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "actions": { + "type": "object", + "properties": { + "deposit": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + }, + "withdraw": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + }, + "borrow": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + }, + "repay": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + }, + "repayWithCollateral": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + }, + "claimRewards": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + } + } } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { + }, + "required": [ + "id", + "type", + "productName", + "provider", + "token", + "depositApy", + "baseDepositApy", + "borrowApy", + "baseBorrowApy", + "totalDeposit", + "totalBorrow", + "maxBorrow", + "actions" + ] + }, + "YieldMarket": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "const": "yield" + }, + "productName": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "enum": [ + "kamino", + "lulo", + "marginfi", + "jupiter", + "defituna", + "carrot", + "dflow" + ] + }, + "name": { + "type": "string" + }, + "icon": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "icon" + ] + }, + "token": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "address", + "symbol", + "decimals", + "icon" + ] + }, + "websiteUrl": { + "type": "string", + "format": "uri" + }, + "depositApy": { + "type": "number" + }, + "baseDepositApy": { + "type": "number" + }, + "baseDepositApy30d": { + "type": "number" + }, + "baseDepositApy90d": { + "type": "number" + }, + "baseDepositApy180d": { + "type": "number" + }, + "totalDeposit": { + "type": "number" + }, + "totalDepositUsd": { + "type": "number" + }, + "rewards": { + "type": "array", + "items": { + "anyOf": [ + { "type": "object", "properties": { - "markets": { - "type": "array", - "items": { - "anyOf": [ - { - "title": "Lending Market", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "const": "lending" - }, - "productName": { - "type": "string" - }, - "provider": { - "type": "object", - "properties": { - "id": { - "enum": [ - "kamino", - "lulo", - "marginfi", - "jupiter", - "defituna", - "carrot", - "dflow" - ] - }, - "name": { - "type": "string" - }, - "icon": { - "type": "string" - } - }, - "required": ["id", "name", "icon"] - }, - "token": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "borrowToken": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "maxLtv": { - "type": "number", - "description": "Maximum loan-to-value ratio" - }, - "liquidationLtv": { - "type": "number", - "description": "Loan-to-value ratio at which liquidation occurs" - }, - "liquidationPenalty": { - "type": "number", - "description": "Penalty percentage for liquidations" - }, - "websiteUrl": { - "type": "string", - "format": "uri" - }, - "depositApy": { - "type": "number", - "description": "Total percentage ratio APY **including** rewards" - }, - "baseDepositApy": { - "type": "number", - "description": "APY percentage ratio excluding rewards" - }, - "baseDepositApy30d": { - "type": "number", - "description": "30-day average APY percentage ratio excluding rewards" - }, - "baseDepositApy90d": { - "type": "number", - "description": "90-day average APY percentage ratio excluding rewards" - }, - "baseDepositApy180d": { - "type": "number", - "description": "180-day average APY percentage ratio excluding rewards" - }, - "borrowApy": { - "type": "number", - "description": "Total percentage ratio APY **including** rewards" - }, - "baseBorrowApy": { - "type": "number", - "description": "APY percentage ratio excluding rewards" - }, - "baseBorrowApy30d": { - "type": "number", - "description": "30-day average APY percentage ratio excluding rewards" - }, - "baseBorrowApy90d": { - "type": "number", - "description": "90-day average APY percentage ratio excluding rewards" - }, - "baseBorrowApy180d": { - "type": "number", - "description": "180-day average APY percentage ratio excluding rewards" - }, - "totalDeposit": { - "type": "number" - }, - "totalDepositUsd": { - "type": "number" - }, - "totalBorrow": { - "type": "number" - }, - "totalBorrowUsd": { - "type": "number" - }, - "maxDeposit": { - "type": "number" - }, - "maxBorrow": { - "type": "number" - }, - "rewards": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "const": "deposit" - }, - "apy": { - "type": "number" - }, - "token": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "marketAction": { - "type": "string" - } - }, - "required": [ - "type", - "apy", - "token", - "marketAction" - ], - "title": "Deposit Reward", - "description": "Reward for depositing" - }, - { - "type": "object", - "properties": { - "type": { - "const": "borrow" - }, - "apy": { - "type": "number" - }, - "token": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "marketAction": { - "type": "string" - } - }, - "required": [ - "type", - "apy", - "token", - "marketAction" - ], - "title": "Borrow Reward", - "description": "Reward for borrowing" - } - ] - } - }, - "additionalData": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": true - }, - "actions": { - "type": "object", - "properties": { - "deposit": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "withdraw": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "claimRewards": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "borrow": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "repay": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "repayWithCollateral": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - } - }, - "additionalProperties": true - } - }, - "required": [ - "id", - "type", - "provider", - "token", - "depositApy", - "baseDepositApy", - "borrowApy", - "baseBorrowApy", - "totalDeposit", - "totalBorrow", - "maxDeposit", - "maxBorrow", - "actions" - ] - }, - { - "title": "Yield Market", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "const": "yield" - }, - "productName": { - "type": "string" - }, - "provider": { - "type": "object", - "properties": { - "id": { - "enum": [ - "kamino", - "lulo", - "marginfi", - "jupiter", - "defituna", - "carrot", - "dflow" - ] - }, - "name": { - "type": "string" - }, - "icon": { - "type": "string" - } - }, - "required": ["id", "name", "icon"] - }, - "token": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "websiteUrl": { - "type": "string", - "format": "uri" - }, - "depositApy": { - "type": "number" - }, - "baseDepositApy": { - "type": "number" - }, - "baseDepositApy30d": { - "type": "number", - "description": "30-day average APY excluding rewards" - }, - "baseDepositApy90d": { - "type": "number", - "description": "90-day average APY excluding rewards" - }, - "baseDepositApy180d": { - "type": "number", - "description": "180-day average APY excluding rewards" - }, - "totalDeposit": { - "type": "number", - "description": "Total amount deposited in the vault" - }, - "totalDepositUsd": { - "type": "number", - "description": "Total value of deposits in USD" - }, - "rewards": { - "type": "array", - "description": "Available rewards for this yield market", - "items": { - "type": "object", - "properties": { - "type": { - "const": "deposit" - }, - "apy": { - "type": "number" - }, - "token": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "marketAction": { - "type": "string" - } - }, - "required": [ - "type", - "apy", - "token", - "marketAction" - ] - } - }, - "additionalData": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": true - }, - "actions": { - "type": "object", - "properties": { - "deposit": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "withdraw": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "withdrawComplete": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "claimRewards": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - } - }, - "additionalProperties": true - } - }, - "required": [ - "id", - "type", - "provider", - "token", - "depositApy", - "actions" - ] - }, - { - "title": "Loop Market", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "const": "loop" - }, - "productName": { - "type": "string" - }, - "provider": { - "type": "object", - "properties": { - "id": { - "enum": [ - "kamino", - "lulo", - "marginfi", - "jupiter", - "defituna", - "carrot", - "dflow" - ] - }, - "name": { - "type": "string" - }, - "icon": { - "type": "string" - } - }, - "required": ["id", "name", "icon"] - }, - "tokenA": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "tokenB": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "websiteUrl": { - "type": "string", - "format": "uri" - }, - "depositApy": { - "type": "number" - }, - "depositApy30d": { - "type": "number", - "description": "30-day average deposit APY" - }, - "depositApy90d": { - "type": "number", - "description": "90-day average deposit APY" - }, - "depositApy180d": { - "type": "number", - "description": "180-day average deposit APY" - }, - "maxLeverage": { - "type": "number" - }, - "maxLtv": { - "type": "number", - "minimum": 0, - "maximum": 100, - "description": "Maximum Loan-to-Value allowed when borrowing, expressed as a percentage of deposited value" - }, - "liquidationLtv": { - "type": "number", - "minimum": 0, - "maximum": 100, - "description": "Loan-to-Value percentage ratio of deposited value at which the position becomes liquidatable" - }, - "additionalData": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": true - }, - "actions": { - "type": "object", - "properties": { - "setup": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "deposit": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "withdraw": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - } - } - } - }, - "required": [ - "id", - "type", - "provider", - "tokenA", - "tokenB", - "depositApy", - "maxLeverage", - "actions" - ] - }, - { - "title": "Perpetual Market", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "const": "perpetual" - }, - "productName": { - "type": "string" - }, - "provider": { - "type": "object", - "properties": { - "id": { - "enum": [ - "kamino", - "lulo", - "marginfi", - "jupiter", - "defituna", - "carrot", - "dflow" - ] - }, - "name": { - "type": "string" - }, - "icon": { - "type": "string" - } - }, - "required": ["id", "name", "icon"] - }, - "tokenA": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "tokenB": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "websiteUrl": { - "type": "string", - "format": "uri" - }, - "liquidity": { - "type": "object", - "properties": { - "longUsd": { - "type": "number" - }, - "shortUsd": { - "type": "number" - } - }, - "required": ["longUsd", "shortUsd"] - }, - "maxLeverage": { - "type": "number" - }, - "additionalData": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": true - }, - "actions": { - "type": "object", - "properties": { - "setup": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "openPosition": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "closePosition": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - } - }, - "additionalProperties": true - } - }, - "required": [ - "id", - "type", - "provider", - "tokenA", - "tokenB", - "liquidity", - "maxLeverage", - "actions" - ] - }, - { - "title": "Prediction Market", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "const": "prediction" - }, - "provider": { - "type": "object", - "properties": { - "id": { - "enum": [ - "kamino", - "lulo", - "marginfi", - "jupiter", - "defituna", - "carrot", - "dflow" - ] - }, - "name": { - "type": "string" - }, - "icon": { - "type": "string" - } - }, - "required": ["id", "name", "icon"] - }, - "websiteUrl": { - "type": "string", - "format": "uri" - }, - "bundleId": { - "type": "string", - "description": "Identifier for positions bundled into one logical structure, such as position or market" - }, - "title": { - "type": "string" - }, - "subtitle": { - "type": "string" - }, - "status": { - "enum": ["open", "closed", "settled"] - }, - "result": { - "type": "string" - }, - "volume": { - "type": "number" - }, - "openInterest": { - "type": "number" - }, - "yesBid": { - "type": "number" - }, - "noBid": { - "type": "number" - }, - "yesAsk": { - "type": "number" - }, - "noAsk": { - "type": "number" - }, - "openTime": { - "type": "number" - }, - "closeTime": { - "type": "number" - }, - "expirationTime": { - "type": "number" - }, - "yesToken": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon", - "name" - ] - }, - "noToken": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon", - "name" - ] - }, - "additionalData": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": true - } - }, - "required": [ - "id", - "type", - "provider", - "title", - "status" - ] - } - ] - } - }, - "cursor": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Cursor for the next page, null if no more results" - } - }, - "required": ["markets", "cursor"] - }, - "example": { - "markets": [ - { - "id": "string", - "type": "string", - "productName": "string", - "provider": { - "id": "string", - "name": "string", - "icon": "string" - }, - "token": { - "address": "string", - "symbol": "string", - "decimals": 1, - "icon": "string" - }, - "borrowToken": { - "address": "string", - "symbol": "string", - "decimals": 1, - "icon": "string" - }, - "websiteUrl": "string", - "depositApy": 1, - "baseDepositApy": 1, - "baseDepositApy30d": 1, - "baseDepositApy90d": 1, - "baseDepositApy180d": 1, - "borrowApy": 1, - "baseBorrowApy": 1, - "baseBorrowApy30d": 1, - "baseBorrowApy90d": 1, - "baseBorrowApy180d": 1, - "totalDeposit": 1, - "totalDepositUsd": 1, - "totalBorrow": 1, - "totalBorrowUsd": 1, - "maxDeposit": 1, - "maxBorrow": 1, - "rewards": [ - { - "type": "string", - "apy": 1, - "token": { - "address": "string", - "symbol": "string", - "decimals": 1, - "icon": "string" - }, - "marketAction": "string" - } - ], - "maxLtv": 0, - "liquidationLtv": 0, - "liquidationPenalty": 0, - "additionalData": {}, - "actions": { - "deposit": { - "blinkUrl": "string" - }, - "withdraw": { - "blinkUrl": "string" - }, - "claimRewards": { - "blinkUrl": "string" - } - } - } - ] - } - } - } - } - } - } - }, - "/v0/markets/history": { - "get": { - "operationId": "marketsV0Api.marketsHistory", - "summary": "Get historical market snapshots", - "description": "Fetch market snapshots within a time range for one or more markets. Optionally interpolate to a uniform time grid.", - "tags": ["Markets"], - "parameters": [ - { - "name": "marketIds", - "in": "query", - "required": true, - "schema": { - "type": "string", - "description": "Comma separated list of market IDs." - }, - "allowEmptyValue": true, - "allowReserved": true - }, - { - "name": "startTime", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "date-time", - "x-native-type": "date", - "description": "Start time of the snapshot. Date or datetime in RFC 3339 format", - "default": "2025-06-01T00:00:00Z", - "example": "2025-06-01T00:00:00Z" - }, - "allowEmptyValue": true, - "allowReserved": true - }, - { - "name": "endTime", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time", - "x-native-type": "date", - "description": "End time of the snapshot. Date or datetime in RFC 3339 format. Defaults to current time if not provided", - "default": "2025-10-09T23:59:59Z", - "example": "2025-10-09T23:59:59Z" - }, - "allowEmptyValue": true, - "allowReserved": true - }, - { - "name": "resolution", - "in": "query", - "required": false, - "schema": { - "enum": ["1h", "1d"], - "description": "Time interval for historical snapshots. Controls the granularity of data points returned." - }, - "allowEmptyValue": true, - "allowReserved": true - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "markets": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "history": { - "type": "array", - "items": { - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "format": "date-time", - "x-native-type": "date" - }, - "depositApy": { - "anyOf": [ - { "type": "number" }, - { "type": "null" } - ] - }, - "totalDeposit": { - "anyOf": [ - { "type": "number" }, - { "type": "null" } - ] - }, - "totalDepositUsd": { - "anyOf": [ - { "type": "number" }, - { "type": "null" } - ] - } - }, - "required": ["timestamp"] - } - } - }, - "required": ["id", "history"] - } - } - }, - "required": ["markets"] - } - }, - "required": ["data"] - } - } - } - } - } - } - }, - "/v0/marketsByType": { - "get": { - "operationId": "marketsV0Api.listMarketsGroupedByType", - "summary": "List all markets grouped by type", - "description": "Returns real-time market data from supported protocols, such as Jupiter, Kamino, MarginFi, Lulo and many more. For more information, please check our [Protocol Support Roadmap](/markets/supported-protocols).", - "tags": ["Markets"], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "lending": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "const": "lending" - }, - "productName": { - "type": "string" - }, - "provider": { - "type": "object", - "properties": { - "id": { - "enum": [ - "kamino", - "lulo", - "marginfi", - "jupiter", - "defituna", - "carrot" - ] - }, - "name": { - "type": "string" - }, - "icon": { - "type": "string" - } - }, - "required": ["id", "name", "icon"] - }, - "token": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "borrowToken": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "maxLtv": { - "type": "number", - "description": "Maximum loan-to-value ratio" - }, - "liquidationLtv": { - "type": "number", - "description": "Loan-to-value ratio at which liquidation occurs" - }, - "liquidationPenalty": { - "type": "number", - "description": "Penalty percentage for liquidations" - }, - "websiteUrl": { - "type": "string", - "format": "uri" - }, - "depositApy": { - "type": "number", - "description": "Total APY **including** rewards" - }, - "baseDepositApy": { - "type": "number", - "description": "APY excluding rewards" - }, - "baseDepositApy30d": { - "type": "number", - "description": "30-day average APY excluding rewards" - }, - "baseDepositApy90d": { - "type": "number", - "description": "90-day average APY excluding rewards" - }, - "baseDepositApy180d": { - "type": "number", - "description": "180-day average APY excluding rewards" - }, - "borrowApy": { - "type": "number", - "description": "Total APY **including** rewards" - }, - "baseBorrowApy": { - "type": "number", - "description": "APY excluding rewards" - }, - "baseBorrowApy30d": { - "type": "number", - "description": "30-day average APY excluding rewards" - }, - "baseBorrowApy90d": { - "type": "number", - "description": "90-day average APY excluding rewards" - }, - "baseBorrowApy180d": { - "type": "number", - "description": "180-day average APY excluding rewards" - }, - "totalDeposit": { - "type": "number" - }, - "totalDepositUsd": { - "type": "number" - }, - "totalBorrow": { - "type": "number" - }, - "totalBorrowUsd": { - "type": "number" - }, - "maxDeposit": { - "type": "number" - }, - "maxBorrow": { - "type": "number" - }, - "rewards": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "const": "deposit" - }, - "apy": { - "type": "number" - }, - "token": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "marketAction": { - "type": "string" - } - }, - "required": [ - "type", - "apy", - "token", - "marketAction" - ], - "title": "Deposit Reward", - "description": "Reward for depositing" - }, - { - "type": "object", - "properties": { - "type": { - "const": "borrow" - }, - "apy": { - "type": "number" - }, - "token": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "marketAction": { - "type": "string" - } - }, - "required": [ - "type", - "apy", - "token", - "marketAction" - ], - "title": "Borrow Reward", - "description": "Reward for borrowing" - } - ] - } - }, - "additionalData": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": true - }, - "actions": { - "type": "object", - "properties": { - "deposit": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "withdraw": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "claimRewards": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "borrow": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "repay": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "repayWithCollateral": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - } - }, - "additionalProperties": true - } - }, - "required": [ - "id", - "type", - "provider", - "token", - "depositApy", - "baseDepositApy", - "borrowApy", - "baseBorrowApy", - "totalDeposit", - "totalBorrow", - "maxDeposit", - "maxBorrow", - "actions" - ] - } - }, - "yield": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "const": "yield" - }, - "productName": { - "type": "string" - }, - "provider": { - "type": "object", - "properties": { - "id": { - "enum": [ - "kamino", - "lulo", - "marginfi", - "jupiter", - "defituna", - "carrot" - ] - }, - "name": { - "type": "string" - }, - "icon": { - "type": "string" - } - }, - "required": ["id", "name", "icon"] - }, - "token": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "websiteUrl": { - "type": "string", - "format": "uri" - }, - "depositApy": { - "type": "number" - }, - "baseDepositApy": { - "type": "number" - }, - "baseDepositApy30d": { - "type": "number", - "description": "30-day average APY excluding rewards" - }, - "baseDepositApy90d": { - "type": "number", - "description": "90-day average APY excluding rewards" - }, - "baseDepositApy180d": { - "type": "number", - "description": "180-day average APY excluding rewards" - }, - "totalDeposit": { - "type": "number", - "description": "Total amount deposited in the vault" - }, - "totalDepositUsd": { - "type": "number", - "description": "Total value of deposits in USD" - }, - "rewards": { - "type": "array", - "description": "Available rewards for this yield market", - "items": { - "type": "object", - "properties": { - "type": { - "const": "deposit" - }, - "apy": { - "type": "number" - }, - "token": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "marketAction": { - "type": "string" - } - }, - "required": [ - "type", - "apy", - "token", - "marketAction" - ] - } - }, - "additionalData": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": true - }, - "actions": { - "type": "object", - "properties": { - "deposit": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "withdraw": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "withdrawComplete": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "claimRewards": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - } - }, - "additionalProperties": true - } - }, - "required": [ - "id", - "type", - "provider", - "token", - "depositApy", - "baseDepositApy", - "actions" - ] - } - }, - "loop": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "const": "loop" - }, - "productName": { - "type": "string" - }, - "provider": { - "type": "object", - "properties": { - "id": { - "enum": [ - "kamino", - "lulo", - "marginfi", - "jupiter", - "defituna", - "carrot" - ] - }, - "name": { - "type": "string" - }, - "icon": { - "type": "string" - } - }, - "required": ["id", "name", "icon"] - }, - "tokenA": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "tokenB": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "websiteUrl": { - "type": "string", - "format": "uri" - }, - "depositApy": { - "type": "number" - }, - "depositApy30d": { - "type": "number", - "description": "30-day average deposit APY" - }, - "depositApy90d": { - "type": "number", - "description": "90-day average deposit APY" - }, - "depositApy180d": { - "type": "number", - "description": "180-day average deposit APY" - }, - "maxLeverage": { - "type": "number" - }, - "maxLtv": { - "type": "number", - "minimum": 0, - "maximum": 100, - "description": "Maximum Loan-to-Value allowed when borrowing, expressed as a percentage of deposited value" - }, - "liquidationLtv": { - "type": "number", - "minimum": 0, - "maximum": 100, - "description": "Loan-to-Value percentage ratio of deposited value at which the position becomes liquidatable" - }, - "additionalData": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": true - }, - "actions": { - "type": "object", - "properties": { - "setup": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "deposit": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "withdraw": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - } - }, - "additionalProperties": true - } - }, - "required": [ - "id", - "type", - "provider", - "tokenA", - "tokenB", - "depositApy", - "maxLeverage", - "actions" - ] - } - }, - "perpetual": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "const": "perpetual" - }, - "productName": { - "type": "string" - }, - "provider": { - "type": "object", - "properties": { - "id": { - "enum": [ - "kamino", - "lulo", - "marginfi", - "jupiter", - "defituna", - "carrot" - ] - }, - "name": { - "type": "string" - }, - "icon": { - "type": "string" - } - }, - "required": ["id", "name", "icon"] - }, - "tokenA": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "tokenB": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "websiteUrl": { - "type": "string", - "format": "uri" - }, - "liquidity": { - "type": "object", - "properties": { - "longUsd": { - "type": "number" - }, - "shortUsd": { - "type": "number" - } - }, - "required": ["longUsd", "shortUsd"] - }, - "maxLeverage": { - "type": "number" - }, - "additionalData": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": true - }, - "actions": { - "type": "object", - "properties": { - "setup": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "openPosition": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "closePosition": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - } - }, - "additionalProperties": true - } - }, - "required": [ - "id", - "type", - "provider", - "tokenA", - "tokenB", - "liquidity", - "maxLeverage", - "actions" - ] - } - } - }, - "required": ["lending", "yield", "loop", "perpetual"] - }, - "example": { - "lending": [ - { - "id": "string", - "type": "lending", - "provider": { - "id": "kamino", - "name": "string", - "icon": "string" - }, - "token": { - "address": "string", - "symbol": "string", - "decimals": 1, - "icon": "string" - }, - "borrowToken": { - "address": "string", - "symbol": "string", - "decimals": 1, - "icon": "string" - }, - "websiteUrl": "string", - "depositApy": 1, - "baseDepositApy": 1, - "baseDepositApy30d": 1, - "baseDepositApy90d": 1, - "baseDepositApy180d": 1, - "borrowApy": 1, - "baseBorrowApy": 1, - "baseBorrowApy30d": 1, - "baseBorrowApy90d": 1, - "baseBorrowApy180d": 1, - "totalDeposit": 1, - "totalDepositUsd": 1, - "totalBorrow": 1, - "totalBorrowUsd": 1, - "maxDeposit": 1, - "maxBorrow": 1, - "rewards": [ - { - "type": "deposit", - "apy": 1, - "token": { - "address": "string", - "symbol": "string", - "decimals": 1, - "icon": "string" - }, - "marketAction": "string" - } - ], - "maxLtv": 0, - "liquidationLtv": 0, - "liquidationPenalty": 0, - "additionalData": { - "propertyName*": "anything" - }, - "actions": { - "deposit": { - "blinkUrl": "string" - }, - "withdraw": { - "blinkUrl": "string" - }, - "claimRewards": { - "blinkUrl": "string" - } - } - } - ], - "yield": [ - { - "id": "string", - "type": "yield", - "provider": { - "id": "kamino", - "name": "string", - "icon": "string" - }, - "token": { - "address": "string", - "symbol": "string", - "decimals": 1, - "icon": "string" - }, - "websiteUrl": "string", - "depositApy": 1, - "baseDepositApy": 1, - "baseDepositApy30d": 1, - "baseDepositApy90d": 1, - "baseDepositApy180d": 1, - "totalDeposit": 1, - "totalDepositUsd": 1, - "additionalData": { - "propertyName*": "anything" - }, - "actions": { - "deposit": { - "blinkUrl": "string" - }, - "withdraw": { - "blinkUrl": "string" - }, - "withdrawComplete": { - "blinkUrl": "string" - } - } - } - ], - "loop": [ - { - "id": "string", - "type": "loop", - "provider": { - "id": "kamino", - "name": "string", - "icon": "string" - }, - "tokenA": { - "address": "string", - "symbol": "string", - "decimals": 1, - "icon": "string" - }, - "tokenB": { - "address": "string", - "symbol": "string", - "decimals": 1, - "icon": "string" - }, - "websiteUrl": "string", - "depositApy": 1, - "depositApy30d": 1, - "depositApy90d": 1, - "depositApy180d": 1, - "maxLeverage": 1, - "additionalData": { - "propertyName*": "anything" - }, - "actions": { - "setup": { - "blinkUrl": "string" - }, - "deposit": { - "blinkUrl": "string" - }, - "withdraw": { - "blinkUrl": "string" - } - } - } - ], - "perpetual": [ - { - "id": "string", - "type": "perpetual", - "provider": { - "id": "kamino", - "name": "string", - "icon": "string" - }, - "tokenA": { - "address": "string", - "symbol": "string", - "decimals": 1, - "icon": "string" - }, - "tokenB": { - "address": "string", - "symbol": "string", - "decimals": 1, - "icon": "string" - }, - "websiteUrl": "string", - "liquidity": { - "longUsd": 1, - "shortUsd": 1 - }, - "maxLeverage": 1, - "additionalData": { - "propertyName*": "anything" - }, - "actions": { - "setup": { - "blinkUrl": "string" - }, - "openPosition": { - "blinkUrl": "string" - }, - "closePosition": { - "blinkUrl": "string" - } - } - } - ] - } - } - } - } - } - } - }, - "/v0/positions/history": { - "get": { - "operationId": "positionsV0Api.positionsHistory", - "summary": "Get historical position snapshots", - "description": "Fetch position snapshots within a time range for a wallet address\n\n\n**Learn More**: For detailed examples, resolution options, practical use cases, and how to interpret cumulative values, see our [Historical Position Data guide](/markets/history).\n", - "tags": ["Positions"], - "parameters": [ - { - "name": "walletAddress", - "in": "query", - "required": true, - "schema": { - "type": "string", - "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176", - "example": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" - } - }, - { - "name": "startTime", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "date-time", - "x-native-type": "date", - "description": "Start time of the snapshot. Date or datetime in RFC 3339 format", - "default": "2025-06-01T00:00:00Z", - "example": "2025-06-01T00:00:00Z" - } - }, - { - "name": "endTime", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time", - "x-native-type": "date", - "description": "End time of the snapshot. Date or datetime in RFC 3339 format. Defaults to current time if not provided", - "default": "2025-10-09T23:59:59Z", - "example": "2025-10-09T23:59:59Z" - } - }, - { - "name": "positionIds", - "in": "query", - "required": false, - "schema": { - "type": "string", - "description": "Comma separated list of position IDs." - } - }, - { - "name": "resolution", - "in": "query", - "required": false, - "schema": { - "enum": ["1m", "5m", "1h", "1d"], - "description": "Time interval for historical snapshots. Controls the granularity of data points returned." - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "positions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "providerId": { - "enum": [ - "kamino", - "lulo", - "marginfi", - "jupiter", - "defituna", - "carrot", - "dflow" - ] - }, - "type": { - "enum": [ - "lending", - "yield", - "loop", - "reward", - "prediction" - ] - }, - "marketId": { - "type": "string" - }, - "history": { - "type": "array", - "items": { - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "format": "date-time", - "x-native-type": "date" - }, - "amount": { - "type": "number" - }, - "amountUsd": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "amountTokenA": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "amountTokenAUsd": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "amountTokenB": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "amountTokenBUsd": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "timestamp", - "amount", - "amountUsd" - ] - } - } + "type": { + "const": "deposit" + }, + "apy": { + "type": "number" + }, + "token": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "icon": { + "anyOf": [ + { + "type": "string" }, - "required": [ - "id", - "providerId", - "type", - "marketId", - "history" - ] - } + { + "type": "null" + } + ] } }, - "required": ["positions"] + "required": [ + "address", + "symbol", + "decimals", + "icon" + ] + }, + "marketAction": { + "type": "string" } }, - "required": ["data"] + "required": [ + "type", + "apy", + "token", + "marketAction" + ], + "title": "Deposit Reward", + "description": "Reward for depositing" }, - "example": { - "data": { - "positions": [ - { - "id": "string", - "providerId": "kamino", - "type": "lending", - "marketId": "string", - "history": [ - { - "timestamp": "2025-10-27T10:42:18.137Z", - "amount": 1, - "amountUsd": 1 - } - ] - } - ] - } + { + "type": "object", + "properties": { + "type": { + "const": "borrow" + }, + "apy": { + "type": "number" + }, + "token": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "address", + "symbol", + "decimals", + "icon" + ] + }, + "marketAction": { + "type": "string" + } + }, + "required": [ + "type", + "apy", + "token", + "marketAction" + ], + "title": "Borrow Reward", + "description": "Reward for borrowing" } + ] + } + }, + "additionalData": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "actions": { + "type": "object", + "properties": { + "deposit": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + }, + "withdraw": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + }, + "withdrawComplete": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + }, + "claimRewards": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] } } } - } + }, + "required": [ + "id", + "type", + "productName", + "provider", + "token", + "depositApy", + "baseDepositApy", + "actions" + ] + }, + "LoopMarket": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "const": "loop" + }, + "productName": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "enum": [ + "kamino", + "lulo", + "marginfi", + "jupiter", + "defituna", + "carrot", + "dflow" + ] + }, + "name": { + "type": "string" + }, + "icon": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "icon" + ] + }, + "tokenA": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "address", + "symbol", + "decimals", + "icon" + ] + }, + "tokenB": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "address", + "symbol", + "decimals", + "icon" + ] + }, + "websiteUrl": { + "type": "string", + "format": "uri" + }, + "depositApy": { + "type": "number" + }, + "depositApy30d": { + "type": "number" + }, + "depositApy90d": { + "type": "number" + }, + "depositApy180d": { + "type": "number" + }, + "maxLeverage": { + "type": "number", + "description": "Maximum leverage allowed when depositing, expressed as a multiplier" + }, + "maxLtv": { + "type": "number", + "minimum": 0, + "maximum": 1, + "description": "Maximum Loan-to-Value before either full/partial liquidation commences (depending on the provider), expressed as a percentage ratio of deposited value" + }, + "liquidationLtv": { + "type": "number", + "minimum": 0, + "maximum": 1, + "description": "Loan-to-Value percentage ratio of deposited value at which the position becomes liquidatable, fully or partially." + }, + "additionalData": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "actions": { + "type": "object", + "properties": { + "setup": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + }, + "deposit": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + }, + "withdraw": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + } + } + } + }, + "required": [ + "id", + "type", + "productName", + "provider", + "tokenA", + "tokenB", + "depositApy", + "maxLeverage", + "maxLtv", + "liquidationLtv", + "actions" + ] + }, + "PerpetualMarket": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "const": "perpetual" + }, + "productName": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "enum": [ + "kamino", + "lulo", + "marginfi", + "jupiter", + "defituna", + "carrot", + "dflow" + ] + }, + "name": { + "type": "string" + }, + "icon": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "icon" + ] + }, + "tokenA": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "address", + "symbol", + "decimals", + "icon" + ] + }, + "tokenB": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "address", + "symbol", + "decimals", + "icon" + ] + }, + "websiteUrl": { + "type": "string", + "format": "uri" + }, + "liquidity": { + "type": "object", + "properties": { + "longUsd": { + "type": "number" + }, + "shortUsd": { + "type": "number" + } + }, + "required": [ + "longUsd", + "shortUsd" + ] + }, + "maxLeverage": { + "type": "number" + }, + "additionalData": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "actions": { + "type": "object", + "properties": { + "setup": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + }, + "openPosition": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + }, + "closePosition": { + "type": "object", + "properties": { + "blinkUrl": { + "type": "string", + "pattern": "^blink:.*" + } + }, + "required": [ + "blinkUrl" + ] + } + } + } + }, + "required": [ + "id", + "type", + "productName", + "provider", + "tokenA", + "tokenB", + "liquidity", + "maxLeverage", + "actions" + ] } - }, - "/v0/positions/owners": { + } + }, + "openapi": "3.1.1", + "paths": { + "/v0/markets": { "get": { - "operationId": "positionsV0Api.positionsByOwners", - "summary": "List all market positions by wallet address", - "description": "Returns position data for supported protocols, such as Jupiter, Kamino, MarginFi, Lulo and many more. For more information, please check our [Protocol Support Roadmap](/markets/supported-protocols).", - "tags": ["Positions"], + "operationId": "markets-positions.marketsV0Api.listMarkets", + "summary": "List all markets", + "description": "Supported providers: MarginFi Lending, Kamino Lending, Kamino Multiply, Kamino Leverage, Lulo.", + "tags": [ + "Markets" + ], "parameters": [ { - "name": "walletAddresses", + "name": "type", "in": "query", - "required": true, "schema": { "type": "string", - "description": "Comma separated list of owner addresses. Currently only supports one address.", - "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176", - "example": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" - } + "description": "Comma separated list of market types (`lending`, `yield`, `loop`, `perpetual`, `prediction`)." + }, + "allowEmptyValue": true, + "allowReserved": true }, { - "name": "bundleIds", + "name": "provider", "in": "query", - "required": false, "schema": { "type": "string", - "description": "Comma separated list of bundle IDs. Currently only supports one bundle ID." - } + "description": "Comma separated list of provider IDs (`marginfi`, `kamino`, `lulo`, `jupiter`, `defituna`, `carrot`, `dflow`)." + }, + "allowEmptyValue": true, + "allowReserved": true }, { - "name": "type", + "name": "asset", "in": "query", - "required": false, "schema": { "type": "string", - "description": "Comma separated list of position types (`lending`, `yield`, `loop`, `reward`, `prediction`). Currently only supports one position type. If no position type is specified, all position types are returned." + "description": "Filter by token mint address (comma-separated). Not supported for prediction markets. Requires an explicit type filter that excludes prediction (e.g. type=lending,yield,loop,perpetual)." + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "description": "Cursor for pagination" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200, + "default": 50, + "description": "Number of markets to return (default: 50, max: 200)" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "filters", + "in": "query", + "schema": { + "type": "string", + "description": "URL-encoded JSON object for filtering. For prediction markets: {\"prediction\":{\"status\":\"open\"|\"closed\"|\"settled\"}} or {\"prediction\":{\"status\":[\"open\",\"closed\"]}}. Accepts single status or array. Default status is \"open\" for prediction markets." }, "allowEmptyValue": true, "allowReserved": true @@ -2858,744 +1363,500 @@ "schema": { "type": "object", "properties": { - "positions": { + "markets": { "type": "array", "items": { "anyOf": [ { - "title": "Lending Position with Market", + "$ref": "#/components/schemas/LendingMarket" + }, + { + "$ref": "#/components/schemas/YieldMarket" + }, + { + "$ref": "#/components/schemas/LoopMarket" + }, + { + "$ref": "#/components/schemas/PerpetualMarket" + }, + { "type": "object", "properties": { "id": { "type": "string" }, "type": { - "const": "lending" + "const": "prediction" }, - "marketId": { - "type": "string" + "provider": { + "type": "object", + "properties": { + "id": { + "enum": [ + "kamino", + "lulo", + "marginfi", + "jupiter", + "defituna", + "carrot", + "dflow" + ] + }, + "name": { + "type": "string" + }, + "icon": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "icon" + ] }, - "ownerAddress": { - "type": "string" + "websiteUrl": { + "type": "string", + "format": "uri" }, "bundleId": { "type": "string", "description": "Identifier for positions bundled into one logical structure, such as position or market" }, - "side": { - "enum": ["deposit", "borrow"] + "title": { + "type": "string" + }, + "subtitle": { + "type": "string" + }, + "status": { + "enum": [ + "open", + "closed", + "settled" + ] + }, + "result": { + "type": "string" + }, + "volume": { + "type": "number" + }, + "openInterest": { + "type": "number" }, - "amount": { + "yesBid": { "type": "number" }, - "amountUsd": { + "noBid": { "type": "number" }, - "ltv": { - "type": "number", - "minimum": 0, - "maximum": 100, - "description": "Current Loan-to-Value of the position, expressed as a percentage ratio of deposited value" + "yesAsk": { + "type": "number" }, - "liquidationPrice": { - "type": "number", - "description": "Deposited token price expressed in borrowed token units at which the position becomes liquidatable" + "noAsk": { + "type": "number" }, - "rewards": { - "type": "array", - "items": { - "type": "object", - "properties": { - "tokenAddress": { - "type": "string" - }, - "amount": { - "type": "number" - }, - "amountUsd": { - "type": "number" - } - }, - "required": ["tokenAddress", "amount"] - } + "openTime": { + "type": "number" }, - "additionalData": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": true + "closeTime": { + "type": "number" }, - "actions": { + "expirationTime": { + "type": "number" + }, + "yesToken": { "type": "object", "properties": { - "deposit": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] + "address": { + "type": "string" }, - "withdraw": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] + "symbol": { + "type": "string" }, - "borrow": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" + "decimals": { + "type": "number" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" } - }, - "required": ["blinkUrl"] + ] }, - "repay": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" } - }, - "required": ["blinkUrl"] + ] } - } + }, + "required": [ + "address", + "symbol", + "decimals", + "icon", + "name" + ] }, - "market": { + "noToken": { "type": "object", "properties": { - "id": { + "address": { "type": "string" }, - "type": { - "const": "lending" - }, - "productName": { + "symbol": { "type": "string" }, - "provider": { - "type": "object", - "properties": { - "id": { - "enum": [ - "kamino", - "lulo", - "marginfi", - "jupiter", - "defituna", - "carrot" - ] - }, - "name": { - "type": "string" - }, - "icon": { - "type": "string" - } - }, - "required": ["id", "name", "icon"] + "decimals": { + "type": "number" }, - "token": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { + "icon": { + "anyOf": [ + { "type": "string" }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + { + "type": "null" } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" ] }, - "websiteUrl": { - "type": "string", - "format": "uri" - }, - "depositApy": { - "type": "number", - "description": "Total APY **including** rewards" - }, - "baseDepositApy": { - "type": "number", - "description": "APY excluding rewards" - }, - "baseDepositApy30d": { - "type": "number", - "description": "30-day average APY excluding rewards" - }, - "baseDepositApy90d": { - "type": "number", - "description": "90-day average APY excluding rewards" - }, - "baseDepositApy180d": { - "type": "number", - "description": "180-day average APY excluding rewards" - }, - "borrowApy": { - "type": "number", - "description": "Total APY **including** rewards" - }, - "baseBorrowApy": { - "type": "number", - "description": "APY excluding rewards" - }, - "baseBorrowApy30d": { - "type": "number", - "description": "30-day average APY excluding rewards" - }, - "baseBorrowApy90d": { - "type": "number", - "description": "90-day average APY excluding rewards" - }, - "baseBorrowApy180d": { - "type": "number", - "description": "180-day average APY excluding rewards" - }, - "totalDeposit": { - "type": "number" - }, - "totalDepositUsd": { - "type": "number" - }, - "totalBorrow": { - "type": "number" - }, - "totalBorrowUsd": { - "type": "number" - }, - "maxDeposit": { - "type": "number" - }, - "maxBorrow": { - "type": "number" - }, - "maxLtv": { - "type": "number", - "minimum": 0, - "maximum": 100, - "description": "Maximum Loan-to-Value allowed when borrowing, expressed as a percentage of deposited value" - }, - "liquidationLtv": { - "type": "number", - "minimum": 0, - "maximum": 100, - "description": "Loan-to-Value percentage ratio of deposited value at which the position becomes liquidatable" - }, - "liquidationPenalty": { - "type": "number", - "minimum": 0, - "maximum": 100, - "description": "Percentage ratio of deposited value taken as a penalty and given to liquidators when position is liquidated" - }, - "rewards": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "const": "deposit" - }, - "apy": { - "type": "number" - }, - "token": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "marketAction": { - "type": "string" - } - }, - "required": [ - "type", - "apy", - "token", - "marketAction" - ], - "title": "Deposit Reward", - "description": "Reward for depositing" - }, - { - "type": "object", - "properties": { - "type": { - "const": "borrow" - }, - "apy": { - "type": "number" - }, - "token": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "marketAction": { - "type": "string" - } - }, - "required": [ - "type", - "apy", - "token", - "marketAction" - ], - "title": "Borrow Reward", - "description": "Reward for borrowing" - } - ] - } - }, - "additionalData": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": true - }, - "actions": { - "type": "object", - "properties": { - "deposit": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "withdraw": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "claimRewards": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "borrow": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "repay": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] + "name": { + "anyOf": [ + { + "type": "string" }, - "repayWithCollateral": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] + { + "type": "null" } - } + ] } }, "required": [ - "id", - "type", - "provider", - "token", - "depositApy", - "baseDepositApy", - "borrowApy", - "baseBorrowApy", - "totalDeposit", - "totalBorrow", - "maxDeposit", - "maxBorrow", - "actions" + "address", + "symbol", + "decimals", + "icon", + "name" ] + }, + "additionalData": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} } }, "required": [ "id", "type", - "marketId", - "ownerAddress", - "side", - "amount", - "market" + "provider", + "title", + "status" ] - }, - { - "title": "Yield Position with Market", + } + ] + } + }, + "cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Cursor for the next page, null if no more results" + } + }, + "required": [ + "markets", + "cursor" + ] + } + } + } + } + } + } + }, + "/v0/marketsByType": { + "get": { + "operationId": "markets-positions.marketsV0Api.listMarketsGroupedByType", + "summary": "List all markets grouped by type", + "description": "Supported providers: MarginFi Lending, Kamino Lending, Kamino Multiply, Kamino Leverage, Lulo. Temporarily without `prediction` type.", + "tags": [ + "Markets" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "lending": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LendingMarket" + } + }, + "yield": { + "type": "array", + "items": { + "$ref": "#/components/schemas/YieldMarket" + } + }, + "loop": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LoopMarket" + } + }, + "perpetual": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PerpetualMarket" + } + } + }, + "required": [ + "lending", + "yield", + "loop", + "perpetual" + ] + } + } + } + } + } + } + }, + "/v0/markets/history": { + "get": { + "operationId": "markets-positions.marketsV0Api.marketsHistory", + "summary": "Get historical market snapshots", + "description": "Fetch market snapshots within a time range for one or more markets. Optionally interpolate to a uniform time grid.", + "tags": [ + "Markets" + ], + "parameters": [ + { + "name": "marketIds", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "Comma separated list of market IDs." + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "startTime", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "date-time", + "x-native-type": "date", + "description": "Start time of the snapshot. Date or datetime in RFC 3339 format" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "endTime", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "x-native-type": "date", + "description": "End time of the snapshot. Date or datetime in RFC 3339 format. Defaults to current time if not provided" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "resolution", + "in": "query", + "required": false, + "schema": { + "enum": [ + "1h", + "1d" + ] + }, + "style": "deepObject", + "explode": true, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "markets": { + "type": "array", + "items": { "type": "object", "properties": { "id": { "type": "string" }, - "type": { - "const": "yield" - }, - "marketId": { - "type": "string" - }, - "ownerAddress": { - "type": "string" - }, - "amount": { - "type": "number" - }, - "amountUsd": { - "type": "number" - }, - "rewards": { + "history": { "type": "array", "items": { "type": "object", "properties": { - "tokenAddress": { - "type": "string" - }, - "amount": { - "type": "number" - }, - "amountUsd": { - "type": "number" - } - }, - "required": ["tokenAddress", "amount"] - } - }, - "additionalData": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": true - }, - "market": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "const": "yield" - }, - "productName": { - "type": "string" - }, - "provider": { - "type": "object", - "properties": { - "id": { - "enum": [ - "kamino", - "lulo", - "marginfi", - "jupiter", - "defituna", - "carrot" - ] - }, - "name": { - "type": "string" - }, - "icon": { - "type": "string" - } - }, - "required": ["id", "name", "icon"] - }, - "token": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } + "timestamp": { + "type": "string", + "format": "date-time", + "x-native-type": "date" }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "websiteUrl": { - "type": "string", - "format": "uri" - }, - "depositApy": { - "type": "number" - }, - "baseDepositApy": { - "type": "number" - }, - "baseDepositApy30d": { - "type": "number", - "description": "30-day average APY excluding rewards" - }, - "baseDepositApy90d": { - "type": "number", - "description": "90-day average APY excluding rewards" - }, - "baseDepositApy180d": { - "type": "number", - "description": "180-day average APY excluding rewards" - }, - "totalDeposit": { - "type": "number", - "description": "Total amount deposited in the vault" - }, - "totalDepositUsd": { - "type": "number", - "description": "Total value of deposits in USD" - }, - "rewards": { - "type": "array", - "description": "Available rewards for this yield market", - "items": { - "type": "object", - "properties": { - "type": { - "const": "deposit" - }, - "apy": { + "depositApy": { + "anyOf": [ + { "type": "number" }, - "token": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "marketAction": { - "type": "string" + { + "type": "null" } - }, - "required": [ - "type", - "apy", - "token", - "marketAction" ] - } - }, - "additionalData": { - "type": "object", - "propertyNames": { - "type": "string" }, - "additionalProperties": true - }, - "actions": { - "type": "object", - "properties": { - "deposit": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "withdraw": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "withdrawComplete": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } + "totalDeposit": { + "anyOf": [ + { + "type": "number" }, - "required": ["blinkUrl"] - }, - "claimRewards": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } + { + "type": "null" + } + ] + }, + "totalDepositUsd": { + "anyOf": [ + { + "type": "number" }, - "required": ["blinkUrl"] - } + { + "type": "null" + } + ] } - } - }, - "required": [ - "id", - "type", - "provider", - "token", - "depositApy", - "baseDepositApy", - "actions" - ] + }, + "required": [ + "timestamp" + ] + } } }, "required": [ "id", - "type", - "marketId", - "ownerAddress", - "amount", - "market" + "history" ] + } + } + }, + "required": [ + "markets" + ] + } + }, + "required": [ + "data" + ] + } + } + } + } + } + } + }, + "/v0/positions/owners": { + "get": { + "operationId": "markets-positions.positionsV0Api.positionsByOwners", + "summary": "List all market positions by wallet address", + "description": "Supported providers & markets: Kamino Lending, Lulo.", + "tags": [ + "Positions" + ], + "parameters": [ + { + "name": "walletAddresses", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "Comma separated list of owner addresses. Currently only supports one address.", + "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "bundleIds", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "Comma separated list of bundle IDs. Currently only supports one bundle ID." + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "type", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "Comma separated list of position types (`lending`, `yield`, `loop`, `reward`, `prediction`). Currently only supports one position type. If no position type is specified, all position types are returned." + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "positions": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/LendingPositionWithMarket" + }, + { + "$ref": "#/components/schemas/YieldPositionWithMarket" }, { - "title": "Loop Position with Market", "type": "object", "properties": { "id": { @@ -3623,7 +1884,7 @@ "propertyNames": { "type": "string" }, - "additionalProperties": true + "additionalProperties": {} }, "amount": { "type": "number", @@ -3650,7 +1911,7 @@ "ltv": { "type": "number", "minimum": 0, - "maximum": 100, + "maximum": 1, "description": "Current Loan-to-Value before either full/partial liquidation commences (depending on the provider), expressed as a percentage ratio of deposited value" }, "liquidationPrice": { @@ -3663,190 +1924,7 @@ "description": "Current leverage of the position, expressed as a multiplier" }, "market": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "const": "loop" - }, - "productName": { - "type": "string" - }, - "provider": { - "type": "object", - "properties": { - "id": { - "enum": [ - "kamino", - "lulo", - "marginfi", - "jupiter", - "defituna", - "carrot" - ] - }, - "name": { - "type": "string" - }, - "icon": { - "type": "string" - } - }, - "required": ["id", "name", "icon"] - }, - "tokenA": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "tokenB": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "icon": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "address", - "symbol", - "decimals", - "icon" - ] - }, - "websiteUrl": { - "type": "string", - "format": "uri" - }, - "depositApy": { - "type": "number" - }, - "depositApy30d": { - "type": "number", - "description": "30-day average deposit APY" - }, - "depositApy90d": { - "type": "number", - "description": "90-day average deposit APY" - }, - "depositApy180d": { - "type": "number", - "description": "180-day average deposit APY" - }, - "maxLeverage": { - "type": "number", - "description": "Maximum leverage allowed when depositing, expressed as a multiplier" - }, - "maxLtv": { - "type": "number", - "minimum": 0, - "maximum": 100, - "description": "Maximum Loan-to-Value before either full/partial liquidation commences (depending on the provider), expressed as a percentage ratio of deposited value" - }, - "liquidationLtv": { - "type": "number", - "minimum": 0, - "maximum": 100, - "description": "Loan-to-Value percentage ratio of deposited value at which the position becomes liquidatable, fully or partially." - }, - "additionalData": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": true - }, - "actions": { - "type": "object", - "properties": { - "setup": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "deposit": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - }, - "withdraw": { - "type": "object", - "properties": { - "blinkUrl": { - "type": "string", - "pattern": "^blink:.*" - } - }, - "required": ["blinkUrl"] - } - }, - "additionalProperties": true - } - }, - "required": [ - "id", - "type", - "provider", - "tokenA", - "tokenB", - "depositApy", - "maxLeverage", - "maxLtv", - "liquidationLtv", - "actions" - ] + "$ref": "#/components/schemas/LoopMarket" } }, "required": [ @@ -3861,7 +1939,6 @@ ] }, { - "title": "Reward Position", "type": "object", "properties": { "id": { @@ -3926,23 +2003,44 @@ ] }, "side": { - "enum": ["deposit", "borrow"] + "enum": [ + "deposit", + "borrow" + ] } }, - "required": ["type"] + "required": [ + "type" + ] }, "additionalData": { "type": "object", "propertyNames": { "type": "string" }, - "additionalProperties": true + "additionalProperties": {} }, "amount": { "type": "number" }, "amountUsd": { "type": "number" + }, + "market": { + "anyOf": [ + { + "$ref": "#/components/schemas/LendingMarket" + }, + { + "$ref": "#/components/schemas/YieldMarket" + }, + { + "$ref": "#/components/schemas/LoopMarket" + }, + { + "$ref": "#/components/schemas/PerpetualMarket" + } + ] } }, "required": [ @@ -3955,7 +2053,6 @@ ] }, { - "title": "Prediction Position", "type": "object", "properties": { "id": { @@ -4016,14 +2113,17 @@ ] }, "side": { - "enum": ["yes", "no"] + "enum": [ + "yes", + "no" + ] }, "additionalData": { "type": "object", "propertyNames": { "type": "string" }, - "additionalProperties": true + "additionalProperties": {} }, "amount": { "type": "number" @@ -4037,6 +2137,64 @@ "costBasisAvg": { "type": "number" }, + "pnl": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "realized": { + "type": "number" + }, + "unrealized": { + "type": "number" + }, + "realizedLifetime": { + "type": "number" + }, + "totalLifetime": { + "type": "number" + }, + "unrealizedPct": { + "type": "number" + }, + "capital": { + "type": "object", + "properties": { + "invested": { + "type": "number", + "description": "Sum of all buy costs within the active position" + }, + "investedLifetime": { + "type": "number", + "description": "Sum of all buy costs across all re-entries for this market" + }, + "netFlow": { + "type": "number", + "description": "Net capital flow within the active position: sell proceeds minus buy costs. Negative means own capital is still locked in the position; positive means the initial investment has been fully recouped with additional realized returns" + }, + "netFlowLifetime": { + "type": "number", + "description": "Net capital flow across all re-entries for this market: sell proceeds minus buy costs. Negative means own capital is still locked in the position; positive means the initial investment has been fully recouped with additional realized returns" + } + }, + "required": [ + "invested", + "investedLifetime", + "netFlow", + "netFlowLifetime" + ] + } + }, + "required": [ + "total", + "realized", + "unrealized", + "realizedLifetime", + "totalLifetime", + "unrealizedPct" + ] + }, "market": { "type": "object", "properties": { @@ -4067,7 +2225,11 @@ "type": "string" } }, - "required": ["id", "name", "icon"] + "required": [ + "id", + "name", + "icon" + ] }, "websiteUrl": { "type": "string", @@ -4084,7 +2246,11 @@ "type": "string" }, "status": { - "enum": ["open", "closed", "settled"] + "enum": [ + "open", + "closed", + "settled" + ] }, "result": { "type": "string" @@ -4203,7 +2369,7 @@ "propertyNames": { "type": "string" }, - "additionalProperties": true + "additionalProperties": {} } }, "required": [ @@ -4229,115 +2395,227 @@ } } }, - "required": ["positions"] - }, - "example": { - "positions": [ - { - "id": "string", - "type": "lending", - "marketId": "string", - "ownerAddress": "string", - "bundleId": "string", - "websiteUrl": "string", - "side": "deposit", - "rewards": [ - { - "tokenAddress": "string", - "amount": 1, - "amountUsd": 1 - } - ], - "additionalData": { - "propertyName*": "anything" - }, - "actions": { - "deposit": { - "blinkUrl": "string" - }, - "withdraw": { - "blinkUrl": "string" - }, - "borrow": { - "blinkUrl": "string" - }, - "repay": { - "blinkUrl": "string" - } - }, - "amount": 1, - "amountUsd": 1, - "ltv": 0, - "liquidationPrice": 1, - "market": { - "id": "string", - "type": "lending", - "provider": { - "id": "kamino", - "name": "string", - "icon": "string" - }, - "token": { - "address": "string", - "symbol": "string", - "decimals": 1, - "icon": "string" - }, - "borrowToken": { - "address": "string", - "symbol": "string", - "decimals": 1, - "icon": "string" - }, - "websiteUrl": "string", - "depositApy": 1, - "baseDepositApy": 1, - "baseDepositApy30d": 1, - "baseDepositApy90d": 1, - "baseDepositApy180d": 1, - "borrowApy": 1, - "baseBorrowApy": 1, - "baseBorrowApy30d": 1, - "baseBorrowApy90d": 1, - "baseBorrowApy180d": 1, - "totalDeposit": 1, - "totalDepositUsd": 1, - "totalBorrow": 1, - "totalBorrowUsd": 1, - "maxDeposit": 1, - "maxBorrow": 1, - "rewards": [ - { - "type": "deposit", - "apy": 1, - "token": { - "address": "string", - "symbol": "string", - "decimals": 1, - "icon": "string" + "required": [ + "positions" + ] + } + } + } + } + } + } + }, + "/v0/positions/history": { + "get": { + "operationId": "markets-positions.positionsV0Api.positionsHistory", + "summary": "Get historical position snapshots", + "description": "Fetch position snapshots within a time range for a wallet address. Optionally interpolate using Birdeye price data.", + "tags": [ + "Positions" + ], + "parameters": [ + { + "name": "walletAddress", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "Wallet address to fetch position history for", + "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "startTime", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "date-time", + "x-native-type": "date", + "description": "Start time of the snapshot. Date or datetime in RFC 3339 format", + "default": "2026-01-01T00:00:00Z" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "endTime", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "x-native-type": "date", + "description": "End time of the snapshot. Date or datetime in RFC 3339 format. Defaults to current time if not provided", + "default": "2026-01-31T23:59:59Z" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "positionIds", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "Comma separated list of position IDs." + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "resolution", + "in": "query", + "required": false, + "schema": { + "enum": [ + "1m", + "5m", + "1h", + "1d" + ], + "description": "Time resolution for aggregating snapshots", + "default": "1h" + }, + "style": "deepObject", + "explode": true, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "positions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "providerId": { + "enum": [ + "kamino", + "lulo", + "marginfi", + "jupiter", + "defituna", + "carrot", + "dflow" + ] + }, + "type": { + "enum": [ + "lending", + "yield", + "loop", + "reward", + "prediction" + ] + }, + "marketId": { + "type": "string" + }, + "history": { + "type": "array", + "items": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "amount": { + "type": "number" + }, + "amountUsd": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "amountTokenA": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "amountTokenAUsd": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "amountTokenB": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "amountTokenBUsd": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "timestamp", + "amount", + "amountUsd" + ] + } + } }, - "marketAction": "string" - } - ], - "maxLtv": 0, - "liquidationLtv": 0, - "liquidationPenalty": 0, - "additionalData": { - "propertyName*": "anything" - }, - "actions": { - "deposit": { - "blinkUrl": "string" - }, - "withdraw": { - "blinkUrl": "string" - }, - "claimRewards": { - "blinkUrl": "string" + "required": [ + "id", + "providerId", + "type", + "marketId", + "history" + ] } } - } + }, + "required": [ + "positions" + ] } + }, + "required": [ + "data" ] } } @@ -4348,10 +2626,12 @@ }, "/v0/positions/pnl": { "get": { - "operationId": "positionsV0Api.positionsPnl", + "operationId": "markets-positions.positionsV0Api.positionsPnl", "summary": "Get PnL data for wallet positions", "description": "Computes realized and unrealized PnL for all pnl-able positions (currently DFlow prediction only), including closed positions.", - "tags": ["Positions"], + "tags": [ + "Positions" + ], "parameters": [ { "name": "walletAddresses", @@ -4360,9 +2640,10 @@ "schema": { "type": "string", "description": "Comma separated list of owner addresses. Currently only supports one address.", - "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176", - "example": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" - } + "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" + }, + "allowEmptyValue": true, + "allowReserved": true } ], "responses": { @@ -4399,7 +2680,6 @@ }, "positions": { "type": "array", - "description": "List of positions that contribute to PnL calculations. Each position is a separate entry.", "items": { "type": "object", "properties": { @@ -4452,7 +2732,12 @@ "description": "Net capital flow across all re-entries for this market: sell proceeds minus buy costs. Negative means own capital is still locked in the position; positive means the initial investment has been fully recouped with additional realized returns" } }, - "required": ["invested", "investedLifetime", "netFlow", "netFlowLifetime"] + "required": [ + "invested", + "investedLifetime", + "netFlow", + "netFlowLifetime" + ] } }, "required": [ @@ -4464,7 +2749,8 @@ "realizedLifetime", "totalLifetime" ] - } + }, + "description": "List of positions that contribute to PnL calculations. Each position is a separate entry." } }, "required": [ @@ -4484,20 +2770,7 @@ } } }, - "security": [ - { - "clientKey": [] - } - ], - "components": { - "securitySchemes": { - "clientKey": { - "type": "apiKey", - "name": "x-dialect-client-key", - "in": "header", - "description": "Client key for the Markets API", - "x-default": "pk_demo" - } - } + "x-mcp": { + "enabled": true } }