mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 13:35:21 +02:00
Data provider simplification, tests, and documentation (#1997)
* Ignore env.test from source control * Simplification of providers interface * Synth tests * Update money to use new find rates method * Remove unused issues code * Additional issue feature removals * Update price data fetching and tests * Update documentation for providers * Security test fixes * Fix self host test * Update synth usage data access * Remove AI pr schema changes
This commit is contained in:
parent
dd75cadebc
commit
f65b93a352
95 changed files with 2014 additions and 1638 deletions
|
@ -2,15 +2,19 @@
|
|||
http_interactions:
|
||||
- request:
|
||||
method: get
|
||||
uri: https://api.synthfinance.com/rates/historical?date=2024-08-01&from=USD&to=MXN
|
||||
uri: https://api.synthfinance.com/rates/historical?date=2024-01-01&from=USD&to=GBP
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ''
|
||||
headers:
|
||||
User-Agent:
|
||||
- Faraday v2.10.0
|
||||
Authorization:
|
||||
- Bearer <SYNTH_API_KEY>
|
||||
X-Source:
|
||||
- maybe_app
|
||||
X-Source-Type:
|
||||
- managed
|
||||
User-Agent:
|
||||
- Faraday v2.12.2
|
||||
Accept-Encoding:
|
||||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
||||
Accept:
|
||||
|
@ -21,29 +25,25 @@ http_interactions:
|
|||
message: OK
|
||||
headers:
|
||||
Date:
|
||||
- Thu, 01 Aug 2024 17:20:28 GMT
|
||||
- Sat, 15 Mar 2025 22:18:46 GMT
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
- chunked
|
||||
Connection:
|
||||
- keep-alive
|
||||
Cf-Ray:
|
||||
- 8ac77fbcc9d013ae-CMH
|
||||
Cf-Cache-Status:
|
||||
- DYNAMIC
|
||||
Cache-Control:
|
||||
- max-age=0, private, must-revalidate
|
||||
Etag:
|
||||
- W/"668c8ac287a5ff6d6a705c35c69823b1"
|
||||
- W/"b0b21c870fe53492404cc5ac258fa465"
|
||||
Referrer-Policy:
|
||||
- strict-origin-when-cross-origin
|
||||
Rndr-Id:
|
||||
- 44367fcb-e5b4-457d
|
||||
Strict-Transport-Security:
|
||||
- max-age=63072000; includeSubDomains
|
||||
Vary:
|
||||
- Accept-Encoding
|
||||
Referrer-Policy:
|
||||
- strict-origin-when-cross-origin
|
||||
Rndr-Id:
|
||||
- ff56c2fe-6252-4b2c
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
|
@ -53,17 +53,29 @@ http_interactions:
|
|||
X-Render-Origin-Server:
|
||||
- Render
|
||||
X-Request-Id:
|
||||
- 61992b01-969b-4af5-8119-9b17e385da07
|
||||
- 8ce9dc85-afbd-437c-b18d-ec788b712334
|
||||
X-Runtime:
|
||||
- '0.369358'
|
||||
- '0.031963'
|
||||
X-Xss-Protection:
|
||||
- '0'
|
||||
Cf-Cache-Status:
|
||||
- DYNAMIC
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=SwRPS1vBsrKtk%2Ftb7Ix8j%2FCWYw9tZgbJxR1FCmotWn%2FIZAE3Ri%2FUwHtvkOSqBq6HN5pLVetfem5hp%2BkqWmD5GRCVho0mp3VgRr3J1tBMwrVK2p50tfpmb3X22Jj%2BOfapq1C22PnN"}],"group":"cf-nel","max_age":604800}'
|
||||
Nel:
|
||||
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
||||
Speculation-Rules:
|
||||
- '"/cdn-cgi/speculation"'
|
||||
Server:
|
||||
- cloudflare
|
||||
Cf-Ray:
|
||||
- 920f6378fe582237-ORD
|
||||
Alt-Svc:
|
||||
- h3=":443"; ma=86400
|
||||
Server-Timing:
|
||||
- cfL4;desc="?proto=TCP&rtt=26670&min_rtt=26569&rtt_var=10167&sent=4&recv=6&lost=0&retrans=0&sent_bytes=2829&recv_bytes=922&delivery_rate=105759&cwnd=181&unsent_bytes=0&cid=f0a872e0b2909c59&ts=188&x=0"
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
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
|
||||
string: '{"data":{"date":"2024-01-01","source":"USD","rates":{"GBP":0.785476}},"meta":{"total_records":1,"credits_used":1,"credits_remaining":249830,"date":"2024-01-01"}}'
|
||||
recorded_at: Sat, 15 Mar 2025 22:18:46 GMT
|
||||
recorded_with: VCR 6.3.1
|
||||
|
|
File diff suppressed because one or more lines are too long
81
test/vcr_cassettes/synth/exchange_rates.yml
Normal file
81
test/vcr_cassettes/synth/exchange_rates.yml
Normal file
File diff suppressed because one or more lines are too long
82
test/vcr_cassettes/synth/health.yml
Normal file
82
test/vcr_cassettes/synth/health.yml
Normal file
|
@ -0,0 +1,82 @@
|
|||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: get
|
||||
uri: https://api.synthfinance.com/user
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ''
|
||||
headers:
|
||||
Authorization:
|
||||
- Bearer <SYNTH_API_KEY>
|
||||
X-Source:
|
||||
- maybe_app
|
||||
X-Source-Type:
|
||||
- managed
|
||||
User-Agent:
|
||||
- Faraday v2.12.2
|
||||
Accept-Encoding:
|
||||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
||||
Accept:
|
||||
- "*/*"
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Date:
|
||||
- Sat, 15 Mar 2025 22:18:47 GMT
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
Connection:
|
||||
- keep-alive
|
||||
Cache-Control:
|
||||
- max-age=0, private, must-revalidate
|
||||
Etag:
|
||||
- W/"4ec3e0a20895d90b1e1241ca67f10ca3"
|
||||
Referrer-Policy:
|
||||
- strict-origin-when-cross-origin
|
||||
Rndr-Id:
|
||||
- 0cab64c9-e312-4bec
|
||||
Strict-Transport-Security:
|
||||
- max-age=63072000; includeSubDomains
|
||||
Vary:
|
||||
- Accept-Encoding
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
X-Permitted-Cross-Domain-Policies:
|
||||
- none
|
||||
X-Render-Origin-Server:
|
||||
- Render
|
||||
X-Request-Id:
|
||||
- 1958563c-7c18-4201-a03c-a4b343dc68ab
|
||||
X-Runtime:
|
||||
- '0.014938'
|
||||
X-Xss-Protection:
|
||||
- '0'
|
||||
Cf-Cache-Status:
|
||||
- DYNAMIC
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=P3OWn4c8LFFWI0Dwr2CSYwHLaNhf9iD9TfAhqdx5PtLoWZ0pSImebfUsh00ZbOmh4r2cRJEQOmvy67wAwl6p0W%2Fx9017EkCnCaXibBBCKqJTBOdGnsSuV%2B45LrHsQmg%2BGeBwrw4b"}],"group":"cf-nel","max_age":604800}'
|
||||
Nel:
|
||||
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
||||
Speculation-Rules:
|
||||
- '"/cdn-cgi/speculation"'
|
||||
Server:
|
||||
- cloudflare
|
||||
Cf-Ray:
|
||||
- 920f637aa8cf1152-ORD
|
||||
Alt-Svc:
|
||||
- h3=":443"; ma=86400
|
||||
Server-Timing:
|
||||
- cfL4;desc="?proto=TCP&rtt=25627&min_rtt=25594&rtt_var=9664&sent=4&recv=6&lost=0&retrans=0&sent_bytes=2827&recv_bytes=878&delivery_rate=111991&cwnd=248&unsent_bytes=0&cid=c8e4c4e269114d14&ts=263&x=0"
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: '{"id":"user_3208c49393f54b3e974795e4bea5b864","email":"test@maybe.co","name":"Test
|
||||
User","plan":"Business","api_calls_remaining":249830,"api_limit":250000,"credits_reset_at":"2025-04-01T00:00:00.000-04:00","current_period_start":"2025-03-01T00:00:00.000-05:00"}'
|
||||
recorded_at: Sat, 15 Mar 2025 22:18:47 GMT
|
||||
recorded_with: VCR 6.3.1
|
105
test/vcr_cassettes/synth/security_info.yml
Normal file
105
test/vcr_cassettes/synth/security_info.yml
Normal file
|
@ -0,0 +1,105 @@
|
|||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: get
|
||||
uri: https://api.synthfinance.com/tickers/AAPL?operating_mic=XNAS
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ''
|
||||
headers:
|
||||
Authorization:
|
||||
- Bearer <SYNTH_API_KEY>
|
||||
X-Source:
|
||||
- maybe_app
|
||||
X-Source-Type:
|
||||
- managed
|
||||
User-Agent:
|
||||
- Faraday v2.12.2
|
||||
Accept-Encoding:
|
||||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
||||
Accept:
|
||||
- "*/*"
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Date:
|
||||
- Sun, 16 Mar 2025 12:04:12 GMT
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
Connection:
|
||||
- keep-alive
|
||||
Cache-Control:
|
||||
- max-age=0, private, must-revalidate
|
||||
Etag:
|
||||
- W/"a9deeb6437d359f080be449b9b2c547b"
|
||||
Referrer-Policy:
|
||||
- strict-origin-when-cross-origin
|
||||
Rndr-Id:
|
||||
- 1e77ae49-050a-45fc
|
||||
Strict-Transport-Security:
|
||||
- max-age=63072000; includeSubDomains
|
||||
Vary:
|
||||
- Accept-Encoding
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
X-Permitted-Cross-Domain-Policies:
|
||||
- none
|
||||
X-Render-Origin-Server:
|
||||
- Render
|
||||
X-Request-Id:
|
||||
- 222dacf1-37f3-4eb8-91d5-edf13d732d46
|
||||
X-Runtime:
|
||||
- '0.059222'
|
||||
X-Xss-Protection:
|
||||
- '0'
|
||||
Cf-Cache-Status:
|
||||
- DYNAMIC
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=%2BLW%2Fd%2BbcNg4%2FleO6ECyB4RJBMbm6vWG3%2FX4oKQXfn1ROSPVrISc3ZFVlXfITGW4XYJSPyUDF%2FXrrRF6p3Wzow07QamOrsux7sxBMvtWmcubgpCMFI4zgnhESklW6KcmAefwrgj9i"}],"group":"cf-nel","max_age":604800}'
|
||||
Nel:
|
||||
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
||||
Speculation-Rules:
|
||||
- '"/cdn-cgi/speculation"'
|
||||
Server:
|
||||
- cloudflare
|
||||
Cf-Ray:
|
||||
- 92141c97bfd9124c-ORD
|
||||
Alt-Svc:
|
||||
- h3=":443"; ma=86400
|
||||
Server-Timing:
|
||||
- cfL4;desc="?proto=TCP&rtt=27459&min_rtt=26850&rtt_var=11288&sent=4&recv=6&lost=0&retrans=0&sent_bytes=2828&recv_bytes=905&delivery_rate=91272&cwnd=104&unsent_bytes=0&cid=ccd6aa7e48e4b0eb&ts=287&x=0"
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: '{"data":{"ticker":"AAPL","name":"Apple Inc.","links":{"homepage_url":"https://www.apple.com"},"logo_url":"https://logo.synthfinance.com/ticker/AAPL","description":"Apple
|
||||
Inc. designs, manufactures, and markets smartphones, personal computers, tablets,
|
||||
wearables, and accessories worldwide. The company offers iPhone, a line of
|
||||
smartphones; Mac, a line of personal computers; iPad, a line of multi-purpose
|
||||
tablets; and wearables, home, and accessories comprising AirPods, Apple TV,
|
||||
Apple Watch, Beats products, and HomePod. It also provides AppleCare support
|
||||
and cloud services; and operates various platforms, including the App Store
|
||||
that allow customers to discover and download applications and digital content,
|
||||
such as books, music, video, games, and podcasts. In addition, the company
|
||||
offers various services, such as Apple Arcade, a game subscription service;
|
||||
Apple Fitness+, a personalized fitness service; Apple Music, which offers
|
||||
users a curated listening experience with on-demand radio stations; Apple
|
||||
News+, a subscription news and magazine service; Apple TV+, which offers exclusive
|
||||
original content; Apple Card, a co-branded credit card; and Apple Pay, a cashless
|
||||
payment service, as well as licenses its intellectual property. The company
|
||||
serves consumers, and small and mid-sized businesses; and the education, enterprise,
|
||||
and government markets. It distributes third-party applications for its products
|
||||
through the App Store. The company also sells its products through its retail
|
||||
and online stores, and direct sales force; and third-party cellular network
|
||||
carriers, wholesalers, retailers, and resellers. Apple Inc. was founded in
|
||||
1976 and is headquartered in Cupertino, California.","kind":"common stock","cik":"0000320193","currency":"USD","address":{"country":"USA","address_line1":"One
|
||||
Apple Park Way","city":"Cupertino","state":"CA","postal_code":"95014"},"exchange":{"name":"Nasdaq/Ngs
|
||||
(Global Select Market)","mic_code":"XNGS","operating_mic_code":"XNAS","acronym":"NGS","country":"United
|
||||
States","country_code":"US","timezone":"America/New_York"},"ceo":"Mr. Timothy
|
||||
D. Cook","founding_year":1976,"industry":"Consumer Electronics","sector":"Technology","phone":"408-996-1010","total_employees":161000,"composite_figi":"BBG000B9Y5X2","market_data":{"high_today":213.95,"low_today":209.58,"open_today":211.25,"close_today":213.49,"volume_today":60060200.0,"fifty_two_week_high":260.1,"fifty_two_week_low":164.08,"average_volume":62848099.37313433,"price_change":0.0,"percent_change":0.0}},"meta":{"credits_used":1,"credits_remaining":249808}}'
|
||||
recorded_at: Sun, 16 Mar 2025 12:04:12 GMT
|
||||
recorded_with: VCR 6.3.1
|
83
test/vcr_cassettes/synth/security_price.yml
Normal file
83
test/vcr_cassettes/synth/security_price.yml
Normal file
|
@ -0,0 +1,83 @@
|
|||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: get
|
||||
uri: https://api.synthfinance.com/tickers/AAPL/open-close?end_date=2024-08-01&operating_mic_code=XNAS&page=1&start_date=2024-08-01
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ''
|
||||
headers:
|
||||
Authorization:
|
||||
- Bearer <SYNTH_API_KEY>
|
||||
X-Source:
|
||||
- maybe_app
|
||||
X-Source-Type:
|
||||
- managed
|
||||
User-Agent:
|
||||
- Faraday v2.12.2
|
||||
Accept-Encoding:
|
||||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
||||
Accept:
|
||||
- "*/*"
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Date:
|
||||
- Sun, 16 Mar 2025 12:08:00 GMT
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
Connection:
|
||||
- keep-alive
|
||||
Cache-Control:
|
||||
- max-age=0, private, must-revalidate
|
||||
Etag:
|
||||
- W/"cdf04c2cd77e230c03117dd13d0921f9"
|
||||
Referrer-Policy:
|
||||
- strict-origin-when-cross-origin
|
||||
Rndr-Id:
|
||||
- e74b3425-0b7c-447d
|
||||
Strict-Transport-Security:
|
||||
- max-age=63072000; includeSubDomains
|
||||
Vary:
|
||||
- Accept-Encoding
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
X-Permitted-Cross-Domain-Policies:
|
||||
- none
|
||||
X-Render-Origin-Server:
|
||||
- Render
|
||||
X-Request-Id:
|
||||
- b906c5e1-18cc-44cc-9085-313ff066a6ce
|
||||
X-Runtime:
|
||||
- '0.544708'
|
||||
X-Xss-Protection:
|
||||
- '0'
|
||||
Cf-Cache-Status:
|
||||
- DYNAMIC
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=dZNe6qCGGI2XGXgByLr69%2FYrDQdy2FLtnXafxJnlsvyVjrRFiCvmbbIzgF5CDgtj9HZ8RC5Rh9jbuEI6hPokpa3Al4FEIAZB5AbfZ9toP%2Bc5muG%2FuBgHR%2FnIZpsWG%2BQKmBPu9MBa"}],"group":"cf-nel","max_age":604800}'
|
||||
Nel:
|
||||
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
||||
Speculation-Rules:
|
||||
- '"/cdn-cgi/speculation"'
|
||||
Server:
|
||||
- cloudflare
|
||||
Cf-Ray:
|
||||
- 921422292d0feacc-ORD
|
||||
Alt-Svc:
|
||||
- h3=":443"; ma=86400
|
||||
Server-Timing:
|
||||
- cfL4;desc="?proto=TCP&rtt=30826&min_rtt=26727&rtt_var=12950&sent=5&recv=6&lost=0&retrans=0&sent_bytes=2827&recv_bytes=970&delivery_rate=108354&cwnd=219&unsent_bytes=0&cid=43c717161effdc57&ts=695&x=0"
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: '{"ticker":"AAPL","currency":"USD","exchange":{"name":"Nasdaq/Ngs (Global
|
||||
Select Market)","mic_code":"XNGS","operating_mic_code":"XNAS","acronym":"NGS","country":"United
|
||||
States","country_code":"US","timezone":"America/New_York"},"prices":[{"date":"2024-08-01","open":224.37,"close":218.36,"high":224.48,"low":217.02,"volume":62501000}],"paging":{"prev":"/tickers/AAPL/open-close?end_date=2024-08-01\u0026operating_mic_code=XNAS\u0026page=\u0026start_date=2024-08-01","next":"/tickers/AAPL/open-close?end_date=2024-08-01\u0026operating_mic_code=XNAS\u0026page=\u0026start_date=2024-08-01","total_records":1,"current_page":1,"per_page":100,"total_pages":1},"meta":{"credits_used":1,"credits_remaining":249807}}'
|
||||
recorded_at: Sun, 16 Mar 2025 12:08:00 GMT
|
||||
recorded_with: VCR 6.3.1
|
File diff suppressed because one or more lines are too long
104
test/vcr_cassettes/synth/security_search.yml
Normal file
104
test/vcr_cassettes/synth/security_search.yml
Normal file
|
@ -0,0 +1,104 @@
|
|||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: get
|
||||
uri: https://api.synthfinance.com/tickers/search?country_code=US&dataset=limited&limit=25&name=AAPL
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ''
|
||||
headers:
|
||||
Authorization:
|
||||
- Bearer <SYNTH_API_KEY>
|
||||
X-Source:
|
||||
- maybe_app
|
||||
X-Source-Type:
|
||||
- managed
|
||||
User-Agent:
|
||||
- Faraday v2.12.2
|
||||
Accept-Encoding:
|
||||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
||||
Accept:
|
||||
- "*/*"
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Date:
|
||||
- Sun, 16 Mar 2025 12:01:58 GMT
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
Connection:
|
||||
- keep-alive
|
||||
Cache-Control:
|
||||
- max-age=0, private, must-revalidate
|
||||
Etag:
|
||||
- W/"3e444869eacbaf17006766a691cc8fdc"
|
||||
Referrer-Policy:
|
||||
- strict-origin-when-cross-origin
|
||||
Rndr-Id:
|
||||
- 2effb56b-f67f-402d
|
||||
Strict-Transport-Security:
|
||||
- max-age=63072000; includeSubDomains
|
||||
Vary:
|
||||
- Accept-Encoding
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
X-Permitted-Cross-Domain-Policies:
|
||||
- none
|
||||
X-Render-Origin-Server:
|
||||
- Render
|
||||
X-Request-Id:
|
||||
- 33470619-5119-4923-b4e0-e9a0eeb532a1
|
||||
X-Runtime:
|
||||
- '0.453770'
|
||||
X-Xss-Protection:
|
||||
- '0'
|
||||
Cf-Cache-Status:
|
||||
- DYNAMIC
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=ayZOlXkCwLgUl%2FrB2%2BlqtqR5HCllubf4HLDipEt3klWKyHS4nilHi9XZ1fiEQWx7xwiRMJZ5EW0Xzm7ISoHWTtEbkgMQHWYQwSTeg30ahFFHK1pkOOnET1fuW1UxiZwlJtq1XZGB"}],"group":"cf-nel","max_age":604800}'
|
||||
Nel:
|
||||
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
||||
Speculation-Rules:
|
||||
- '"/cdn-cgi/speculation"'
|
||||
Server:
|
||||
- cloudflare
|
||||
Cf-Ray:
|
||||
- 921419514e0a6399-ORD
|
||||
Alt-Svc:
|
||||
- h3=":443"; ma=86400
|
||||
Server-Timing:
|
||||
- cfL4;desc="?proto=TCP&rtt=25809&min_rtt=25801&rtt_var=9692&sent=4&recv=6&lost=0&retrans=0&sent_bytes=2829&recv_bytes=939&delivery_rate=111952&cwnd=121&unsent_bytes=0&cid=2beb787f15cd8ab9&ts=610&x=0"
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: '{"data":[{"symbol":"AAPL","name":"Apple Inc.","logo_url":"https://logo.synthfinance.com/ticker/AAPL","currency":"USD","exchange":{"name":"Nasdaq/Ngs
|
||||
(Global Select Market)","mic_code":"XNGS","operating_mic_code":"XNAS","acronym":"NGS","country":"United
|
||||
States","country_code":"US","timezone":"America/New_York"}},{"symbol":"APLY","isin":"US88634T8577","name":"YieldMax
|
||||
AAPL Option Income ETF","logo_url":"https://logo.synthfinance.com/ticker/APLY","currency":"USD","exchange":{"name":"Nyse
|
||||
Arca","mic_code":"ARCX","operating_mic_code":"XNYS","acronym":"NYSE","country":"United
|
||||
States","country_code":"US","timezone":"America/New_York"}},{"symbol":"AAPD","name":"Direxion
|
||||
Daily AAPL Bear 1X ETF","logo_url":"https://logo.synthfinance.com/ticker/AAPD","currency":"USD","exchange":{"name":"Nasdaq/Nms
|
||||
(Global Market)","mic_code":"XNMS","operating_mic_code":"XNAS","acronym":"","country":"United
|
||||
States","country_code":"US","timezone":"America/New_York"}},{"symbol":"AAPU","isin":"US25461A8743","name":"Direxion
|
||||
Daily AAPL Bull 2X Shares","logo_url":"https://logo.synthfinance.com/ticker/AAPU","currency":"USD","exchange":{"name":"Nasdaq/Nms
|
||||
(Global Market)","mic_code":"XNMS","operating_mic_code":"XNAS","acronym":"","country":"United
|
||||
States","country_code":"US","timezone":"America/New_York"}},{"symbol":"AAPB","isin":"XXXXXXXR8842","name":"GraniteShares
|
||||
2x Long AAPL Daily ETF","logo_url":"https://logo.synthfinance.com/ticker/AAPB","currency":"USD","exchange":{"name":"Nasdaq/Ngs
|
||||
(Global Select Market)","mic_code":"XNGS","operating_mic_code":"XNAS","acronym":"NGS","country":"United
|
||||
States","country_code":"US","timezone":"America/New_York"}},{"symbol":"AAPD","isin":"US25461A3041","name":"Direxion
|
||||
Daily AAPL Bear 1X Shares","logo_url":"https://logo.synthfinance.com/ticker/AAPD","currency":"USD","exchange":{"name":"Nasdaq/Ngs
|
||||
(Global Select Market)","mic_code":"XNGS","operating_mic_code":"XNAS","acronym":"NGS","country":"United
|
||||
States","country_code":"US","timezone":"America/New_York"}},{"symbol":"AAPU","isin":"US25461A8743","name":"Direxion
|
||||
Daily AAPL Bull 1.5X Shares","logo_url":"https://logo.synthfinance.com/ticker/AAPU","currency":"USD","exchange":{"name":"Nasdaq/Ngs
|
||||
(Global Select Market)","mic_code":"XNGS","operating_mic_code":"XNAS","acronym":"NGS","country":"United
|
||||
States","country_code":"US","timezone":"America/New_York"}},{"symbol":"AAPJ","isin":"US00037T1034","name":"AAP,
|
||||
Inc.","logo_url":"https://logo.synthfinance.com/ticker/AAPJ","currency":"USD","exchange":{"name":"Otc
|
||||
Pink Marketplace","mic_code":"PINX","operating_mic_code":"OTCM","acronym":"","country":"United
|
||||
States","country_code":"US","timezone":"America/New_York"}}]}'
|
||||
recorded_at: Sun, 16 Mar 2025 12:01:58 GMT
|
||||
recorded_with: VCR 6.3.1
|
82
test/vcr_cassettes/synth/transaction_enrich.yml
Normal file
82
test/vcr_cassettes/synth/transaction_enrich.yml
Normal file
|
@ -0,0 +1,82 @@
|
|||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: get
|
||||
uri: https://api.synthfinance.com/enrich?amount=25.5&city=San%20Francisco&country=US&date=2025-03-16&description=UBER%20EATS&state=CA
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ''
|
||||
headers:
|
||||
Authorization:
|
||||
- Bearer <SYNTH_API_KEY>
|
||||
X-Source:
|
||||
- maybe_app
|
||||
X-Source-Type:
|
||||
- managed
|
||||
User-Agent:
|
||||
- Faraday v2.12.2
|
||||
Accept-Encoding:
|
||||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
||||
Accept:
|
||||
- "*/*"
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Date:
|
||||
- Sun, 16 Mar 2025 12:09:33 GMT
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
Connection:
|
||||
- keep-alive
|
||||
Cache-Control:
|
||||
- max-age=0, private, must-revalidate
|
||||
Etag:
|
||||
- W/"00411c83cfeaade519bcc3e57d9e461e"
|
||||
Referrer-Policy:
|
||||
- strict-origin-when-cross-origin
|
||||
Rndr-Id:
|
||||
- 56a8791d-85ed-4342
|
||||
Strict-Transport-Security:
|
||||
- max-age=63072000; includeSubDomains
|
||||
Vary:
|
||||
- Accept-Encoding
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
X-Permitted-Cross-Domain-Policies:
|
||||
- none
|
||||
X-Render-Origin-Server:
|
||||
- Render
|
||||
X-Request-Id:
|
||||
- 1b35b9c1-0092-40b1-8b70-2bce7c5796af
|
||||
X-Runtime:
|
||||
- '0.884634'
|
||||
X-Xss-Protection:
|
||||
- '0'
|
||||
Cf-Cache-Status:
|
||||
- DYNAMIC
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=qUtB0aWbK%2Fh5W7cV%2FugsUGbWKtJzsf%2FXd5i8cm8KlepEtLyuVPH7XX0fqwzHp43OCWQkGr9r8hRBBSEcx9LWW5vS7%2B1kXCJaKPaTRn%2BWtsEymHg78OHqDcMahwSuy%2FkpSGLWo0or"}],"group":"cf-nel","max_age":604800}'
|
||||
Nel:
|
||||
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
||||
Speculation-Rules:
|
||||
- '"/cdn-cgi/speculation"'
|
||||
Server:
|
||||
- cloudflare
|
||||
Cf-Ray:
|
||||
- 921424681aa4acab-ORD
|
||||
Alt-Svc:
|
||||
- h3=":443"; ma=86400
|
||||
Server-Timing:
|
||||
- cfL4;desc="?proto=TCP&rtt=26975&min_rtt=26633&rtt_var=10231&sent=4&recv=6&lost=0&retrans=0&sent_bytes=2829&recv_bytes=969&delivery_rate=108737&cwnd=210&unsent_bytes=0&cid=318ff675628918e1&ts=1035&x=0"
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: '{"merchant":"Uber Eats","merchant_id":"mer_aea41e7f29ce47b5873f3caf49d5972d","category":"Dining
|
||||
Out","website":"ubereats.com","icon":"https://logo.synthfinance.com/ubereats.com","meta":{"credits_used":1,"credits_remaining":249806}}'
|
||||
recorded_at: Sun, 16 Mar 2025 12:09:33 GMT
|
||||
recorded_with: VCR 6.3.1
|
82
test/vcr_cassettes/synth/usage.yml
Normal file
82
test/vcr_cassettes/synth/usage.yml
Normal file
|
@ -0,0 +1,82 @@
|
|||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: get
|
||||
uri: https://api.synthfinance.com/user
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ''
|
||||
headers:
|
||||
Authorization:
|
||||
- Bearer <SYNTH_API_KEY>
|
||||
X-Source:
|
||||
- maybe_app
|
||||
X-Source-Type:
|
||||
- managed
|
||||
User-Agent:
|
||||
- Faraday v2.12.2
|
||||
Accept-Encoding:
|
||||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
||||
Accept:
|
||||
- "*/*"
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Date:
|
||||
- Sat, 15 Mar 2025 22:18:47 GMT
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
Connection:
|
||||
- keep-alive
|
||||
Cache-Control:
|
||||
- max-age=0, private, must-revalidate
|
||||
Etag:
|
||||
- W/"4ec3e0a20895d90b1e1241ca67f10ca3"
|
||||
Referrer-Policy:
|
||||
- strict-origin-when-cross-origin
|
||||
Rndr-Id:
|
||||
- 54c8ecf9-6858-4db6
|
||||
Strict-Transport-Security:
|
||||
- max-age=63072000; includeSubDomains
|
||||
Vary:
|
||||
- Accept-Encoding
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
X-Permitted-Cross-Domain-Policies:
|
||||
- none
|
||||
X-Render-Origin-Server:
|
||||
- Render
|
||||
X-Request-Id:
|
||||
- a4112cfb-0eac-4e3e-a880-7536d90dcba0
|
||||
X-Runtime:
|
||||
- '0.007036'
|
||||
X-Xss-Protection:
|
||||
- '0'
|
||||
Cf-Cache-Status:
|
||||
- DYNAMIC
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=Rt0BTtrgXzYjWOQFgb%2Bg6N4xKvXtPI66Q251bq9nWtqUhGHo17GmVVAPkutwN7Gisw1RmvYfxYUiMCCxlc4%2BjuHxbU1%2BXr9KHy%2F5pUpLhgLNNrtkqqKOCW4GduODnDbw2I38Rocu"}],"group":"cf-nel","max_age":604800}'
|
||||
Nel:
|
||||
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
||||
Speculation-Rules:
|
||||
- '"/cdn-cgi/speculation"'
|
||||
Server:
|
||||
- cloudflare
|
||||
Cf-Ray:
|
||||
- 920f637d1fe8eb68-ORD
|
||||
Alt-Svc:
|
||||
- h3=":443"; ma=86400
|
||||
Server-Timing:
|
||||
- cfL4;desc="?proto=TCP&rtt=28779&min_rtt=27036&rtt_var=11384&sent=5&recv=6&lost=0&retrans=0&sent_bytes=2828&recv_bytes=878&delivery_rate=107116&cwnd=203&unsent_bytes=0&cid=52bc39ad09dd9eff&ts=145&x=0"
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: '{"id":"user_3208c49393f54b3e974795e4bea5b864","email":"test@maybe.co","name":"Test
|
||||
User","plan":"Business","api_calls_remaining":1200,"api_limit":5000,"credits_reset_at":"2025-04-01T00:00:00.000-04:00","current_period_start":"2025-03-01T00:00:00.000-05:00"}'
|
||||
recorded_at: Sat, 15 Mar 2025 22:18:47 GMT
|
||||
recorded_with: VCR 6.3.1
|
Loading…
Add table
Add a link
Reference in a new issue