Skip to content

Instantly share code, notes, and snippets.

@kenhkan
Created August 9, 2024 18:36
Show Gist options
  • Save kenhkan/f806f75514e9d77defc37fd41ff5ccb5 to your computer and use it in GitHub Desktop.
Save kenhkan/f806f75514e9d77defc37fd41ff5ccb5 to your computer and use it in GitHub Desktop.
# This is fine, with EURCHF at minute-level granularity or greater.
curl -vvvv "https://api.polygon.io/v2/aggs/ticker/C:EURCHF/range/1/minute/1722934161000/1735689600000?cursor=bGltaXQ9NTAwMDAmc29ydD1hc2M&apiKey=<redacted>"
# EURCHF at any second period is always stuck and eventually returns with a 504 Gateway Timeout or 502 Bad Gateway.
curl -vvvv "https://api.polygon.io/v2/aggs/ticker/C:EURCHF/range/1/second/1722934161000/1735689600000?cursor=bGltaXQ9NTAwMDAmc29ydD1hc2M&apiKey=<redacted>"
curl -vvvv "https://api.polygon.io/v2/aggs/ticker/C:EURCHF/range/30/second/1722934161000/1735689600000?cursor=bGltaXQ9NTAwMDAmc29ydD1hc2M&apiKey=<redacted>"
curl -vvvv "https://api.polygon.io/v2/aggs/ticker/C:EURCHF/range/59/second/1722934161000/1735689600000?cursor=bGltaXQ9NTAwMDAmc29ydD1hc2M&apiKey=<redacted>"
# These succeed, as with any other pair at second-level granularity.
curl -vvvv "https://api.polygon.io/v2/aggs/ticker/C:EURJPY/range/1/second/1722934161000/1735689600000?cursor=bGltaXQ9NTAwMDAmc29ydD1hc2M&apiKey=<redacted>"
curl -vvvv "https://api.polygon.io/v2/aggs/ticker/C:EURUSD/range/1/second/1722934161000/1735689600000?cursor=bGltaXQ9NTAwMDAmc29ydD1hc2M&apiKey=<redacted>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment