Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] Fix FMP Currency/Crypto Historical Prices #6383

Merged
merged 2 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def get_url_params(symbol: str) -> str:
url_params = f"{symbol}?{query_str}&apikey={api_key}"
url = f"{base_url}/historical-chart/{interval}/{url_params}"
if interval == "1day":
url = f"{base_url}/historical-price-full/crypto/{url_params}"
url = f"{base_url}/historical-price-full/{url_params}"
return url

symbols = query.symbol.split(",")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def get_url_params(symbol: str) -> str:
url_params = f"{symbol}?{query_str}&apikey={api_key}"
url = f"{base_url}/historical-chart/{interval}/{url_params}"
if interval == "1day":
url = f"{base_url}/historical-price-full/forex/{url_params}"
url = f"{base_url}/historical-price-full/{url_params}"
return url

symbols = query.symbol.split(",")
Expand All @@ -108,11 +108,8 @@ def get_url_params(symbol: str) -> str:

async def get_one(symbol):
"""Get data for one symbol."""

url = get_url_params(symbol)

data = []

response = await amake_request(url, **kwargs)

if isinstance(response, dict) and response.get("Error Message"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interactions:
Connection:
- keep-alive
method: GET
uri: https://financialmodelingprep.com/api/v3/historical-price-full/crypto/BTCUSD?apikey=MOCK_API_KEY&from=2023-01-01&interval=1d&to=2023-01-10
uri: https://financialmodelingprep.com/api/v3/historical-price-full/BTCUSD?apikey=MOCK_API_KEY&from=2023-01-01&interval=1d&to=2023-01-10
response:
body:
string: !!binary |
Expand Down Expand Up @@ -48,7 +48,7 @@ interactions:
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 29 Feb 2024 04:42:50 GMT
- Thu, 09 May 2024 15:33:03 GMT
Etag:
- W/"ee3-iGBRI0WlQUT/ED3Q3GcS73lQbMw"
Server:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,23 @@ interactions:
Connection:
- keep-alive
method: GET
uri: https://financialmodelingprep.com/api/v3/historical-price-full/forex/EURUSD?apikey=MOCK_API_KEY&from=2023-01-01&interval=1d&to=2023-01-10
uri: https://financialmodelingprep.com/api/v3/historical-price-full/EURUSD?apikey=MOCK_API_KEY&from=2023-01-01&interval=1d&to=2023-01-10
response:
body:
string: !!binary |
H4sIAAAAAAAAA5WWPW/bMBCG9/wKwbNt3PFbWdsuXVq0TZeig2ILsQvbCvwVBEH+eynWFY/KSWY8
eLj3fBQfv3rJl5uimByet/fNZnJbTD7dfbv7/nEybaur9eHY7NeLqlV++UpRvIRvry2rY932CxBy
BjhDCL8JWvNY77yGc7DSia68Wj+sLmVrZFfeNE+XqlBdcbFpDvWlbLTu6tXyzwciSYmu087N5rQN
igOHcYHTzv/qdDjWy58DHYtVtXto6zAHELYvfK33i3p3DLrQSkT9/FQ9Xh4l7qe6rwPKz9XuVO2f
C4RpIeSkN/TLud7/WG+7Vdu5oeN1Ok4aSp60iJQIaV1ypJEFLV3sTUEbbWT8IzvQon3suCwDuteR
gAbtegIFDVqBQmXexxrKDNb/R+fhdhxuY4hZCW4TyXa0Ddk/pS2GbU0kAlsLG7fOwk46EtgWsCdQ
2EZb8i/lkXYZpMPcPMyGxaw4yh4+Q1mx6UF7U8pa+A+DeZQwDxfHjIymxMg+j63JYBvm5rHVHFst
/MuSCVc5EXsTunFnvcQAI+MOiYmtAxg3cdJBOaMaMTHOJZfLMT/eUtbXKaPMDGXF2hd0XJ8glgxi
jZK4iNoUhxhrZRwXFOiV0eOv19ExnrW+cm/yOkL2DbY0louKMdDqCuiwbhicB1uyflY6bonC1swJ
qAfSAoYy2VhLT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M2jQ14A4o/aiy04LURhTpyNiIklpxrm1r
N3bZgwLaIvb+Tzv8/7l5+wf35VDF+AwAAA==
headers:
Access-Control-Allow-Credentials:
- 'true'
Expand All @@ -44,9 +45,9 @@ interactions:
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 29 Feb 2024 04:42:50 GMT
- Thu, 09 May 2024 15:33:04 GMT
Etag:
- W/"cd0-Rv/ywzhqPUdb7KJ/ZDpUXIC8K1A"
- W/"cf8-QiT4ARSPwS2WpuJ8xk9gvh9vqrg"
Server:
- nginx/1.18.0 (Ubuntu)
Transfer-Encoding:
Expand Down
Loading