S3BucketHelper

StockSharp.Connectors.Common

Helper for working with AWS S3 buckets via direct HTTP (without AWS SDK).

メソッド

GetDateRangeFromFilesAsync(HttpClient, string, string, string, string, CancellationToken, string) : ValueTask<ValueTuple?<DateTime, DateTime>>

Gets the date range from S3 bucket by listing files. Uses file-based date extraction (e.g., "prefix/BTCUSDT-2024-01-01.zip" -> January 1, 2024).

client
HTTP client to use.
bucketName
S3 bucket name.
region
AWS region (e.g., "ap-northeast-1").
prefix
Prefix to search (e.g., "data/spot/daily/klines/BTCUSDT/1m/BTCUSDT-1m-").
dateFormat
Date format in filenames (e.g., "yyyy-MM-dd").
cancellationToken
Cancellation token.
baseUrl
Optional custom base URL for S3-compatible endpoints. If null, uses virtual-hosted style.

戻り値: Min and max dates, or null if no data found or error occurred.

GetDateRangeFromFilesAsync(HttpClient, string, string, string, string, CancellationToken, string) : ValueTask<ValueTuple?<DateTime, DateTime>>

Gets the date range from S3 bucket by listing files. Uses file-based date extraction (e.g., "prefix/BTCUSDT-2024-01-01.zip" -> January 1, 2024).

client
HTTP client to use.
bucketName
S3 bucket name.
region
AWS region (e.g., "ap-northeast-1").
prefix
Prefix to search (e.g., "data/spot/daily/klines/BTCUSDT/1m/BTCUSDT-1m-").
dateFormat
Date format in filenames (e.g., "yyyy-MM-dd").
cancellationToken
Cancellation token.
baseUrl
Optional custom base URL for S3-compatible endpoints. If null, uses virtual-hosted style.

戻り値: Min and max dates, or null if no data found or error occurred.

GetDateRangeFromFilesAsync(HttpClient, string, string, string, string, CancellationToken, string) : ValueTask<ValueTuple?<DateTime, DateTime>>

Gets the date range from S3 bucket by listing files. Uses file-based date extraction (e.g., "prefix/BTCUSDT-2024-01-01.zip" -> January 1, 2024).

client
HTTP client to use.
bucketName
S3 bucket name.
region
AWS region (e.g., "ap-northeast-1").
prefix
Prefix to search (e.g., "data/spot/daily/klines/BTCUSDT/1m/BTCUSDT-1m-").
dateFormat
Date format in filenames (e.g., "yyyy-MM-dd").
cancellationToken
Cancellation token.
baseUrl
Optional custom base URL for S3-compatible endpoints. If null, uses virtual-hosted style.

戻り値: Min and max dates, or null if no data found or error occurred.

GetDateRangeFromFoldersAsync(HttpClient, string, string, string, string, CancellationToken, string) : ValueTask<ValueTuple?<DateTime, DateTime>>

Gets the date range from S3 bucket by listing folder prefixes. Uses folder-based date extraction (e.g., "prefix/202401/" -> January 2024).

client
HTTP client to use.
bucketName
S3 bucket name.
region
AWS region (e.g., "ap-northeast-1").
prefix
Prefix to search (e.g., "spot/deals/").
dateFormat
Date format in folder names: "yyyyMM" for monthly, "yyyyMMdd" for daily.
cancellationToken
Cancellation token.
baseUrl
Optional custom base URL for S3-compatible endpoints. If null, uses virtual-hosted style.

戻り値: Min and max dates, or null if no data found or error occurred.

GetDateRangeFromFoldersAsync(HttpClient, string, string, string, string, CancellationToken, string) : ValueTask<ValueTuple?<DateTime, DateTime>>

Gets the date range from S3 bucket by listing folder prefixes. Uses folder-based date extraction (e.g., "prefix/202401/" -> January 2024).

client
HTTP client to use.
bucketName
S3 bucket name.
region
AWS region (e.g., "ap-northeast-1").
prefix
Prefix to search (e.g., "spot/deals/").
dateFormat
Date format in folder names: "yyyyMM" for monthly, "yyyyMMdd" for daily.
cancellationToken
Cancellation token.
baseUrl
Optional custom base URL for S3-compatible endpoints. If null, uses virtual-hosted style.

戻り値: Min and max dates, or null if no data found or error occurred.

GetDateRangeFromFoldersAsync(HttpClient, string, string, string, string, CancellationToken, string) : ValueTask<ValueTuple?<DateTime, DateTime>>

Gets the date range from S3 bucket by listing folder prefixes. Uses folder-based date extraction (e.g., "prefix/202401/" -> January 2024).

client
HTTP client to use.
bucketName
S3 bucket name.
region
AWS region (e.g., "ap-northeast-1").
prefix
Prefix to search (e.g., "spot/deals/").
dateFormat
Date format in folder names: "yyyyMM" for monthly, "yyyyMMdd" for daily.
cancellationToken
Cancellation token.
baseUrl
Optional custom base URL for S3-compatible endpoints. If null, uses virtual-hosted style.

戻り値: Min and max dates, or null if no data found or error occurred.