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

Does YFinance.jl need a key? #25

Closed
rzhli opened this issue Nov 8, 2024 · 4 comments
Closed

Does YFinance.jl need a key? #25

rzhli opened this issue Nov 8, 2024 · 4 comments

Comments

@rzhli
Copy link

rzhli commented Nov 8, 2024

using YFinance

get_prices("AAPL", range="1d", interval="90m")
Stacktrace:
 [1] getproperty(x::HTTP.Exceptions.StatusError, f::Symbol)
   @ Base ./Base.jl:49
 [2] 
   @ YFinance ~/.julia/packages/YFinance/bhSdU/src/Prices.jl:197
 [3] top-level scope
@eohne
Copy link
Owner

eohne commented Nov 8, 2024

Hi @rzhli thanks for opening an issue.
No you don't need a key.
I just checked from my Android and the function runs fine for me.
Do you maybe need a proxy to access the internet?
If so you can set it like this:

create_proxy_settings("http://proxy.xyz.com:8080",user="your username",password="Your Password")

If you don't need a proxy can you see whether Julia can access the internet by running this check please:

using HTTP
res = HTTP.get("https://www.google.com");
res.status==200

What Julia version are you on?

@rzhli
Copy link
Author

rzhli commented Nov 8, 2024

Hi @rzhli thanks for opening an issue. No you don't need a key. I just checked from my Android and the function runs fine for me. Do you maybe need a proxy to access the internet? If so you can set it like this:

create_proxy_settings("http://proxy.xyz.com:8080",user="your username",password="Your Password")

If you don't need a proxy can you see whether Julia can access the internet by running this check please:

using HTTP
res = HTTP.get("https://www.google.com");
res.status==200

What Julia version are you on?

julia> versioninfo()
Julia Version 1.11.1
Commit 8f5b7ca12ad (2024-10-16 10:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 12 × AMD Ryzen 5 5600H with Radeon Graphics
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver3)
Threads: 12 default, 0 interactive, 6 GC (on 12 virtual cores)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 12
  JULIA_PKG_SERVER = https://pkg.julialang.org

I'm using a subscribe URL to access Internet:
圖片
I don't know how to set the proxy in julia

@eohne
Copy link
Owner

eohne commented Nov 8, 2024

I'm not personally familiar with Hiddify or its subscribe URL system. However, to use a proxy with YFinance.jl, you'll need to find the following information from your Hiddify client:

  1. Look in your Hiddify client settings for:

    • HTTP or HTTPS proxy settings
    • The local proxy address (usually something like 127.0.0.1)
    • The port number being used (common ports are 1080, 10809, or 20809)
  2. Once you have these details, you can configure YFinance.jl like this:

    create_proxy_settings("http://127.0.0.1:YOUR_PORT")

    If your setup requires username and password (uncommon for local proxies):

    create_proxy_settings("http://127.0.0.1:YOUR_PORT", user="username", password="password")

Sorry for not being more helpful.

@rzhli
Copy link
Author

rzhli commented Nov 9, 2024

I'm not personally familiar with Hiddify or its subscribe URL system. However, to use a proxy with YFinance.jl, you'll need to find the following information from your Hiddify client:

1. Look in your Hiddify client settings for:
   
   * HTTP or HTTPS proxy settings
   * The local proxy address (usually something like `127.0.0.1`)
   * The port number being used (common ports are 1080, 10809, or 20809)

2. Once you have these details, you can configure YFinance.jl like this:
   ```julia
   create_proxy_settings("http://127.0.0.1:YOUR_PORT")
   ```
   
   
       
         
       
   
         
       
   
       
     
   If your setup requires username and password (uncommon for local proxies):
   ```julia
   create_proxy_settings("http://127.0.0.1:YOUR_PORT", user="username", password="password")
   ```

Sorry for not being more helpful.

seems like problem with network connection, not the package, I'll figure out my self, thanks

@rzhli rzhli closed this as completed Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants