### Get Stake Portfolio Response Example Source: https://docs.taostats.io/reference/get-stake-portfolio Example response from the Get Stake Portfolio endpoint. Contains details like hotkey, coldkey, netuid, balance, and more. ```json { "hotkey_name": "Taostats", "hotkey": { "ss58": "5GKH9FPPnWSUoeeTJp19wVtd84XqFW4pyK2ijV2GsFbhTrP1", "hex": "0xbc0e6b701243978c1fe73d721c7b157943a713fca9f3c88cad7a9f7799bc6b26" }, "coldkey": { "ss58": "5Dw9eWw19H1n6VtK4WLTJVgk5XNhXgHV39pTptthWSLjG31w", "hex": "0x52b5527a846824c4095e7688e6cf1271a9c6b36f5b6391e82928c2b36be11a59" }, "netuid": 64, "subnet_rank": 283, "subnet_total_holders": 14051, "balance": "532854877505", "balance_as_tao": "45028348418", "total_bought_alpha": "566189540885", "total_bought_alpha_as_tao": "142999900000", "total_bought_alpha_as_usd": "59017.06", "total_sold_alpha": "179216171419", "total_sold_alpha_as_tao": "45041577328", "total_sold_alpha_as_usd": "18642.43", "total_transferred_in_alpha": "0", "total_transferred_in_alpha_as_tao": "0", "total_transferred_in_alpha_as_usd": "0", "total_transferred_out_alpha": "0", "total_transferred_out_alpha_as_tao": "0", "total_transferred_out_alpha_as_usd": "0", "total_buys": 2, "total_sells": 1, "total_transfers_in": 0, "total_transfers_out": 0, "current_market_price_usd": "37.77", "current_market_price_tao": "0", "average_purchase_price_tao": "0", "average_sale_price_tao": "0", "average_purchase_price_usd": "104.24", "average_sale_price_usd": "104.02", "total_earned_alpha": "145881508039", "total_earned_alpha_as_tao": "12327566725", "total_earned_alpha_as_usd": "5510.09", "realised_profit_usd": "-38.26", "unrealised_profit_usd": "-20209.90", "realised_profit_tao": "-222230533", "unrealised_profit_tao": "-52707739023", "period_start_tao_price_in_usd": null, "period_start_alpha": null, "period_start_alpha_price_in_tao": null, "period_start_alpha_cost_in_usd": null } ``` -------------------------------- ### Get Liquidity Tick to Price API Response Example Source: https://docs.taostats.io/reference/get-liquidity-tick-to-price Example of a successful response when querying the tick to price endpoint. It shows the tick value and its corresponding price. ```json { "data": [ { "tick": 123, "price": "1.012375333531027970456969303" } ] } ``` -------------------------------- ### Liquidity Distribution Response in JSON Source: https://docs.taostats.io/reference/liquidity Example JSON response structure from the Get Liquidity Distribution API, showing a segmented array of objects with activeLiquidity and price fields. This represents the output format without dependencies or inputs, limited to a partial example for brevity. ```json ... { "activeLiquidity": "1440957321", "price": "0.0483229580117229056229522940" }, { "activeLiquidity": "1440957321", "price": "0.0488085874110689833991748318" }, { "activeLiquidity": "1440957321", "price": "0.0492990972217808558704205053" }, { "activeLiquidity": "1440957321", "price": "0.0497945364903436235075979460" }, { "activeLiquidity": "91240979464", "price": "0.0502949547561429888846537086" }, { "activeLiquidity": "91240979464", "price": "0.0508004020564187411750832081" }, ... ``` -------------------------------- ### Example JSON Response for Account Data Source: https://docs.taostats.io/reference/coldkeyswallets This is an example JSON response structure for a successful API request to fetch account data. It includes pagination details and a list of account objects, each containing network, block, timestamp, and balance information. ```JSON { "pagination": { "current_page": 1, "per_page": 50, "total_items": 205362, "total_pages": 4108, "next_page": 2, "prev_page": null }, "data": [ { "address": { "ss58": "5GBnPzvPghS8AuCoo6bfnK7JUFHuyUhWSFD4woBNsKnPiEUi", "hex": "0xb656ef6d8fa3ae7a7800906b6ea83a7c1320041290002c3ae7b1e4c68b1e4a67" }, "network": "finney", "block_number": 5011596, "timestamp": "2025-02-26T13:52:48Z", "rank": 1, "balance_free": "777150581296935", "balance_staked": "0", "balance_staked_alpha_as_tao": "0", "balance_staked_root": "0", "balance_total": "777150581296935", "created_on_date": "2024-04-09", "created_on_network": "finney", "coldkey_swap": null }, { "address": { "ss58": "5FCY9iJYwghetXjE6xiYTj9g3HVW2K7E6JswWnR7PosJCRK9", "hex": "0x8aadfd659682487db6cb8e41e827056374743295cfad120270bc151e20883324" }, "network": "finney", "block_number": 5011596, "timestamp": "2025-02-26T13:52:48Z", "rank": 2, "balance_free": "1647950000", "balance_staked": "239843703109925", "balance_staked_alpha_as_tao": "0", "balance_staked_root": "239843703109925" } ] } ``` -------------------------------- ### Get Tao Balance Info (cURL) Source: https://docs.taostats.io/reference/live Example using cURL to retrieve the balance information for a specific Tao address. This is a basic HTTP GET request to the taostats.io API. ```Shell curl --request GET \ --url https://api.taostats.io/api/v1/live/accounts/address/balance-info \ --header 'accept: application/json' ``` -------------------------------- ### Get Tao Balance Info (Node.js) Source: https://docs.taostats.io/reference/live Node.js example for retrieving Tao balance information. This would typically use a library like 'axios' or the built-in 'https' module to make the API call. ```JavaScript // Node.js example not provided in the source text, but would typically involve: // const axios = require('axios'); // // async function getTaoBalance(address) { // try { // const response = await axios.get(`https://api.taostats.io/api/v1/live/accounts/${address}/balance-info`, { // headers: { 'accept': 'application/json' } // }); // return response.data; // } catch (error) { // console.error('Error fetching Tao balance:', error); // return null; // } // } ``` -------------------------------- ### TAOStats Event Payload Example (Text) Source: https://docs.taostats.io/reference/get-event-1 This example demonstrates the structure of an event payload returned by the TAOStats.io API. It includes details such as event ID, extrinsic index, pallet, name, arguments, and block information. This format is useful for parsing event data. ```text { "id": "5453540-0157", event id "extrinsic_index": 49, "index": 157, "phase": "ApplyExtrinsic", "pallet": "TransactionPayment", "name": "TransactionFeePaid", "args": { "actualFee": "0", "tip": "0", "who": "0x96f0651155c3a50c68d6fbe4175f512627d6517140ce00ae495e8b4a81050815" }, "block_number": 5453540, "extrinsic_id": "5453540-0049", "call_id": "5453540-0049", "timestamp": "2025-04-28T23:01:36Z" }, ``` -------------------------------- ### TaoStats API Output Example (Text) Source: https://docs.taostats.io/reference/get-validators-in-a-subnet Demonstrates the structure of a typical output when querying TaoStats API. This example shows the expected format for validator addresses (SS58 and hex), name, netuid, and hotkey alpha value. It is provided in text format for clarity. ```text { "address": { "ss58": "5FFN6Nvvm78GqyMratgXXvjbqZPi7SHgSQ81nyS96jBuUWgt", "hex": "0x8cd280d43e4cf6501ae3b425583975ff63ce4d7470cf518074b5903ff375600e" }, "name": "PRvalidator", "netuid": 75, "hotkey_alpha": "30008447885" as rao }, ``` -------------------------------- ### Validator Data Structure Example (Text) Source: https://docs.taostats.io/reference/get-validator-history-1 This snippet shows an example of the data structure returned for validator statistics. It includes details like hotkey, coldkey, stake, rank, returns, and subnet dominance. The data is presented in a text format, suitable for direct inspection or basic parsing. ```text { "hotkey": { "ss58": "5GKH9FPPnWSUoeeTJp19wVtd84XqFW4pyK2ijV2GsFbhTrP1", "hex": "0xbc0e6b701243978c1fe73d721c7b157943a713fca9f3c88cad7a9f7799bc6b26" }, "coldkey": { "ss58": "5GcCZ2BPXBjgG88tXJCEtkbdg2hNrPbL4EFfbiVRvBZdSQDC", "hex": "0xc8f623c92b47ac9645d6744f3d448cdb7a2a3b08a22a39bfd1db0afbd9c07117" }, "name": "Taostats & Corcel", "block_number": 4920349, "timestamp": "2025-02-13T21:40:24Z", "created_on_date": "2023-03-21", "rank": 1, "nominators": 6691, "nominators_24_hr_change": 5, "system_stake": "5864261013828190", as rao "stake": "767381773437417", as rao "stake_24_hr_change": "-3452405790344", as rao "dominance": "13.08573700297269211464",percentage "validator_stake": "457978988665",as rao "take": "0.08999771114671549554", number "total_daily_return": "0", "validator_return": "0", "nominator_return_per_k": "468470749",as rao "apr": "0.17099", "nominator_return_per_k_7_day_average": "468989538",as rao "nominator_return_per_k_30_day_average": "452990300" as rao, "apr_7_day_average": "0.17118", "apr_30_day_average": "0.16534", "pending_emission": "136028561110", per epoch as rao "blocks_until_next_reward": 4472, "last_reward_block": 4917621, "registrations": [ 0, 63 ], "permits": [ 0, 53 ], "subnet_dominance": [ { "netuid": 0, "dominance": "13.08573700297269211464", percentage "family_stake": "767381773437417" as rao }, } ] }, ``` -------------------------------- ### Retrieve Coldkey Example Output (JSON) Source: https://docs.taostats.io/reference/get-exchanges Shows a sample JSON response for a coldkey object returned by the Taostats.io API. Useful for developers to understand the data format, including ss58 and hex fields. No specific dependencies; this is illustrative output. ```text { "coldkey": { "ss58": "5C5FQQSfuxgJc5sHjjAL9RKAzR98qqCV2YN5xAm2wVf1ctGR", "hex": "0x006a327fd8209758351b989bc48825c945360dcc1d7ac279976cd445d9027d03" }, "name": "Kraken Cold", "icon": null }, ``` -------------------------------- ### Get Exchanges API Response Example Source: https://docs.taostats.io/reference/get-exchanges Example JSON response from the Taostats API when requesting exchange information. Includes coldkey details (SS58 and hex formats), exchange name, and icon URL. ```json { "coldkey": { "ss58": "5C5FQQSfuxgJc5sHjjAL9RKAzR98qqCV2YN5xAm2wVf1ctGR", "hex": "0x006a327fd8209758351b989bc48825c945360dcc1d7ac279976cd445d9027d03" }, "name": "Kraken Cold", "icon": null } ``` -------------------------------- ### Validator Output Example Source: https://docs.taostats.io/reference/get-validator-performance-dtao-history This snippet provides an example of the output structure for validator data, detailing various metrics like hotkey, coldkey, block number, trust, take, and weight. ```APIDOC ## GET /websites/taostats_io_reference/output ### Description Retrieves a sample output structure for validator data from the TaoStats.io reference API. This includes detailed metrics about a validator's performance and network participation. ### Method GET ### Endpoint /websites/taostats_io_reference/output ### Parameters This endpoint does not have any path or query parameters. ### Request Body This endpoint does not accept a request body. ### Request Example GET /websites/taostats_io_reference/output ### Response #### Success Response (200) - **output** (object) - Contains the validator data structure. - **name** (string) - The name of the validator (can be null). - **hotkey** (object) - Details about the validator's hotkey. - **ss58** (string) - The SS58 address of the hotkey. - **hex** (string) - The hex representation of the hotkey. - **coldkey** (object) - Details about the validator's coldkey. - **ss58** (string) - The SS58 address of the coldkey. - **hex** (string) - The hex representation of the coldkey. - **block_number** (integer) - The block number at which this data was recorded. - **timestamp** (string) - The ISO 8601 timestamp of the data. - **netuid** (integer) - The network UID. - **uid** (integer) - The unique identifier for the validator. - **position** (integer) - The validator's position in the network. - **last_updated** (integer) - Timestamp of the last update. - **nominators** (integer) - The number of nominators for the validator. - **vtrust** (number) - The validator's trust score. - **validator_type** (string) - The type of validator (e.g., 'childkey'). - **take** (number) - The validator's take percentage. - **childkey_take** (number) - The child key take percentage. - **proportion** (string) - The proportion value. - **subnet_weight** (string) - The validator's weight within the subnet (in rao). - **root_weight** (string) - The validator's weight at the root level (in rao). - **alpha** (string) - The alpha value (in rao). - **family_subnet_weight** (string) - The family's subnet weight (in rao). - **family_root_weight** (string) - The family's root weight (in rao). - **family_alpha** (string) - The family's alpha value (in rao). - **dominance** (string) - The dominance percentage. - **dividends** (number) - The dividends received by the validator. - **nominator_return_per_day** (string) - Daily return for nominators. - **validator_return_per_day** (string) - Daily return for the validator. #### Response Example ```json { "output": { "name": null, "hotkey": { "ss58": "5CAQhe9pWMe9anWX9qbK6Z9RydRth7S6WDopapSr6uShGum5", "hex": "0x0459b8ac46933d4cbbd4f0b36934704e7a726851b359ca2ee8d5e704a8896e02" }, "coldkey": { "ss58": "5GcCZ2BPXBjgG88tXJCEtkbdg2hNrPbL4EFfbiVRvBZdSQDC", "hex": "0xc8f623c92b47ac9645d6744f3d448cdb7a2a3b08a22a39bfd1db0afbd9c07117" }, "block_number": 5457464, "timestamp": "2025-04-29T12:06:24Z", "netuid": 19, "uid": 142, "position": 1, "last_updated": 5457424, "nominators": 823, "vtrust": 0.9999542229343099, "validator_type": "childkey", "take": "0.17999542229343099", "childkey_take": "0", "proportion": "1", "subnet_weight": "410541579188894.74000000000000", "root_weight": "217835913007812.74000000000000", "alpha": "192705666181082", "family_subnet_weight": "410541579188894.74000000000000", "family_root_weight": "217835913007812.74000000000000", "family_alpha": "192705666181082", "dominance": "25.60", "dividends": 0.26250095368886854, "nominator_return_per_day": "0", "validator_return_per_day": "0" } } ``` ``` -------------------------------- ### GET /api/v1/live/accounts/{address}/balance-info Source: https://docs.taostats.io/reference/live This endpoint retrieves the live free Tao balance information for a specified account address. It requires a valid coldkey address as a path parameter and returns balance details in JSON format. Use this for real-time balance queries in Tao blockchain applications. ```APIDOC ## GET /api/v1/live/accounts/{address}/balance-info ### Description Retrieves the free Tao balance for the specified account address in the Tao blockchain. ### Method GET ### Endpoint /api/v1/live/accounts/{address}/balance-info ### Parameters #### Path Parameters - **address** (string) - Required - Coldkey address of the account. #### Query Parameters None #### Request Body None ### Request Example ``` curl --request GET \ --url https://api.taostats.io/api/v1/live/accounts/{address}/balance-info \ --header 'accept: application/json' ``` ### Response #### Success Response (200) - **balanceInfo** (object) - Balance information object. #### Response Example ``` {} ``` #### Error Response (400) - **error** (object) - Error details object. #### Response Example ``` {} ``` ``` -------------------------------- ### GET /api/account/latest/v1 Source: https://docs.taostats.io/reference/coldkeyswallets This endpoint fetches the latest account data, including balances, staking details, and rankings for accounts on the specified network. It supports pagination to handle large datasets. Use query parameters to filter by network and control pagination. ```APIDOC ## GET /api/account/latest/v1 ### Description Retrieves the latest account information, such as addresses, balances, staking amounts, and rankings, for a given network. Supports pagination for efficient data retrieval. ### Method GET ### Endpoint /api/account/latest/v1 ### Parameters #### Path Parameters None #### Query Parameters - **network** (string) - Required - The network name, e.g., 'Finney' - **page** (integer) - Required - The page number for pagination, starting from 1 - **limit** (integer) - Required - The number of items per page, e.g., 50 #### Request Body None (GET request) ### Request Example ```bash curl --request GET \ --url 'https://api.taostats.io/api/account/latest/v1?network=Finney&page=1&limit=50' \ --header 'accept: application/json' ``` ### Response #### Success Response (200) - **pagination** (object) - Pagination metadata including current_page, per_page, total_items, total_pages, next_page, prev_page - **data** (array) - Array of account objects, each containing address (with ss58 and hex), network, block_number, timestamp, rank, balance_free (string), balance_staked (string), balance_staked_alpha_as_tao (string), balance_staked_root (string), balance_total (string), created_on_date (string), created_on_network (string), coldkey_swap (null or value) #### Response Example ```json { "pagination": { "current_page": 1, "per_page": 50, "total_items": 205362, "total_pages": 4108, "next_page": 2, "prev_page": null }, "data": [ { "address": { "ss58": "5GBnPzvPghS8AuCoo6bfnK7JUFHuyUhWSFD4woBNsKnPiEUi", "hex": "0xb656ef6d8fa3ae7a7800906b6ea83a7c1320041290002c3ae7b1e4c68b1e4a67" }, "network": "finney", "block_number": 5011596, "timestamp": "2025-02-26T13:52:48Z", "rank": 1, "balance_free": "777150581296935", "balance_staked": "0", "balance_staked_alpha_as_tao": "0", "balance_staked_root": "0", "balance_total": "777150581296935", "created_on_date": "2024-04-09", "created_on_network": "finney", "coldkey_swap": null } ] } ``` ### Error Handling - **400** - Bad request, typically due to invalid parameters (e.g., malformed network name or pagination values). Response body is an object with error details. ``` -------------------------------- ### Get Tao Balance Info (PHP) Source: https://docs.taostats.io/reference/live PHP script to fetch Tao balance information using cURL. This example demonstrates making an HTTP GET request to the taostats.io API. ```PHP // PHP example not provided in the source text, but would typically involve: // ``` -------------------------------- ### Get Event API JSON Response Example Source: https://docs.taostats.io/reference/get-event-1 Demonstrates the JSON response structure for chain events. Shows a TransactionFeePaid event with details including event ID, extrinsic index, pallet information, arguments, and timestamp. This example illustrates the data format returned when querying blockchain events. ```json { "id": "5453540-0157", "extrinsic_index": 49, "index": 157, "phase": "ApplyExtrinsic", "pallet": "TransactionPayment", "name": "TransactionFeePaid", "full_name": "TransactionPayment.TransactionFeePaid", "args": { "actualFee": "0", "tip": "0", "who": "0x96f0651155c3a50c68d6fbe4175f512627d6517140ce00ae495e8b4a81050815" }, "block_number": 5453540, "extrinsic_id": "5453540-0049", "call_id": "5453540-0049", "timestamp": "2025-04-28T23:01:36Z" } ``` -------------------------------- ### Provide example JSON output for token details Source: https://docs.taostats.io/reference/get-price-history-1 The snippet shows a sample JSON payload returned by the TAOStats.io API containing token metadata, supply figures, price information, and market statistics. It can be used as a reference for parsing API responses. Note that the example includes inline comments and may not be valid strict JSON. ```text { "created_at": "2025-04-28T15:45:04Z", "updated_at": "2025-04-28T15:45:04Z", "name": "Bittensor", "symbol": "TAO", "slug": "bittensor", "circulating_supply":"8687103" amount of token in circulation, "max_supply": "21000000" the max number of tokens, "total_supply": "8687103" , "last_updated": "2025-04-28T15:44:00Z", "price": "361.919486420088" price in USD, "volume_24h": "193875141.332405" Volume in USD, "market_cap": "3144031856.2384" Market cap in USD, "percent_change_1h": "-3.72273857" hourly price delta %, "percent_change_24h": "3.02800653" daily price delta %, "percent_change_7d": "14.53687118" weekly price delta %, "percent_change_30d": "60.5253009" monthly price delta %, "percent_change_60d": "3.36943051" 2 month price delta %, "percent_change_90d": "-20.46854563" quarterly price delta %, "market_cap_dominance": "0.1071", "fully_diluted_market_cap": "7600309214.82" market cap with todays price and full issuance }, ``` -------------------------------- ### Get Validator Data (HTTP) Source: https://docs.taostats.io/reference/validation-1 This snippet shows how to make an HTTP GET request to the TaoStats API to retrieve the latest validator data. It includes the base URL and an example of the expected JSON response structure for a validator. ```http GET https://api.taostats.io/api/dtao/validator/latest/v1 ``` ```json { "hotkey": { "ss58": "5GKH9FPPnWSUoeeTJp19wVtd84XqFW4pyK2ijV2GsFbhTrP1", "hex": "0xbc0e6b701243978c1fe73d721c7b157943a713fca9f3c88cad7a9f7799bc6b26" }, "coldkey": { "ss58": "5GcCZ2BPXBjgG88tXJCEtkbdg2hNrPbL4EFfbiVRvBZdSQDC", "hex": "0xc8f623c92b47ac9645d6744f3d448cdb7a2a3b08a22a39bfd1db0afbd9c07117" }, "name": "Taostats & Corcel", "block_number": 5453927, "timestamp": "2025-04-29T00:19:00Z", "created_on_date": "2025-02-13", "rank": 1, "root_rank": 1, "alpha_rank": 1, "active_subnets": 88, "global_nominators": 28224, "global_nominators_24_hr_change": 103, "take": "0.08999771114671549554", "global_weighted_stake": "295814209201488", "global_weighted_stake_24_hr_change": "-7812357318085", "global_alpha_stake_as_tao": "152287191316855", "root_stake": "797372321581294", "weighted_root_stake": "143527017884633", "dominance": "14.10", "dominance_24_hr_change": "0.04", "nominator_return_per_day": "790856951071", "validator_return_per_day": "78214435626" } ``` -------------------------------- ### GET /new-endpoint Source: https://docs.taostats.io/reference/get_new-endpoint-1 Retrieves information from the new endpoint. This is a basic GET endpoint that returns a successful response. Use this as a starting point for documenting additional API endpoints. ```APIDOC ## GET /new-endpoint ### Description This is your first endpoint! Edit this page to start documenting your API. ### Method GET ### Endpoint https://management-api.taostats.io/new-endpoint ### Parameters This endpoint does not require any parameters. ### Request Example No request body is required for this GET endpoint. ### Response #### Success Response (200) Returns a successful response. Response schema is not defined in the specification. #### Response Example Response schema not defined in OpenAPI specification. ``` -------------------------------- ### Define OpenAPI specification for Live: Get Free Tao Balance endpoint Source: https://docs.taostats.io/reference/get-live-balance-info This JSON snippet provides the OpenAPI 3.1 specification for the TaoStats.io live balance endpoint. It includes the server URL, API key security header, path parameter for the coldkey address, and success/error response schemas. The specification can be used with API documentation tools or client generators. ```json { "openapi": "3.1.0", "info": { "title": "taostats-1", "version": "2.0" }, "servers": [ { "url": "https://api.taostats.io" } ], "components": { "securitySchemes": { "sec0": { "type": "apiKey", "in": "header", "name": "Authorization" } } }, "security": [ { "sec0": [] } ], "paths": { "/api/v1/live/accounts/{address}/balance-info": { "get": { "summary": "Live: Get Free Tao Balance", "description": "", "operationId": "get-live-balance-info", "parameters": [ { "name": "address", "in": "path", "description": "coldkey address", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{}" } }, "schema": { "type": "object", "properties": {} } } } }, "400": { "description": "400", "content": { "application/json": { "examples": { "Result": { "value": "{}" } }, "schema": { "type": "object", "properties": {} } } } } }, "deprecated": false } } }, "x-readme": { "headers": [], "explorer-enabled": true, "proxy-enabled": true }, "x-readme-fauxas": true } ``` -------------------------------- ### Get Coingecko Asset cURL Request Source: https://docs.taostats.io/reference/coingecko Example cURL command to fetch asset data from the CoinGecko API. This request requires no authentication and accepts JSON. ```shell curl --request GET \ --url https://api.taostats.io/api/coingecko/asset \ --header 'accept: application/json' ``` -------------------------------- ### Get Block Number over Interval - OpenAPI Definition Source: https://docs.taostats.io/reference/get-block-interval-1 This snippet defines the OpenAPI 3.1.0 specification for the '/api/block/interval/v1' GET endpoint. It details parameters like timestamp range and frequency, and provides an example of the paginated JSON response containing block numbers and timestamps. ```json { "openapi": "3.1.0", "info": { "title": "taostats-1", "version": "2.0" }, "servers": [ { "url": "https://api.taostats.io" } ], "components": { "securitySchemes": { "sec0": { "type": "apiKey", "in": "header", "name": "Authorization" } } }, "security": [ { "sec0": [] } ], "paths": { "/api/block/interval/v1": { "get": { "summary": "Get Block Number over Interval", "description": "", "operationId": "get-block-interval-1", "parameters": [ { "name": "timestamp_start", "in": "query", "description": "timestamp range in Unix timestamp (seconds since 1970-01-01) (inclusive)", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "name": "timestamp_end", "in": "query", "description": "timestamp range in Unix timestamp (seconds since 1970-01-01) (inclusive)", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "name": "frequency", "in": "query", "description": "how frequently to grab blocks", "required": true, "schema": { "type": "string", "enum": [ "by_hour", "by_day" ], "default": "by_day" } }, { "name": "page", "in": "query", "description": "The page number of the response.", "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "limit", "in": "query", "description": "The number of responses. max is 200,", "schema": { "type": "integer", "format": "int32", "default": 50 } }, { "name": "order", "in": "query", "schema": { "type": "string", "enum": [ "date_asc", "date_desc" ] } } ], "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{\n \"pagination\": {\n \"current_page\": 1,\n \"per_page\": 50,\n \"total_items\": 5,\n \"total_pages\": 1,\n \"next_page\": null,\n \"prev_page\": null\n },\n \"data\": [\n {\n \"block_number\": 5007431,\n \"timestamp\": \"2025-02-25T23:59:48Z\"\n },\n {\n \"block_number\": 5000231,\n \"timestamp\": \"2025-02-24T23:59:48.001Z\"\n },\n {\n \"block_number\": 4993036,\n \"timestamp\": \"2025-02-23T23:59:48Z\"\n },\n {\n \"block_number\": 4985836,\n \"timestamp\": \"2025-02-22T23:59:48Z\"\n },\n {\n \"block_number\": 4978636,\n \"timestamp\": \"2025-02-21T23:59:48Z\"\n }\n ]\n}" } }, "schema": { "type": "object", "properties": { "pagination": { "type": "object", "properties": { "current_page": { "type": "integer", "example": 1, "default": 0 }, "per_page": { "type": "integer", "example": 50, "default": 0 }, "total_items": { "type": "integer", "example": 5, "default": 0 }, "total_pages": { "type": "integer", "example": 1, "default": 0 }, "next_page": {}, "prev_page": {} } }, "data": { "type": "array", "items": { "type": "object", "properties": { "block_number": { "type": "integer", "example": 5007431, "default": 0 }, "timestamp": { "type": "string" } } } } } } } } } } } } } } ``` -------------------------------- ### GET Request to New Endpoint using cURL Source: https://docs.taostats.io/reference/new-endpoint-1 This snippet demonstrates making a GET request to the new endpoint using cURL in the Shell environment. It requires a valid URL and sends a GET request, expecting a 200 successful response. Note that this is a basic example with no authentication shown. ```Shell curl --request GET \ --url https://management-api.taostats.io/new-endpoint ```