1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00

Add security prices provider (Synth integration) (#1039)

* User tickers as primary lookup symbol instead of isin

* Add security price provider

* Fetch security prices in bulk to improve sync performance

* Fetch prices in bulk, better mocking for tests
This commit is contained in:
Zach Gollwitzer 2024-08-01 19:43:23 -04:00 committed by GitHub
parent c70c8b6d86
commit 453a54e5e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 584 additions and 118 deletions

View file

@ -2,13 +2,13 @@
http_interactions:
- request:
method: get
uri: https://api.synthfinance.com/rates/historical?date=<%= Date.current.to_s %>&from=USD&to=MXN
uri: https://api.synthfinance.com/rates/historical?date=2024-08-01&from=USD&to=MXN
body:
encoding: US-ASCII
string: ''
headers:
User-Agent:
- Faraday v2.9.0
- Faraday v2.10.0
Authorization:
- Bearer <SYNTH_API_KEY>
Accept-Encoding:
@ -21,21 +21,21 @@ http_interactions:
message: OK
headers:
Date:
- Wed, 27 Mar 2024 02:54:11 GMT
- Thu, 01 Aug 2024 17:20:28 GMT
Content-Type:
- application/json; charset=utf-8
Content-Length:
- '138'
Transfer-Encoding:
- chunked
Connection:
- keep-alive
Cf-Ray:
- 86ac182ad9ec7ce5-LAX
- 8ac77fbcc9d013ae-CMH
Cf-Cache-Status:
- DYNAMIC
Cache-Control:
- max-age=0, private, must-revalidate
Etag:
- W/"46780d3f34043bb3bc799b1efae62418"
- W/"668c8ac287a5ff6d6a705c35c69823b1"
Strict-Transport-Security:
- max-age=63072000; includeSubDomains
Vary:
@ -43,7 +43,7 @@ http_interactions:
Referrer-Policy:
- strict-origin-when-cross-origin
Rndr-Id:
- 3ca97b82-f963-43a3
- ff56c2fe-6252-4b2c
X-Content-Type-Options:
- nosniff
X-Frame-Options:
@ -53,9 +53,9 @@ http_interactions:
X-Render-Origin-Server:
- Render
X-Request-Id:
- 64731a8c-4cad-4e42-81c9-60b0d3634a0f
- 61992b01-969b-4af5-8119-9b17e385da07
X-Runtime:
- '0.021432'
- '0.369358'
X-Xss-Protection:
- '0'
Server:
@ -64,6 +64,6 @@ http_interactions:
- h3=":443"; ma=86400
body:
encoding: ASCII-8BIT
string: '{"data":{"date":"<%= Date.current.to_s %>","source":"USD","rates":{"MXN":16.64663}},"meta":{"total_records":1,"credits_used":1,"credits_remaining":976}}'
recorded_at: Wed, 27 Mar 2024 02:54:11 GMT
string: '{"data":{"date":"2024-08-01","source":"USD","rates":{"MXN":18.645877}},"meta":{"total_records":1,"credits_used":1,"credits_remaining":248999}}'
recorded_at: Thu, 01 Aug 2024 17:20:28 GMT
recorded_with: VCR 6.2.0

File diff suppressed because one or more lines are too long