Skip to content

Retrieving Historical Data #38

Answered by devfinwiz
Craven-Pirate asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Craven-Pirate ,
You can integrate this project into your python scripts easily. Kindly refer to the example below to access https://fin-maestro-kin.apidog.io/api-6701893 endpoint responsible for obtaining index's historical data:

import requests

# Base URL of your running server
BASE_URL = "http://localhost:8000"

# Endpoint for fetching historical index data
endpoint = "/nseindices/history"

# Parameters for the GET request
params = {
    "symbol": "NIFTY 50",
    "start_date": "10-01-2024",
    "end_date": "12-01-2024"
}

# Sending the GET request with parameters
response = requests.get(f"{BASE_URL}{endpoint}", params=params)

# Checking if the request was successful
if response.st…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Craven-Pirate
Comment options

@devfinwiz
Comment options

@devfinwiz
Comment options

@Craven-Pirate
Comment options

@devfinwiz
Comment options

Answer selected by Craven-Pirate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants