From 236b45e2c11c8fd6e0c9171126d496eeb2713961 Mon Sep 17 00:00:00 2001 From: bjoerndotsol <69760194+bjoerndotsol@users.noreply.github.com> Date: Thu, 12 Mar 2026 09:20:24 +0000 Subject: [PATCH] chore: update openapi specs for deficarrot,defituna lulo,marginfi --- openapi/deficarrot.json | 145 ++++--- openapi/defituna.json | 135 +++++-- openapi/lulo.json | 30 +- openapi/marginfi.json | 842 ++++++++++++++++++++-------------------- 4 files changed, 625 insertions(+), 527 deletions(-) diff --git a/openapi/deficarrot.json b/openapi/deficarrot.json index 3ce1996..2b34010 100644 --- a/openapi/deficarrot.json +++ b/openapi/deficarrot.json @@ -12,8 +12,8 @@ "paths": { "/v0/crt/mint/{poolToken}": { "get": { - "operationId": "mint.getMintBlink", - "summary": "Get mint blink", + "operationId": "deficarrot.mint.getMintBlink", + "summary": "Mint", "description": "Get a blink for mint operations", "tags": [ "Earn" @@ -26,15 +26,11 @@ "schema": { "type": "string", "description": "Supported token address or label", - "examples": [ - "PYUSD", - "USDT", - "USDC", - "2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo", - "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", - "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" - ] - } + "default": "PYUSD", + "example": "PYUSD" + }, + "x-default": "PYUSD", + "example": "PYUSD" } ], "responses": { @@ -124,11 +120,14 @@ } } } + }, + "x-mint": { + "href": "api-reference/deficarrot/earn/mint-get" } }, "post": { - "operationId": "mint.mint", - "summary": "Mint operation", + "operationId": "deficarrot.mint.mint", + "summary": "Mint", "description": "Execute a mint operation", "tags": [ "Earn" @@ -141,17 +140,11 @@ "schema": { "type": "string", "description": "Supported token address or label", - "example": "USDC", - "default": "USDC", - "examples": [ - "USDC", - "PYUSD", - "USDT", - "2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo", - "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", - "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" - ] - } + "default": "PYUSD", + "example": "PYUSD" + }, + "x-default": "PYUSD", + "example": "PYUSD" }, { "name": "percentage", @@ -163,7 +156,11 @@ "description": "The percentage of funds to use (alternative to amount)", "default": 10, "example": 10 - } + }, + "allowEmptyValue": true, + "allowReserved": true, + "x-default": 10, + "example": 10 }, { "name": "amount", @@ -172,7 +169,9 @@ "type": "number", "minimum": 0, "description": "The amount to use. Human-readable value, e.g. 0.1 USDC" - } + }, + "allowEmptyValue": true, + "allowReserved": true } ], "requestBody": { @@ -187,29 +186,20 @@ "enum": [ "transaction" ], - "example": "transaction", - "default": "transaction" + "default": "transaction", + "example": "transaction" }, "account": { "type": "string", "description": "The public key of the account that executes the transaction", - "example": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176", - "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" + "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176", + "example": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" } }, "required": [ "type", "account" ] - }, - "examples": { - "mint": { - "summary": "Mint transaction", - "value": { - "type": "transaction", - "account": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" - } - } } } } @@ -268,13 +258,16 @@ } } } + }, + "x-mint": { + "href": "api-reference/deficarrot/earn/mint-post" } } }, "/v0/crt/redeem/{poolToken}": { "get": { - "operationId": "redeem.getRedeemBlink", - "summary": "Get redeem blink", + "operationId": "deficarrot.redeem.getRedeemBlink", + "summary": "Redeem", "description": "Get a blink for redeem operations. Please note that the amount you redeem will be the amount of the stable coin you input, not the amount of the CRT token you will receive. Also there might be a small difference in the amount you receive due to the price of the stable coin and the CRT token and a withdrawal fee. Please check protocol documentation for more details.", "tags": [ "Earn" @@ -287,15 +280,11 @@ "schema": { "type": "string", "description": "Supported token address or label", - "examples": [ - "PYUSD", - "USDT", - "USDC", - "2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo", - "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", - "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" - ] - } + "default": "PYUSD", + "example": "PYUSD" + }, + "x-default": "PYUSD", + "example": "PYUSD" } ], "responses": { @@ -385,11 +374,14 @@ } } } + }, + "x-mint": { + "href": "api-reference/deficarrot/earn/redeem-get" } }, "post": { - "operationId": "redeem.redeem", - "summary": "Redeem operation", + "operationId": "deficarrot.redeem.redeem", + "summary": "Redeem", "description": "Execute a redeem operation", "tags": [ "Earn" @@ -402,17 +394,11 @@ "schema": { "type": "string", "description": "Supported token address or label", - "example": "USDC", - "default": "USDC", - "examples": [ - "USDC", - "PYUSD", - "USDT", - "2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo", - "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", - "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" - ] - } + "default": "PYUSD", + "example": "PYUSD" + }, + "x-default": "PYUSD", + "example": "PYUSD" }, { "name": "percentage", @@ -424,7 +410,11 @@ "description": "The percentage of funds to use (alternative to amount)", "default": 10, "example": 10 - } + }, + "allowEmptyValue": true, + "allowReserved": true, + "x-default": 10, + "example": 10 }, { "name": "amount", @@ -433,7 +423,9 @@ "type": "number", "minimum": 0, "description": "The amount to use. Human-readable value, e.g. 0.1 USDC" - } + }, + "allowEmptyValue": true, + "allowReserved": true } ], "requestBody": { @@ -448,29 +440,20 @@ "enum": [ "transaction" ], - "example": "transaction", - "default": "transaction" + "default": "transaction", + "example": "transaction" }, "account": { "type": "string", "description": "The public key of the account that executes the transaction", - "example": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176", - "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" + "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176", + "example": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" } }, "required": [ "type", "account" ] - }, - "examples": { - "redeem": { - "summary": "Redeem transaction", - "value": { - "type": "transaction", - "account": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" - } - } } } } @@ -529,8 +512,14 @@ } } } + }, + "x-mint": { + "href": "api-reference/deficarrot/earn/redeem-post" } } } + }, + "x-mcp": { + "enabled": true } } diff --git a/openapi/defituna.json b/openapi/defituna.json index 741a00a..017fdd3 100644 --- a/openapi/defituna.json +++ b/openapi/defituna.json @@ -1,10 +1,6 @@ { - "openapi": "3.1.0", - "x-mcp": { - "enabled": true - }, "info": { - "title": "DeFiTuna Blinks", + "title": "Defituna Blinks API", "version": "0.0.1" }, "servers": [ @@ -12,10 +8,11 @@ "url": "https://defituna.dial.to/api" } ], + "openapi": "3.1.1", "paths": { "/v0/lend/{poolToken}/deposit": { "get": { - "operationId": "v0.getLendDepositBlink", + "operationId": "defituna.v0.getLendDepositBlink", "summary": "Lend Deposit", "description": "Get metadata for depositing a token into DeFiTuna.", "tags": [ @@ -30,10 +27,10 @@ "type": "string", "description": "Token mint address", "default": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", - "x-example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" + "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" }, - "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", - "x-default": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" + "x-default": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", + "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" } ], "responses": { @@ -65,7 +62,10 @@ "type": "object", "properties": { "type": { - "const": "transaction" + "enum": [ + "transaction", + "external-link" + ] }, "href": { "type": "string" @@ -120,10 +120,13 @@ } } } + }, + "x-mint": { + "href": "api-reference/defituna/lend/deposit-get" } }, "post": { - "operationId": "v0.lendDeposit", + "operationId": "defituna.v0.lendDeposit", "summary": "Lend Deposit", "description": "Generate a transaction for depositing a token into DeFiTuna.", "tags": [ @@ -138,10 +141,10 @@ "type": "string", "description": "Token mint address", "default": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", - "x-example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" + "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" }, - "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", - "x-default": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" + "x-default": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", + "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" }, { "name": "percentage", @@ -155,7 +158,9 @@ "example": 10 }, "allowEmptyValue": true, - "allowReserved": true + "allowReserved": true, + "x-default": 10, + "example": 10 }, { "name": "amount", @@ -212,6 +217,37 @@ }, "transaction": { "type": "string" + }, + "links": { + "type": "object", + "properties": { + "next": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "href": { + "type": "string" + } + }, + "required": [ + "type", + "href" + ] + } + }, + "required": [ + "next" + ] + }, + "dialectExperimental": { + "type": "object", + "properties": { + "reference": { + "type": "string" + } + } } }, "required": [ @@ -222,12 +258,15 @@ } } } + }, + "x-mint": { + "href": "api-reference/defituna/lend/deposit-post" } } }, "/v0/lend/{poolToken}/withdraw": { "get": { - "operationId": "v0.getLendWithdrawBlink", + "operationId": "defituna.v0.getLendWithdrawBlink", "summary": "Lend Withdraw", "description": "Get metadata for withdrawing a token from DeFiTuna.", "tags": [ @@ -242,10 +281,10 @@ "type": "string", "description": "Token mint address", "default": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", - "x-example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" + "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" }, - "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", - "x-default": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" + "x-default": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", + "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" } ], "responses": { @@ -277,7 +316,10 @@ "type": "object", "properties": { "type": { - "const": "transaction" + "enum": [ + "transaction", + "external-link" + ] }, "href": { "type": "string" @@ -332,10 +374,13 @@ } } } + }, + "x-mint": { + "href": "api-reference/defituna/lend/withdraw-get" } }, "post": { - "operationId": "v0.lendWithdraw", + "operationId": "defituna.v0.lendWithdraw", "summary": "Lend Withdraw", "description": "Generate a transaction for withdrawing a token from DeFiTuna.", "tags": [ @@ -350,10 +395,10 @@ "type": "string", "description": "Token mint address", "default": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", - "x-example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" + "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" }, - "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", - "x-default": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" + "x-default": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", + "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" }, { "name": "percentage", @@ -367,7 +412,9 @@ "example": 10 }, "allowEmptyValue": true, - "allowReserved": true + "allowReserved": true, + "x-default": 10, + "example": 10 }, { "name": "amount", @@ -424,6 +471,37 @@ }, "transaction": { "type": "string" + }, + "links": { + "type": "object", + "properties": { + "next": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "href": { + "type": "string" + } + }, + "required": [ + "type", + "href" + ] + } + }, + "required": [ + "next" + ] + }, + "dialectExperimental": { + "type": "object", + "properties": { + "reference": { + "type": "string" + } + } } }, "required": [ @@ -434,11 +512,14 @@ } } } + }, + "x-mint": { + "href": "api-reference/defituna/lend/withdraw-post" } } } }, - "components": { - "schemas": {} + "x-mcp": { + "enabled": true } } diff --git a/openapi/lulo.json b/openapi/lulo.json index 6dc6bf5..a483695 100644 --- a/openapi/lulo.json +++ b/openapi/lulo.json @@ -12,7 +12,7 @@ "paths": { "/v0/deposit/{token}/{type}": { "get": { - "operationId": "v0.deposit.getDepositTokenBlink", + "operationId": "lulo.v0.deposit.getDepositTokenBlink", "summary": "Deposit", "description": "Get metadata for depositing a token into Lulo.", "tags": [ @@ -133,10 +133,13 @@ } } } + }, + "x-mint": { + "href": "api-reference/lulo/deposit/deposit-get" } }, "post": { - "operationId": "v0.deposit.depositToken", + "operationId": "lulo.v0.deposit.depositToken", "summary": "Deposit", "description": "Generate a transaction for depositing a token into Lulo.", "tags": [ @@ -253,12 +256,15 @@ } } } + }, + "x-mint": { + "href": "api-reference/lulo/deposit/deposit-post" } } }, "/v0/withdraw/{token}/{type}": { "get": { - "operationId": "v0.withdraw.getWithdrawTokenBlink", + "operationId": "lulo.v0.withdraw.getWithdrawTokenBlink", "summary": "Withdraw", "description": "Get metadata for withdrawing a token from Lulo.", "tags": [ @@ -379,10 +385,13 @@ } } } + }, + "x-mint": { + "href": "api-reference/lulo/withdraw/withdraw-get" } }, "post": { - "operationId": "v0.withdraw.withdrawToken", + "operationId": "lulo.v0.withdraw.withdrawToken", "summary": "Withdraw", "description": "Generate a transaction for withdrawing a token from Lulo.", "tags": [ @@ -499,12 +508,15 @@ } } } + }, + "x-mint": { + "href": "api-reference/lulo/withdraw/withdraw-post" } } }, "/v0/withdraw/{token}/regular/complete": { "get": { - "operationId": "v0.withdraw.getCompleteRegularWithdrawalBlink", + "operationId": "lulo.v0.withdraw.getCompleteRegularWithdrawalBlink", "summary": "Complete Regular Withdrawal", "description": "Get metadata for withdrawing a token from Lulo Regular after cooldown period.", "tags": [ @@ -609,10 +621,13 @@ } } } + }, + "x-mint": { + "href": "api-reference/lulo/withdraw/complete-get" } }, "post": { - "operationId": "v0.withdraw.completeRegularWithdrawal", + "operationId": "lulo.v0.withdraw.completeRegularWithdrawal", "summary": "Complete Regular Withdrawal", "description": "Generate a transaction for withdrawing a token from Lulo Regular after cooldown period.", "tags": [ @@ -703,6 +718,9 @@ } } } + }, + "x-mint": { + "href": "api-reference/lulo/withdraw/complete-post" } } } diff --git a/openapi/marginfi.json b/openapi/marginfi.json index f8ecb81..bc056d4 100644 --- a/openapi/marginfi.json +++ b/openapi/marginfi.json @@ -1,447 +1,457 @@ { - "openapi": "3.1.1", - "x-mcp": { - "enabled": true - }, - "info": { - "title": "MarginFi Blinks", - "version": "0.0.1" - }, - "servers": [ - { - "url": "https://marginfi.dial.to/api" - } - ], - "paths": { - "/v0/lend/{tokenSymbol}/deposit": { - "get": { - "operationId": "v0.lend.getDepositBlink", - "summary": "Lend Deposit Token", - "description": "Get metadata for depositing a token into a MarginFi pool.", - "tags": [ - "Lend" - ], - "parameters": [ - { - "name": "tokenSymbol", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Token symbol to deposit", - "default": "USDC", - "x-example": "USDC" - }, - "example": "USDC", - "x-default": "USDC" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "links": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "const": "transaction" - }, - "href": { - "type": "string" - }, - "label": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "label": { - "type": "string" - } - }, - "required": [ - "name", - "type", - "label" - ] - } - } - }, - "required": [ - "type", - "href", - "label" - ] - } - } - }, - "required": [ - "actions" - ] - } - }, - "required": [ - "title", - "description", - "label", - "icon", - "links" - ] - } - } - } - } - } + "info": { + "title": "MarginFi Blinks", + "version": "0.0.1" + }, + "servers": [ + { + "url": "https://marginfi.dial.to/api" + } + ], + "openapi": "3.1.1", + "paths": { + "/v0/lend/{tokenSymbol}/deposit": { + "get": { + "operationId": "marginfi.v0.lend.getDepositBlink", + "summary": "Lend Deposit Token", + "description": "Get metadata for depositing a token into a MarginFi pool.", + "tags": [ + "Lend" + ], + "parameters": [ + { + "name": "tokenSymbol", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Token symbol to deposit", + "default": "USDC", + "example": "USDC" }, - "post": { - "operationId": "v0.lend.executeDeposit", - "summary": "Lend Deposit Token", - "description": "Generate a transaction for depositing a token into a MarginFi pool.", - "tags": [ - "Lend" - ], - "parameters": [ - { - "name": "tokenSymbol", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Token symbol to deposit", - "default": "USDC", - "x-example": "USDC" - }, - "example": "USDC", - "x-default": "USDC" + "x-default": "USDC", + "example": "USDC" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string" }, - { - "name": "amount", - "in": "query", - "style": "deepObject", - "explode": true, - "schema": { - "type": "number", - "minimum": 1e-06, - "description": "The amount to deposit. Human readable value, e.g. 100 USDC" - } + "description": { + "type": "string" }, - { - "name": "percentage", - "in": "query", - "style": "deepObject", - "explode": true, - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "description": "The percentage of balance to deposit", - "default": 10, - "example": 10 - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { + "label": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "links": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "const": "transaction" + }, + "href": { + "type": "string" + }, + "label": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, "type": { - "type": "string", - "enum": [ - "transaction" - ], - "default": "transaction", - "example": "transaction" + "type": "string" }, - "account": { - "type": "string", - "description": "The public key of the account that executes the transaction", - "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176", - "example": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" + "label": { + "type": "string" } - }, - "required": [ + }, + "required": [ + "name", "type", - "account" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "type": { - "const": "transaction" - }, - "transaction": { - "type": "string" - } - }, - "required": [ - "type", - "transaction" - ] + "label" + ] } - } + } + }, + "required": [ + "type", + "href", + "label" + ] + } } + }, + "required": [ + "actions" + ] } + }, + "required": [ + "title", + "description", + "label", + "icon", + "links" + ] } + } } + } }, - "/v0/lend/{tokenSymbol}/withdraw": { - "get": { - "operationId": "v0.lend.getWithdrawBlink", - "summary": "Lend Withdraw Token", - "description": "Get metadata for withdrawing a token from a MarginFi pool.", - "tags": [ - "Lend" - ], - "parameters": [ - { - "name": "tokenSymbol", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Token symbol to withdraw", - "examples": [ - "USDC", - "SOL", - "USDT" - ], - "default": "USDC", - "example": "USDC" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "links": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "const": "transaction" - }, - "href": { - "type": "string" - }, - "label": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "label": { - "type": "string" - } - }, - "required": [ - "name", - "type", - "label" - ] - } - } - }, - "required": [ - "type", - "href", - "label" - ] - } - } - }, - "required": [ - "actions" - ] - } - }, - "required": [ - "title", - "description", - "label", - "icon", - "links" - ] - } - } - } + "x-mint": { + "href": "api-reference/marginfi/lend/deposit-get" + } + }, + "post": { + "operationId": "marginfi.v0.lend.executeDeposit", + "summary": "Lend Deposit Token", + "description": "Generate a transaction for depositing a token into a MarginFi pool.", + "tags": [ + "Lend" + ], + "parameters": [ + { + "name": "tokenSymbol", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Token symbol to deposit", + "default": "USDC", + "example": "USDC" + }, + "x-default": "USDC", + "example": "USDC" + }, + { + "name": "amount", + "in": "query", + "schema": { + "type": "number", + "minimum": 0.000001, + "description": "The amount to deposit. Human readable value, e.g. 100 USDC" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "percentage", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "The percentage of balance to deposit", + "default": 10, + "example": 10 + }, + "allowEmptyValue": true, + "allowReserved": true, + "x-default": 10, + "example": 10 + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "transaction" + ], + "default": "transaction", + "example": "transaction" + }, + "account": { + "type": "string", + "description": "The public key of the account that executes the transaction", + "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176", + "example": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" + } + }, + "required": [ + "type", + "account" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "const": "transaction" + }, + "transaction": { + "type": "string" } + }, + "required": [ + "type", + "transaction" + ] } + } + } + } + }, + "x-mint": { + "href": "api-reference/marginfi/lend/deposit-post" + } + } + }, + "/v0/lend/{tokenSymbol}/withdraw": { + "get": { + "operationId": "marginfi.v0.lend.getWithdrawBlink", + "summary": "Lend Withdraw Token", + "description": "Get metadata for withdrawing a token from a MarginFi pool.", + "tags": [ + "Lend" + ], + "parameters": [ + { + "name": "tokenSymbol", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Token symbol to withdraw", + "default": "USDC", + "example": "USDC" }, - "post": { - "operationId": "v0.lend.executeWithdraw", - "summary": "Lend Withdraw Token", - "description": "Generate a transaction for withdrawing a token from a MarginFi pool.", - "tags": [ - "Lend" - ], - "parameters": [ - { - "name": "tokenSymbol", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Token symbol to withdraw", - "examples": [ - "USDC", - "SOL", - "USDT" - ], - "default": "USDC", - "example": "USDC" - } + "x-default": "USDC", + "example": "USDC" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string" }, - { - "name": "amount", - "in": "query", - "style": "deepObject", - "explode": true, - "schema": { - "type": "number", - "minimum": 1e-06, - "description": "The amount to withdraw. Human readable value, e.g. 100 USDC" - } + "description": { + "type": "string" }, - { - "name": "percentage", - "in": "query", - "style": "deepObject", - "explode": true, - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "description": "The percentage of balance to withdraw", - "default": 10, - "example": 10 - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { + "label": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "links": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "const": "transaction" + }, + "href": { + "type": "string" + }, + "label": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, "type": { - "type": "string", - "enum": [ - "transaction" - ], - "default": "transaction", - "example": "transaction" + "type": "string" }, - "account": { - "type": "string", - "description": "The public key of the account that executes the transaction", - "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176", - "example": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" + "label": { + "type": "string" } - }, - "required": [ + }, + "required": [ + "name", "type", - "account" - ] - } + "label" + ] + } + } + }, + "required": [ + "type", + "href", + "label" + ] + } } + }, + "required": [ + "actions" + ] } + }, + "required": [ + "title", + "description", + "label", + "icon", + "links" + ] + } + } + } + } + }, + "x-mint": { + "href": "api-reference/marginfi/lend/withdraw-get" + } + }, + "post": { + "operationId": "marginfi.v0.lend.executeWithdraw", + "summary": "Lend Withdraw Token", + "description": "Generate a transaction for withdrawing a token from a MarginFi pool.", + "tags": [ + "Lend" + ], + "parameters": [ + { + "name": "tokenSymbol", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Token symbol to withdraw", + "default": "USDC", + "example": "USDC" + }, + "x-default": "USDC", + "example": "USDC" + }, + { + "name": "amount", + "in": "query", + "schema": { + "type": "number", + "minimum": 0.000001, + "description": "The amount to withdraw. Human readable value, e.g. 100 USDC" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "percentage", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "The percentage of balance to withdraw", + "default": 10, + "example": 10 + }, + "allowEmptyValue": true, + "allowReserved": true, + "x-default": 10, + "example": 10 + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "transaction" + ], + "default": "transaction", + "example": "transaction" + }, + "account": { + "type": "string", + "description": "The public key of the account that executes the transaction", + "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176", + "example": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176" + } }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "type": { - "const": "transaction" - }, - "transaction": { - "type": "string" - } - }, - "required": [ - "type", - "transaction" - ] - } - } - } + "required": [ + "type", + "account" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "const": "transaction" + }, + "transaction": { + "type": "string" } + }, + "required": [ + "type", + "transaction" + ] } + } } + } + }, + "x-mint": { + "href": "api-reference/marginfi/lend/withdraw-post" } + } } -} \ No newline at end of file + }, + "x-mcp": { + "enabled": true + } +}