diff --git a/config.json b/config.json index bbe0e13..2395862 100644 --- a/config.json +++ b/config.json @@ -33,7 +33,8 @@ "stride.json", "xion.json", "snapshots.json", - "stablecoins.json" + "stablecoins.json", + "neutron.json" ], "codeLanguages": [ "curl", @@ -408,6 +409,27 @@ ] } ] + }, + { + "groupName": "Neutron", + "subpages": [ + { + "groupName": "DEX", + "subpages": [ + "reference/neutron/get-dex-pairs", + "reference/neutron/get-dex-liquidity", + "reference/neutron/get-dex-price", + "reference/neutron/get-dex-trades", + "reference/neutron/get-dex-swap-volume" + ] + }, + { + "groupName": "Trading", + "subpages": [ + "reference/neutron/get-trading-volume" + ] + } + ] } ] } diff --git a/docs/reference/neutron/get-dex-liquidity.endpoint.mdx b/docs/reference/neutron/get-dex-liquidity.endpoint.mdx new file mode 100644 index 0000000..689fea8 --- /dev/null +++ b/docs/reference/neutron/get-dex-liquidity.endpoint.mdx @@ -0,0 +1,8 @@ +--- +route: GET /dex/liquidity/{denom0}/{denom1} +--- + +{/* Don't change the file name or the metadata in this file */} +import PriceTag from "@site/src/components/PriceTag"; + + diff --git a/docs/reference/neutron/get-dex-pairs.endpoint.mdx b/docs/reference/neutron/get-dex-pairs.endpoint.mdx new file mode 100644 index 0000000..8401c7e --- /dev/null +++ b/docs/reference/neutron/get-dex-pairs.endpoint.mdx @@ -0,0 +1,8 @@ +--- +route: GET /dex/pairs +--- + +{/* Don't change the file name or the metadata in this file */} +import PriceTag from "@site/src/components/PriceTag"; + + diff --git a/docs/reference/neutron/get-dex-price.endpoint.mdx b/docs/reference/neutron/get-dex-price.endpoint.mdx new file mode 100644 index 0000000..9ebd078 --- /dev/null +++ b/docs/reference/neutron/get-dex-price.endpoint.mdx @@ -0,0 +1,8 @@ +--- +route: GET /dex/price/{denom0}/{denom1} +--- + +{/* Don't change the file name or the metadata in this file */} +import PriceTag from "@site/src/components/PriceTag"; + + diff --git a/docs/reference/neutron/get-dex-swap-volume.endpoint.mdx b/docs/reference/neutron/get-dex-swap-volume.endpoint.mdx new file mode 100644 index 0000000..91657f6 --- /dev/null +++ b/docs/reference/neutron/get-dex-swap-volume.endpoint.mdx @@ -0,0 +1,8 @@ +--- +route: GET /dex/swap-volume/{denom0}/{denom1} +--- + +{/* Don't change the file name or the metadata in this file */} +import PriceTag from "@site/src/components/PriceTag"; + + diff --git a/docs/reference/neutron/get-dex-trades.endpoint.mdx b/docs/reference/neutron/get-dex-trades.endpoint.mdx new file mode 100644 index 0000000..1ecdbdf --- /dev/null +++ b/docs/reference/neutron/get-dex-trades.endpoint.mdx @@ -0,0 +1,8 @@ +--- +route: GET /dex/trades/{denom0}/{denom1} +--- + +{/* Don't change the file name or the metadata in this file */} +import PriceTag from "@site/src/components/PriceTag"; + + diff --git a/docs/reference/neutron/get-trading-volume.endpoint.mdx b/docs/reference/neutron/get-trading-volume.endpoint.mdx new file mode 100644 index 0000000..f439938 --- /dev/null +++ b/docs/reference/neutron/get-trading-volume.endpoint.mdx @@ -0,0 +1,8 @@ +--- +route: GET /trading/volume +--- + +{/* Don't change the file name or the metadata in this file */} +import PriceTag from "@site/src/components/PriceTag"; + + diff --git a/openAPI/neutron.json b/openAPI/neutron.json new file mode 100644 index 0000000..c2f8889 --- /dev/null +++ b/openAPI/neutron.json @@ -0,0 +1,556 @@ +{ + "openapi": "3.0.0", + "servers": [ + { + "url": "https://neutron.numia.xyz" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "info": { + "version": "1.0.0", + "title": "Neutron API" + }, + "components": { + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": {}, + "parameters": {} + }, + "paths": { + "/dex/pairs": { + "get": { + "servers": [ + { + "url": "https://neutron.numia.xyz" + } + ], + "operationId": "getDexPairs", + "tags": [], + "sidebar": "dex", + "attributes": { + "x-sidebar": "dex" + }, + "description": "import PriceTag from \"@site/src/components/PriceTag\";\n\n", + "summary": "Get DEX Pairs", + "responses": { + "200": { + "description": "Status: 200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "token_0": { + "type": "string", + "description": "First token in the pair" + }, + "token_1": { + "type": "string", + "description": "Second token in the pair" + }, + "created_at_height": { + "type": "string", + "description": "Block height when the pair was created" + }, + "updated_at_height": { + "type": "string", + "description": "Block height when the pair was last updated" + }, + "created_at": { + "type": "string", + "description": "Timestamp when the pair was created" + }, + "updated_at": { + "type": "string", + "description": "Timestamp when the pair was last updated" + } + }, + "required": [ + "token_0", + "token_1", + "created_at_height", + "updated_at_height", + "created_at", + "updated_at" + ] + } + }, + "meta": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the field" + }, + "type": { + "type": "string", + "description": "Data type of the field in the database" + }, + "units": { + "type": "string", + "description": "" + } + }, + "required": [ + "name", + "type" + ] + } + }, + "height": { + "type": "string" + } + }, + "required": [ + "data", + "meta", + "height" + ] + } + } + } + } + } + } + }, + "/dex/liquidity/{denom0}/{denom1}": { + "get": { + "servers": [ + { + "url": "https://neutron.numia.xyz" + } + ], + "operationId": "getDexLiquidity", + "tags": [], + "sidebar": "dex", + "attributes": { + "x-sidebar": "dex" + }, + "description": "import PriceTag from \"@site/src/components/PriceTag\";\n\n", + "summary": "Get DEX Liquidity", + "responses": { + "200": { + "description": "Status: 200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "index": { + "type": "string", + "description": "Tick index" + }, + "reserves_0": { + "type": "string", + "nullable": true, + "description": "Reserves for denom0" + }, + "reserves_1": { + "type": "string", + "nullable": true, + "description": "Reserves for denom1" + } + }, + "required": [ + "index" + ] + } + }, + "meta": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the field" + }, + "type": { + "type": "string", + "description": "Data type of the field in the database" + }, + "units": { + "type": "string", + "description": "" + } + }, + "required": [ + "name", + "type" + ] + } + }, + "height": { + "type": "string" + }, + "time": { + "type": "string" + } + }, + "required": [ + "data", + "meta", + "height", + "time" + ] + } + } + } + } + } + } + }, + "/dex/price/{denom0}/{denom1}": { + "get": { + "servers": [ + { + "url": "https://neutron.numia.xyz" + } + ], + "operationId": "getDexPrice", + "tags": [], + "sidebar": "dex", + "attributes": { + "x-sidebar": "dex" + }, + "description": "import PriceTag from \"@site/src/components/PriceTag\";\n\n", + "summary": "Get DEX Price", + "responses": { + "200": { + "description": "Status: 200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "time": { + "type": "string", + "description": "Timestamp for the OHLC period" + }, + "open": { + "type": "number", + "description": "Opening tick index" + }, + "high": { + "type": "number", + "description": "Highest tick index" + }, + "low": { + "type": "number", + "description": "Lowest tick index" + }, + "close": { + "type": "number", + "description": "Closing tick index" + } + }, + "required": [ + "time", + "open", + "high", + "low", + "close" + ] + } + }, + "meta": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the field" + }, + "type": { + "type": "string", + "description": "Data type of the field in the database" + }, + "units": { + "type": "string", + "description": "" + } + }, + "required": [ + "name", + "type" + ] + } + }, + "height": { + "type": "string" + }, + "time": { + "type": "string" + } + }, + "required": [ + "data", + "meta", + "height", + "time" + ] + } + } + } + } + } + } + }, + "/dex/trades/{denom0}/{denom1}": { + "get": { + "servers": [ + { + "url": "https://neutron.numia.xyz" + } + ], + "operationId": "getDexTrades", + "tags": [], + "sidebar": "dex", + "attributes": { + "x-sidebar": "dex" + }, + "description": "import PriceTag from \"@site/src/components/PriceTag\";\n\n", + "summary": "Get DEX Trades", + "responses": { + "200": { + "description": "Status: 200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "time": { + "type": "string" + }, + "height": { + "type": "string" + }, + "tx": { + "type": "string" + }, + "buy": { + "type": "string", + "nullable": true + }, + "sell": { + "type": "string", + "nullable": true + }, + "buy_at": { + "type": "number", + "nullable": true + }, + "sell_at": { + "type": "number", + "nullable": true + } + }, + "required": [ + "time", + "height" + ] + } + }, + "meta": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the field" + }, + "type": { + "type": "string", + "description": "Data type of the field in the database" + }, + "units": { + "type": "string", + "description": "" + } + }, + "required": [ + "name", + "type" + ] + } + }, + "height": { + "type": "string" + }, + "time": { + "type": "string" + } + }, + "required": [ + "data", + "meta", + "height" + ] + } + } + } + } + } + } + }, + "/dex/swap-volume/{denom0}/{denom1}": { + "get": { + "servers": [ + { + "url": "https://neutron.numia.xyz" + } + ], + "operationId": "getDexSwapVolume", + "tags": [], + "sidebar": "dex", + "attributes": { + "x-sidebar": "dex" + }, + "description": "import PriceTag from \"@site/src/components/PriceTag\";\n\n", + "summary": "Get DEX Swap Volume", + "responses": { + "200": { + "description": "Status: 200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "time": { + "type": "string", + "description": "Timestamp for the volume period" + }, + "volume": { + "type": "string", + "description": "Volume amount" + } + }, + "required": [ + "time", + "volume" + ] + } + }, + "meta": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the field" + }, + "type": { + "type": "string", + "description": "Data type of the field in the database" + }, + "units": { + "type": "string", + "description": "" + } + }, + "required": [ + "name", + "type" + ] + } + }, + "height": { + "type": "string" + }, + "time": { + "type": "string" + } + }, + "required": [ + "data", + "meta", + "height", + "time" + ] + } + } + } + } + } + } + }, + "/trading/volume": { + "get": { + "servers": [ + { + "url": "https://neutron.numia.xyz" + } + ], + "operationId": "getTradingVolume", + "tags": [], + "description": "import PriceTag from \"@site/src/components/PriceTag\";\n\n", + "summary": "Get Trading Volume", + "responses": { + "200": { + "description": "Status: 200", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "day": { + "type": "string" + }, + "value": { + "type": "number" + } + }, + "required": [ + "day", + "value" + ] + } + } + } + } + } + } + } + } + } +} diff --git a/scripts/src/api-config.ts b/scripts/src/api-config.ts index ee374cc..db70eaf 100644 --- a/scripts/src/api-config.ts +++ b/scripts/src/api-config.ts @@ -77,6 +77,12 @@ export const apiConfig: ApiSection[] = [ oasFile: "https://api-docs.numia.xyz/xion/openapi.json", title: "Xion", }, + { + name: "neutron", + categoryName: "Advanced APIs", + oasFile: "https://api-docs.numia.xyz/neutron/openapi.json", + title: "Neutron", + }, { name: "snapshots", categoryName: "Tools",