Polygon.io is proud to offer extensive financial datasets, easily accessible thanks to S3. This guide provides detailed steps on setting up various S3 clients to efficiently retrieve the data you need.
A valid flat files subscription with Polygon.io, after which you will receive unique authentication keys. We have standardized the endpoint and bucket details for all users as follows:
Endpoint: https://files.polygon.io Bucket: flatfiles
Polygon.io rigorously tests and supports four widely recognized S3 clients to ensure compatibility and user convenience. These include:
Below, you’ll find the setup process for each client.
The AWS S3 Command Line Interface (CLI) is a powerful tool designed to interact with Amazon S3.
Here’s how to get started:
aws s3 ls s3://flatfiles/ --endpoint-url https://files.polygon.io
Rclone facilitates data synchronization between your local system and S3 storage. Follow these steps to configure Rclone with Polygon.io:
[s3] type = s3 env_auth = false access_key_id = [ACCESS_KEY_ID] secret_access_key = [SECRET_ACCESS_KEY] endpoint = https://files.polygon.io
d. After configuration, you can interact with your storage using commands like rclone ls s3:flatfiles.
MinIO client works seamlessly with any S3 compatible cloud storage. Here’s how to configure it with Polygon.io:
{ "version": "10", "aliases": { "s3": { "url": "https://files.polygon.io", "accessKey": "YourAccessKey", "secretKey": "YourSecretKey", "api": "S3v4", "path": "auto" } } }
Boto3 is the Amazon Web Services (AWS) SDK for Python, which enables Python developers to write software that makes use of Amazon services like S3. To set it up, follow these steps:
import boto3 from botocore.client import Config # Initialize a session using your credentials session = boto3.Session( aws_access_key_id='YOUR_ACCESS_KEY', aws_secret_access_key='YOUR_SECRET_KEY', ) # Create a client with your session and specify the endpoint s3 = session.client( 's3', endpoint_url='https://files.polygon.io', config=Config(signature_version='s3v4'), ) # List buckets, objects, or perform any other operations for key in s3.list_objects(Bucket='flatfiles')['Contents']: print(key['Key'])
c. This script initiates a session with your credentials, establishes a client connection, and lists all files available in the specified bucket.
By following the steps outlined for each client, you can efficiently set up your systems to access extensive financial datasets from Polygon.io via S3. or further assistance or more advanced setup options, please refer to the respective client’s official documentation.