Koios-API commited on
Commit
82f3ada
1 Parent(s): 0597661

Upload output.json

Browse files
Files changed (1) hide show
  1. output.json +50 -0
output.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "instruction": "Using curl, retrieve the latest block information from the Cardano blockchain using the Koios API.",
4
+ "output": "curl -X GET \"https://api.koios.rest/api/v1/tip\" -H \"accept: application/json\"",
5
+ "input": "",
6
+ "text": "Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Using curl, retrieve the latest block information from the Cardano blockchain using the Koios API. ### Input: No input ### Output: curl -X GET \"https://api.koios.rest/api/v1/tip\" -H \"accept: application/json\" ### Description: The \"/tip\" endpoint fetches the latest block (tip) of the Cardano blockchain. It provides details about the most recently validated block, essential for applications needing up-to-date blockchain data. No parameters are required for this API call, making it straightforward to obtain the latest state of the blockchain. The curl command utilizes the GET method, specifying the endpoint and setting the header to accept JSON-formatted responses, illustrating an example of a basic API request for retrieving data."
7
+ },
8
+ {
9
+ "instruction": "Get the latest block information from the Cardano blockchain using the Koios API in Python.",
10
+ "output": "import requests response = requests.get(\"https://api.koios.rest/api/v1/tip\", headers={\"accept\": \"application/json\"}) print(response.json())",
11
+ "input": "",
12
+ "text": "Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Get the latest block information from the Cardano blockchain using the Koios API in Python. ### Input: No input ### Output: import requests response = requests.get(\"https://api.koios.rest/api/v1/tip\", headers={\"accept\": \"application/json\"}) print(response.json()) ### Description: The \"/tip\" endpoint fetches the latest block (tip) of the Cardano blockchain. This Python script uses the requests library to send a GET request to the endpoint. It sets the header to accept JSON-formatted responses, which is essential for interpreting the API's output correctly. The script captures the response in JSON format and prints it, making it a practical example for developers needing real-time data from the blockchain."
13
+ },
14
+ {
15
+ "instruction": "Using curl, retrieve the list of parameter update proposals from the Cardano blockchain using the Koios API.",
16
+ "output": "curl -X GET \"https://api.koios.rest/api/v1/param_updates\" -H \"accept: application/json\"",
17
+ "input": "",
18
+ "text": "Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Using curl, retrieve the list of parameter update proposals from the Cardano blockchain using the Koios API. ### Input: No input ### Output: curl -X GET \"https://api.koios.rest/api/v1/param_updates\" -H \"accept: application/json\" ### Description: The \"/param_updates\" endpoint lists historical and pending updates to the blockchain's parameters. This endpoint is critical for developers, analysts, and stakeholders who need to track changes in blockchain operation rules, including adjustments to transaction fees, block size, and other protocol specifics. The curl command utilizes the GET method to query this endpoint, specifying the 'accept: application/json' header to ensure the response is in JSON format, suitable for easy parsing and integration in various applications."
19
+ },
20
+ {
21
+ "instruction": "Using Python, retrieve parameter update proposals from the Cardano blockchain using the Koios API.",
22
+ "output": "import requests\\n\\nurl = \"https://api.koios.rest/api/v1/param_updates\"\\nheaders = {\"accept\": \"application/json\"}\\nresponse = requests.get(url, headers=headers)\\ndata = response.json()\\nprint(data)\\n",
23
+ "input": "",
24
+ "text": "Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Using Python, retrieve parameter update proposals from the Cardano blockchain using the Koios API. ### Input: No input ### Output: import requests\\n\\nurl = \"https://api.koios.rest/api/v1/param_updates\"\\nheaders = {\"accept\": \"application/json\"}\\nresponse = requests.get(url, headers=headers)\\ndata = response.json()\\nprint(data)\\n ### Description: The \"/param_updates\" endpoint lists all parameter update proposals submitted to the blockchain starting from the Shelley era. This Python script uses the requests library to make a GET request to the endpoint, setting the header to accept JSON-formatted responses. It retrieves and prints the parameter updates, providing an efficient way for developers to track changes and proposals regarding the Cardano blockchain's operational parameters."
25
+ },
26
+ {
27
+ "instruction": "Using Python, retrieve the genesis block information of the Cardano blockchain using the Koios API.",
28
+ "output": "import requests\\n\\nurl = \"https://api.koios.rest/api/v1/genesis\"\\nheaders = {\"accept\": \"application/json\"}\\nresponse = requests.get(url, headers=headers)\\ndata = response.json()\\nprint(data)\\n",
29
+ "input": "",
30
+ "text": "Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Using Python, retrieve the genesis block information of the Cardano blockchain using the Koios API. ### Input: No input ### Output: import requests\\n\\nurl = \"https://api.koios.rest/api/v1/genesis\"\\nheaders = {\"accept\": \"application/json\"}\\nresponse = requests.get(url, headers=headers)\\ndata = response.json()\\nprint(data)\\n ### Description: The \"/genesis\" endpoint retrieves information about the genesis block of the Cardano blockchain. This Python script employs the requests library to issue a GET request, specifying that it accepts JSON-formatted responses. The script processes the response in JSON format and prints the data, which includes essential foundational information about the blockchain. This is particularly useful for developers needing insights into the initial block parameters and settings of the Cardano network."
31
+ },
32
+ {
33
+ "instruction": "Using curl, retrieve information about the genesis block of the Cardano blockchain using the Koios API.",
34
+ "output": "curl -X GET \"https://api.koios.rest/api/v1/genesis\" -H \"accept: application/json\"",
35
+ "input": "",
36
+ "text": "Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Using curl, retrieve information about the genesis block of the Cardano blockchain using the Koios API. ### Input: No input ### Output: curl -X GET \"https://api.koios.rest/api/v1/genesis\" -H \"accept: application/json\" ### Description: The \"/genesis\" endpoint retrieves information about the genesis block of the Cardano blockchain. This endpoint is crucial for understanding the initial parameters and setup of the blockchain, such as the starting block, initial stakeholders, and configuration settings. The curl command specifies the GET method to fetch data from this endpoint, with headers set to accept JSON responses, providing a straightforward method to access foundational blockchain data."
37
+ },
38
+ {
39
+ "instruction": "Using curl, retrieve information about epoch 320 from the Cardano blockchain and whether to include the next epoch's details using the Koios API.",
40
+ "output": "curl -X GET \"https://api.koios.rest/api/v1/epoch_info?_epoch_no=320&_include_next_epoch=false\" -H \"accept: application/json\"",
41
+ "input": "_epoch_no=320, _include_next_epoch=false",
42
+ "text": "Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Using curl, retrieve information about epoch 320 from the Cardano blockchain and whether to include the next epoch's details using the Koios API. ### Input: _epoch_no=320, _include_next_epoch=false ### Output: curl -X GET \"https://api.koios.rest/api/v1/epoch_info?_epoch_no=320&_include_next_epoch=false\" -H \"accept: application/json\" ### Description: The \"/epoch_info\" endpoint retrieves detailed information about a specific epoch on the Cardano blockchain. This endpoint is versatile, allowing queries for epoch details such as start and end times, stake distributions, and other relevant metrics. The parameters _epoch_no specifies the epoch number (320 in this case), and _include_next_epoch=false indicates that the next epoch's details should not be included in the response. This curl command uses the GET method and includes parameters in the URL to specify the request details, setting the header to accept JSON responses, which helps in fetching and viewing the data in a structured format."
43
+ },
44
+ {
45
+ "instruction": "Using Python, retrieve information about a specific epoch (320) from the Cardano blockchain without including the next epoch, using the Koios API.",
46
+ "output": "import requests\\n\\nurl = \"https://api.koios.rest/api/v1/epoch_info?_epoch_no=320&_include_next_epoch=false\"\\nheaders = {\"accept\": \"application/json\"}\\nresponse = requests.get(url, headers=headers)\\ndata = response.json()\\nprint(data)\\n",
47
+ "input": "_epoch_no=320, _include_next_epoch=false",
48
+ "text": "Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Using Python, retrieve information about a specific epoch (320) from the Cardano blockchain without including the next epoch, using the Koios API. ### Input: _epoch_no=320, _include_next_epoch=false ### Output: import requests\\n\\nurl = \"https://api.koios.rest/api/v1/epoch_info?_epoch_no=320&_include_next_epoch=false\"\\nheaders = {\"accept\": \"application/json\"}\\nresponse = requests.get(url, headers=headers)\\ndata = response.json()\\nprint(data)\\n ### Description: The \"/epoch_info\" endpoint retrieves detailed information about a specific epoch on the Cardano blockchain. This Python script sends a GET request with parameters specifying epoch number 320 and not to include information about the next epoch. The script uses the requests library, sets the header to accept JSON responses, and prints the data in a readable format. This method is crucial for obtaining historical data about specific epochs for analysis or reporting purposes."
49
+ }
50
+ ]