From 3e01cc4f9501b26642332f72ff9b98d7dddb87e7 Mon Sep 17 00:00:00 2001 From: SATHVIK SVS Date: Wed, 15 Jan 2025 07:04:22 +0530 Subject: [PATCH 1/2] update server urls --- static/swagger/auctionhouse/matchedOrders.json | 2 +- static/swagger/auctionhouse/matchedOrdersById.json | 2 +- static/swagger/auctionhouse/matchedOrdersByUser.json | 2 +- static/swagger/auctionhouse/ordersCountByUser.json | 2 +- static/swagger/auctionhouse/unmatchedOrders.json | 2 +- static/swagger/auctionhouse/unmatchedOrdersById.json | 2 +- static/swagger/auctionhouse/unmatchedOrdersByUser.json | 2 +- static/swagger/openapi.json | 4 ++-- static/swagger/quote/fiat.json | 2 +- static/swagger/quote/price.json | 2 +- static/swagger/quote/quote.json | 2 +- static/swagger/quote/strategies.json | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/static/swagger/auctionhouse/matchedOrders.json b/static/swagger/auctionhouse/matchedOrders.json index 2eddd47..9039a82 100644 --- a/static/swagger/auctionhouse/matchedOrders.json +++ b/static/swagger/auctionhouse/matchedOrders.json @@ -5,7 +5,7 @@ "description": "This endpoint retrieves all matched orders, where `Orderbook` has picked up the order. Pagination is optional for limiting the results.", "servers": [ { - "url": "https://evm-swapper-relay.onrender.com" + "url": "https://orderbook.garden.finance" } ], "parameters": [ diff --git a/static/swagger/auctionhouse/matchedOrdersById.json b/static/swagger/auctionhouse/matchedOrdersById.json index 5c69d8a..92796c9 100644 --- a/static/swagger/auctionhouse/matchedOrdersById.json +++ b/static/swagger/auctionhouse/matchedOrdersById.json @@ -5,7 +5,7 @@ "description": "Retrieves a matched order using its unique order ID from the order book. It returns the order details if the order has been picked up by `Orderbook`.", "servers": [ { - "url": "https://evm-swapper-relay.onrender.com" + "url": "https://orderbook.garden.finance" } ], "parameters": [ diff --git a/static/swagger/auctionhouse/matchedOrdersByUser.json b/static/swagger/auctionhouse/matchedOrdersByUser.json index 599c3da..4a3b038 100644 --- a/static/swagger/auctionhouse/matchedOrdersByUser.json +++ b/static/swagger/auctionhouse/matchedOrdersByUser.json @@ -5,7 +5,7 @@ "description": "Retrieves all unmatched orders for a specific user, identified by their unique address, with optional pagination. It returns the orders that have been initiated and picked up by `Orderbook`.", "servers": [ { - "url": "https://evm-swapper-relay.onrender.com" + "url": "https://orderbook.garden.finance" } ], "parameters": [ diff --git a/static/swagger/auctionhouse/ordersCountByUser.json b/static/swagger/auctionhouse/ordersCountByUser.json index ba87a27..fbb87a8 100644 --- a/static/swagger/auctionhouse/ordersCountByUser.json +++ b/static/swagger/auctionhouse/ordersCountByUser.json @@ -5,7 +5,7 @@ "description": "Fetches the total number of orders for a specific user based on their address.", "servers": [ { - "url": "https://evm-swapper-relay.onrender.com" + "url": "https://orderbook.garden.finance" } ], "parameters": [ diff --git a/static/swagger/auctionhouse/unmatchedOrders.json b/static/swagger/auctionhouse/unmatchedOrders.json index fb5ccb2..9934ac8 100644 --- a/static/swagger/auctionhouse/unmatchedOrders.json +++ b/static/swagger/auctionhouse/unmatchedOrders.json @@ -5,7 +5,7 @@ "description": "Retrieves all unmatched orders, where users have initiated the order but `Orderbook` has not yet picked it up. Pagination is optional for limiting the results.", "servers": [ { - "url": "https://evm-swapper-relay.onrender.com" + "url": "https://orderbook.garden.finance" } ], "parameters": [ diff --git a/static/swagger/auctionhouse/unmatchedOrdersById.json b/static/swagger/auctionhouse/unmatchedOrdersById.json index c8a94da..3bf5bd4 100644 --- a/static/swagger/auctionhouse/unmatchedOrdersById.json +++ b/static/swagger/auctionhouse/unmatchedOrdersById.json @@ -5,7 +5,7 @@ "description": "Retrieves a unmatched order using its unique order ID from the order book. It returns the order details if the order has not been picked up by `Orderbook`.", "servers": [ { - "url": "https://evm-swapper-relay.onrender.com" + "url": "https://orderbook.garden.finance" } ], "parameters": [ diff --git a/static/swagger/auctionhouse/unmatchedOrdersByUser.json b/static/swagger/auctionhouse/unmatchedOrdersByUser.json index 56ccd65..fb81526 100644 --- a/static/swagger/auctionhouse/unmatchedOrdersByUser.json +++ b/static/swagger/auctionhouse/unmatchedOrdersByUser.json @@ -5,7 +5,7 @@ "description": "Retrieves all unmatched orders for a specific user, identified by their unique address, with optional pagination. It returns the orders that have been initiated but not yet picked up by `Orderbook`.", "servers": [ { - "url": "https://evm-swapper-relay.onrender.com" + "url": "https://orderbook.garden.finance" } ], "parameters": [ diff --git a/static/swagger/openapi.json b/static/swagger/openapi.json index fdda93e..0fa5aa1 100644 --- a/static/swagger/openapi.json +++ b/static/swagger/openapi.json @@ -15,11 +15,11 @@ }, "servers": [ { - "url": "https://evm-swapper-relay.onrender.com", + "url": "https://orderbook.garden.finance", "description": "Auth, Gasless, Orderbook server" }, { - "url":"https://quote-knrp.onrender.com", + "url":"https://quote.garden.finance", "description": "Quote server" } ], diff --git a/static/swagger/quote/fiat.json b/static/swagger/quote/fiat.json index b7f777e..929e0e9 100644 --- a/static/swagger/quote/fiat.json +++ b/static/swagger/quote/fiat.json @@ -5,7 +5,7 @@ "description": "Retrieves the USD prices for the input and output tokens associated with the specified order pair, providing accurate and up-to-date pricing information.", "servers": [ { - "url": "https://quote-knrp.onrender.com" + "url": "https://quote.garden.finance" } ], "security": [], diff --git a/static/swagger/quote/price.json b/static/swagger/quote/price.json index b43d2a0..579a6f5 100644 --- a/static/swagger/quote/price.json +++ b/static/swagger/quote/price.json @@ -5,7 +5,7 @@ "description": "Retrieves a `quote` for the specified `order pair`, considering the exact output or input amount.", "servers": [ { - "url": "https://quote-knrp.onrender.com" + "url": "https://quote.garden.finance" } ], "security": [], diff --git a/static/swagger/quote/quote.json b/static/swagger/quote/quote.json index acb6ce8..0401205 100644 --- a/static/swagger/quote/quote.json +++ b/static/swagger/quote/quote.json @@ -5,7 +5,7 @@ "description": "Retrieves an attested quote, which includes the validity period of the quote until a specified time. It ensures that the quote is valid for a certain duration before expiration.", "servers": [ { - "url": "https://quote-knrp.onrender.com" + "url": "https://quote.garden.finance" } ], "security": [], diff --git a/static/swagger/quote/strategies.json b/static/swagger/quote/strategies.json index 701e678..c6defe3 100644 --- a/static/swagger/quote/strategies.json +++ b/static/swagger/quote/strategies.json @@ -5,7 +5,7 @@ "description": "Retrieves a list of all available strategies.", "servers": [ { - "url": "https://quote-knrp.onrender.com" + "url": "https://quote.garden.finance" } ], "security": [], From 4c42a24d1a92fcb8a99e9c48dfc55aa9d9584e0f Mon Sep 17 00:00:00 2001 From: ManiReddyt Date: Wed, 15 Jan 2025 12:32:02 +0530 Subject: [PATCH 2/2] Update server URLs in API specifications to use the price.garden.finance endpoint --- static/swagger/openapi.json | 4 +- static/swagger/quote/fiat.json | 184 +++++----- static/swagger/quote/price.json | 241 ++++++------ static/swagger/quote/quote.json | 528 +++++++++++++-------------- static/swagger/quote/strategies.json | 275 +++++++------- 5 files changed, 606 insertions(+), 626 deletions(-) diff --git a/static/swagger/openapi.json b/static/swagger/openapi.json index 0fa5aa1..b123f25 100644 --- a/static/swagger/openapi.json +++ b/static/swagger/openapi.json @@ -19,7 +19,7 @@ "description": "Auth, Gasless, Orderbook server" }, { - "url":"https://quote.garden.finance", + "url": "https://price.garden.finance", "description": "Quote server" } ], @@ -102,4 +102,4 @@ "$ref": "./quote/price.json" } } -} \ No newline at end of file +} diff --git a/static/swagger/quote/fiat.json b/static/swagger/quote/fiat.json index 929e0e9..a90a108 100644 --- a/static/swagger/quote/fiat.json +++ b/static/swagger/quote/fiat.json @@ -1,99 +1,97 @@ { - "get": { - "operationId": "usdForOrderPair", - "summary": "Get USD prices for an order pair.", - "description": "Retrieves the USD prices for the input and output tokens associated with the specified order pair, providing accurate and up-to-date pricing information.", - "servers": [ - { - "url": "https://quote.garden.finance" - } - ], - "security": [], - "parameters": [ - { - "name": "order_pair", - "in": "query", - "required": true, - "schema": { - "type": "string", - "description": "The order pair for which USD prices are needed.", - "example": "ethereum:USDC::arbitrum:USDT" - } - } - ], - "responses": { - "200": { - "description": "Successfully retrieved USD prices.", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "Specifies the source and destination chain and asset in the format {fromChain}:{fromAsset}::{toChain}:{toAsset}", - "properties": { - "status":{ - "type": "string", - "enum": ["Ok","Error"], - "description": "An enum representing the possible outcomes of the endpoint, indicating whether the request was successful.", - "example": "Ok" - }, - "data": { - "type": "object", - "properties": { - "input_token_price": { - "type": "number", - "format": "double", - "description": "The USD price of the input token in the order pair.", - "example": 97056.37479601552 - }, - "output_token_price": { - "type": "number", - "format": "double", - "description": "The USD price of the output token in the order pair.", - "example": 97056.37479601552 - } - } - } - } - } + "get": { + "operationId": "usdForOrderPair", + "summary": "Get USD prices for an order pair.", + "description": "Retrieves the USD prices for the input and output tokens associated with the specified order pair, providing accurate and up-to-date pricing information.", + "servers": [ + { + "url": "https://price.garden.finance" + } + ], + "security": [], + "parameters": [ + { + "name": "order_pair", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "The order pair for which USD prices are needed.", + "example": "ethereum:USDC::arbitrum:USDT" + } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved USD prices.", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Specifies the source and destination chain and asset in the format {fromChain}:{fromAsset}::{toChain}:{toAsset}", + "properties": { + "status": { + "type": "string", + "enum": ["Ok", "Error"], + "description": "An enum representing the possible outcomes of the endpoint, indicating whether the request was successful.", + "example": "Ok" + }, + "data": { + "type": "object", + "properties": { + "input_token_price": { + "type": "number", + "format": "double", + "description": "The USD price of the input token in the order pair.", + "example": 97056.37479601552 + }, + "output_token_price": { + "type": "number", + "format": "double", + "description": "The USD price of the output token in the order pair.", + "example": 97056.37479601552 } + } } - }, - "400": { - "description": "Failed to retrieve USD prices.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["Ok","Error"], - "example": "Error", - "description": "An enum representing the possible outcomes of the endpoint, indicating whether the request was successful." - }, - "error": { - "type": "object", - "properties":{ - "code": { - "type": "number", - "description":"The numeric status code indicating the type of error or response.", - "example": 400 - }, - "message": { - "type": "string", - "description": "A descriptive message providing details about the error or response.", - "example": "failed to get fiat values: Asset not found : ethereum:usdc" - } - } - } - } - } + } + } + } + } + }, + "400": { + "description": "Failed to retrieve USD prices.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["Ok", "Error"], + "example": "Error", + "description": "An enum representing the possible outcomes of the endpoint, indicating whether the request was successful." + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "number", + "description": "The numeric status code indicating the type of error or response.", + "example": 400 + }, + "message": { + "type": "string", + "description": "A descriptive message providing details about the error or response.", + "example": "failed to get fiat values: Asset not found : ethereum:usdc" } + } } + } } - }, - "tags": [ - "Quote" - ] - } -} \ No newline at end of file + } + } + } + }, + "tags": ["Quote"] + } +} diff --git a/static/swagger/quote/price.json b/static/swagger/quote/price.json index 579a6f5..ff3be80 100644 --- a/static/swagger/quote/price.json +++ b/static/swagger/quote/price.json @@ -1,129 +1,124 @@ { - "get": { - "operationId": "price", - "summary": "Get a quote for an order pair.", - "description": "Retrieves a `quote` for the specified `order pair`, considering the exact output or input amount.", - "servers": [ - { - "url": "https://quote.garden.finance" - } - ], - "security": [], - "parameters": [ - { - "name": "order_pair", - "in": "query", - "required": true, - "schema": { - "type": "string", - "description": "The order pair for which the quote is needed.", - "example": "ethereum_sepolia:0x3C6a17b8cD92976D1D91E491c93c98cd81998265::bitcoin_testnet:primary" - } - }, - { - "name": "exact_out", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "description": "Indicates whether the exact output amount is specified.", - "example": false - } - }, - { - "name": "amount", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "decimal", - "description": "The amount for the quote.", - "example": 100000000 - } - } - ], - "responses": { - "200": { - "description": "Successfully retrieved quote.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "Ok", - "Error" - ], - "example": "Ok" - }, - "result": { - "type": "object", - "properties": { - "quotes": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "example": { - "ea56btyr": "99700000" - } - }, - "input_token_price": { - "type": "number", - "format": "float", - "description": "The USD price of the input token.", - "example": 97056.37479601552 - }, - "output_token_price": { - "type": "number", - "format": "float", - "description": "The USD price of the output token.", - "example": 97056.37479601552 - } - } - } - } - } + "get": { + "operationId": "price", + "summary": "Get a quote for an order pair.", + "description": "Retrieves a `quote` for the specified `order pair`, considering the exact output or input amount.", + "servers": [ + { + "url": "https://price.garden.finance" + } + ], + "security": [], + "parameters": [ + { + "name": "order_pair", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "The order pair for which the quote is needed.", + "example": "ethereum_sepolia:0x3C6a17b8cD92976D1D91E491c93c98cd81998265::bitcoin_testnet:primary" + } + }, + { + "name": "exact_out", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Indicates whether the exact output amount is specified.", + "example": false + } + }, + { + "name": "amount", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "decimal", + "description": "The amount for the quote.", + "example": 100000000 + } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved quote.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["Ok", "Error"], + "example": "Ok" + }, + "result": { + "type": "object", + "properties": { + "quotes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "ea56btyr": "99700000" + } + }, + "input_token_price": { + "type": "number", + "format": "float", + "description": "The USD price of the input token.", + "example": 97056.37479601552 + }, + "output_token_price": { + "type": "number", + "format": "float", + "description": "The USD price of the output token.", + "example": 97056.37479601552 } + } } - }, - "400": { - "description": "Failed to retrieve quote.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["Ok","Error"], - "example": "Error" - }, - "error": { - "type": "object", - "properties": { - "code": { - "type": "number", - "description":"The numeric status code indicating the type of error or response.", - "example": 401 - }, - "message": { - "type": "string", - "description": "A descriptive message providing details about the error or response.", - "example": "failed to get token fiat values: Asset not found : _sepolia:0x3c6a17b8cd92976d1d91e491c93c98cd81998265" - } - } - } - } - } + } + } + } + } + }, + "400": { + "description": "Failed to retrieve quote.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["Ok", "Error"], + "example": "Error" + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "number", + "description": "The numeric status code indicating the type of error or response.", + "example": 401 + }, + "message": { + "type": "string", + "description": "A descriptive message providing details about the error or response.", + "example": "failed to get token fiat values: Asset not found : _sepolia:0x3c6a17b8cd92976d1d91e491c93c98cd81998265" } + } } + } } - }, - "tags": [ - "Quote" - ] - } -} \ No newline at end of file + } + } + } + }, + "tags": ["Quote"] + } +} diff --git a/static/swagger/quote/quote.json b/static/swagger/quote/quote.json index 0401205..63593da 100644 --- a/static/swagger/quote/quote.json +++ b/static/swagger/quote/quote.json @@ -1,277 +1,269 @@ { - "post": { - "operationId": "attestedQuote", - "summary": "Get an attested quote for an order.", - "description": "Retrieves an attested quote, which includes the validity period of the quote until a specified time. It ensures that the quote is valid for a certain duration before expiration.", - "servers": [ - { - "url": "https://quote.garden.finance" - } - ], - "security": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "source_chain": { - "type": "string", - "description": "The blockchain network where the swap originates.", - "example": "bitcoin" - }, - "destination_chain": { - "type": "string", - "description": "The blockchain network where the swap completes.", - "example": "ethereum" - }, - "source_asset": { - "type": "string", - "description": "The asset being swapped on the source blockchain.", - "example": "primary" - }, - "destination_asset": { - "type": "string", - "description": "The asset to be received on the destination blockchain.", - "example": "0xd8a6e3fca403d79b6ad6216b60527f51cc967d39" - }, - "initiator_source_address": { - "type": "string", - "description": "The wallet address initiating the swap on the source blockchain.", - "example": "0x5A4b7eD8c2a1F1e34C8e9...6A3C5D2B1f8E7A9C" - }, - "initiator_destination_address": { - "type": "string", - "description": "The wallet address to receive the asset on the destination blockchain.", - "example": "0x5A4b7eD8c2a1F1e34C8e9...6A3C5D2B1f8E7A9C" - }, - "source_amount": { - "type": "string", - "description": "The amount of the asset being swapped on the source blockchain.", - "example": "1" - }, - "destination_amount": { - "type": "string", - "description": "The amount of the asset expected on the destination blockchain.", - "example": "0.97" - }, - "fee": { - "type": "number", - "description": "The total cost associated with the swap transaction.", - "example": 1 - }, - "nonce": { - "type": "string", - "description": "A unique identifier for the swap transaction to prevent duplication.", - "example": "b8bc718d6af38a0d2cac5085c53f617a52e590b0ff4ad2c4abb0825e9cc39079" - }, - "min_destination_confirmations": { - "type": "integer", - "description": "The minimum number of confirmations required on the destination blockchain to finalize the swap.", - "example": 0 - }, - "timelock": { - "type": "integer", - "description": "A timeout period after which the swap expires if not completed.", - "example": 288 - }, - "secret_hash": { - "type": "string", - "description": "A cryptographic hash used to verify the transaction's security.", - "example": "f4a3b8d16e58cd30b8a0e9f504b1c7f9f24d1c70eaf2a3794b3c7e5bb7c90f5d" - }, - "additional_data": { - "type": "object", - "properties": { - "strategy_id": { - "type": "string", - "description": "Provided by the quote server", - "example": "bre112" - }, - "bitcoin_optional_recipient": { - "type": "string", - "description": "An optional Bitcoin address to receive the output token, if specified.", - "example": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" - } - } - } - } - } + "post": { + "operationId": "attestedQuote", + "summary": "Get an attested quote for an order.", + "description": "Retrieves an attested quote, which includes the validity period of the quote until a specified time. It ensures that the quote is valid for a certain duration before expiration.", + "servers": [ + { + "url": "https://price.garden.finance" + } + ], + "security": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "source_chain": { + "type": "string", + "description": "The blockchain network where the swap originates.", + "example": "bitcoin" + }, + "destination_chain": { + "type": "string", + "description": "The blockchain network where the swap completes.", + "example": "ethereum" + }, + "source_asset": { + "type": "string", + "description": "The asset being swapped on the source blockchain.", + "example": "primary" + }, + "destination_asset": { + "type": "string", + "description": "The asset to be received on the destination blockchain.", + "example": "0xd8a6e3fca403d79b6ad6216b60527f51cc967d39" + }, + "initiator_source_address": { + "type": "string", + "description": "The wallet address initiating the swap on the source blockchain.", + "example": "0x5A4b7eD8c2a1F1e34C8e9...6A3C5D2B1f8E7A9C" + }, + "initiator_destination_address": { + "type": "string", + "description": "The wallet address to receive the asset on the destination blockchain.", + "example": "0x5A4b7eD8c2a1F1e34C8e9...6A3C5D2B1f8E7A9C" + }, + "source_amount": { + "type": "string", + "description": "The amount of the asset being swapped on the source blockchain.", + "example": "1" + }, + "destination_amount": { + "type": "string", + "description": "The amount of the asset expected on the destination blockchain.", + "example": "0.97" + }, + "fee": { + "type": "number", + "description": "The total cost associated with the swap transaction.", + "example": 1 + }, + "nonce": { + "type": "string", + "description": "A unique identifier for the swap transaction to prevent duplication.", + "example": "b8bc718d6af38a0d2cac5085c53f617a52e590b0ff4ad2c4abb0825e9cc39079" + }, + "min_destination_confirmations": { + "type": "integer", + "description": "The minimum number of confirmations required on the destination blockchain to finalize the swap.", + "example": 0 + }, + "timelock": { + "type": "integer", + "description": "A timeout period after which the swap expires if not completed.", + "example": 288 + }, + "secret_hash": { + "type": "string", + "description": "A cryptographic hash used to verify the transaction's security.", + "example": "f4a3b8d16e58cd30b8a0e9f504b1c7f9f24d1c70eaf2a3794b3c7e5bb7c90f5d" + }, + "additional_data": { + "type": "object", + "properties": { + "strategy_id": { + "type": "string", + "description": "Provided by the quote server", + "example": "bre112" + }, + "bitcoin_optional_recipient": { + "type": "string", + "description": "An optional Bitcoin address to receive the output token, if specified.", + "example": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" + } } + } } - }, - "responses": { - "200": { - "description": "Successfully retrieved attested quote.", - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "type": "string", - "enum": [ - "Ok", - "Error" - ], - "example": "Ok", - "description": "An enum representing the possible outcomes of the endpoint, indicating whether the request was successful." - }, - "result": { - "type": "object", - "description": "The order object", - "properties": { - "source_chain": { - "type": "string", - "description": "The blockchain network where the swap originates.", - "example": "bitcoin" - }, - "destination_chain": { - "type": "string", - "description": "The blockchain network where the swap completes.", - "example": "ethereum" - }, - "source_asset": { - "type": "string", - "description": "The asset being swapped on the source blockchain.", - "example": "primary" - }, - "destination_asset": { - "type": "string", - "description": "The asset to be received on the destination blockchain.", - "example": "0xd8a6e3fca403d79b6ad6216b60527f51cc967d39" - }, - "initiator_source_address": { - "type": "string", - "description": "The wallet address initiating the swap on the source blockchain.", - "example": "0x5A4b7eD8c2a1F1e34C8e9...6A3C5D2B1f8E7A9C" - }, - "initiator_destination_address": { - "type": "string", - "description": "The wallet address to receive the asset on the destination blockchain.", - "example": "0x5A4b7eD8c2a1F1e34C8e9...6A3C5D2B1f8E7A9C" - }, - "source_amount": { - "type": "string", - "description": "The amount of the asset being swapped on the source blockchain.", - "example": "1" - }, - "destination_amount": { - "type": "string", - "description": "The amount of the asset expected on the destination blockchain.", - "example": "0.97" - }, - "fee": { - "type": "string", - "description": "The total cost associated with the swap transaction.", - "example": 1 - }, - "nonce": { - "type": "string", - "description": "A unique identifier for the swap transaction to prevent duplication.", - "example": "b8bc718d6af38a0d2cac5085c53f617a52e590b0ff4ad2c4abb0825e9cc39079" - }, - "min_destination_confirmations": { - "type": "integer", - "description": "The minimum number of confirmations required on the destination blockchain to finalize the swap.", - "example": 0 - }, - "timelock": { - "type": "integer", - "description": "A timeout period after which the swap expires if not completed.", - "example": 288 - }, - "secret_hash": { - "type": "string", - "description": "A cryptographic hash used to verify the transaction's security.", - "example": "f4a3b8d16e58cd30b8a0e9f504b1c7f9f24d1c70eaf2a3794b3c7e5bb7c90f5d" - }, - "additional_data": { - "type": "object", - "properties": { - "strategy_id": { - "type": "string", - "description": "Provided by the quote server", - "example": "bre112" - }, - "input_token_price": { - "type": "number", - "format": "double", - "description": "Provided by the quote server", - "example": 97056.37479601552 - }, - "output_token_price": { - "type": "number", - "format": "double", - "description": "Provided by the quote server", - "example": 97056.37479601552 - }, - "deadline": { - "type": "string", - "description": "Validity till the current quote is valid" - }, - "bitcoin_optional_recipient": { - "type": "string", - "description": "An optional Bitcoin address to receive the output token, if specified.", - "example": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" - }, - "sig": { - "type": "string", - "description": "", - "example": "MEYCIQDYfLzU1MxP3RLlY5YXzkKcFvndv3tZyjGtHKqbrFqJ6QIhAMTytBYJ5Fb2+9NdXdHSTHz9BUEtwxE/n9VUwqP1X5fn" - }, - "instant_refund_tx_bytes": { - "type": "string", - "description": "The signature used to derive the transaction hash for an instant refund in case of transaction failure.", - "example": "90a36c9fc942109060165b9db0ada8f6499302288d9d3698c6b4fa9431b5bf22" - } - } - } - } - } - } + } + } + } + }, + "responses": { + "200": { + "description": "Successfully retrieved attested quote.", + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "type": "string", + "enum": ["Ok", "Error"], + "example": "Ok", + "description": "An enum representing the possible outcomes of the endpoint, indicating whether the request was successful." + }, + "result": { + "type": "object", + "description": "The order object", + "properties": { + "source_chain": { + "type": "string", + "description": "The blockchain network where the swap originates.", + "example": "bitcoin" + }, + "destination_chain": { + "type": "string", + "description": "The blockchain network where the swap completes.", + "example": "ethereum" + }, + "source_asset": { + "type": "string", + "description": "The asset being swapped on the source blockchain.", + "example": "primary" + }, + "destination_asset": { + "type": "string", + "description": "The asset to be received on the destination blockchain.", + "example": "0xd8a6e3fca403d79b6ad6216b60527f51cc967d39" + }, + "initiator_source_address": { + "type": "string", + "description": "The wallet address initiating the swap on the source blockchain.", + "example": "0x5A4b7eD8c2a1F1e34C8e9...6A3C5D2B1f8E7A9C" + }, + "initiator_destination_address": { + "type": "string", + "description": "The wallet address to receive the asset on the destination blockchain.", + "example": "0x5A4b7eD8c2a1F1e34C8e9...6A3C5D2B1f8E7A9C" + }, + "source_amount": { + "type": "string", + "description": "The amount of the asset being swapped on the source blockchain.", + "example": "1" + }, + "destination_amount": { + "type": "string", + "description": "The amount of the asset expected on the destination blockchain.", + "example": "0.97" + }, + "fee": { + "type": "string", + "description": "The total cost associated with the swap transaction.", + "example": 1 + }, + "nonce": { + "type": "string", + "description": "A unique identifier for the swap transaction to prevent duplication.", + "example": "b8bc718d6af38a0d2cac5085c53f617a52e590b0ff4ad2c4abb0825e9cc39079" + }, + "min_destination_confirmations": { + "type": "integer", + "description": "The minimum number of confirmations required on the destination blockchain to finalize the swap.", + "example": 0 + }, + "timelock": { + "type": "integer", + "description": "A timeout period after which the swap expires if not completed.", + "example": 288 + }, + "secret_hash": { + "type": "string", + "description": "A cryptographic hash used to verify the transaction's security.", + "example": "f4a3b8d16e58cd30b8a0e9f504b1c7f9f24d1c70eaf2a3794b3c7e5bb7c90f5d" + }, + "additional_data": { + "type": "object", + "properties": { + "strategy_id": { + "type": "string", + "description": "Provided by the quote server", + "example": "bre112" + }, + "input_token_price": { + "type": "number", + "format": "double", + "description": "Provided by the quote server", + "example": 97056.37479601552 + }, + "output_token_price": { + "type": "number", + "format": "double", + "description": "Provided by the quote server", + "example": 97056.37479601552 + }, + "deadline": { + "type": "string", + "description": "Validity till the current quote is valid" + }, + "bitcoin_optional_recipient": { + "type": "string", + "description": "An optional Bitcoin address to receive the output token, if specified.", + "example": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" + }, + "sig": { + "type": "string", + "description": "", + "example": "MEYCIQDYfLzU1MxP3RLlY5YXzkKcFvndv3tZyjGtHKqbrFqJ6QIhAMTytBYJ5Fb2+9NdXdHSTHz9BUEtwxE/n9VUwqP1X5fn" + }, + "instant_refund_tx_bytes": { + "type": "string", + "description": "The signature used to derive the transaction hash for an instant refund in case of transaction failure.", + "example": "90a36c9fc942109060165b9db0ada8f6499302288d9d3698c6b4fa9431b5bf22" } + } } + } } - }, - "400": { - "description": "Failed to retrieve attested quote.", - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "type": "string", - "enum": [ - "Ok", - "Error" - ], - "example": "Error", - "description": "An enum representing the possible outcomes of the endpoint, indicating whether the request was successful." - }, - "error": { - "type": "object", - "properties": { - "code": { - "type": "number", - "description": "The numeric status code indicating the type of error or response.", - "example": 400 - }, - "message": { - "type": "string", - "description": "A descriptive message providing details about the error or response.", - "example": "0x prefixed secret_hash are not allowed" - } - } - } - } - } + } + } + } + } + }, + "400": { + "description": "Failed to retrieve attested quote.", + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "type": "string", + "enum": ["Ok", "Error"], + "example": "Error", + "description": "An enum representing the possible outcomes of the endpoint, indicating whether the request was successful." + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "number", + "description": "The numeric status code indicating the type of error or response.", + "example": 400 + }, + "message": { + "type": "string", + "description": "A descriptive message providing details about the error or response.", + "example": "0x prefixed secret_hash are not allowed" } + } } + } } - }, - "tags": [ - "Quote" - ] - } -} \ No newline at end of file + } + } + } + }, + "tags": ["Quote"] + } +} diff --git a/static/swagger/quote/strategies.json b/static/swagger/quote/strategies.json index c6defe3..4591383 100644 --- a/static/swagger/quote/strategies.json +++ b/static/swagger/quote/strategies.json @@ -1,145 +1,140 @@ { - "get": { - "operationId": "strategies", - "summary": "Get available strategies.", - "description": "Retrieves a list of all available strategies.", - "servers": [ - { - "url": "https://quote.garden.finance" - } - ], - "security": [], - "responses": { - "200": { - "description": "Successfully retrieved strategies.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "Ok", - "Error" - ], - "example": "Ok" - }, - "data": { - "type": "object", - "description": "Retrieves a hashmap of strategies", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for the strategy.", - "example": "ea56btyr" - }, - "source_chain_address": { - "type": "string", - "description": "Address on the source chain.", - "example": "0x661bA32eb5f86CaB358DDbB7F264b10c5825e2dd" - }, - "dest_chain_address": { - "type": "string", - "description": "Address on the destination chain.", - "example": "460f2e8ff81fc4e0a8e6ce7796704e3829e3e3eedb8db9390bdc51f4f04cf0a6" - }, - "source_chain": { - "type": "string", - "description": "Name of the source chain.", - "example": "ethereum_sepolia" - }, - "dest_chain": { - "type": "string", - "description": "Name of the destination chain.", - "example": "bitcoin_testnet" - }, - "source_asset": { - "type": "object", - "properties": { - "asset": { - "type": "string", - "example": "0x3C6a17b8cD92976D1D91E491c93c98cd81998265" - }, - "token_id": { - "type": "string", - "example": "bitcoin" - }, - "decimals": { - "type": "integer", - "description": "Number of decimals for the asset.", - "example": 8 - } - }, - "description": "Asset on the source chain." - }, - "dest_asset": { - "type": "object", - "properties": { - "asset": { - "type": "string", - "example": "primary" - }, - "token_id": { - "type": "string", - "example": "bitcoin" - }, - "decimals": { - "type": "integer", - "description": "Number of decimals for the asset.", - "example": 8 - } - }, - "description": "Asset on the destination chain." - }, - "makers": { - "type": "array", - "items": { - "type": "string", - "example": "" - }, - "description": "List of maker addresses." - }, - "min_amount": { - "type": "string", - "format": "decimal", - "description": "Minimum trade amount for the strategy." - }, - "max_amount": { - "type": "string", - "format": "decimal", - "description": "Maximum trade amount for the strategy." - }, - "min_source_timelock": { - "type": "integer", - "format": "int64", - "description": "Minimum timelock for the source chain." - }, - "min_source_confirmations": { - "type": "integer", - "format": "int64", - "description": "Minimum number of confirmations on the source chain." - }, - "min_price": { - "type": "number", - "format": "float", - "description": "Minimum price for the strategy." - }, - "fee": { - "type": "integer", - "format": "int64", - "description": "Fee in basis points (bips)." - } - } - } - } + "get": { + "operationId": "strategies", + "summary": "Get available strategies.", + "description": "Retrieves a list of all available strategies.", + "servers": [ + { + "url": "https://price.garden.finance" + } + ], + "security": [], + "responses": { + "200": { + "description": "Successfully retrieved strategies.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["Ok", "Error"], + "example": "Ok" + }, + "data": { + "type": "object", + "description": "Retrieves a hashmap of strategies", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the strategy.", + "example": "ea56btyr" + }, + "source_chain_address": { + "type": "string", + "description": "Address on the source chain.", + "example": "0x661bA32eb5f86CaB358DDbB7F264b10c5825e2dd" + }, + "dest_chain_address": { + "type": "string", + "description": "Address on the destination chain.", + "example": "460f2e8ff81fc4e0a8e6ce7796704e3829e3e3eedb8db9390bdc51f4f04cf0a6" + }, + "source_chain": { + "type": "string", + "description": "Name of the source chain.", + "example": "ethereum_sepolia" + }, + "dest_chain": { + "type": "string", + "description": "Name of the destination chain.", + "example": "bitcoin_testnet" + }, + "source_asset": { + "type": "object", + "properties": { + "asset": { + "type": "string", + "example": "0x3C6a17b8cD92976D1D91E491c93c98cd81998265" + }, + "token_id": { + "type": "string", + "example": "bitcoin" + }, + "decimals": { + "type": "integer", + "description": "Number of decimals for the asset.", + "example": 8 + } + }, + "description": "Asset on the source chain." + }, + "dest_asset": { + "type": "object", + "properties": { + "asset": { + "type": "string", + "example": "primary" + }, + "token_id": { + "type": "string", + "example": "bitcoin" + }, + "decimals": { + "type": "integer", + "description": "Number of decimals for the asset.", + "example": 8 } + }, + "description": "Asset on the destination chain." + }, + "makers": { + "type": "array", + "items": { + "type": "string", + "example": "" + }, + "description": "List of maker addresses." + }, + "min_amount": { + "type": "string", + "format": "decimal", + "description": "Minimum trade amount for the strategy." + }, + "max_amount": { + "type": "string", + "format": "decimal", + "description": "Maximum trade amount for the strategy." + }, + "min_source_timelock": { + "type": "integer", + "format": "int64", + "description": "Minimum timelock for the source chain." + }, + "min_source_confirmations": { + "type": "integer", + "format": "int64", + "description": "Minimum number of confirmations on the source chain." + }, + "min_price": { + "type": "number", + "format": "float", + "description": "Minimum price for the strategy." + }, + "fee": { + "type": "integer", + "format": "int64", + "description": "Fee in basis points (bips)." } + } } + } } - }, - "tags": [ - "Quote" - ] - } -} \ No newline at end of file + } + } + } + }, + "tags": ["Quote"] + } +}