Index One's Solutions Overview
  • 👋Welcome to Index One's Solutions Overview
  • Overview
    • 💡What we do
    • ✨Our Features
  • Product Guides
    • 🛠️Index Construction
      • 📪Universe, Weighting and Specifications
      • 📪Drag functionality
      • 📪Index Universe
      • 📪How to upload a custom basket
      • 📪How to build an index
      • 📪How to use custom code to build an index
    • 🛠️Index Maintenance
      • 📪Rebalancing a basket index
      • 📪Set up delivery of a tracker file or weighting file
      • 📪Download index values from a live index page
      • 📪Set up S3 data retrieval
    • 📎Reference Data
      • ⚙️Attributes and Filters
      • 📍Symbol Mapping
      • 🌏Country Codes
      • 🔢Formulas and Calculations
    • 🔗Integrations
      • 📪How to embed index data on your website
      • 📪How to integrate index data on Alphathena
Powered by GitBook
On this page
  • Step 1: Set up S3 delivery stream on Streams
  • Step 2: Retrieve data from the S3 bucket
  1. Product Guides
  2. Index Maintenance

Set up S3 data retrieval

Here is sample code to retrieve data from Index One's S3 bucket in Python.

PreviousDownload index values from a live index pageNextReference Data

Last updated 6 months ago

Step 1: Set up S3 delivery stream on Streams

Navigate to the page and set up a delivery a stream with the below configurations.

Step 2: Retrieve data from the S3 bucket

Use this code to retrieve data from Index One's S3 bucket in Python.

Team directory is equal to the team_id which is accessible from the Team page in the console.

import boto3

access_key = "xxxxxxxxxxxxxxxxxxxx"
secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
bucket_name = "prod-core-i1-export"
team_directory = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/"

session = boto3.Session(
    aws_access_key_id=access_key,
    aws_secret_access_key=secret
)

s3_client = session.client("s3")

r = s3_client.list_objects_v2(
    Bucket=bucket_name,
    Prefix=team_directory
)

for object in r['Contents']:
    s3_client.download_file(
        bucket_name,
        object['Key'],
        '/my/local/dir/filename.csv'
    )

Please get in touch with admin@indexone.io to request S3 access keys.

🛠️
📪
Streams